posts_request_ids
Filters the Post IDs SQL request before sending.
Usage
add_filter( 'posts_request_ids', 'wp_kama_posts_request_ids_filter', 10, 2 ); /** * Function for `posts_request_ids` filter-hook. * * @param string $request The post ID request. * @param WP_Query $query The WP_Query instance. * * @return string */ function wp_kama_posts_request_ids_filter( $request, $query ){ // filter... return $request; }
- $request(string)
- The post ID request.
- $query(WP_Query)
- The WP_Query instance.
Changelog
Since 3.4.0 | Introduced. |
Where the hook is called
posts_request_ids
wp-includes/class-wp-query.php 3355
$this->request = apply_filters( 'posts_request_ids', $this->request, $this );