[wp-trac] [WordPress Trac] #11881: setup-config.php step 2 broken
WordPress Trac
wp-trac at lists.automattic.com
Sat Feb 6 04:53:53 UTC 2010
#11881: setup-config.php step 2 broken
-----------------------------+----------------------------------------------
Reporter: sivel | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Upgrade/Install | Version: 3.0
Severity: major | Keywords: has-patch multisite
-----------------------------+----------------------------------------------
Comment(by nacin):
I've been trying to come up with a different approach to default constants
for some time now. I find the current implementation to be a little tough
to follow, and I was never a fan of the $context strings. It's better than
what we had but really it should be obvious exactly what is being defined,
especially when using it outside of wp-settings.php (like in ms-files.php,
script-loader.php...).
So, I came up with this:
{{{
wp_default_constants( 'WP_CONTENT_URL', 'WP_PLUGIN_DIR', 'WP_PLUGIN_URL',
'PLUGINDIR', 'WPMU_PLUGIN_DIR', 'WPMU_PLUGIN_URL', 'MUPLUGINDIR' );
}}}
The code itself in wp_default_constants() is now leaner -- checking
whether the constant is already defined is handled at the top of the
function, not repeatedly throughout -- but it introduces slightly more
drag by looping through those constants in a switch wrapped in a foreach.
I'm not sold on it, but I wanted to propose it and see what was thought
about it.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11881#comment:44>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list