| 1 | <?php |
|---|
| 2 | /** |
|---|
| 3 | * The template for displaying comments |
|---|
| 4 | * |
|---|
| 5 | * The area of the page that contains both current comments |
|---|
| 6 | * and the comment form. |
|---|
| 7 | * |
|---|
| 8 | * @subpackage MultiSport |
|---|
| 9 | * @author customizablethemes |
|---|
| 10 | * @since MultiSport 1.0.0 |
|---|
| 11 | * |
|---|
| 12 | */ |
|---|
| 13 | |
|---|
| 14 | if ( post_password_required() ) { |
|---|
| 15 | return; |
|---|
| 16 | } |
|---|
| 17 | ?> |
|---|
| 18 | |
|---|
| 19 | <?php if ( have_comments() ) : ?> |
|---|
| 20 | <h3 id="comments"> |
|---|
| 21 | <?php |
|---|
| 22 | $comments_number = get_comments_number(); |
|---|
| 23 | if ( '1' === $comments_number ) { |
|---|
| 24 | /* translators: %s: post title */ |
|---|
| 25 | printf( _x( 'One Reply to “%s”', 'comments title', 'multisport' ), get_the_title() ); |
|---|
| 26 | } else { |
|---|
| 27 | printf( |
|---|
| 28 | /* translators: 1: number of comments, 2: post title */ |
|---|
| 29 | _nx( |
|---|
| 30 | '%1$s Reply to “%2$s”', |
|---|
| 31 | '%1$s Replies to “%2$s”', |
|---|
| 32 | $comments_number, |
|---|
| 33 | 'comments title', |
|---|
| 34 | 'multisport' |
|---|
| 35 | ), |
|---|
| 36 | number_format_i18n( $comments_number ), |
|---|
| 37 | get_the_title() |
|---|
| 38 | ); |
|---|
| 39 | } |
|---|
| 40 | ?> |
|---|
| 41 | </h3><!-- #comments --> |
|---|
| 42 | |
|---|
| 43 | <ol class="commentlist"> |
|---|
| 44 | <?php |
|---|
| 45 | wp_list_comments( array( |
|---|
| 46 | 'style' => 'ol', |
|---|
| 47 | 'short_ping' => true, |
|---|
| 48 | 'avatar_size' => 56, |
|---|
| 49 | ) ); |
|---|
| 50 | ?> |
|---|
| 51 | </ol><!-- .commentlist --> |
|---|
| 52 | |
|---|
| 53 | <div class="comment-navigation"> |
|---|
| 54 | |
|---|
| 55 | <div class="alignleft"><?php previous_comments_link(); ?> |
|---|
| 56 | </div><!-- .alignleft --> |
|---|
| 57 | |
|---|
| 58 | <div class="alignright"><?php next_comments_link(); ?> |
|---|
| 59 | </div><!-- .alignright --> |
|---|
| 60 | |
|---|
| 61 | </div><!-- .comment-navigation --> |
|---|
| 62 | |
|---|
| 63 | <?php endif; // have_comments() ?> |
|---|
| 64 | |
|---|
| 65 | <?php |
|---|
| 66 | // If comments are closed and there are comments, let's leave a little note, shall we? |
|---|
| 67 | if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : |
|---|
| 68 | ?> |
|---|
| 69 | <p class="no-comments"><?php _e( 'Comments are closed.', 'multisport' ); ?></p> |
|---|
| 70 | <?php endif; ?> |
|---|
| 71 | |
|---|
| 72 | <?php comment_form(); ?> |
|---|