Current File : /home/kelaby89/sergio-cuchi.tattoo/wp-content/themes/maori/comments.php |
<?php if (post_password_required()) { return; } ?>
<?php if ((have_comments()) || (comments_open())) { ?>
<div id="maori-comments-wrapper">
<?php if (have_comments()) { ?>
<?php $maori_num_comments = get_comments_number(); ?>
<div id="maori_comments_block" class="maori_comments_block">
<h3 class="maori-title-with-border">
<span><?php esc_html_e("Comments", 'maori'); ?></span>
</h3>
<div class="maori_commentlist">
<?php wp_list_comments( array('callback' => 'maori_comment','style' => 'div') ); ?>
</div>
<div class="maori_comments_rss">
<?php post_comments_feed_link('<i class="fa fa-rss-square"></i>' . esc_html__( 'Subscribe', 'maori' )); ?>
</div>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) { ?>
<div class="maori-pager comments-pager">
<div class="maori-pager-left">
<?php previous_comments_link( '<i class="fa fa-chevron-left"></i> ' . esc_html__( 'Older comments', 'maori' ) ); ?>
</div>
<div class="maori-pager-right">
<?php next_comments_link( esc_html__( 'Newer comments', 'maori' ) . ' <i class="fa fa-chevron-right"></i>'); ?>
</div>
<div class="clearfix"></div>
</div>
<?php } ?>
<?php
if (!empty($comments_by_type['pings'])) {
$maori_count = count($comments_by_type['pings']);
($maori_count !== 1) ? $maori_txt = esc_html__('Pings/Trackbacks', 'maori') : $maori_txt = esc_html__('Pings/Trackbacks', 'maori');
?>
<h6 id="pings"><?php printf( esc_html__( '%1$d %2$s for "%3$s"', 'maori'), $maori_count, $maori_txt, get_the_title() )?></h6>
<ol class="maori_commentlist">
<?php wp_list_comments('type=pings&max_depth=<em>'); ?>
</ol>
<?php } ?>
</div>
<?php } ?>
<?php if (comments_open()) { ?>
<div id="maori_comment_form" class="maori_comment_form">
<?php
$comments_args = array(
'title_reply_before'=>'<h3>',
'title_reply_after'=>'</h3>',
'cancel_reply_before' => '<span class="maori_cancel">',
'cancel_reply_after' => '</span>',
'class_submit' => 'btn btn-default'
);
?>
<?php comment_form($comments_args); ?>
</div>
<?php } ?>
</div>
<?php } ?>