EP_WP_Query_Integration::filter_the_posts PHP 메소드

filter_the_posts() 공개 메소드

Filter the posts array to contain ES query results in EP_Post form. Pull previously queried posts.
public filter_the_posts ( array $posts, &$query ) : array
$posts array
리턴 array
    public function filter_the_posts($posts, &$query)
    {
        if (!ep_elasticpress_enabled($query) || apply_filters('ep_skip_query_integration', false, $query) || !isset($this->posts_by_query[spl_object_hash($query)])) {
            return $posts;
        }
        $new_posts = $this->posts_by_query[spl_object_hash($query)];
        return $new_posts;
    }