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
This commit is contained in:
Sergey Biryukov
2026-03-28 23:50:44 +00:00
parent dec7e5da85
commit cfb8a82010
4 changed files with 5 additions and 5 deletions

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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' );

View File

@@ -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.