comment_feed_orderby
Filters the ORDER BY clause of the comments feed query before sending.
Usage
add_filter( 'comment_feed_orderby', 'wp_kama_comment_feed_orderby_filter' ); /** * Function for `comment_feed_orderby` filter-hook. * * @param string $corderby The ORDER BY clause of the query. * * @return string */ function wp_kama_comment_feed_orderby_filter( $corderby ){ // filter... return $corderby; }
- $corderby(string)
- The ORDER BY clause of the query.
Changelog
Since 2.8.0 | Introduced. |
Where the hook is called
comment_feed_orderby
wp-includes/class-wp-query.php 2798
$corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );
wp-includes/class-wp-query.php 3388
$corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );