Make WordPress Core


Ignore:
Timestamp:
08/12/2017 12:47:38 PM (8 years ago)
Author:
flixos90
Message:

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.

File:
1 edited

Legend:

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

    r41219 r41241  
    788788 * Whether or not we can edit this network from this page.
    789789 *
    790  * By default editing of network is restricted to the Network Admin for that `$site_id`
    791  * this allows for this to be overridden.
     790 * By default editing of network is restricted to the Network Admin for that `$network_id`.
     791 * This function allows for this to be overridden.
    792792 *
    793793 * @since 3.1.0
     
    795795 * @global wpdb $wpdb WordPress database abstraction object.
    796796 *
    797  * @param int $site_id The network/site ID to check.
     797 * @param int $network_id The network ID to check.
    798798 * @return bool True if network can be edited, otherwise false.
    799799 */
    800 function can_edit_network( $site_id ) {
     800function can_edit_network( $network_id ) {
    801801    global $wpdb;
    802802
    803     if ( $site_id == $wpdb->siteid )
     803    if ( $network_id == $wpdb->siteid )
    804804        $result = true;
    805805    else
     
    811811     * @since 3.1.0
    812812     *
    813      * @param bool $result  Whether the network can be edited from this page.
    814      * @param int  $site_id The network/site ID to check.
     813     * @param bool $result     Whether the network can be edited from this page.
     814     * @param int  $network_id The network ID to check.
    815815     */
    816     return apply_filters( 'can_edit_network', $result, $site_id );
     816    return apply_filters( 'can_edit_network', $result, $network_id );
    817817}
    818818
Note: See TracChangeset for help on using the changeset viewer.