Allow to read wp-config.php without loading WP
|Reported by:||hakre||Owned by:||anonymous|
|Severity:||normal||Keywords:||has-patch tested commit dev-feedback|
Normaly WordPress is configured by it's configuration file. It contains a bare minimum of configuration values and there are a lot of additional configuration values that help to properly use WordPress.
One compontent of WordPress, namely the load-scripts.php file, does not reflect these settings.
Because wp-config.php (the configuration file) includes wp-settings.php which bootstraps nearly the whole wordpress frontend, seperation is hard to achieve.
it should be vice-versa. wp-config.php should contain the config values (as it is) and that file should be included. if additional includes should be needed by the main program flow, those can be included afterwards. there is no need that the config file includes further program code.
this should not be so hard to achieve because there because as far as I've seen there is only one place where wp-settings.php is actually included (wp-load.php).
removing the include command from wp-settings.php and putting it into wp-load.php directly after the include of wp-settings.php should create the base to include wp-settings.php in other files like wp-admin/load-scripts.php.
load-scripts.php can then reflect the setting of configuration constants like SCRIPT_DEBUG
Change History (22)
- Keywords dev-feedback added; 2nd-opinion removed
- Milestone changed from Unassigned to 2.8
- Summary changed from Problem: wp-admin/load-scripts.php can not use User-Configuration to Allow to read wp-config.php without loading WP
- Milestone 2.8 deleted
- Resolution set to wontfix
- Status changed from new to closed
- Milestone set to 2.8
- Resolution wontfix deleted
- Status changed from closed to reopened