WordPress.org

Make WordPress Core

Ticket #15166: patch.patch

File patch.patch, 577 bytes (added by kawauso, 4 years ago)

Use is_network_admin() check before using 'active_plugins' option

  • plugin.php

     
    397397 * @return bool True, if in the active plugins list. False, not in the list. 
    398398 */ 
    399399function is_plugin_active( $plugin ) { 
    400         return in_array( $plugin, (array) get_option( 'active_plugins', array() ) ) || is_plugin_active_for_network( $plugin ); 
     400        return ( !is_network_admin() && in_array( $plugin, (array) get_option( 'active_plugins', array() ) ) ) || is_plugin_active_for_network( $plugin ); 
    401401} 
    402402 
    403403/**