Make WordPress Core


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

    r47198 r47219  
    5757    $result  = array();
    5858    foreach ( $updates as $update ) {
    59         if ( $update->response == 'autoupdate' ) {
     59        if ( 'autoupdate' === $update->response ) {
    6060            continue;
    6161        }
     
    292292    $cur = get_preferred_from_update_core();
    293293
    294     if ( ! isset( $cur->response ) || $cur->response != 'upgrade' ) {
     294    if ( ! isset( $cur->response ) || 'upgrade' !== $cur->response ) {
    295295        return false;
    296296    }
     
    338338        $cur = get_preferred_from_update_core();
    339339
    340         if ( isset( $cur->response ) && $cur->response == 'upgrade' ) {
     340        if ( isset( $cur->response ) && 'upgrade' === $cur->response ) {
    341341            $msg .= sprintf(
    342342                '<a href="%s" class="button" aria-describedby="wp-version">%s</a> ',
Note: See TracChangeset for help on using the changeset viewer.