Make WordPress Core


Ignore:
Timestamp:
02/09/2020 04:52:28 PM (6 years 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-setting.php

    r47122 r47219  
    157157     */
    158158    public function value() {
    159         if ( $this->is_previewed && $this->_previewed_blog_id === get_current_blog_id() ) {
     159        if ( $this->is_previewed && get_current_blog_id() === $this->_previewed_blog_id ) {
    160160            $undefined  = new stdClass(); // Symbol.
    161161            $post_value = $this->post_value( $undefined );
     
    385385     */
    386386    public function filter_nav_menu_options( $nav_menu_options ) {
    387         if ( $this->_previewed_blog_id !== get_current_blog_id() ) {
     387        if ( get_current_blog_id() !== $this->_previewed_blog_id ) {
    388388            return $nav_menu_options;
    389389        }
     
    556556
    557557                $post_value = $setting->post_value( null );
    558                 if ( ! is_null( $post_value ) && $this->previous_term_id === intval( $post_value ) ) {
     558                if ( ! is_null( $post_value ) && intval( $post_value ) === $this->previous_term_id ) {
    559559                    $this->manager->set_post_value( $setting->id, $this->term_id );
    560560                    $setting->save();
Note: See TracChangeset for help on using the changeset viewer.