|
1 | | -<?php if(post_password_required()) : ?> |
| 1 | +<?php if ( post_password_required() ) { ?> |
2 | 2 | <a name="comments"></a> |
3 | 3 | <div id="comments"> |
4 | | - <p><?php _e('Password Required', 'origami') ?></p> |
| 4 | + <p><?php _e( 'Password Required', 'origami' ); ?></p> |
5 | 5 | </div> |
6 | 6 | <?php return; ?> |
7 | | -<?php endif; ?> |
| 7 | +<?php } ?> |
8 | 8 |
|
9 | | -<?php if(have_comments() || comments_open()) : ?> |
| 9 | +<?php if ( have_comments() || comments_open() ) { ?> |
10 | 10 | <a name="comments"></a> |
11 | 11 | <div id="comments" class="section"> |
12 | | - <?php if(have_comments()) : ?> |
| 12 | + <?php if ( have_comments() ) { ?> |
13 | 13 | <h3 class="comments-title"> |
14 | 14 | <?php |
15 | 15 | printf( |
16 | | - _n('One Comment', '%1$s Comments', get_comments_number(), 'origami'), |
17 | | - number_format_i18n(get_comments_number()), |
| 16 | + _n( 'One Comment', '%1$s Comments', get_comments_number(), 'origami' ), |
| 17 | + number_format_i18n( get_comments_number() ), |
18 | 18 | '<em>' . get_the_title() . '</em>' |
19 | 19 | ); |
20 | | - ?> |
| 20 | + ?> |
21 | 21 | </h3> |
22 | 22 |
|
23 | | - <?php if(get_comment_pages_count() > 1 && get_option('page_comments')) : ?> |
| 23 | + <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) { ?> |
24 | 24 | <div class="navigation"> |
25 | 25 | <div |
26 | | - class="nav-previous"><?php previous_comments_link(__('<span class="meta-nav">←</span> Older Comments', 'origami')); ?></div> |
| 26 | + class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">←</span> Older Comments', 'origami' ) ); ?></div> |
27 | 27 | <div |
28 | | - class="nav-next"><?php next_comments_link(__('Newer Comments <span class="meta-nav">→</span>', 'origami')); ?></div> |
| 28 | + class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">→</span>', 'origami' ) ); ?></div> |
29 | 29 | </div> |
30 | | - <?php endif; ?> |
| 30 | + <?php } ?> |
31 | 31 |
|
32 | 32 | <ol class="commentlist"> |
33 | 33 | <?php |
34 | | - // List comments |
35 | | - wp_list_comments(array( |
36 | | - 'callback' => 'origami_comment' |
37 | | - )); |
38 | | - ?> |
| 34 | + // List comments |
| 35 | + wp_list_comments( array( |
| 36 | + 'callback' => 'origami_comment', |
| 37 | + ) ); |
| 38 | + ?> |
39 | 39 | </ol> |
40 | | - <?php endif; ?> |
| 40 | + <?php } ?> |
41 | 41 |
|
42 | 42 | <?php |
43 | 43 | // Display the comment form |
44 | 44 | $commenter = wp_get_current_commenter(); |
45 | | - comment_form(array( |
| 45 | + comment_form( array( |
46 | 46 | 'fields' => array( |
47 | | - 'author' => sprintf('<input name="author" type="text" placeholder="%s" value="' . esc_attr( $commenter['comment_author'] ) . '" required />', __('Name*', 'origami')), |
48 | | - 'email' => sprintf('<input name="email" type="text" placeholder="%s" value="' . esc_attr( $commenter['comment_author_email'] ) . '" required />', __('Email*', 'origami')), |
49 | | - 'url' => sprintf('<input name="url" type="text" placeholder="%s" value="' . esc_attr( $commenter['comment_author_url'] ) . '" />', __('Website', 'origami')), |
| 47 | + 'author' => sprintf( '<input name="author" type="text" placeholder="%s" value="' . esc_attr( $commenter['comment_author'] ) . '" required />', __( 'Name*', 'origami' ) ), |
| 48 | + 'email' => sprintf( '<input name="email" type="text" placeholder="%s" value="' . esc_attr( $commenter['comment_author_email'] ) . '" required />', __( 'Email*', 'origami' ) ), |
| 49 | + 'url' => sprintf( '<input name="url" type="text" placeholder="%s" value="' . esc_attr( $commenter['comment_author_url'] ) . '" />', __( 'Website', 'origami' ) ), |
50 | 50 | ), |
51 | 51 | 'comment_field' => '<textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea>', |
52 | | - )); |
53 | | - ?> |
| 52 | + ) ); |
| 53 | + ?> |
54 | 54 | </div> |
55 | | -<?php endif; ?> |
| 55 | +<?php } ?> |
56 | 56 |
|
57 | | -<?php if(!comments_open() && !is_page() && post_type_supports(get_post_type(), 'comments')) : ?> |
| 57 | +<?php if ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) { ?> |
58 | 58 | <div id="comments" class="comments-disabled content"> |
59 | | - <p><?php _e('Comments are Disabled', 'origami') ?></p> |
| 59 | + <p><?php _e( 'Comments are Disabled', 'origami' ); ?></p> |
60 | 60 | </div> |
61 | | -<?php endif; ?> |
| 61 | +<?php } ?> |
0 commit comments