Tidy up the mu-plugins loading code to make it more readable.
Fix a couple of other tab/whitespace issues. git-svn-id: https://develop.svn.wordpress.org/trunk@12713 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d0f31a991c
commit
f3096d0ecb
@ -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() )
|
if( is_multisite() )
|
||||||
sort( $mu_plugins );
|
sort( $mu_plugins );
|
||||||
foreach( $mu_plugins as $mu_plugin )
|
|
||||||
|
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');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user