comments.php
83 lines
| 1 | <?php |
| 2 | if ( post_password_required() ) : |
| 3 | return; |
| 4 | endif; |
| 5 | global $kubio_comments_data; |
| 6 | |
| 7 | ?> |
| 8 | |
| 9 | <div id="comments" class="post-comments"> |
| 10 | <h4 class="comments-title"> |
| 11 | <span class="comments-number"> |
| 12 | <?php |
| 13 | comments_number( |
| 14 | $kubio_comments_data['none'], |
| 15 | $kubio_comments_data['one'], |
| 16 | str_replace( '{COMMENTS-COUNT}', '%', $kubio_comments_data['multiple'] ) |
| 17 | ); |
| 18 | ?> |
| 19 | </span> |
| 20 | </h4> |
| 21 | |
| 22 | <ol class="comment-list"> |
| 23 | <?php |
| 24 | wp_list_comments( |
| 25 | array( |
| 26 | 'walker' => apply_filters( 'kubio/walker-comment', '' ), |
| 27 | 'avatar_size' => $kubio_comments_data['avatar_size'], |
| 28 | 'format' => 'html5', |
| 29 | ) |
| 30 | ); |
| 31 | ?> |
| 32 | </ol> |
| 33 | |
| 34 | <?php |
| 35 | if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : |
| 36 | ?> |
| 37 | <div class="h-row"> |
| 38 | <div class="h-col h-col-auto"> |
| 39 | <div class="prev-posts"> |
| 40 | <?php |
| 41 | previous_comments_link( |
| 42 | sprintf( |
| 43 | '« %s', |
| 44 | __( |
| 45 | 'Older Comments', |
| 46 | 'kubio' |
| 47 | ) |
| 48 | ) |
| 49 | ); |
| 50 | ?> |
| 51 | </div> |
| 52 | </div> |
| 53 | <div class="h-col"></div> |
| 54 | <div class="h-col h-col-auto"> |
| 55 | <div class="next-posts"> |
| 56 | <?php |
| 57 | next_comments_link( |
| 58 | sprintf( |
| 59 | '%s »', |
| 60 | __( |
| 61 | 'Newer Comments', |
| 62 | 'kubio' |
| 63 | ) |
| 64 | ) |
| 65 | ); |
| 66 | ?> |
| 67 | </div> |
| 68 | </div> |
| 69 | </div> |
| 70 | <?php |
| 71 | endif; |
| 72 | ?> |
| 73 | |
| 74 | <?php |
| 75 | if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : |
| 76 | ?> |
| 77 | <p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'kubio' ); ?></p> |
| 78 | <?php |
| 79 | endif; |
| 80 | ?> |
| 81 | |
| 82 | </div> |
| 83 |