Make WordPress Core


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

    r47122 r47219  
    831831        $disable_next  = false;
    832832
    833         if ( $current == 1 ) {
     833        if ( 1 == $current ) {
    834834            $disable_first = true;
    835835            $disable_prev  = true;
    836836        }
    837         if ( $current == 2 ) {
     837        if ( 2 == $current ) {
    838838            $disable_first = true;
    839839        }
    840         if ( $current == $total_pages ) {
     840        if ( $total_pages == $current ) {
    841841            $disable_last = true;
    842842            $disable_next = true;
    843843        }
    844         if ( $current == $total_pages - 1 ) {
     844        if ( $total_pages - 1 == $current ) {
    845845            $disable_last = true;
    846846        }
Note: See TracChangeset for help on using the changeset viewer.