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
This commit is contained in:
Aaron Jorbin 2016-02-24 22:11:50 +00:00
parent b73a1c9aa9
commit 46baace6f3
1 changed files with 1 additions and 1 deletions

View File

@ -3705,7 +3705,7 @@ class WP_Query {
// Put sticky posts at the top of the posts array // Put sticky posts at the top of the posts array
$sticky_posts = get_option('sticky_posts'); $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); $num_posts = count($this->posts);
$sticky_offset = 0; $sticky_offset = 0;
// Loop over posts and relocate stickies to the front. // Loop over posts and relocate stickies to the front.