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

WordPress Trac noreply at wordpress.org
Fri Jul 14 18:50:48 UTC 2023


#57487: Add support for "development mode"
-------------------------------------------------+-------------------------
 Reporter:  azaozz                               |       Owner:  flixos90
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.3
Component:  General                              |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-dev-  |     Focuses:
  note                                           |
-------------------------------------------------+-------------------------
Changes (by azaozz):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 Replying to [comment:50 peterwilsoncc]:

 > Introduce the utility function `wp_in_development_mode()` allowing
 developers to detect the mode via a parameter.

 Hmm, think that's not quite ready. Seems `wp_in_development_mode()` lacks
 the ability to detect "any" dev. mode. I.e. a possible (desirable) future
 use of development mode would be to do strict checks, and throw more fatal
 errors. That should be enabled in "any" dev. mode.

 Maybe add:

 {{{
 if ( 'any' === $mode ) {
     return true;
 }
 }}}

 just under the `if empty()` check.

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


More information about the wp-trac mailing list