Changeset 42343 for trunk/src/wp-includes/theme-compat/comments.php
- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/theme-compat/comments.php
r42228 r42343 6 6 * 7 7 * This file is here for backward compatibility with old themes and will be removed in a future version 8 *9 8 */ 10 9 _deprecated_file( … … 18 17 19 18 // Do not delete these lines 20 if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) 21 die ('Please do not load this page directly. Thanks!'); 19 if ( ! empty( $_SERVER['SCRIPT_FILENAME'] ) && 'comments.php' == basename( $_SERVER['SCRIPT_FILENAME'] ) ) { 20 die( 'Please do not load this page directly. Thanks!' ); 21 } 22 22 23 24 <p class="nocomments"><?php _e( 'This post is password protected. Enter the password to view comments.'); ?></p>23 if ( post_password_required() ) { ?> 24 <p class="nocomments"><?php _e( 'This post is password protected. Enter the password to view comments.' ); ?></p> 25 25 <?php 26 27 26 return; 27 } 28 28 ?> 29 29 … … 33 33 <h3 id="comments"> 34 34 <?php 35 if ( 1 == get_comments_number() ) { 36 /* translators: %s: post title */ 37 printf( __( 'One response to %s' ), '“' . get_the_title() . '”' ); 38 } else { 39 /* translators: 1: number of comments, 2: post title */ 40 printf( _n( '%1$s response to %2$s', '%1$s responses to %2$s', get_comments_number() ), 41 number_format_i18n( get_comments_number() ), '“' . get_the_title() . '”' ); 42 } 35 if ( 1 == get_comments_number() ) { 36 /* translators: %s: post title */ 37 printf( __( 'One response to %s' ), '“' . get_the_title() . '”' ); 38 } else { 39 /* translators: 1: number of comments, 2: post title */ 40 printf( 41 _n( '%1$s response to %2$s', '%1$s responses to %2$s', get_comments_number() ), 42 number_format_i18n( get_comments_number() ), '“' . get_the_title() . '”' 43 ); 44 } 43 45 ?> 44 46 </h3> 45 47 46 48 <div class="navigation"> 47 <div class="alignleft"><?php previous_comments_link() ?></div>48 <div class="alignright"><?php next_comments_link() ?></div>49 <div class="alignleft"><?php previous_comments_link(); ?></div> 50 <div class="alignright"><?php next_comments_link(); ?></div> 49 51 </div> 50 52 51 53 <ol class="commentlist"> 52 <?php wp_list_comments(); ?>54 <?php wp_list_comments(); ?> 53 55 </ol> 54 56 55 57 <div class="navigation"> 56 <div class="alignleft"><?php previous_comments_link() ?></div>57 <div class="alignright"><?php next_comments_link() ?></div>58 <div class="alignleft"><?php previous_comments_link(); ?></div> 59 <div class="alignright"><?php next_comments_link(); ?></div> 58 60 </div> 59 61 <?php else : // this is displayed if there are no comments so far ?> … … 64 66 <?php else : // comments are closed ?> 65 67 <!-- If comments are closed. --> 66 <p class="nocomments"><?php _e( 'Comments are closed.'); ?></p>68 <p class="nocomments"><?php _e( 'Comments are closed.' ); ?></p> 67 69 68 70 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.