posts_fields filter-hookWP 2.1.0

Filters the SELECT clause of the query.

Usage

add_filter( 'posts_fields', 'wp_kama_posts_fields_filter', 10, 2 );
function wp_kama_posts_fields_filter( $fields, $query ){
	// filter...

	return $fields;
}
$fields(string)
The SELECT clause of the query.
$query(WP_Query)
The WP_Query instance (passed by reference).

Changelog

Since 2.1.0 Introduced.

Where the hook is called

WP_Query::get_posts()
posts_fields
wp-includes/class-wp-query.php 2823
$fields = apply_filters_ref_array( 'posts_fields', array( $fields, &$this ) );

Where the hook is used in WordPress

Usage not found.