comment_feed_groupby хук-фильтрWP 2.2.0

Filters the GROUP BY clause of the comments feed query before sending.

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

add_filter( 'comment_feed_groupby', 'wp_kama_comment_feed_groupby_filter', 10, 2 );

/**
 * Function for `comment_feed_groupby` filter-hook.
 * 
 * @param string   $cgroupby The GROUP BY clause of the query.
 * @param WP_Query $query    The WP_Query instance (passed by reference).
 *
 * @return string
 */
function wp_kama_comment_feed_groupby_filter( $cgroupby, $query ){

	// filter...
	return $cgroupby;
}
$cgroupby(строка)
The GROUP BY clause of the query.
$query(WP_Query)
The WP_Query instance (passed by reference).

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

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

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

WP_Query::get_posts()
comment_feed_groupby
wp-includes/class-wp-query.php 2697
$cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( $cgroupby, &$this ) );
wp-includes/class-wp-query.php 3170
$cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( '', &$this ) );

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

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