[wp-trac] [WordPress Trac] #41576: Add global filters in options API
WordPress Trac
noreply at wordpress.org
Sun Aug 6 22:37:26 UTC 2017
#41576: Add global filters in options API
--------------------------------+-----------------------------
Reporter: pcfreak30 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------------+-----------------------------
Currently get_option has
{{{#!php
$pre = apply_filters( "pre_option_{$option}", false, $option );
}}}
I would like to see:
{{{#!php
$pre = apply_filters( "pre_option", false, $option );
}}}
and possibly a better filter name. Need this in all option CRUD functions.
Use case is allowing any option to be rerouted without knowing the option
name ahead of time. In my case dealing with any transients. At present I
have to filter the wpdb query hook and do sql rewritng.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41576>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list