comment_feed_limits
Filters the LIMIT clause of the comments feed query before sending.
Usage
add_filter( 'comment_feed_limits', 'wp_kama_comment_feed_limits_filter', 10, 2 ); /** * Function for `comment_feed_limits` filter-hook. * * @param string $climits The JOIN clause of the query. * @param WP_Query $query The WP_Query instance (passed by reference). * * @return string */ function wp_kama_comment_feed_limits_filter( $climits, $query ){ // filter... return $climits; }
- $climits(string)
- The JOIN 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
comment_feed_limits
wp-includes/class-wp-query.php 2717
$climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option( 'posts_per_rss' ), &$this ) );
wp-includes/class-wp-query.php 3178
$climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option( 'posts_per_rss' ), &$this ) );