From f11e53166ed9597b41e6fcfbcf0ac114694ed8f3 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 9 Dec 2010 12:36:39 +0000 Subject: [PATCH] s/can_edit_site/can_edit_network/g. see #15720. git-svn-id: https://develop.svn.wordpress.org/trunk@16833 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/class-wp-ms-users-list-table.php | 2 +- wp-admin/includes/ms.php | 10 +++++----- wp-admin/network/site-info.php | 2 +- wp-admin/network/site-options.php | 2 +- wp-admin/network/site-themes.php | 2 +- wp-admin/network/site-users.php | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/wp-admin/includes/class-wp-ms-users-list-table.php b/wp-admin/includes/class-wp-ms-users-list-table.php index ff14c26c96..abe3cb4544 100644 --- a/wp-admin/includes/class-wp-ms-users-list-table.php +++ b/wp-admin/includes/class-wp-ms-users-list-table.php @@ -217,7 +217,7 @@ class WP_MS_Users_List_Table extends WP_List_Table { echo ""; if ( is_array( $blogs ) ) { foreach ( (array) $blogs as $key => $val ) { - if ( !can_edit_site( $val->site_id ) ) + if ( !can_edit_network( $val->site_id ) ) continue; $path = ( $val->path == '/' ) ? '' : $val->path; diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php index f45a83d31d..90bb09a730 100644 --- a/wp-admin/includes/ms.php +++ b/wp-admin/includes/ms.php @@ -722,14 +722,14 @@ function revoke_super_admin( $user_id ) { return false; } /** - * Whether or not we can edit this site from this page + * Whether or not we can edit this network from this page * - * By default editing of sites 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 site_id this allows for this to be overridden * * @since 3.1.0 - * @param integer $site_id The site id to check. + * @param integer $site_id The network/site id to check. */ -function can_edit_site( $site_id ) { +function can_edit_network( $site_id ) { global $wpdb; if ($site_id == $wpdb->siteid ) @@ -737,6 +737,6 @@ function can_edit_site( $site_id ) { else $result = false; - return apply_filters( 'can_edit_site', $result, $site_id ); + return apply_filters( 'can_edit_network', $result, $site_id ); } ?> diff --git a/wp-admin/network/site-info.php b/wp-admin/network/site-info.php index bff04e2bce..4e7679005f 100644 --- a/wp-admin/network/site-info.php +++ b/wp-admin/network/site-info.php @@ -22,7 +22,7 @@ if ( ! $id ) wp_die( __('Invalid site ID.') ); $details = get_blog_details( $id ); -if ( !can_edit_site( $details->site_id ) ) +if ( !can_edit_network( $details->site_id ) ) wp_die( __( 'You do not have permission to access this page.' ) ); $is_main_site = is_main_site( $id ); diff --git a/wp-admin/network/site-options.php b/wp-admin/network/site-options.php index 31a4796062..b1a3912cba 100644 --- a/wp-admin/network/site-options.php +++ b/wp-admin/network/site-options.php @@ -22,7 +22,7 @@ if ( ! $id ) wp_die( __('Invalid site ID.') ); $details = get_blog_details( $id ); -if ( !can_edit_site( $details->site_id ) ) +if ( !can_edit_network( $details->site_id ) ) wp_die( __( 'You do not have permission to access this page.' ) ); $is_main_site = is_main_site( $id ); diff --git a/wp-admin/network/site-themes.php b/wp-admin/network/site-themes.php index 6b72e3d6b8..3c47634e8f 100644 --- a/wp-admin/network/site-themes.php +++ b/wp-admin/network/site-themes.php @@ -31,7 +31,7 @@ if ( ! $id ) $wp_list_table->prepare_items(); $details = get_blog_details( $id ); -if ( !can_edit_site( $details->site_id ) ) +if ( !can_edit_network( $details->site_id ) ) wp_die( __( 'You do not have permission to access this page.' ) ); $is_main_site = is_main_site( $id ); diff --git a/wp-admin/network/site-users.php b/wp-admin/network/site-users.php index 3c3b940fb4..481404e820 100644 --- a/wp-admin/network/site-users.php +++ b/wp-admin/network/site-users.php @@ -28,7 +28,7 @@ if ( ! $id ) wp_die( __('Invalid site ID.') ); $details = get_blog_details( $id ); -if ( !can_edit_site( $details->site_id ) ) +if ( !can_edit_network( $details->site_id ) ) wp_die( __( 'You do not have permission to access this page.' ) ); $is_main_site = is_main_site( $id );