Make WordPress Core


Ignore:
Timestamp:
10/02/2015 07:07:23 PM (8 years ago)
Author:
jeremyfelt
Message:

MS: Use *_network_option() functions throughout core.

Replaces all uses of *_site_option() with the corresponding "network" function.

This excludes one usage in wp-admin/admin-footer.php that needs more investigation.

Props spacedmonkey.
See #28290.

File:
1 edited

Legend:

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

    r34566 r34778  
    467467        return false;
    468468
    469     $plugins = get_site_option( 'active_sitewide_plugins');
     469    $plugins = get_network_option( 'active_sitewide_plugins' );
    470470    if ( isset($plugins[$plugin]) )
    471471        return true;
     
    525525    if ( is_multisite() && ( $network_wide || is_network_only_plugin($plugin) ) ) {
    526526        $network_wide = true;
    527         $current = get_site_option( 'active_sitewide_plugins', array() );
     527        $current = get_network_option( 'active_sitewide_plugins', array() );
    528528        $_GET['networkwide'] = 1; // Back compat for plugins looking for this value.
    529529    } else {
     
    578578
    579579        if ( $network_wide ) {
    580             $current = get_site_option( 'active_sitewide_plugins', array() );
     580            $current = get_network_option( 'active_sitewide_plugins', array() );
    581581            $current[$plugin] = time();
    582             update_site_option( 'active_sitewide_plugins', $current );
     582            update_network_option( 'active_sitewide_plugins', $current );
    583583        } else {
    584584            $current = get_option( 'active_plugins', array() );
     
    629629function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) {
    630630    if ( is_multisite() )
    631         $network_current = get_site_option( 'active_sitewide_plugins', array() );
     631        $network_current = get_network_option( 'active_sitewide_plugins', array() );
    632632    $current = get_option( 'active_plugins', array() );
    633633    $do_blog = $do_network = false;
     
    710710        update_option('active_plugins', $current);
    711711    if ( $do_network )
    712         update_site_option( 'active_sitewide_plugins', $network_current );
     712        update_network_option( 'active_sitewide_plugins', $network_current );
    713713}
    714714
     
    882882
    883883    if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) {
    884         $network_plugins = (array) get_site_option( 'active_sitewide_plugins', array() );
     884        $network_plugins = (array) get_network_option( 'active_sitewide_plugins', array() );
    885885        $plugins = array_merge( $plugins, array_keys( $network_plugins ) );
    886886    }
Note: See TracChangeset for help on using the changeset viewer.