WordPress at a glance

comments_number() WP 1.0

Display the language string for the number of comments the current post has.

✈ 1 time = 0.000071s = very fast | 50000 times = 1.61s = fast

No Hooks.

Return

Nothing (null).

Usage

comments_number( $zero, $one, $more, $deprecated );
$zero(string)
Text for no comments.
Default: false
$one(string)
Text for one comment.
Default: false
$more(string)
Text for more than one comment.
Default: false
$deprecated(string)
Not used.
Default: ''

Code of comments_number: wp-includes/comment-template.php VER 5.0.1

<?php
function comments_number( $zero = false, $one = false, $more = false, $deprecated = '' ) {
	if ( ! empty( $deprecated ) ) {
		_deprecated_argument( __FUNCTION__, '1.3.0' );
	}
	echo get_comments_number_text( $zero, $one, $more );
}

Related Functions

From category: Comments

No comments
    Hello, !     Log In . Register