mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-02 19:54:28 +00:00
Query: After [37692], don't skip set_found_posts() when no posts are found.
The 'found_posts' filter must continue to run for plugins manipulating post results via filter. Props dd32. Fixes #36687. git-svn-id: https://develop.svn.wordpress.org/trunk@37712 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3650,10 +3650,11 @@ class WP_Query {
|
||||
}
|
||||
}
|
||||
|
||||
// Convert to WP_Post objects and set the found-post totals.
|
||||
$this->set_found_posts( $q, $limits );
|
||||
|
||||
// Convert to WP_Post objects.
|
||||
if ( $this->posts ) {
|
||||
$this->posts = array_map( 'get_post', $this->posts );
|
||||
$this->set_found_posts( $q, $limits );
|
||||
}
|
||||
|
||||
if ( ! $q['suppress_filters'] ) {
|
||||
|
||||
Reference in New Issue
Block a user