[wp-hackers] How to send notification messages in wordpress?

Gaurav Aggarwal gaurav91.2008 at gmail.com
Fri Mar 11 15:17:18 UTC 2011


Try admin Widgets

On Fri, Mar 11, 2011 at 8:26 PM, Dougal Campbell <dougal at gunters.org> wrote:
> On Mar 10 2011 6:05 AM, john wrote:
>>
>> Is there anything comparable to cakePHP's setFlash in WP? I've got a
>> multiform plugin and I simply want to notify users of their actions inside a
>> div at the top of each page. Any Ideas how to go about this? I've read a
>> little about WP_Error, but these aren't error messages... merely things like
>> "Image Upload Successful!" etc.
>>
> Hook into the 'admin_notices' action, and output a div with class
> 'update-nag'.
>
> add_action('admin_notices', 'my_alert');
> function my_alert() {
>  echo "<div class='update-nag'>Git 'er done!</div>";
> }
>
>
> --
> Dougal Campbell <dougal at gunters.org>
> http://dougal.gunters.org/
> http://twitter.com/dougal
> http://twitual.com/
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
regards,

Gaurav Aggarwal
IIIrd year student
Computers Engineering
Delhi College of Engineering


More information about the wp-hackers mailing list