comments_number filter-hookWP 1.5.0

Filters the comments count for display.

Usage

add_filter( 'comments_number', 'wp_kama_comments_number_filter', 10, 2 );

/**
 * Function for `comments_number` filter-hook.
 * 
 * @param string $output A translatable string formatted based on whether the count is equal to 0, 1, or 1+.
 * @param int    $number The number of post comments.
 *
 * @return string
 */
function wp_kama_comments_number_filter( $output, $number ){

	// filter...
	return $output;
}
$output(string)
A translatable string formatted based on whether the count is equal to 0, 1, or 1+.
$number(int)
The number of post comments.

Changelog

Since 1.5.0 Introduced.

Where the hook is called

get_comments_number_text()
comments_number
wp-includes/comment-template.php 953
return apply_filters( 'comments_number', $output, $number );

Where the hook is used in WordPress

Usage not found.