mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-31 04:31:35 +01:00
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:
parent
39c6a67c0a
commit
320d5873f7
@ -429,14 +429,14 @@ class WP_Widget {
|
|||||||
if ( isset( $wp_registered_widgets[ $del_id ]['params'][0]['number'] ) ) {
|
if ( isset( $wp_registered_widgets[ $del_id ]['params'][0]['number'] ) ) {
|
||||||
$number = $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 ] );
|
unset( $all_instances[ $number ] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ( isset( $_POST[ 'widget-' . $this->id_base ] ) && is_array( $_POST[ 'widget-' . $this->id_base ] ) ) {
|
if ( isset( $_POST[ 'widget-' . $this->id_base ] ) && is_array( $_POST[ 'widget-' . $this->id_base ] ) ) {
|
||||||
$settings = $_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'];
|
$num = $_POST['multi_number'] ? (int) $_POST['multi_number'] : (int) $_POST['widget_number'];
|
||||||
$settings = array( $num => array() );
|
$settings = array( $num => array() );
|
||||||
} else {
|
} else {
|
||||||
@ -508,7 +508,7 @@ class WP_Widget {
|
|||||||
$widget_args = wp_parse_args( $widget_args, array( 'number' => -1 ) );
|
$widget_args = wp_parse_args( $widget_args, array( 'number' => -1 ) );
|
||||||
$all_instances = $this->get_settings();
|
$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.
|
// We echo out a form where 'number' can be set later.
|
||||||
$this->_set( '__i__' );
|
$this->_set( '__i__' );
|
||||||
$instance = array();
|
$instance = array();
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user