comment_feed_orderby хук-фильтрWP 2.8.0

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

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

add_filter( 'comment_feed_orderby', 'wp_kama_comment_feed_orderby_filter', 10, 2 );

/**
 * Function for `comment_feed_orderby` filter-hook.
 * 
 * @param string   $corderby The ORDER BY clause of the query.
 * @param WP_Query $query    The WP_Query instance (passed by reference).
 *
 * @return string
 */
function wp_kama_comment_feed_orderby_filter( $corderby, $query ){

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

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

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

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

WP_Query::get_posts()
comment_feed_orderby
wp-includes/class-wp-query.php 2707
$corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );
wp-includes/class-wp-query.php 3174
$corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );

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

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