/
var
/
www
/
barefootlaw.org
/
wp-content
/
themes
/
barefoot
/
Upload File
HOME
<?php /** * The template for displaying comments * * The area of the page that contains both current comments * and the comment form. * * @package Aisconverse * @subpackage Covercase * @since Covercase 1.0 */ /** * If the current post is protected by a password and * the visitor has not yet entered the password we will * return early without loading the comments. */ if ( post_password_required() ) { return; } ?> <?php if ( have_comments() ) : ?> <div class="single-post-comment-list" id="comments"> <?php $comments_number = get_comments_number(); if ( 1 === absint( $comments_number ) ) { $comment_word = esc_html__( 'Comment', 'covercase' ); } else { $comment_word = esc_html__( 'Comments', 'covercase' ); } ?> <div class="single-post-comment-list__head"> <div class="single-post-comment-list__total-title"><?php echo esc_html( $comment_word ); ?></div> <div class="single-post-comment-list__total-comments"><?php echo esc_html( $comments_number ); ?></div> </div> <?php the_comments_navigation(); ?> <div class="single-post-comment-list__body"> <?php wp_list_comments( array( 'walker' => new Covercase_Comments_Walker(), 'style' => 'div' ) ); ?> </div> </div> <?php if ( get_comment_pages_count() > 1 ) { ?> <div class="single-post-comment-nav"> <?php paginate_comments_links(); ?> </div> <?php } ?> <?php endif; // Check for have_comments(). ?> <?php // If comments are closed and there are comments, let's leave a little note, shall we? if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) { ?> <div class="single-post-comment-list--disabled text-danger text-center"><?php esc_html_e( 'Comments are closed.', 'covercase' ); ?></div> <?php } ?> <?php $commenter = wp_get_current_commenter(); $user = wp_get_current_user(); $user_identity = $user->exists() ? $user->display_name : ''; $args = array(); if ( ! isset( $args['format'] ) ) { $args['format'] = current_theme_supports( 'html5', 'comment-form' ) ? 'html5' : 'xhtml'; } $req = get_option( 'require_name_email' ); $aria_req = ( $req ? " aria-required='true'" : '' ); $html_req = ( $req ? " required='required'" : '' ); $html5 = 'html5' === $args['format']; $reqs = ( $req ? '*' : '' ); $fields = array( 'author' => '<div class="row wpcf7-form-control-wrap"><div class="col-sm-4"><input id="author" name="author" placeholder="' . esc_attr__( 'Your name', 'covercase' ) . $reqs . '" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" maxlength="245"' . $aria_req . $html_req . ' /></div>', 'email' => '<div class="col-sm-4"><input id="email" name="email" placeholder="' . esc_attr__( 'Email address', 'covercase' ) . $reqs . '" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" maxlength="100" aria-describedby="email-notes"' . $aria_req . $html_req . ' /></div>', 'url' => '<div class="col-sm-4"><input id="url" name="url" placeholder="' . esc_attr__( 'Website', 'covercase' ) . '" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" maxlength="200" /></div></div>', ); $fieldset = ''; $notice = '<span>'.esc_html__( 'Your email address will not be published', 'covercase' ).'</span>'; if ( is_user_logged_in() ) { $fieldset = '<div class="form-wrap">'; $notice = ''; } $args = array( 'comment_field' => $fieldset . '<div class="wpcf7-form-control-wrap"><textarea id="comment" placeholder="' . esc_attr__( 'Comment*', 'covercase' ) . '" name="comment" maxlength="65525" aria-required="true" required="required"></textarea></div></div>', 'fields' => apply_filters( 'comment_form_default_fields', $fields ), 'title_reply' => sprintf( '%s<div class="comment-reply-title__meta">%s', esc_html__( 'Your Comment', 'covercase' ), $notice ), 'label_submit' => esc_html__( 'Add Comment', 'covercase' ), 'submit_field' => '%1$s %2$s', 'comment_notes_before' => '', 'cancel_reply_before' => '', 'cancel_reply_after' => '</div>', 'logged_in_as' => '<div class="logged-in-as">' . sprintf( __( '<a href="%1$s" aria-label="%2$s">Logged in as %3$s</a>. <a href="%4$s">Log out?</a>', 'covercase' ), get_edit_user_link(), esc_attr( sprintf( __( 'Logged in as %s. Edit your profile.', 'covercase' ), $user_identity ) ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( get_the_ID() ) ) ) ) . '</div>', 'title_reply_before' => '<div id="reply-title" class="comment-reply-title">', 'title_reply_after' => '</div>', 'cancel_reply_link' => esc_html__( 'Cancel Reply', 'covercase' ), 'class_form' => 'comment-form wpcf7-form ' ); ?> <div class="comment-respond <?php echo is_user_logged_in() ? 'comment-respond--logged' : ''; ?> wpcf7"><?php comment_form( $args ); ?></div>