WordPress.org

Make WordPress Core

Changeset 35690


Ignore:
Timestamp:
11/18/2015 09:17:30 PM (4 years ago)
Author:
boonebgorges
Message:

In WP_Query, set is_home to false during REST requests.

Props danielbachhuber.
Fixes #34373.

File:
1 edited

Legend:

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

    r35679 r35690  
    18121812            $this->is_comment_feed = true;
    18131813
    1814         if ( !( $this->is_singular || $this->is_archive || $this->is_search || $this->is_feed || $this->is_trackback || $this->is_404 || $this->is_admin || $this->is_comments_popup || $this->is_robots ) )
     1814        if ( !( $this->is_singular || $this->is_archive || $this->is_search || $this->is_feed || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) || $this->is_trackback || $this->is_404 || $this->is_admin || $this->is_comments_popup || $this->is_robots ) )
    18151815            $this->is_home = true;
    18161816
Note: See TracChangeset for help on using the changeset viewer.