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
This commit is contained in:
Sergey Biryukov 2023-08-25 01:28:16 +00:00
parent 39c6a67c0a
commit 320d5873f7
2 changed files with 4 additions and 4 deletions

View File

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

View File

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