[wp-hackers] anonymous functions for do_action and apply_filters
Leo germani
leogermani at gmail.com
Mon Dec 20 20:43:00 UTC 2010
Hi there,
have any of you guys discussed about adding the possibility to use php
anonymous functions [1] with the hooks?
I mean something like:
add_filter('the_title', function($title) { return '<b>'. $title. '</b>'; });
instead of declaring a function and passing its name as a paramenter to
add_filter and add_action.
What you think about it?
Leo,,
[1] http://php.net/manual/en/functions.anonymous.php
--
leogermani.pirex.com.br
leogermani.estudiolivre.org
More information about the wp-hackers
mailing list