#38650 closed enhancement (fixed)
Provide some guidance on what conditionals can/should be used in default-filters.php
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.7 | Priority: | low |
Severity: | minor | Version: | |
Component: | Bootstrap/Load | Keywords: | has-patch |
Focuses: | docs | Cc: |
Description
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?).
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
@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.