Ticket #10177: get-comments-number-text.diff
File get-comments-number-text.diff, 1.4 KB (added by , 16 years ago) |
---|
-
wp-includes/comment-template.php
542 542 * @param string $zero Text for no comments 543 543 * @param string $one Text for one comment 544 544 * @param string $more Text for more than one comment 545 * @param string $deprecated Not used.546 545 */ 547 function comments_number( $zero = false, $one = false, $more = false, $deprecated = '' ) { 546 function comments_number() { 547 $args = func_get_args(); 548 echo call_user_func_array( 'get_comments_number_text', $args ); 549 } 550 551 /** 552 * Return the language string for the number of comments the current post has. 553 * 554 * @since 2.9 555 * @uses $id 556 * @uses apply_filters() Calls the 'comments_number' hook on the output and number of comments respectively. 557 * 558 * @param string $zero Text for no comments 559 * @param string $one Text for one comment 560 * @param string $more Text for more than one comment 561 */ 562 function get_comments_number_text( $zero = false, $one = false, $more = false ) { 548 563 global $id; 549 564 $number = get_comments_number($id); 550 565 … … 555 570 else // must be one 556 571 $output = ( false === $one ) ? __('1 Comment') : $one; 557 572 558 echoapply_filters('comments_number', $output, $number);573 return apply_filters('comments_number', $output, $number); 559 574 } 560 575 561 576 /**