<?php
function webhosty_custom_comments($comment, $args, $depth){
	$GLOBALS['comment'] = $comment;
	extract($args, EXTR_SKIP);
	if ( 'div' == $args['style'] ) {
		$tag = 'div';
		$add_below = 'comment';
	}else{
		$tag = 'li';
		$add_below = 'div-comment';
	} 
	?>    

<<?php echo esc_attr($tag); ?> <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ) ?> id="comment-<?php comment_ID() ?>">


<?php if ( 'div' != $args['style'] ) : ?>
	<div id="div-comment-<?php comment_ID() ?>" class="commentary-item clearfix">
	<?php endif; ?>
	<div> 
	  <?php echo get_avatar($comment,$size='101') ?> 
	</div>
	<div class="commentary-post clearfix">
		<div class="time-name">
			<div class="data-time">
			  <i class="time-ico"></i>
			  <span><?php comment_time(); ?> </span> <span> <?php comment_date('j.m.y'); ?></span> 
			</div>
			<span class="user-name">
			  <?php  comment_author(); ?> 
			</span>
		</div>
		<?php if ( $comment->comment_approved == '0' ) { ?>
			<p class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.','webhosty' ); ?></p>
			<br /> 
		<?php }else{ ?>		 
		<div class="commentary-text">
			<?php _e( comment_text(), 'webhosty' );?>  
		</div>
		<?php }  ?> 
		<?php comment_reply_link( array_merge( $args, array(  'add_below' => $add_below,'depth' => $depth, 'max_depth' => $args['max_depth'] , 'reply_text' => '<i class="fa fa-reply"></i> Reply') ) ); ?>    
	</div>

<?php if ( 'div' != $args['style'] ) : ?>
	</div>
	<?php endif; ?>

	<?php
}
?>