[wp-trac] [WordPress Trac] #38650: Provide some guidance on what conditionals can/should be used in default-filters.php
WordPress Trac
noreply at wordpress.org
Sat Aug 31 15:05:41 UTC 2024
#38650: Provide some guidance on what conditionals can/should be used in default-
filters.php
----------------------------+---------------------
Reporter: helen | Owner: jorbin
Type: enhancement | Status: closed
Priority: low | Milestone: 6.7
Component: Bootstrap/Load | Version:
Severity: minor | Resolution: fixed
Keywords: has-patch | Focuses: docs
----------------------------+---------------------
Comment (by utech1):
In `default-filters.php`, you can't use functions like `get_option()` or
`is_customize_preview()` due to how loading works. It's often confusing,
so adding an inline comment at the top explaining the file's purpose and
what functions are safe to use (like those in `load.php`) would be
helpful.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38650#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list