From f57f03b9357255da53d4f750592e602d2aa00937 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sat, 15 Apr 2017 17:29:55 +0000 Subject: [PATCH] Networks and Sites: Correct a capability check when accessing the Sites -> Add New screen. Props flixos90 See #39156 git-svn-id: https://develop.svn.wordpress.org/trunk@40433 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/network/site-new.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/network/site-new.php b/src/wp-admin/network/site-new.php index 0be051ec87..f36dffb522 100644 --- a/src/wp-admin/network/site-new.php +++ b/src/wp-admin/network/site-new.php @@ -13,8 +13,9 @@ require_once( dirname( __FILE__ ) . '/admin.php' ); /** WordPress Translation Install API */ require_once( ABSPATH . 'wp-admin/includes/translation-install.php' ); -if ( ! current_user_can( 'manage_sites' ) ) +if ( ! current_user_can( 'create_sites' ) ) { wp_die( __( 'Sorry, you are not allowed to add sites to this network.' ) ); +} get_current_screen()->add_help_tab( array( 'id' => 'overview',