posts_request_ids хук-фильтрWP 3.4.0

Filters the Post IDs SQL request before sending.

Использование

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(строка)
The post ID request.
$query(WP_Query)
The WP_Query instance.

Список изменений

С версии 3.4.0 Введена.

Где вызывается хук

WP_Query::get_posts()
posts_request_ids
wp-includes/class-wp-query.php 3417
$this->request = apply_filters( 'posts_request_ids', $this->request, $this );

Где используется хук в WordPress

Использование не найдено.