WordPress.org

Make WordPress Core

Changeset 12713


Ignore:
Timestamp:
01/12/2010 09:28:33 PM (10 years ago)
Author:
westi
Message:

Tidy up the mu-plugins loading code to make it more readable.
Fix a couple of other tab/whitespace issues.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-settings.php

    r12688 r12713  
    489489    if ( $dh = opendir( WPMU_PLUGIN_DIR ) ) {
    490490        $mu_plugins = array ();
    491         while ( ( $plugin = readdir( $dh ) ) !== false )
    492             if ( substr( $plugin, -4 ) == '.php' )
     491        while ( ( $plugin = readdir( $dh ) ) !== false ) {
     492            if ( substr( $plugin, -4 ) == '.php' ) {
    493493                $mu_plugins[] = $plugin;
     494            }
     495        }
     496       
    494497        closedir( $dh );
    495                 if( is_multisite() )
    496                 sort( $mu_plugins );
    497         foreach( $mu_plugins as $mu_plugin )
     498
     499        if( is_multisite() )
     500            sort( $mu_plugins );
     501       
     502        foreach( $mu_plugins as $mu_plugin ) {
    498503            include_once( WPMU_PLUGIN_DIR . '/' . $mu_plugin );
     504        }
    499505    }
    500506}
     
    503509 * @since 3.0
    504510 */
    505 if( is_multisite() )
    506         ms_network_plugins();
     511if( is_multisite() ) {
     512    ms_network_plugins();
     513}
    507514
    508515do_action('muplugins_loaded');
     
    513520 */
    514521if( is_multisite() ) {
    515     ms_site_check();
    516     ms_network_cookies();
     522    ms_site_check();
     523    ms_network_cookies();
    517524}
    518525/**
     
    521528 */
    522529if( !defined('COOKIEHASH') )
    523         define('COOKIEHASH', md5(get_option('siteurl')));
     530    define('COOKIEHASH', md5(get_option('siteurl')));
    524531
    525532/**
Note: See TracChangeset for help on using the changeset viewer.