comment_feed_orderby filter-hookWP 2.8.0

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

Usage

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(string)
The ORDER BY clause of the query.
$query(WP_Query)
The WP_Query instance (passed by reference).

Changelog

Since 2.8.0 Introduced.

Where the hook is called

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 ) );

Where the hook is used in WordPress

Usage not found.