Make WordPress Core


Ignore:
Timestamp:
10/07/2015 05:11:01 PM (9 years ago)
Author:
jeremyfelt
Message:

Revert [34778], continue using _site_option() for the current network.

The _network_option() parameter order will be changing to accept $network_id first. The _site_option() functions will remain in use throughout core as our way of retrieving a network option for the current network.

See #28290.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/plugin.php

    r34825 r34912  
    463463        return false;
    464464
    465     $plugins = get_network_option( 'active_sitewide_plugins' );
     465    $plugins = get_site_option( 'active_sitewide_plugins');
    466466    if ( isset($plugins[$plugin]) )
    467467        return true;
     
    521521    if ( is_multisite() && ( $network_wide || is_network_only_plugin($plugin) ) ) {
    522522        $network_wide = true;
    523         $current = get_network_option( 'active_sitewide_plugins', array() );
     523        $current = get_site_option( 'active_sitewide_plugins', array() );
    524524        $_GET['networkwide'] = 1; // Back compat for plugins looking for this value.
    525525    } else {
     
    574574
    575575        if ( $network_wide ) {
    576             $current = get_network_option( 'active_sitewide_plugins', array() );
     576            $current = get_site_option( 'active_sitewide_plugins', array() );
    577577            $current[$plugin] = time();
    578             update_network_option( 'active_sitewide_plugins', $current );
     578            update_site_option( 'active_sitewide_plugins', $current );
    579579        } else {
    580580            $current = get_option( 'active_plugins', array() );
     
    625625function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) {
    626626    if ( is_multisite() )
    627         $network_current = get_network_option( 'active_sitewide_plugins', array() );
     627        $network_current = get_site_option( 'active_sitewide_plugins', array() );
    628628    $current = get_option( 'active_plugins', array() );
    629629    $do_blog = $do_network = false;
     
    706706        update_option('active_plugins', $current);
    707707    if ( $do_network )
    708         update_network_option( 'active_sitewide_plugins', $network_current );
     708        update_site_option( 'active_sitewide_plugins', $network_current );
    709709}
    710710
     
    878878
    879879    if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) {
    880         $network_plugins = (array) get_network_option( 'active_sitewide_plugins', array() );
     880        $network_plugins = (array) get_site_option( 'active_sitewide_plugins', array() );
    881881        $plugins = array_merge( $plugins, array_keys( $network_plugins ) );
    882882    }
Note: See TracChangeset for help on using the changeset viewer.