Filters the raw post results array, prior to status checks.
Parameters
Source
$this->posts = apply_filters_ref_array( 'posts_results', array( $this->posts, &$this ) );
Changelog
| Version | Description |
|---|---|
| 2.3.0 | Introduced. |
| CARVIEW |
Filters the raw post results array, prior to status checks.
The input of this filter is an array of posts, created by any(?) WP_Query looking for posts.
$this->posts = apply_filters_ref_array( 'posts_results', array( $this->posts, &$this ) );
| Used by | Description |
|---|---|
WP_Query::get_posts()wp-includes/class-wp-query.php | Retrieves an array of posts based on query variables. |
| Version | Description |
|---|---|
| 2.3.0 | Introduced. |
You must log in before being able to contribute a note or feedback.
Example migrated from Codex:
Code sample for filtering an array of posts results and return an array of post objects which does not have the word “selfie” in the title.