Make WordPress Core

Changeset 59792


Ignore:
Timestamp:
02/09/2025 06:49:51 PM (5 weeks ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in WP_Query::the_post() and ::have_posts().

Follow-up to [2716], [2741], [11464].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-query.php

    r59788 r59792  
    37533753        $this->before_loop = false;
    37543754
    3755         if ( -1 == $this->current_post ) { // Loop has just started.
     3755        if ( -1 === $this->current_post ) { // Loop has just started.
    37563756            /**
    37573757             * Fires once the loop is started.
     
    37803780        if ( $this->current_post + 1 < $this->post_count ) {
    37813781            return true;
    3782         } elseif ( $this->current_post + 1 == $this->post_count && $this->post_count > 0 ) {
     3782        } elseif ( $this->current_post + 1 === $this->post_count && $this->post_count > 0 ) {
    37833783            /**
    37843784             * Fires once the loop has ended.
     
    37893789             */
    37903790            do_action_ref_array( 'loop_end', array( &$this ) );
     3791
    37913792            // Do some cleaning up after the loop.
    37923793            $this->rewind_posts();
Note: See TracChangeset for help on using the changeset viewer.