Remove redundant current_user_can() check. props jeremyfelt. fixes #26057.
git-svn-id: https://develop.svn.wordpress.org/trunk@26236 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2e52eeb484
commit
0262b2e4db
@ -33,11 +33,9 @@ get_current_screen()->set_help_sidebar(
|
|||||||
if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) {
|
if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) {
|
||||||
check_admin_referer( 'add-blog', '_wpnonce_add-blog' );
|
check_admin_referer( 'add-blog', '_wpnonce_add-blog' );
|
||||||
|
|
||||||
if ( ! current_user_can( 'manage_sites' ) )
|
|
||||||
wp_die( __( 'You do not have permission to access this page.' ) );
|
|
||||||
|
|
||||||
if ( ! is_array( $_POST['blog'] ) )
|
if ( ! is_array( $_POST['blog'] ) )
|
||||||
wp_die( __( 'Can’t create an empty site.' ) );
|
wp_die( __( 'Can’t create an empty site.' ) );
|
||||||
|
|
||||||
$blog = $_POST['blog'];
|
$blog = $_POST['blog'];
|
||||||
$domain = '';
|
$domain = '';
|
||||||
if ( preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) )
|
if ( preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) )
|
||||||
|
Loading…
Reference in New Issue
Block a user