From 0b17c7e5f4ccc3ea6394bb61984f678bc8aab2b4 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 5 May 2024 14:35:19 +0000 Subject: [PATCH] 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 --- wp-includes/capabilities.php | 6 ++---- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/wp-includes/capabilities.php b/wp-includes/capabilities.php index 26b150fe4b..1263208e3f 100644 --- a/wp-includes/capabilities.php +++ b/wp-includes/capabilities.php @@ -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; diff --git a/wp-includes/version.php b/wp-includes/version.php index 41e0f1fcf8..ec82ed1267 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @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.