From 5c0361aeb1a6c9135b81296f7ad5da2dd83745a2 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 9 Aug 2020 01:56:05 +0000 Subject: [PATCH] Coding Standards: Remove a few more extra brackets from some conditions in `wp-admin/includes/plugin.php`. Follow-up to [48764]. See #50767. Built from https://develop.svn.wordpress.org/trunk@48766 git-svn-id: http://core.svn.wordpress.org/trunk@48528 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/plugin.php | 6 +++--- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index e28686dab3..e201d90da6 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -1982,7 +1982,7 @@ function get_admin_page_title() { foreach ( array_keys( $submenu ) as $parent ) { foreach ( $submenu[ $parent ] as $submenu_array ) { if ( isset( $plugin_page ) - && ( $plugin_page === $submenu_array[2] ) + && $plugin_page === $submenu_array[2] && ( $pagenow === $parent || $plugin_page === $parent || $plugin_page === $hook @@ -2138,13 +2138,13 @@ function user_can_access_admin_page() { return true; } - if ( isset( $plugin_page ) && ( $plugin_page === $parent ) && isset( $_wp_menu_nopriv[ $plugin_page ] ) ) { + if ( isset( $plugin_page ) && $plugin_page === $parent && isset( $_wp_menu_nopriv[ $plugin_page ] ) ) { return false; } if ( isset( $submenu[ $parent ] ) ) { foreach ( $submenu[ $parent ] as $submenu_array ) { - if ( isset( $plugin_page ) && ( $submenu_array[2] === $plugin_page ) ) { + if ( isset( $plugin_page ) && $submenu_array[2] === $plugin_page ) { return current_user_can( $submenu_array[1] ); } elseif ( $submenu_array[2] === $pagenow ) { return current_user_can( $submenu_array[1] ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 716f0f561e..3df78603a6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-48765'; +$wp_version = '5.6-alpha-48766'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.