comments.php (5086B)
1 <?php 2 if (post_password_required()): 3 return; 4 endif; 5 ?> 6 7 8 <div class="post-comments col-padding mdc-elevation--z5"> 9 <?php if (have_comments()): ?> 10 <div class="flexbox middle-sm space-bottom-large comments-counter-wrapper"> 11 <h3 class="comments-title"> 12 <span class="comments-number"> 13 <?php comments_number(__('No Comments', 'materialis'), __('Comments: <span>1</span>', 'materialis'), __('Comments: <span>%</span>', 'materialis')); ?> 14 </span> 15 </h3> 16 <button class="button color2 add-comment-toggler mdc-elevation--z7"><?php esc_html_e('Add comment', 'materialis') ?></button> 17 </div> 18 <ol class="comment-list"> 19 <?php 20 wp_list_comments(array( 21 'avatar_size' => '40', 22 'max_depth' => '2', 23 'reply_text' => '<i class="mdi mdi-message-text"></i> ' . __('Reply', 'materialis'), 24 )); 25 ?> 26 </ol> 27 28 <?php 29 if (get_comment_pages_count() > 1 && get_option('page_comments')): 30 ?> 31 <div class="navigation mdc-elevation--z5"> 32 <div class="prev-posts"> 33 <?php previous_comments_link("<i class=\"font-icon-post mdi mdi-chevron-left\"></i> " . __('Older Comments', 'materialis')); ?> 34 </div> 35 <div class="next-posts"> 36 <?php next_comments_link(__('Newer Comments', 'materialis') . " <i class=\"font-icon-post mdi mdi-chevron-right\"></i>"); ?> 37 </div> 38 </div> 39 <?php 40 endif; 41 42 elseif (comments_open() && post_type_supports(get_post_type(), 'comments')): ?> 43 <div class="flexbox middle-sm space-bottom-large comments-counter-wrapper"> 44 <h4 class="comments-title"> 45 <span class="comments-number"><?php esc_html_e('No Comments', 'materialis'); ?></span> 46 </h4> 47 <button class="button color2 add-comment-toggler mdc-elevation--z7"><?php esc_html_e('Add comment', 'materialis') ?></button> 48 </div> 49 <?php endif; 50 51 if ( ! comments_open() && get_comments_number() && post_type_supports(get_post_type(), 'comments')): ?> 52 <p class="no-comments"><?php _e('Comments are closed.', 'materialis'); ?></p> 53 <?php endif; ?> 54 55 <div class="comments-form"> 56 <div class="comment-form"> 57 <?php 58 comment_form( 59 array( 60 'title_reply' => __('Add your comment', 'materialis'), 61 'class_submit' => 'submit button color2 mdc-elevation--z7', 62 'label_submit' => __('Send', 'materialis'), 63 'comment_notes_before' => '', 64 'comment_field' => '<div class="comment-form-comment mdc-text-field mdc-text-field--textarea">' . 65 '<textarea id="comment" name="comment" class="mdc-text-field__input" rows="8" cols="40" required></textarea>' . 66 '<label for="comment" class="mdc-floating-label">' . __('Comment', 'materialis') . '</label>' . 67 '</div>', 68 'fields' => apply_filters( 69 'comment_form_default_fields', 70 array( 71 'author' => '<div class="comment-form-author mdc-text-field half right-margin">' . 72 '<input type="text" id="author" name="author" class="mdc-text-field__input" size="30" maxlength="245" required>' . 73 '<label class="mdc-floating-label" for="author">' . __('Your Name', 'materialis') . '</label>' . 74 '<div class="mdc-line-ripple"></div>' . 75 '</div>', 76 'email' => '<div class="comment-form-email mdc-text-field half left-margin">' . 77 '<input type="email" id="email" name="email" class="mdc-text-field__input" size="30" maxlength="100" required>' . 78 '<label class="mdc-floating-label" for="email">' . __('Your Email', 'materialis') . '</label>' . 79 '<div class="mdc-line-ripple"></div>' . 80 '</div>', 81 'url' => '<div class="comment-form-url mdc-text-field">' . 82 '<input type="text" id="url" name="url" class="mdc-text-field__input" size="30" maxlength="200">' . 83 '<label class="mdc-floating-label" for="url">' . __('Your Website', 'materialis') . '</label>' . 84 '<div class="mdc-line-ripple"></div>' . 85 '</div>', 86 ) 87 ), 88 ) 89 ); 90 ?> 91 </div> 92 </div> 93 94 </div> 95 <!-- /post-comments -->