[wp-trac] [WordPress Trac] #57487: Add support for "development mode"

WordPress Trac noreply at wordpress.org
Tue Jan 31 23:43:38 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 flixos90):

 @azaozz That sounds great to me.

 Though I would suggest we wrap this constant check in a function that also
 has a filter so that we can control it at runtime as well (critical for
 unit tests for example).

 Basically like this:

 {{{
 function wp_development_mode() {
     $development_mode = defined( 'WP_DEVELOPMENT_MODE' ) ?
 WP_DEVELOPMENT_MODE : false;
     return apply_filters( 'wp_development_mode', $development_mode );
 }
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57487#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list