Skip to content

Commit

Permalink
Coding Standards: Remove extra conditional in is_super_admin().
Browse files Browse the repository at this point in the history
Follow-up to [12612].

Props dhruvang21, ankit-k-gupta, audrasjb.
Fixes #61098.

git-svn-id: https://develop.svn.wordpress.org/trunk@58099 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed May 5, 2024
1 parent 3f6ea2a commit b0308b8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/wp-includes/capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -1088,10 +1088,8 @@ function is_super_admin( $user_id = false ) {
if ( is_array( $super_admins ) && in_array( $user->user_login, $super_admins, true ) ) {
return true;
}
} else {
if ( $user->has_cap( 'delete_users' ) ) {
return true;
}
} elseif ( $user->has_cap( 'delete_users' ) ) {
return true;
}

return false;
Expand Down

0 comments on commit b0308b8

Please sign in to comment.