Make WordPress Core

Opened 8 years ago

Last modified 7 years ago

#38650 new enhancement

Provide some guidance on what conditionals can/should be used in default-filters.php

Reported by: helen's profile helen Owned by:
Milestone: Awaiting Review Priority: low
Severity: minor Version:
Component: Bootstrap/Load Keywords:
Focuses: docs Cc:


There are a lot of things you can't use in default-filters.php, such as get_option() or is_customize_preview(). Those deeply familiar with how load works might have some idea as to what's safe and what isn't, but it's generally confusing and a little opaque. I'd suggest some kind of inline comment at the top explaining the point of the file and what's generally safe (i.e. stuff in load.php as I understand?).

Change History (1)

#1 @DrewAPicture
7 years ago

@helen How specific would you imagine this blurb being? I mean, we can generally outline that the file is loaded after specific files have loaded, e.g. load, class-wp, wp-db, etc. Might also mention that it's effectively loaded before multisite is initialized. I'm not just sure how you envision of the structure of the comment going.

Note: See TracTickets for help on using tickets.