From cfb8a8201041d424e1bbd2695aca91a9e88897fc Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 28 Mar 2026 23:50:44 +0000 Subject: [PATCH] Code Quality: Simplify boolean assignments. This makes minor code simplifications by removing unnecessary ternary operations and directly assigning boolean expressions. These changes make the code easier to read and maintain, but do not alter the underlying logic. Props Soean. See #64898. Built from https://develop.svn.wordpress.org/trunk@62173 git-svn-id: http://core.svn.wordpress.org/trunk@61455 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-ms-themes-list-table.php | 2 +- wp-admin/includes/upgrade.php | 2 +- wp-admin/nav-menus.php | 4 ++-- wp-includes/version.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-admin/includes/class-wp-ms-themes-list-table.php b/wp-admin/includes/class-wp-ms-themes-list-table.php index 6a1fbdfb8d..a0fca2fd60 100644 --- a/wp-admin/includes/class-wp-ms-themes-list-table.php +++ b/wp-admin/includes/class-wp-ms-themes-list-table.php @@ -59,7 +59,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table { $page = $this->get_pagenum(); - $this->is_site_themes = ( 'site-themes-network' === $this->screen->id ) ? true : false; + $this->is_site_themes = 'site-themes-network' === $this->screen->id; if ( $this->is_site_themes ) { $this->site_id = isset( $_REQUEST['id'] ) ? (int) $_REQUEST['id'] : 0; diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 6adb0521ff..914113bde0 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -3282,7 +3282,7 @@ function dbDelta( $queries = '', $execute = true ) { // phpcs:ignore WordPress.N 'fieldname' => $tableindex->Column_name, 'subpart' => $tableindex->Sub_part, ); - $index_ary[ $keyname ]['unique'] = ( '0' === (string) $tableindex->Non_unique ) ? true : false; + $index_ary[ $keyname ]['unique'] = '0' === (string) $tableindex->Non_unique; $index_ary[ $keyname ]['index_type'] = $tableindex->Index_type; } diff --git a/wp-admin/nav-menus.php b/wp-admin/nav-menus.php index 8dc68582f3..808574f125 100644 --- a/wp-admin/nav-menus.php +++ b/wp-admin/nav-menus.php @@ -549,9 +549,9 @@ $nav_menus = wp_get_nav_menus(); $menu_count = count( $nav_menus ); // Are we on the add new screen? -$add_new_screen = ( isset( $_GET['menu'] ) && 0 === (int) $_GET['menu'] ) ? true : false; +$add_new_screen = isset( $_GET['menu'] ) && 0 === (int) $_GET['menu']; -$locations_screen = ( isset( $_GET['action'] ) && 'locations' === $_GET['action'] ) ? true : false; +$locations_screen = isset( $_GET['action'] ) && 'locations' === $_GET['action']; $page_count = wp_count_posts( 'page' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 1828d3c884..8176522781 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '7.1-alpha-62171'; +$wp_version = '7.1-alpha-62173'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.