[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:16:13 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:3 SergeyBiryukov]:
 > Just to clarify, what would be the difference between:
 >
 > * `wp_is_development_mode()` returning `true` (or
 `wp_get_development_mode()` returning a non-empty value)
 > * `wp_get_environment_type()` returning `'development'`
 > * `WP_DEBUG` set to `true`
 >
 > This already looks a bit confusing to me :)

 Yea, sorry about that. There will be no difference between
 `wp_is_development_mode()` (no param) and `(bool)
 wp_get_development_mode()`  This ticket is just to make
 `wp_is_development_mode()` the best way to check whether dev. mode is
 enabled and a bit more consistent.

 Afaik the environment_type refers more to the server settings, etc. not to
 how WP would handle errors and warnings. WP_DEBUG may be used (and is
 used) in different cases and different environments. Some sites (without
 staging?) may perhaps enable it temporarily for debugging/to log errors.

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


More information about the wp-trac mailing list