Ticket #4964: comments-template.patch
| File comments-template.patch, 1.0 KB (added by Viper007Bond, 6 years ago) |
|---|
-
wp-includes/comment-template.php
161 161 return apply_filters('get_comments_number', $count); 162 162 } 163 163 164 function comments_number( $zero = false, $one = false, $more = false, $ deprecated= '' ) {164 function comments_number( $zero = false, $one = false, $more = false, $number = '' ) { 165 165 global $id; 166 $number = get_comments_number($id);166 if ( !is_numeric($number) ) $number = get_comments_number($id); 167 167 168 168 if ( $number > 1 ) 169 169 $output = str_replace('%', $number, ( false === $more ) ? __('% Comments') : $more); 170 elseif ( $number == 0 ) 170 elseif ( $number == 1 ) 171 $output = ( false === $one ) ? __('1 Comment') : $one; 172 else // must be 0 or something out of range 171 173 $output = ( false === $zero ) ? __('No Comments') : $zero; 172 else // must be one173 $output = ( false === $one ) ? __('1 Comment') : $one;174 174 175 175 echo apply_filters('comments_number', $output, $number); 176 176 }
