File: /home/platne/serwer143450/public_html/exzo.hillconnect.pl/wp-content/themes/exzo/comments.php
<?php
/**
* The template for displaying comments
*
* The area of the page that contains both current comments
* and the comment form.
*
*/
/*
* 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;
}
?>
<div class="h3"> <?php esc_html_e( 'comments', 'exzo' ); ?>
</div>
<div class="title-underline left"><span></span></div>
<div class="simple-article size-3 grey uppercase col-xs-b5"> <?php esc_html_e( ' There are ', 'exzo' ); ?><?php comments_number(); ?> </div>
<div class="empty-space col-xs-b15 col-md-b50"></div>
<?php
function exzo_comment( $comment, $args, $depth ) {
if ( 'div' === $args['style'] ) {
$tag = 'div';
$add_below = 'comment';
} else {
$tag = 'div';
$add_below = 'div-comment';
}
?>
<<?php echo esc_html( $tag ) ?> <?php comment_class( empty( $args['has_children'] ) ? 'comment-entry' : 'comment-entry parent' ) ?> id="comment-<?php comment_ID() ?>">
<?php if ( 'div' != $args['style'] ) : ?>
<div id="div-comment-<?php comment_ID() ?>" class="comment-body">
<?php endif; ?>
<div class="comment-top">
<?php
ob_start();
$atts = array(
'class' => 'image'
);
if ( $args['avatar_size'] != 0 ) {
echo wp_kses_post( get_avatar( $comment, $args['avatar_size'], '', '', $atts ) );
}
?>
<div class="content">
<h6 class="h6 col-xs-b5"><?php echo wp_kses_post( get_comment_author() ) ?></h6>
<div class="simple-article size-1 grey uppercase">
<?php
/* translators: 1: date, 2: time */
echo esc_html( get_comment_time( 'H:i ' ) );
$d = " F j / Y";
echo esc_html( get_comment_date( $d ) ); ?>
</div>
</div>
<?php if ( $comment->comment_approved == '0' ) : ?>
<em class="comment-awaiting-moderation"><?php esc_html_e( 'Your comment is awaiting moderation.', 'exzo' ); ?></em>
<br/>
<?php endif; ?>
<?php comment_reply_link( array_merge( $args, array(
'add_below' => sanitize_text_field( $add_below ),
'before' => ' <a class="button size-1 style-5" href="#">
<span class="button-wrapper">
<span class="icon"><i class="fa fa-comment-o" aria-hidden="true"></i></span>
',
'after' => ' </span>
</a>',
'depth' => sanitize_text_field( $depth ),
'max_depth' => sanitize_text_field( $args['max_depth'] )
) ) ); ?>
<a class="button size-1 style-5" href="#">
<span class="button-wrapper">
<span class="icon"><i class="fa fa-comment-o" aria-hidden="true"></i></span>
<span class="text"> <?php echo esc_html__( 'reply', 'exzo' ); ?></span>
</span>
</a>
<div class="comment-metadata"><a
href="<?php echo esc_url( htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ); ?>">
</div>
<div class="simple-article size-2">
<?php comment_text(); ?>
</div>
<?php edit_comment_link( esc_html__( '(Edit)', 'exzo' ), ' ', '' );
?>
<?php if ( 'div' != $args['style'] ) : ?>
</div>
<div class="empty-space col-xs-b35"></div>
<?php endif; ?>
<?php
}
?>
<div class="comments">
<?php
/*
* function to construct comments
*/
?>
<?php if ( have_comments() ) : ?>
<div class="comments-wrapper">
<?php
//show comments
wp_list_comments( array(
'walker' => new exzo_comment_walker(),
'type' => 'all',
'short_ping' => true,
// 'callback' => 'exzo_comment'
) );
?>
</div>
<?php
endif; // have_comments()
// 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' ) ) :
?>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'exzo' ); ?></p>
<?php endif;
?>
</div><!-- .comments-area -->
<?php echo str_replace( 'avatar ', ' avatar image ', ob_get_clean() ); ?>
<div class="empty-space col-xs-b15"></div>
<div class="row m10">
<div id="comments-form">
<?php
//We get the option to comment form
ob_start();
$args = array(
'comment_notes_before' => '',
'submit_field' => '<div class="form-submit">%1$s %2$s</div>',
'title_reply' => esc_html__( 'leave a comment', 'exzo' ),
'title_reply_to' => esc_html__( 'Leave a comment to %s', 'exzo' ),
'fields' => array(
'author' => '
<div class="col-sm-6">
<input type="text" class="simple-input" name="author" required="" placeholder=" ' . esc_html__( 'First Name (*)', 'exzo' ) . '" >
<div class="empty-space col-xs-b20"></div>
</div>
',
'email' => '
<div class="col-sm-6">
<input type="email" class="simple-input" name="email" required="" placeholder=" ' . esc_html__( 'Email (*)', 'exzo' ) . '">
<div class="empty-space col-xs-b20"></div>
</div>',
),
'comment_field' => ' <div class="col-sm-12">
<textarea class="simple-input" name="comment"
placeholder="' . esc_html__( 'Your Comment (*)', 'exzo' ) . '" maxlength="65525" required="required"></textarea>
<div class="empty-space col-xs-b20"></div>
</div>',
'submit_button' => ' <div class="col-sm-12 text-right">
<div class="button size-2 style-3">
<span class="button-wrapper">
<span class="icon"><img src=" ' . esc_url( get_template_directory_uri() . '/img/icon-4.png' ) . '" alt=""></span>
<span class="text">' . esc_html__( 'submit', 'exzo' ) . '</span>
</span>
<input type="submit"/>
</div>
</div>'
);
comment_form( $args );
$str = ob_get_clean();
echo str_replace( 'comment-form', 'form-comment ', $str )
?> </div>
</div>
<div class="empty-space col-xs-b35 col-md-b70"></div>