Changeset 12930 for trunk/wp-includes/load.php
- Timestamp:
- 02/02/2010 09:41:17 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/load.php
r12888 r12930 375 375 * @return array Files to include 376 376 */ 377 function wp_ muplugins_to_load() {377 function wp_load_mu_plugins() { 378 378 $mu_plugins = array(); 379 379 if ( !is_dir( WPMU_PLUGIN_DIR ) ) … … 402 402 * @return array Files to include 403 403 */ 404 function wp_ plugins_to_load() {404 function wp_load_plugins() { 405 405 $plugins = array(); 406 406 … … 409 409 $plugins[] = ABSPATH . 'my-hacks.php'; 410 410 411 $active_plugins = apply_filters( 'active_plugins', get_option( 'active_plugins', array() ) ); 412 if ( !is_array( $active_plugins ) || defined( 'WP_INSTALLING' ) ) 411 $active_plugins = (array) apply_filters( 'active_plugins', get_option( 'active_plugins', array() ) ); 412 413 // Get active network plugins 414 if ( is_multisite() ) { 415 $active_sitewide_plugins = (array) get_site_option( 'active_sitewide_plugins', array() ); 416 if ( !empty($active_sitewide_plugins) ) { 417 $active_plugins = array_merge( $active_plugins, array_keys( $active_sitewide_plugins ) ); 418 sort( $active_plugins ); 419 } 420 } 421 422 if ( empty( $active_plugins ) || defined( 'WP_INSTALLING' ) ) 413 423 return $plugins; 424 414 425 foreach ( $active_plugins as $plugin ) { 415 if ( validate_file( $plugin ) // $plugin must validate as file416 || '.php' != substr( $plugin, -4 ) // $plugin must end with '.php'417 || !file_exists( WP_PLUGIN_DIR . '/' . $plugin ) // $plugin must exist426 if ( ! validate_file( $plugin ) // $plugin must validate as file 427 && '.php' == substr( $plugin, -4 ) // $plugin must end with '.php' 428 && file_exists( WP_PLUGIN_DIR . '/' . $plugin ) // $plugin must exist 418 429 ) 419 continue;420 430 $plugins[] = WP_PLUGIN_DIR . '/' . $plugin; 421 431 }
Note: See TracChangeset
for help on using the changeset viewer.