WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/07/2015 05:11:01 PM (5 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-includes/capabilities-functions.php

    r34778 r34912  
    337337        if ( is_multisite() ) {
    338338            // update_, install_, and delete_ are handled above with is_super_admin().
    339             $menu_perms = get_network_option( 'menu_items', array() );
     339            $menu_perms = get_site_option( 'menu_items', array() );
    340340            if ( empty( $menu_perms['plugins'] ) )
    341341                $caps[] = 'manage_network_plugins';
     
    353353        if ( !is_multisite() )
    354354            $caps[] = $cap;
    355         elseif ( is_super_admin( $user_id ) || get_network_option( 'add_new_users' ) )
     355        elseif ( is_super_admin( $user_id ) || get_site_option( 'add_new_users' ) )
    356356            $caps[] = $cap;
    357357        else
     
    579579        return $super_admins;
    580580    else
    581         return get_network_option( 'site_admins', array('admin') );
     581        return get_site_option( 'site_admins', array('admin') );
    582582}
    583583
Note: See TracChangeset for help on using the changeset viewer.