[wp-hackers] Admin notices
Rob Miller
rob at bigfish.co.uk
Mon Apr 11 06:20:56 UTC 2011
On 11 Apr 2011, at 07:15, Ryan McCue wrote:
> 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.
>
No need to target 5.3+; you can do anonymous functions in PHP 4.0+:
add_action('admin_notices', create_function('', 'echo "your message";'));
More information about the wp-hackers
mailing list