WordPress.org

Make WordPress Core

Ticket #50213: 50213.diff

File 50213.diff, 606 bytes (added by dlh, 4 months ago)
  • src/wp-includes/class-wp-query.php

    diff --git src/wp-includes/class-wp-query.php src/wp-includes/class-wp-query.php
    index 50da8ed7d2..cd77cc2c8c 100644
    class WP_Query { 
    965965                }
    966966
    967967                if ( ! ( $this->is_singular || $this->is_archive || $this->is_search || $this->is_feed
    968                                 || ( defined( 'REST_REQUEST' ) && REST_REQUEST )
     968                                || ( defined( 'REST_REQUEST' ) && REST_REQUEST && $this->is_main_query() )
    969969                                || $this->is_trackback || $this->is_404 || $this->is_admin || $this->is_robots || $this->is_favicon ) ) {
    970970                        $this->is_home = true;
    971971                }