public filter_the_posts ( array $posts, &$query ) : array | ||
$posts | array | |
return | 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;
}