diff -r c7c34916027a -r 177826044cd9 wp/wp-admin/network/sites.php --- a/wp/wp-admin/network/sites.php Mon Oct 14 18:06:33 2019 +0200 +++ b/wp/wp-admin/network/sites.php Mon Oct 14 18:28:13 2019 +0200 @@ -10,43 +10,48 @@ /** Load WordPress Administration Bootstrap */ require_once( dirname( __FILE__ ) . '/admin.php' ); -if ( ! current_user_can( 'manage_sites' ) ) +if ( ! current_user_can( 'manage_sites' ) ) { wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); +} $wp_list_table = _get_list_table( 'WP_MS_Sites_List_Table' ); -$pagenum = $wp_list_table->get_pagenum(); +$pagenum = $wp_list_table->get_pagenum(); -$title = __( 'Sites' ); +$title = __( 'Sites' ); $parent_file = 'sites.php'; add_screen_option( 'per_page' ); -get_current_screen()->add_help_tab( array( - 'id' => 'overview', - 'title' => __('Overview'), - 'content' => - '

' . __('Add New takes you to the Add New Site screen. You can search for a site by Name, ID number, or IP address. Screen Options allows you to choose how many sites to display on one page.') . '

' . - '

' . __('This is the main table of all sites on this network. Switch between list and excerpt views by using the icons above the right side of the table.') . '

' . - '

' . __('Hovering over each site reveals seven options (three for the primary site):') . '

' . - '' . - '

' . __('The site ID is used internally, and is not shown on the front end of the site or to users/viewers.') . '

' . - '

' . __('Clicking on bold headings can re-sort this table.') . '

' -) ); +get_current_screen()->add_help_tab( + array( + 'id' => 'overview', + 'title' => __( 'Overview' ), + 'content' => + '

' . __( 'Add New takes you to the Add New Site screen. You can search for a site by Name, ID number, or IP address. Screen Options allows you to choose how many sites to display on one page.' ) . '

' . + '

' . __( 'This is the main table of all sites on this network. Switch between list and excerpt views by using the icons above the right side of the table.' ) . '

' . + '

' . __( 'Hovering over each site reveals seven options (three for the primary site):' ) . '

' . + '' . + '

' . __( 'The site ID is used internally, and is not shown on the front end of the site or to users/viewers.' ) . '

' . + '

' . __( 'Clicking on bold headings can re-sort this table.' ) . '

', + ) +); get_current_screen()->set_help_sidebar( - '

' . __('For more information:') . '

' . - '

' . __('Documentation on Site Management') . '

' . - '

' . __('Support Forums') . '

' + '

' . __( 'For more information:' ) . '

' . + '

' . __( 'Documentation on Site Management' ) . '

' . + '

' . __( 'Support Forums' ) . '

' ); -get_current_screen()->set_screen_reader_content( array( - 'heading_pagination' => __( 'Sites list navigation' ), - 'heading_list' => __( 'Sites list' ), -) ); +get_current_screen()->set_screen_reader_content( + array( + 'heading_pagination' => __( 'Sites list navigation' ), + 'heading_list' => __( 'Sites list' ), + ) +); $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0; @@ -122,15 +127,16 @@ switch ( $_GET['action'] ) { case 'deleteblog': - if ( ! current_user_can( 'delete_sites' ) ) + if ( ! current_user_can( 'delete_sites' ) ) { wp_die( __( 'Sorry, you are not allowed to access this page.' ), '', array( 'response' => 403 ) ); + } $updated_action = 'not_deleted'; if ( $id != '0' && $id != get_network()->site_id && current_user_can( 'delete_site', $id ) ) { wpmu_delete_blog( $id, true ); $updated_action = 'delete'; } - break; + break; case 'delete_sites': check_admin_referer( 'ms-delete-sites' ); @@ -143,7 +149,7 @@ } if ( ! current_user_can( 'delete_site', $site_id ) ) { - $site = get_site( $site_id ); + $site = get_site( $site_id ); $site_address = untrailingslashit( $site->domain . $site->path ); wp_die( sprintf( __( 'Sorry, you are not allowed to delete the site %s.' ), $site_address ), 403 ); @@ -172,8 +178,9 @@