[wp-hackers] new filter hook in get_option()
Leo germani
leogermani at gmail.com
Fri Oct 15 14:27:36 UTC 2010
Hi all,
Ive submited a patch to create a new filter hook in get_option() function.
I think its very useful and completely harmless, so I would like to ask if
you guys can have a look and share opinions here.
the description:
Current filter 'pre_option_$option' does not pass the option name as a
parameter, so you need to have one specific function for each option you
want to filter. This does not allow you to filter dynamically created
options, nor lets you filter all options if you want to do so.
My patch creates a new filter called 'get_option' which passes the
parameters 'option_name' and the 'default_value', so you can have one filter
to filter many options.
http://core.trac.wordpress.org/ticket/15054
Leo,,
--
leogermani.pirex.com.br
leogermani.estudiolivre.org
More information about the wp-hackers
mailing list