Make WordPress Core

Changeset 56466


Ignore:
Timestamp:
08/25/2023 01:26:01 AM (14 months ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-widget.php

    r55398 r56466  
    430430                $number = $wp_registered_widgets[ $del_id ]['params'][0]['number'];
    431431
    432                 if ( $this->id_base . '-' . $number == $del_id ) {
     432                if ( $this->id_base . '-' . $number === $del_id ) {
    433433                    unset( $all_instances[ $number ] );
    434434                }
     
    437437            if ( isset( $_POST[ 'widget-' . $this->id_base ] ) && is_array( $_POST[ 'widget-' . $this->id_base ] ) ) {
    438438                $settings = $_POST[ 'widget-' . $this->id_base ];
    439             } elseif ( isset( $_POST['id_base'] ) && $_POST['id_base'] == $this->id_base ) {
     439            } elseif ( isset( $_POST['id_base'] ) && $_POST['id_base'] === $this->id_base ) {
    440440                $num      = $_POST['multi_number'] ? (int) $_POST['multi_number'] : (int) $_POST['widget_number'];
    441441                $settings = array( $num => array() );
     
    509509        $all_instances = $this->get_settings();
    510510
    511         if ( -1 == $widget_args['number'] ) {
     511        if ( -1 === $widget_args['number'] ) {
    512512            // We echo out a form where 'number' can be set later.
    513513            $this->_set( '__i__' );
Note: See TracChangeset for help on using the changeset viewer.