apply_filters( 'comments_number', string $comments_number_text, int $comments_number )
- Since
- 1.5.0
Filters the comments count for display.
Compatibility
- WordPress
- since 1.5.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$comments_number_textstring- A translatable string formatted based on whether the count is equal to 0, 1, or 1+.
$comments_numberint- The number of post comments.
Where this hook fires · 1
wp-includes/comment-template.php:1012get_comments_number_text()
Source code
* @see _n() * * @param string $comments_number_text A translatable string formatted based on whether the count * is equal to 0, 1, or 1+. * @param int $comments_number The number of post comments. */ return apply_filters( 'comments_number', $comments_number_text, $comments_number );} /** * Retrieves the text of the current comment. * * @since 1.5.0Changelog
Introduced in 1.5.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.