[wp-trac] [WordPress Trac] #30947: wp-includes files should not contain hooks
WordPress Trac
noreply at wordpress.org
Mon Jan 12 16:39:40 UTC 2015
#30947: wp-includes files should not contain hooks
----------------------------+--------------------
Reporter: wonderboymusic | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.2
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
----------------------------+--------------------
Comment (by wonderboymusic):
In [changeset:"31168"]:
{{{
#!CommitTicketReference repository="" revision="31168"
There are some random `add_action()` and `add_filter()` calls littered
around some files in `wp-includes/`. These should be moved to `wp-includes
/default-filters.php` with the rest of the registered hooks. It seems like
this was the best practice for awhile and then we randomly stopped. This
file loads way before any of the includes, so the hooks will be registered
for any request that loads WordPress, even `SHORTINIT` - a lot of the
hooks registered won't run anyways (that's already the case).
See #30947.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30947#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list