WordPress.org

Make WordPress Core


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

Coding Standards: Use Yoda conditions where appropriate.

See #49222.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-ms-themes-list-table.php

    r47122 r47219  
    167167            $order   = strtoupper( $order );
    168168
    169             if ( $orderby === 'Name' ) {
     169            if ( 'Name' === $orderby ) {
    170170                if ( 'ASC' === $order ) {
    171171                    $this->items = array_reverse( $this->items );
     
    503503        }
    504504
    505         if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $stylesheet != get_option( 'stylesheet' ) && $stylesheet != get_option( 'template' ) ) {
     505        if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && get_option( 'stylesheet' ) !== $stylesheet && get_option( 'template' ) !== $stylesheet ) {
    506506            $url = add_query_arg(
    507507                array(
     
    581581        global $status, $totals;
    582582        if ( $theme->errors() ) {
    583             $pre = $status === 'broken' ? __( 'Broken Theme:' ) . ' ' : '';
     583            $pre = 'broken' === $status ? __( 'Broken Theme:' ) . ' ' : '';
    584584            echo '<p><strong class="error-message">' . $pre . $theme->errors()->get_error_message() . '</strong></p>';
    585585        }
Note: See TracChangeset for help on using the changeset viewer.