comment_feed_where filter-hookWP 2.2.0

Filters the WHERE clause of the comments feed query before sending.

Usage

add_filter( 'comment_feed_where', 'wp_kama_comment_feed_where_filter', 10, 2 );

/**
 * Function for `comment_feed_where` filter-hook.
 * 
 * @param string   $cwhere The WHERE clause of the query.
 * @param WP_Query $query  The WP_Query instance (passed by reference).
 *
 * @return string
 */
function wp_kama_comment_feed_where_filter( $cwhere, $query ){

	// filter...
	return $cwhere;
}
$cwhere(string)
The WHERE clause of the query.
$query(WP_Query)
The WP_Query instance (passed by reference).

Changelog

Since 2.2.0 Introduced.

Where the hook is called

WP_Query::get_posts()
comment_feed_where
wp-includes/class-wp-query.php 2686
$cwhere = apply_filters_ref_array( 'comment_feed_where', array( $cwhere, &$this ) );
wp-includes/class-wp-query.php 3139
$cwhere = apply_filters_ref_array( 'comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", &$this ) );

Where the hook is used in WordPress

Usage not found.