File: /mnt/data/just-litigate/wp-content/themes/lawna/comments.php
<?php
/**
* @package Case-Themes
*/
if ( post_password_required() ) {
return;
}
$post_related = lawna()->get_theme_opt( 'post_related', false );
?>
<div id="comments" class="comments-area">
<?php
if ( have_comments() ) : ?>
<div class="comment-list-wrap">
<h2 class="comments-title">
<?php
$comment_count = get_comments_number();
if ( 1 === intval($comment_count) ) {
echo esc_html__( '1 Comment', 'lawna' );
} else {
echo esc_attr( $comment_count ).' '.esc_html__('Comments', 'lawna');
}
?>
</h2>
<?php the_comments_navigation(); ?>
<ul class="comment-list">
<?php
wp_list_comments( array(
'style' => 'ul',
'short_ping' => true,
'callback' => 'lawna_comment_list',
'max_depth' => 3
) );
?>
</ul>
<?php the_comments_navigation(); ?>
</div>
<?php if ( ! comments_open() ) : ?>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'lawna' ); ?></p>
<?php
endif;
endif;
$args = array(
'id_form' => 'commentform',
'id_submit' => 'submit',
'class_submit' => 'btn btn-icon-box',
'title_reply' => esc_attr__( 'Leave A Comment', 'lawna'),
'title_reply_to' => esc_attr__( 'Leave A Comment To ', 'lawna') . '%s',
'cancel_reply_link' => esc_attr__( 'Cancel Comment', 'lawna'),
'submit_button' => '<button name="%1$s" type="submit" id="%2$s" class="%3$s" /><span class="pxl--btn-text">Submit Now
<svg xmlns="http://www.w3.org/2000/svg" width="38" height="38" viewBox="0 0 20 20" fill="none">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.2428 4.41082C10.5682 4.08539 11.0959 4.08539 11.4213 4.41082L16.4213 9.41083C16.7467 9.73625 16.7467 10.2639 16.4213 10.5893L11.4213 15.5893C11.0959 15.9147 10.5682 15.9147 10.2428 15.5893C9.91737 15.2639 9.91737 14.7362 10.2428 14.4108L13.8202 10.8334H4.16536C3.70513 10.8334 3.33203 10.4603 3.33203 10.0001C3.33203 9.53983 3.70513 9.16675 4.16536 9.16675H13.8202L10.2428 5.58934C9.91737 5.2639 9.91737 4.73626 10.2428 4.41082Z" fill="black"/>
</svg>
</span></button>',
'comment_notes_before' => '',
'fields' => apply_filters( 'comment_form_default_fields', array(
'author_firstname' =>
'<div class="row"><div class="comment-form-author col-lg-12 col-md-12 col-sm-12">'.
'<div class="pxl-title">first name</div><input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) .
'" size="30" placeholder="'.esc_attr__('e.g. Oliver Spiteri', 'lawna').'"/></div>',
'author_lastname' =>
'<div class="comment-form-author col-lg-12 col-md-12 col-sm-12">'.
'<div class="pxl-title">last name</div><input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) .
'" size="30" placeholder="'.esc_attr__('e.g. Oliver Spiteri', 'lawna').'"/></div>',
'email' =>
'<div class="comment-form-email col-lg-12 col-md-12 col-sm-12">'.
'<div class="pxl-title">email</div><input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) .
'" size="30" placeholder="'.esc_attr__('[email protected]', 'lawna').'"/></div></div>',
)
),
'comment_field' => '<div class="comment-form-comment"><div class="pxl-title">comment</div><textarea id="comment" name="comment" cols="45" rows="8" placeholder="'.esc_attr__('Write your comment here...', 'lawna').'" aria-required="true">' .
'</textarea></div>',
);
comment_form($args); ?>
</div>
<?php if ($post_related) :?>
<?php lawna()->blog->get_related_post(); ?>
<?php endif; ?>