WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/15/2016 12:32:25 PM (5 years ago)
Author:
boonebgorges
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/query.php

    r37692 r37712  
    36513651        }
    36523652
    3653         // Convert to WP_Post objects and set the found-post totals.
     3653        $this->set_found_posts( $q, $limits );
     3654
     3655        // Convert to WP_Post objects.
    36543656        if ( $this->posts ) {
    36553657            $this->posts = array_map( 'get_post', $this->posts );
    3656             $this->set_found_posts( $q, $limits );
    36573658        }
    36583659
Note: See TracChangeset for help on using the changeset viewer.