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

Props sathyapulse, spacedmonkey.
Fixes #41507.


git-svn-id: https://develop.svn.wordpress.org/trunk@41242 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Felix Arntz
2017-08-12 13:10:24 +00:00
parent 9595e6c38b
commit 440c8692e3
8 changed files with 14 additions and 43 deletions
+1 -5
View File
@@ -792,15 +792,11 @@ function choose_primary_blog() {
*
* @since 3.1.0
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $network_id The network ID to check.
* @return bool True if network can be edited, otherwise false.
*/
function can_edit_network( $network_id ) {
global $wpdb;
if ( $network_id == $wpdb->siteid )
if ( $network_id == get_current_network_id() )
$result = true;
else
$result = false;