mirror of
https://git.sindominio.net/estibadores/wordpress.git
synced 2024-11-14 23:21:07 +01:00
80 lines
2.9 KiB
PHP
80 lines
2.9 KiB
PHP
|
<?php if (post_password_required()) {
|
||
|
return;
|
||
|
} ?>
|
||
|
|
||
|
<?php if (have_comments()): ?>
|
||
|
<p id="comments" class="h3 page-header">
|
||
|
<i class="fa fa-fw fa-comments"></i> <?php _e('Comments', 'ltk-foundation'); ?>
|
||
|
</p>
|
||
|
<ol class="comments">
|
||
|
<?php wp_list_comments([
|
||
|
'style' => 'ol',
|
||
|
'avatar_size' => 46,
|
||
|
'callback' => function($comment, $args, $depth) {
|
||
|
if ($comment->comment_type == 'comment' || $comment->comment_type == '') {
|
||
|
get_template_part('templates/comment');
|
||
|
} else {
|
||
|
get_template_part('templates/pingback');
|
||
|
}
|
||
|
}
|
||
|
]); ?>
|
||
|
</ol>
|
||
|
<?php endif; ?>
|
||
|
|
||
|
<?php $comment_pages = paginate_comments_links([
|
||
|
'format' => 'array',
|
||
|
'type' => 'array',
|
||
|
'echo' => false,
|
||
|
'mid_size' => 3,
|
||
|
'end_size' => 3
|
||
|
]); ?>
|
||
|
|
||
|
<?php if (! empty($comment_pages)): ?>
|
||
|
<?php $cpage = (int) get_query_var('cpage', 1); ?>
|
||
|
<div class="item-pagination">
|
||
|
<p class="pull-left"><?php _e('Comment pages:', 'ltk-foundation'); ?></p>
|
||
|
<ul class="pagination">
|
||
|
<?php foreach ($comment_pages as $page): ?>
|
||
|
<?php $pnumber = strip_tags($page); ?>
|
||
|
<li<?php if ($cpage == $pnumber): ?> class="active"<?php endif; ?>>
|
||
|
<?php if ($cpage == $pnumber): ?><a href><?php endif; ?>
|
||
|
<?php echo $page; ?>
|
||
|
<?php if ($cpage == $pnumber): ?></a><?php endif; ?>
|
||
|
</li>
|
||
|
<?php endforeach; ?>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<?php endif; ?>
|
||
|
|
||
|
<?php comment_form([
|
||
|
'format' => 'html5',
|
||
|
'title_reply_before' => '<p class="h3 page-header"><i class="fa fa-fw fa-plus"></i> ',
|
||
|
'title_reply_after' => '</p>',
|
||
|
'cancel_reply_before' => '<p>',
|
||
|
'cancel_reply_after' => '</p>',
|
||
|
'class_form' => 'comments-form row',
|
||
|
'fields' => [
|
||
|
'author' =>
|
||
|
'<div class="form-group col-xs-12 col-md-4">
|
||
|
<label for="author" class="control-label">' . __('Your name', 'ltk-foundation') . ' <span>*</span></label>
|
||
|
<input type="text" name="author" id="author" class="form-control" value="' . esc_attr($commenter['comment_author']) . '" tabindex="1" required aria-required="true">
|
||
|
</div>',
|
||
|
'email' =>
|
||
|
'<div class="form-group col-xs-12 col-md-4">
|
||
|
<label for="email" class="control-label">' . __('Your email address', 'ltk-foundation') . ' <span>*</span></label>
|
||
|
<input type="text" name="email" id="email" class="form-control" value="' . esc_attr($commenter['comment_author_email']) . '" tabindex="2" required aria-required="true">
|
||
|
</div>',
|
||
|
'url' =>
|
||
|
'<div class="form-group col-xs-12 col-md-4">
|
||
|
<label for="url" class="control-label">' . __('Website URL', 'ltk-foundation') . '</label>
|
||
|
<input type="text" name="url" id="url" class="form-control" value="' . esc_attr($commenter['comment_author_url']) . '" tabindex="3">
|
||
|
</div>'
|
||
|
],
|
||
|
'comment_field' =>
|
||
|
'<div class="col-xs-12">
|
||
|
<label for="comment" class="control-label">' . __('Comment', 'ltk-foundation') . '</label>
|
||
|
<textarea id="comment" name="comment" class="form-control" rows="5" maxlength="65525" aria-required="true" required></textarea>
|
||
|
</div>',
|
||
|
'class_submit' => 'btn btn-primary'
|
||
|
]); ?>
|