rest_post_search_query

rest_post_search_query

Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.5.2

apply_filters('rest_post_search_query') is found 1 times:

  • /wp-includes/rest-api/search/class-wp-rest-post-search-handler.php line 93
    		 *
    		 * @param array           $query_args Key value array of query var to query value.
    		 * @param WP_REST_Request $request    The request used.
    		 */
    		$query_args = apply_filters( 'rest_post_search_query', $query_args, $request );
    
    		$query = new WP_Query();
    		$posts = $query->query( $query_args );
    		// Querying the whole post object will warm the object cache, avoiding an extra query per result.
    		$found_ids = wp_list_pluck( $posts, 'ID' );
    		$total     = $query->found_posts;