From 46baace6f3b26a3be92840a9591751c86f07b3b7 Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Wed, 24 Feb 2016 22:11:50 +0000 Subject: [PATCH] Revert r36696 This broke embeds. Needs a better solution to also make sure all queries from the REST API aren't broken. see #35907. git-svn-id: https://develop.svn.wordpress.org/trunk@36699 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/query.php b/src/wp-includes/query.php index 76a17bfd0a..4b3e1e41f7 100644 --- a/src/wp-includes/query.php +++ b/src/wp-includes/query.php @@ -3705,7 +3705,7 @@ class WP_Query { // Put sticky posts at the top of the posts array $sticky_posts = get_option('sticky_posts'); - if ( ( $this->is_home || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) && $page <= 1 && is_array($sticky_posts) && !empty($sticky_posts) && !$q['ignore_sticky_posts'] ) { + if ( $this->is_home && $page <= 1 && is_array($sticky_posts) && !empty($sticky_posts) && !$q['ignore_sticky_posts'] ) { $num_posts = count($this->posts); $sticky_offset = 0; // Loop over posts and relocate stickies to the front.