[wp-trac] [WordPress Trac] #15054: Add filter hook to get_option
WordPress Trac
wp-trac at lists.automattic.com
Fri Oct 15 15:38:12 UTC 2010
#15054: Add filter hook to get_option
-------------------------+--------------------------------------------------
Reporter: leogermani | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: General | Version: 3.1
Severity: normal | Resolution: worksforme
Keywords: has-patch |
-------------------------+--------------------------------------------------
Comment(by leogermani):
I wanted it to use in a multi language plugin Im writing.
For instance, I want to filter all options, and, if Im visiting other
language than the default, I will return 'myplugin_$language_$option'
value instead of $option value.
Using current_filter() is a valid workaround. The only thing is that I
have to do a foreach in all existing opions to add a filter for each one.
Anyways, current_filter is fine
cheers
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15054#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list