#38650 closed enhancement (fixed)
Provide some guidance on what conditionals can/should be used in default-filters.php
| Reported by: | helen | Owned by: | jorbin |
|---|---|---|---|
| Priority: | low | Milestone: | 6.7 |
| Component: | Bootstrap/Load | Version: | |
| Severity: | minor | Keywords: | has-patch |
| Cc: | Focuses: | docs |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
@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.