WordPress.org

Make WordPress Core

Changeset 16833


Ignore:
Timestamp:
12/09/2010 12:36:39 PM (7 years ago)
Author:
nacin
Message:

s/can_edit_site/can_edit_network/g. see #15720.

Location:
trunk/wp-admin
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-ms-users-list-table.php

    r16765 r16833  
    218218                            if ( is_array( $blogs ) ) {
    219219                                foreach ( (array) $blogs as $key => $val ) {
    220                                     if ( !can_edit_site( $val->site_id ) )
     220                                    if ( !can_edit_network( $val->site_id ) )
    221221                                        continue;
    222222                                   
  • trunk/wp-admin/includes/ms.php

    r16764 r16833  
    723723}
    724724/**
    725  * Whether or not we can edit this site from this page
     725 * Whether or not we can edit this network from this page
    726726 *
    727  * By default editing of sites is restricted to the Network Admin for that site_id this allows for this to be overridden
     727 * By default editing of network is restricted to the Network Admin for that site_id this allows for this to be overridden
    728728 *
    729729 * @since 3.1.0
    730  * @param integer $site_id The site id to check.
    731  */
    732 function can_edit_site( $site_id ) {
     730 * @param integer $site_id The network/site id to check.
     731 */
     732function can_edit_network( $site_id ) {
    733733    global $wpdb;
    734734       
     
    738738        $result = false;
    739739   
    740     return apply_filters( 'can_edit_site', $result, $site_id );
     740    return apply_filters( 'can_edit_network', $result, $site_id );
    741741}
    742742?>
  • trunk/wp-admin/network/site-info.php

    r16764 r16833  
    2323
    2424$details = get_blog_details( $id );
    25 if ( !can_edit_site( $details->site_id ) )
     25if ( !can_edit_network( $details->site_id ) )
    2626    wp_die( __( 'You do not have permission to access this page.' ) );
    2727
  • trunk/wp-admin/network/site-options.php

    r16764 r16833  
    2323
    2424$details = get_blog_details( $id );
    25 if ( !can_edit_site( $details->site_id ) )
     25if ( !can_edit_network( $details->site_id ) )
    2626    wp_die( __( 'You do not have permission to access this page.' ) );
    2727
  • trunk/wp-admin/network/site-themes.php

    r16764 r16833  
    3232
    3333$details = get_blog_details( $id );
    34 if ( !can_edit_site( $details->site_id ) )
     34if ( !can_edit_network( $details->site_id ) )
    3535    wp_die( __( 'You do not have permission to access this page.' ) );
    3636
  • trunk/wp-admin/network/site-users.php

    r16764 r16833  
    2929
    3030$details = get_blog_details( $id );
    31 if ( !can_edit_site( $details->site_id ) )
     31if ( !can_edit_network( $details->site_id ) )
    3232    wp_die( __( 'You do not have permission to access this page.' ) );
    3333
Note: See TracChangeset for help on using the changeset viewer.