Provider::replace_posts_results( array|object|null $posts, WP_Query|null $wp_query = null )
If the query was not able to find results for specific occurrence IDs we hydrate the cache before the results are returned to the next WP_Query call.
Contents
Parameters
- $posts
-
(array|object|null) (Required) The query results.
- $wp_query
-
(WP_Query|null) (Optional) A reference to the WP Query object whose post results are being filtered.
Default value: null
Return
(mixed) The original results, replaced if required.
Source
File: src/Events_Pro/Custom_Tables/V1/WP_Query/Provider.php
public function replace_posts_results( $posts, $wp_query = null ) {
if ( $this->noop || ! $wp_query instanceof WP_Query ) {
return $posts;
}
return $this->container->make( Replace_Results::class )->replace( $posts, $wp_query );
}
Changelog
| Version | Description |
|---|---|
| 6.0.0 | Introduced. |