[wp-trac] [WordPress Trac] #58484: Always use wp_get_environment_type in all sources

WordPress Trac noreply at wordpress.org
Thu Jun 8 08:05:12 UTC 2023


#58484: Always use wp_get_environment_type in all sources
----------------------------+-----------------------------
 Reporter:  ramon fincken   |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Bootstrap/Load  |    Version:  trunk
 Severity:  normal          |   Keywords:  has-patch
  Focuses:                  |
----------------------------+-----------------------------
 This is a follow up on https://core.trac.wordpress.org/ticket/55741

 where we need to have just a single function to be called which determines
 the environment type.

 As wp-admin/includes/class-wp-debug-data.php is already using:

 {{{
 $environment_type       = wp_get_environment_type();
 }}}

 and later on:
 this happens

 {{{
                 // Check WP_ENVIRONMENT_TYPE.
                 if ( defined( 'WP_ENVIRONMENT_TYPE' ) &&
 WP_ENVIRONMENT_TYPE ) {
                         $wp_environment_type = WP_ENVIRONMENT_TYPE;
                 } else {
                         $wp_environment_type = __( 'Undefined' );
                 }
 }}}

 so this is not the same as what happens at wp_get_environment_type();

 So this ticket is where we remove that lines of code.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58484>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list