Changeset 4494
- Timestamp:
- 11/19/2006 07:45:28 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment-template.php
r4144 r4494 162 162 } 163 163 164 function comments_number( $zero = 'No Comments', $one = '1 Comment', $more = '% Comments', $number = '' ) { 165 global $id, $comment; 166 $number = get_comments_number( $id ); 167 if ($number == 0) { 168 $blah = $zero; 169 } elseif ($number == 1) { 170 $blah = $one; 171 } elseif ($number > 1) { 172 $blah = str_replace('%', $number, $more); 173 } 174 echo apply_filters('comments_number', $blah); 164 function comments_number( $zero = false, $one = false, $more = false, $number = '' ) { 165 global $id; 166 $number = get_comments_number($id); 167 168 if ( $number > 1 ) 169 $output = str_replace('%', $number, ( false === $more ) ? __('% Comments') : $more); 170 elseif ( $number == 0 ) 171 $output = ( false === $zero ) ? __('No Comments') : $zero; 172 else // must be one 173 $output = ( false === $one ) ? __('1 Comment') : $one; 174 175 echo apply_filters('comments_number', $output, $number); 175 176 } 176 177
Note: See TracChangeset
for help on using the changeset viewer.