[wp-trac] [WordPress Trac] #50896: Add filters to wp_get_environment_type()

WordPress Trac noreply at wordpress.org
Thu Aug 13 13:08:41 UTC 2020


#50896: Add filters to wp_get_environment_type()
----------------------------+------------------------------
 Reporter:  crstauf         |       Owner:  (none)
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Bootstrap/Load  |     Version:  5.5
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:
----------------------------+------------------------------

Comment (by chesio):

 Environment type should be constant, it simply feels bad to think about it
 as a filterable value that can potentially change multiple times during
 single request.

 > Setting the environment default to "development" means that whenever a
 new development environment is created, the code runs in its safest mode
 from the start, even without explicitly defining WP_ENVIRONMENT_TYPE
 constant.

 I would argue that **production is the safest mode**. I would prefer any
 of my development websites to accidentally run in production mode than any
 of my production websites to accidentally run in development mode :-) In
 production HTTPS is forced, regular code integrity checks are run, assets
 are optimized etc...

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


More information about the wp-trac mailing list