Fix sticky post handling. Use unset instead of array_splice to remove an item by key retrieved by array_search. props jeffstieler, fixes #11966.
git-svn-id: https://develop.svn.wordpress.org/trunk@14135 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b15624a124
commit
a8d984183f
@ -2462,7 +2462,7 @@ class WP_Query {
|
||||
$sticky_offset++;
|
||||
// Remove post from sticky posts array
|
||||
$offset = array_search($sticky_post->ID, $sticky_posts);
|
||||
array_splice($sticky_posts, $offset, 1);
|
||||
unset( $sticky_posts[$offset] );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user