From 31219ee677301ddeb8e5b90a3d077c354c6b0fa4 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Wed, 18 Nov 2015 21:18:26 +0000 Subject: [PATCH] In `WP_Query`, set `is_home` to `false` during REST requests. Props danielbachhuber. Fixes #34373. Built from https://develop.svn.wordpress.org/trunk@35690 git-svn-id: http://core.svn.wordpress.org/trunk@35654 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 5a6a6eb93c..a2b236540e 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1811,7 +1811,7 @@ class WP_Query { if ( $this->is_feed && ( !empty($qv['withcomments']) || ( empty($qv['withoutcomments']) && $this->is_singular ) ) ) $this->is_comment_feed = true; - 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 ) ) + 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 ) ) $this->is_home = true; // Correct is_* for page_on_front and page_for_posts diff --git a/wp-includes/version.php b/wp-includes/version.php index cbbc8a118b..a57ed79e0e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-beta4-35689'; +$wp_version = '4.4-beta4-35690'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.