WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
фильтр не описан

posts_clauses хук-фильтр . WP 3.1.0

Filters all query clauses at once, for convenience.

Covers the WHERE, GROUP BY, JOIN, ORDER BY, DISTINCT, fields (SELECT), and LIMITS clauses.


add_filter( 'posts_clauses', 'filter_function_name_8266', 10, 2 );
function filter_function_name_8266( $clauses, $query ){
	// filter...

	return $clauses;
Associative array of the clauses for the query.
The WP_Query instance (passed by reference).

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

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

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

wp-includes/class-wp-query.php 2779
$clauses = (array) apply_filters_ref_array( 'posts_clauses', array( compact( $pieces ), &$this ) );

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

wp-admin/includes/ajax-actions.php 2977
add_filter( 'posts_clauses', '_filter_query_attachment_filenames' );
wp-admin/includes/post.php 1272
add_filter( 'posts_clauses', '_filter_query_attachment_filenames' );
wp-includes/post.php 7606
remove_filter( 'posts_clauses', __FUNCTION__ );
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php 92
add_filter( 'posts_clauses', '_filter_query_attachment_filenames' );