[wp-trac] [WordPress Trac] #58855: Fix and enhance wp_in_development_mode() to be able to return whether a development mode is beiung used

WordPress Trac noreply at wordpress.org
Thu Jul 20 21:24:54 UTC 2023


#58855: Fix and enhance wp_in_development_mode() to be able to return whether a
development mode is beiung used
-------------------------+---------------------
 Reporter:  azaozz       |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  6.4
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+---------------------

Comment (by azaozz):

 Replying to [comment:5 costdev]:
 > Some possible configurations that may help clarify the differences

 Yep, thanks.

 > From what I can tell, these changes to `wp_is_development_mode()` should
 suffice:
 > - Make `$mode` optional with a default value of `null`.
 > - Change the first guard to:
 > {{{#!php
 > if ( empty( $current_mode ) ) {
 >     return '' === $mode;
 > }
 > }}}

 Yep, or check for `null` like in the linked PR. Both ways would be fine
 imho.

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


More information about the wp-trac mailing list