| 1 | <?php |
|---|
| 2 | /** |
|---|
| 3 | * The template for displaying comments |
|---|
| 4 | * |
|---|
| 5 | * This is the template that displays the area of the page that contains both the current comments |
|---|
| 6 | * and the comment form. |
|---|
| 7 | * |
|---|
| 8 | * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ |
|---|
| 9 | * |
|---|
| 10 | * @package joyas-shop |
|---|
| 11 | */ |
|---|
| 12 | |
|---|
| 13 | /* |
|---|
| 14 | * If the current post is protected by a password and |
|---|
| 15 | * the visitor has not yet entered the password we will |
|---|
| 16 | * return early without loading the comments. |
|---|
| 17 | */ |
|---|
| 18 | if ( post_password_required() ) { |
|---|
| 19 | return; |
|---|
| 20 | } |
|---|
| 21 | ?> |
|---|
| 22 | <div class="clearfix"></div> |
|---|
| 23 | <div id="comments" class="comments-area clearfix" > |
|---|
| 24 | |
|---|
| 25 | <?php |
|---|
| 26 | // You can start editing here -- including this comment! |
|---|
| 27 | if ( have_comments() ) : |
|---|
| 28 | ?> |
|---|
| 29 | <div class="details-page-inner-box comment-meta"> |
|---|
| 30 | <h4 class="comments-title widget-title"> |
|---|
| 31 | <?php |
|---|
| 32 | $Business_Consultant_Finder_comment_count = get_comments_number(); |
|---|
| 33 | if ( '1' === $Business_Consultant_Finder_comment_count ) { |
|---|
| 34 | printf( |
|---|
| 35 | /* translators: 1: title. */ |
|---|
| 36 | esc_html__( 'One thought on “%1$s”', 'joyas-shop' ), |
|---|
| 37 | '<span>' . esc_html( get_the_title() ) . '</span>' |
|---|
| 38 | ); |
|---|
| 39 | } else { |
|---|
| 40 | printf( // WPCS: XSS OK. |
|---|
| 41 | /* translators: 1: comment count number, 2: title. */ |
|---|
| 42 | esc_html( _nx( '%1$s thought on “%2$s”', '%1$s thoughts on “%2$s”', $Business_Consultant_Finder_comment_count, 'comments title', 'joyas-shop' ) ), |
|---|
| 43 | number_format_i18n( $Business_Consultant_Finder_comment_count ), |
|---|
| 44 | '<span>' . get_the_title() . '</span>' |
|---|
| 45 | ); |
|---|
| 46 | } |
|---|
| 47 | ?> |
|---|
| 48 | </h4><!-- .comments-title --> |
|---|
| 49 | |
|---|
| 50 | <?php the_comments_navigation(); ?> |
|---|
| 51 | |
|---|
| 52 | <ul class="comment-list"> |
|---|
| 53 | <?php |
|---|
| 54 | wp_list_comments( array( |
|---|
| 55 | 'style' => 'ul', |
|---|
| 56 | 'short_ping' => true, |
|---|
| 57 | 'callback' => 'joyas_shop_walker_comment', |
|---|
| 58 | ) ); |
|---|
| 59 | ?> |
|---|
| 60 | </ul><!-- .comment-list --> |
|---|
| 61 | |
|---|
| 62 | <?php |
|---|
| 63 | the_comments_navigation(); |
|---|
| 64 | |
|---|
| 65 | // If comments are closed and there are comments, let's leave a little note, shall we? |
|---|
| 66 | if ( ! comments_open() ) : |
|---|
| 67 | ?> |
|---|
| 68 | <p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'joyas-shop' ); ?></p> |
|---|
| 69 | <?php |
|---|
| 70 | endif; |
|---|
| 71 | ?> |
|---|
| 72 | </div> |
|---|
| 73 | |
|---|
| 74 | |
|---|
| 75 | <?php |
|---|
| 76 | endif; // Check for have_comments(). |
|---|
| 77 | ?> |
|---|
| 78 | <?php |
|---|
| 79 | $commenter = wp_get_current_commenter(); |
|---|
| 80 | $consent = empty( $commenter['comment_author_email'] ) ? '' : ' checked="checked"'; |
|---|
| 81 | |
|---|
| 82 | $args = array( |
|---|
| 83 | 'fields' => apply_filters( |
|---|
| 84 | 'comment_form_default_fields', array( |
|---|
| 85 | 'author' =>'<div class="col-xl-4 col-lg-6 col-md-4 col-12">' . '<input id="author" placeholder="' . esc_attr__( 'Your Name', 'joyas-shop' ) . '" name="author" type="text" value="' . |
|---|
| 86 | esc_attr( $commenter['comment_author'] ) . '" size="30" />'. |
|---|
| 87 | ( $req ? '<span class="required">*</span>' : '' ) . |
|---|
| 88 | '</div>' |
|---|
| 89 | , |
|---|
| 90 | 'email' => '<div class="col-xl-4 col-lg-6 col-md-4 col-12">' . '<input id="email" placeholder="' . esc_attr__( 'Your Email', 'joyas-shop' ) . '" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . |
|---|
| 91 | '" size="30" />' . |
|---|
| 92 | ( $req ? '<span class="required">*</span>' : '' ) |
|---|
| 93 | . |
|---|
| 94 | '</div>', |
|---|
| 95 | 'url' => '<div class="col-xl-4 col-lg-6 col-md-4 col-12">' . |
|---|
| 96 | '<input id="url" name="url" placeholder="' . esc_attr__( 'Website', 'joyas-shop' ) . '" type="text" value="' . esc_url( $commenter['comment_author_url'] ) . '" size="30" /> ' . |
|---|
| 97 | |
|---|
| 98 | '</div>', |
|---|
| 99 | 'cookies' => '<p class="comment-form-cookies-consent col-12"><input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" class="fas fa-check" type="checkbox" value="yes"' . $consent . ' />' . '<label for="wp-comment-cookies-consent">'.esc_html__( 'Save my name, email, and website in this browser for the next time I comment.','joyas-shop' ) .'</label></p>', |
|---|
| 100 | |
|---|
| 101 | |
|---|
| 102 | ) |
|---|
| 103 | ), |
|---|
| 104 | 'comment_field' => '<div class="col-12"><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true" placeholder="' . esc_attr__( 'Comment', 'joyas-shop' ) . '">' . |
|---|
| 105 | '</textarea></div>', |
|---|
| 106 | |
|---|
| 107 | |
|---|
| 108 | 'class_form' => 'row', |
|---|
| 109 | 'submit_button' => '<button type="submit" class="btn theme-btn" id="submit-new"><span>'. esc_html__( 'Post Comment', 'joyas-shop' ) .'</span></button>', |
|---|
| 110 | 'title_reply_before' => ' <h4 class="widget-title">', |
|---|
| 111 | 'title_reply_after' => '</h4>', |
|---|
| 112 | 'comment_notes_before' => '<p class="comment-notes col-12">' . esc_html__( 'Your email address will not be published. Required fields are marked *.','joyas-shop' ) . '</p>', |
|---|
| 113 | 'comment_notes_after' => '<div class="form-allowed-tags col-12"><div class="text-wrp">' ./* translators: 1: title. */ sprintf( esc_html__( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', 'joyas-shop' ), ' <code>' . allowed_tags() . '</code>' ) . '</div></div>', |
|---|
| 114 | |
|---|
| 115 | ); |
|---|
| 116 | ?> |
|---|
| 117 | <div class="details-page-inner-box comment-form" > |
|---|
| 118 | |
|---|
| 119 | <?php comment_form( $args );?> |
|---|
| 120 | |
|---|
| 121 | </div> |
|---|
| 122 | |
|---|
| 123 | </div><!-- #comments --> |
|---|