Tidy up the mu-plugins loading code to make it more readable.

Fix a couple of other tab/whitespace issues.

git-svn-id: http://svn.automattic.com/wordpress/trunk@12713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2010-01-12 21:28:33 +00:00
parent 346f859e12
commit 6780fa717c
1 changed files with 17 additions and 10 deletions

View File

@ -488,22 +488,29 @@ if ( !defined( 'MUPLUGINDIR' ) )
if ( is_dir( WPMU_PLUGIN_DIR ) ) { if ( is_dir( WPMU_PLUGIN_DIR ) ) {
if ( $dh = opendir( WPMU_PLUGIN_DIR ) ) { if ( $dh = opendir( WPMU_PLUGIN_DIR ) ) {
$mu_plugins = array (); $mu_plugins = array ();
while ( ( $plugin = readdir( $dh ) ) !== false ) while ( ( $plugin = readdir( $dh ) ) !== false ) {
if ( substr( $plugin, -4 ) == '.php' ) if ( substr( $plugin, -4 ) == '.php' ) {
$mu_plugins[] = $plugin; $mu_plugins[] = $plugin;
}
}
closedir( $dh ); closedir( $dh );
if( is_multisite() )
sort( $mu_plugins ); if( is_multisite() )
foreach( $mu_plugins as $mu_plugin ) sort( $mu_plugins );
foreach( $mu_plugins as $mu_plugin ) {
include_once( WPMU_PLUGIN_DIR . '/' . $mu_plugin ); include_once( WPMU_PLUGIN_DIR . '/' . $mu_plugin );
}
} }
} }
/** /**
* Used to load network wide plugins * Used to load network wide plugins
* @since 3.0 * @since 3.0
*/ */
if( is_multisite() ) if( is_multisite() ) {
ms_network_plugins(); ms_network_plugins();
}
do_action('muplugins_loaded'); do_action('muplugins_loaded');
@ -512,15 +519,15 @@ do_action('muplugins_loaded');
* @since 3.0 * @since 3.0
*/ */
if( is_multisite() ) { if( is_multisite() ) {
ms_site_check(); ms_site_check();
ms_network_cookies(); ms_network_cookies();
} }
/** /**
* Used to guarantee unique hash cookies * Used to guarantee unique hash cookies
* @since 1.5 * @since 1.5
*/ */
if( !defined('COOKIEHASH') ) if( !defined('COOKIEHASH') )
define('COOKIEHASH', md5(get_option('siteurl'))); define('COOKIEHASH', md5(get_option('siteurl')));
/** /**
* Should be exactly the same as the default value of SECRET_KEY in wp-config-sample.php * Should be exactly the same as the default value of SECRET_KEY in wp-config-sample.php