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
This commit is contained in:
John Blackbourn 2017-04-15 17:29:55 +00:00
parent d68a189288
commit f57f03b935
1 changed files with 2 additions and 1 deletions

View File

@ -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',