posts_results filter-hook . WP 2.3.0
Filters the raw post results array, prior to status checks.
Usage
add_filter( 'posts_results', 'filter_function_name_352', 10, 2 ); function filter_function_name_352( $posts, $this ){ // filter... return $posts; }
- $posts(WP_Post[])
- Array of post objects.
- $this(WP_Query)
- The WP_Query instance (passed by reference).
Changelog
Since 2.3.0 | Introduced. |
Where the hook is called
posts_results
wp-includes/class-wp-query.php 3045
$this->posts = apply_filters_ref_array( 'posts_results', array( $this->posts, &$this ) );