[wp-trac] [WordPress Trac] #57487: Add support for "development mode"
WordPress Trac
noreply at wordpress.org
Mon Jan 30 21:43:20 UTC 2023
#57487: Add support for "development mode"
-------------------------+-----------------------------
Reporter: azaozz | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: General | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+-----------------------------
Comment (by azaozz):
Replying to [comment:12 flixos90]:
> Reading through the conversation here, it seems we are mixing up
environment and development mode
Yes, exactly my thoughts! You explained it better :)
> This leads me to think we need something closer to maybe a
`WP_DEVELOPMENT_MODE` constant, which for example could be set to
something like `core`, `plugin`, `theme`. By default it could be either
not set, or an empty string, signifying that no particular development
mode at all should be used.
Yep, also thinking a constant would be best. Would probably be good to
have it always set, like `WP_DEBUG`, as presumably `WP_DEVELOPMENT_MODE`
will make WP a lot "noisier", even probably throwing fatal errors with
backtrace when needed, etc. It can work with `core`, `plugin`, `theme`,
`false` so checking it could be:
{{{
if ( WP_DEVELOPMENT_MODE ) {
...
}}}
{{{
if ( 'theme' === WP_DEVELOPMENT_MODE ) {
...
}}}
{{{
if ( 'core' !== WP_DEVELOPMENT_MODE ) {
...
}}}
etc.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57487#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list