[wp-hackers] Admin notices

Ryan McCue lists at rotorised.com
Mon Apr 11 06:15:57 UTC 2011

John 3:16 Media wrote:
> Give me some credit, I understand the concept of a hook.
> What I am saying is simply in the case of the admin_notices hook I'd imagine
> most the time each function hooked in to it is 99% the same, just different
> text.

If you *really* don't like the concept of hooking a function in, you
could always target PHP 5.3+ and use anonymous functions:

    add_action('admin_notices', function () {
        echo 'your message';

Not something I'd use personally, but the option is available.

Ryan McCue

More information about the wp-hackers mailing list