Changeset 12947 for trunk/wp-admin/includes/plugin.php
- Timestamp:
- 02/04/2010 06:50:36 PM (15 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.