[wp-trac] [WordPress Trac] #38929: WP_Hook should support filters added manually through `advanced-cache.php`
WordPress Trac
noreply at wordpress.org
Tue Nov 29 02:03:16 UTC 2016
#38929: WP_Hook should support filters added manually through `advanced-cache.php`
-------------------------------------------+-----------------------
Reporter: dd32 | Owner: dd32
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.7
Component: Plugins | Version: trunk
Severity: normal | Resolution:
Keywords: commit has-patch dev-reviewed | Focuses:
-------------------------------------------+-----------------------
Comment (by rmccue):
Replying to [comment:3 azaozz]:
> Replying to [comment:1 dd32]:
> > ...anyone modifying `$wp_filter` directly shouldn't probably be doing
so anyway after WordPress loads.
>
> Don't think anybody should be modifying `$wp_filter` directly in any
case. Do you think it is a good idea to add "Doing it wrong..." somewhere?
Perhaps in `WP_Hook::build_preinitialized_hooks()` as it exists to fix
that "bad behavior".
Marking it with deprecation for cache drop-ins would be a good idea, IMO.
I don't think it should trigger that for hooks declared before WP is
loaded though, since there's no alternative to setting `$wp_filter` if WP
hasn't yet loaded.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38929#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list