[wp-trac] [WordPress Trac] #22251: Helper function to simplify checking for constants

WordPress Trac noreply at wordpress.org
Thu Jan 30 23:20:57 UTC 2014


#22251: Helper function to simplify checking for constants
----------------------------+-----------------------------
 Reporter:  evansolomon     |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Future Release
Component:  Bootstrap/Load  |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:
----------------------------+-----------------------------

Comment (by deepwater wells):

 Are there reasons not to implement a configuration object for this
 explicit purpose? Doing so would keep WP as a single-responsibility object
 (basically a router) while also allowing for the use of magic methods,
 defaults/fallbacks, etc. on config items. It would also allow the config
 object to be instantiated independent of (before) WP.

 The config object (WP_Config?) could be accessible via a WP property (once
 instantiated), like `$wp->config->some_setting`, and/or through functions
 like `wp_config_get('some_setting')`. I think this would be more future-
 proof and intuitive than accessing WP directly. Thoughts?

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


More information about the wp-trac mailing list