comments_number [ WordPress Function ]
comments_number ( $zero = false, $one = false, $more = false, $deprecated = '' )
| Parameters: |
|
| Uses: | |
| Defined at: |
|
Display the language string for the number of comments the current post has.
Source
<?php
function comments_number( $zero = false, $one = false, $more = false, $deprecated = '' ) {
if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '1.3' );
$number = get_comments_number();
if ( $number > 1 )
$output = str_replace('%', number_format_i18n($number), ( false === $more ) ? __('% Comments') : $more);
elseif ( $number == 0 )
$output = ( false === $zero ) ? __('No Comments') : $zero;
else // must be one
$output = ( false === $one ) ? __('1 Comment') : $one;
echo apply_filters('comments_number', $output, $number);
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/comments number « WordPress Codex
Function Reference/comments number. Languages: English • 日本語 • (Add your language) ... Usage. <?php comments_number( $zero, $one, $more ); ?> ...
codex.wordpress.org - WordPress › Support » printf and comments_number() order
I'm customizing the starkers theme which re-uses a lot of the twentyten functions. I 'd like to display the post meta data using this modified twentyten_posted_on() ...
wordpress.org - How to show number of comments in WordPress | Zemalf.com
Mar 6, 2010 ... WordPress also has comments_number template tag, which displays the number of comments, but doesn't link to the comments. In this case ...
zemalf.com - comments_number Wordpress hook details -- Adam Brown, BYU ...
WordPress hook directory comments_number. Description. Applied to the formatted text giving the number of comments generated by the comments_number ...
adambrown.info
Gebruikersdiscussies [ wordpress.org ]
- iansane on "comments_number not working"
- iansane on "comments_number not working"
- shilojean on "php comment_link not working for zero quantity"
- alchymyth on "php comment_link not working for zero quantity"
- shilojean on "php comment_link not working for zero quantity"
- alchymyth on "php comment_link not working for zero quantity"
- shilojean on "php comment_link not working for zero quantity"
- raskull on "If comments number in Post Loop"
- koyder on "If comments number in Post Loop"
- Mark / t31os on "Problem with comments_number function"