From 320d5873f79826c32ec5bb1b8156e73f4e875f4b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 25 Aug 2023 01:28:16 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `wp-includes/class-wp-widget.php`. Follow-up to [10764], [10912], [11427]. Props aristath, poena, afercia, SergeyBiryukov. See #58831. Built from https://develop.svn.wordpress.org/trunk@56466 git-svn-id: http://core.svn.wordpress.org/trunk@55978 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-widget.php | 6 +++--- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/class-wp-widget.php b/wp-includes/class-wp-widget.php index d8e5d02e43..f7557a0e3b 100644 --- a/wp-includes/class-wp-widget.php +++ b/wp-includes/class-wp-widget.php @@ -429,14 +429,14 @@ class WP_Widget { if ( isset( $wp_registered_widgets[ $del_id ]['params'][0]['number'] ) ) { $number = $wp_registered_widgets[ $del_id ]['params'][0]['number']; - if ( $this->id_base . '-' . $number == $del_id ) { + if ( $this->id_base . '-' . $number === $del_id ) { unset( $all_instances[ $number ] ); } } } else { if ( isset( $_POST[ 'widget-' . $this->id_base ] ) && is_array( $_POST[ 'widget-' . $this->id_base ] ) ) { $settings = $_POST[ 'widget-' . $this->id_base ]; - } elseif ( isset( $_POST['id_base'] ) && $_POST['id_base'] == $this->id_base ) { + } elseif ( isset( $_POST['id_base'] ) && $_POST['id_base'] === $this->id_base ) { $num = $_POST['multi_number'] ? (int) $_POST['multi_number'] : (int) $_POST['widget_number']; $settings = array( $num => array() ); } else { @@ -508,7 +508,7 @@ class WP_Widget { $widget_args = wp_parse_args( $widget_args, array( 'number' => -1 ) ); $all_instances = $this->get_settings(); - if ( -1 == $widget_args['number'] ) { + if ( -1 === $widget_args['number'] ) { // We echo out a form where 'number' can be set later. $this->_set( '__i__' ); $instance = array(); diff --git a/wp-includes/version.php b/wp-includes/version.php index 3c96b46678..7db99eb282 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56464'; +$wp_version = '6.4-alpha-56466'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.