WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/09/2020 04:52:28 PM (18 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use Yoda conditions where appropriate.

See #49222.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php

    r46821 r47219  
    212212     */
    213213    public function value() {
    214         if ( $this->is_previewed && $this->_previewed_blog_id === get_current_blog_id() ) {
     214        if ( $this->is_previewed && get_current_blog_id() === $this->_previewed_blog_id ) {
    215215            $undefined  = new stdClass(); // Symbol.
    216216            $post_value = $this->post_value( $undefined );
     
    799799                }
    800800
    801                 if ( $nav_menu_setting->previous_term_id !== intval( $value['nav_menu_term_id'] ) ) {
     801                if ( intval( $value['nav_menu_term_id'] ) !== $nav_menu_setting->previous_term_id ) {
    802802                    $this->update_status = 'error';
    803803                    $this->update_error  = new WP_Error( 'unexpected_previous_term_id' );
     
    825825                }
    826826
    827                 if ( $parent_nav_menu_item_setting->previous_post_id !== intval( $value['menu_item_parent'] ) ) {
     827                if ( intval( $value['menu_item_parent'] ) !== $parent_nav_menu_item_setting->previous_post_id ) {
    828828                    $this->update_status = 'error';
    829829                    $this->update_error  = new WP_Error( 'unexpected_previous_post_id' );
Note: See TracChangeset for help on using the changeset viewer.