Make WordPress Core


Ignore:
Timestamp:
08/12/2017 01:10:24 PM (8 years ago)
Author:
flixos90
Message:

Multisite: Remove references to $wpdb->siteid and use get_current_network_id() instead.

Props sathyapulse, spacedmonkey.
Fixes #41507.

File:
1 edited

Legend:

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

    r41241 r41242  
    793793 * @since 3.1.0
    794794 *
    795  * @global wpdb $wpdb WordPress database abstraction object.
    796  *
    797795 * @param int $network_id The network ID to check.
    798796 * @return bool True if network can be edited, otherwise false.
    799797 */
    800798function can_edit_network( $network_id ) {
    801     global $wpdb;
    802 
    803     if ( $network_id == $wpdb->siteid )
     799    if ( $network_id == get_current_network_id() )
    804800        $result = true;
    805801    else
Note: See TracChangeset for help on using the changeset viewer.