mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
Ensure sticky posts are WP_Post objects. props mdawaffe. see #21309.
git-svn-id: http://core.svn.wordpress.org/trunk@21569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
80159bda68
commit
d65b2caac9
@ -2750,7 +2750,7 @@ class WP_Query {
|
||||
// Ignore sticky posts the current user cannot read or are not published.
|
||||
if ( 'publish' != $sticky_post->post_status )
|
||||
continue;
|
||||
array_splice($this->posts, $sticky_offset, 0, array($sticky_post));
|
||||
array_splice($this->posts, $sticky_offset, 0, array( get_post( $sticky_post ) ) );
|
||||
$sticky_offset++;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user