Changeset 12947
- Timestamp:
- 02/04/2010 06:50:36 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/plugin.php
r12930 r12947 260 260 */ 261 261 function is_plugin_active( $plugin ) { 262 return in_array( $plugin, apply_filters( 'active_plugins', get_option( 'active_plugins', array() ) ));262 return in_array( $plugin, (array) get_option( 'active_plugins', array() ) ) || is_plugin_active_for_network( $plugin ); 263 263 } 264 264 … … 271 271 * @return bool True, if active for the network, otherwise false. 272 272 */ 273 function is_plugin_active_for_network( $plugin ) {273 function is_plugin_active_for_network( $plugin ) { 274 274 if ( !is_multisite() ) 275 275 return false; … … 554 554 */ 555 555 function validate_active_plugins() { 556 $plugins = apply_filters( 'active_plugins', get_option( 'active_plugins', array()) );556 $plugins = get_option( 'active_plugins', array() ); 557 557 // validate vartype: array 558 558 if ( ! is_array( $plugins ) ) { … … 563 563 if ( is_multisite() && is_super_admin() ) { 564 564 $network_plugins = (array) get_site_option( 'active_sitewide_plugins', array() ); 565 $plugins = array_merge( (array)$plugins, $network_plugins );565 $plugins = array_merge( $plugins, $network_plugins ); 566 566 } 567 567 -
trunk/wp-admin/includes/upgrade.php
r12933 r12947 1099 1099 */ 1100 1100 function upgrade_network() { 1101 global $wp_current_db_version; 1101 1102 // 2.8 1102 1103 if ( $wp_current_db_version < 11549 ) { … … 1111 1112 update_site_option( 'active_sitewide_plugins', $sitewide_plugins ); 1112 1113 } 1113 update_site_option( 'wpmu_sitewide_plugins', '' );1114 update_site_option( 'deactivated_sitewide_plugins', '' );1114 delete_site_option( 'wpmu_sitewide_plugins' ); 1115 delete_site_option( 'deactivated_sitewide_plugins' ); 1115 1116 } 1116 1117 } -
trunk/wp-includes/load.php
r12930 r12947 404 404 function wp_load_plugins() { 405 405 $plugins = array(); 406 407 // Check for hacks file if the option is enabled 408 if ( get_option( 'hack_file' ) && file_exists( ABSPATH . 'my-hacks.php' ) ) 409 $plugins[] = ABSPATH . 'my-hacks.php'; 410 411 $active_plugins = (array) apply_filters( 'active_plugins', get_option( 'active_plugins', array() ) ); 406 $active_plugins = (array) get_option( 'active_plugins', array() ); 412 407 413 408 // Get active network plugins … … 420 415 } 421 416 417 // Check for hacks file if the option is enabled 418 if ( get_option( 'hack_file' ) && file_exists( ABSPATH . 'my-hacks.php' ) ) { 419 _deprecated_file( 'my-hacks.php', '1.5' ); 420 array_unshift( $plugins, ABSPATH . 'my-hacks.php' ); 421 } 422 422 423 if ( empty( $active_plugins ) || defined( 'WP_INSTALLING' ) ) 423 424 return $plugins;
Note: See TracChangeset
for help on using the changeset viewer.