Multisite: Rename internal $site_id variables referencing networks to $network_id.

This change improves code clarity by using the current naming conventions for networks.

Props lemacarl.
Fixes #41510.


git-svn-id: https://develop.svn.wordpress.org/trunk@41241 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Felix Arntz
2017-08-12 12:47:38 +00:00
parent 0979d6ebfb
commit 9595e6c38b
5 changed files with 69 additions and 68 deletions

View File

@@ -787,20 +787,20 @@ function choose_primary_blog() {
/**
* Whether or not we can edit this network from this page.
*
* By default editing of network is restricted to the Network Admin for that `$site_id`
* this allows for this to be overridden.
* By default editing of network is restricted to the Network Admin for that `$network_id`.
* This function allows for this to be overridden.
*
* @since 3.1.0
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $site_id The network/site ID to check.
* @param int $network_id The network ID to check.
* @return bool True if network can be edited, otherwise false.
*/
function can_edit_network( $site_id ) {
function can_edit_network( $network_id ) {
global $wpdb;
if ( $site_id == $wpdb->siteid )
if ( $network_id == $wpdb->siteid )
$result = true;
else
$result = false;
@@ -810,10 +810,10 @@ function can_edit_network( $site_id ) {
*
* @since 3.1.0
*
* @param bool $result Whether the network can be edited from this page.
* @param int $site_id The network/site ID to check.
* @param bool $result Whether the network can be edited from this page.
* @param int $network_id The network ID to check.
*/
return apply_filters( 'can_edit_network', $result, $site_id );
return apply_filters( 'can_edit_network', $result, $network_id );
}
/**