Coding Standards: Remove extra conditional in `is_super_admin()`.
Follow-up to [12612]. Props dhruvang21, ankit-k-gupta, audrasjb. Fixes #61098. Built from https://develop.svn.wordpress.org/trunk@58099 git-svn-id: http://core.svn.wordpress.org/trunk@57564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d2434ccaa9
commit
0b17c7e5f4
|
@ -1088,10 +1088,8 @@ function is_super_admin( $user_id = false ) {
|
||||||
if ( is_array( $super_admins ) && in_array( $user->user_login, $super_admins, true ) ) {
|
if ( is_array( $super_admins ) && in_array( $user->user_login, $super_admins, true ) ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} elseif ( $user->has_cap( 'delete_users' ) ) {
|
||||||
if ( $user->has_cap( 'delete_users' ) ) {
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.6-alpha-58098';
|
$wp_version = '6.6-alpha-58099';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue