Sindbad~EG File Manager
<?php
if (post_password_required())
{
?>
<p class="nocomments"><?php esc_html_e('This post is password protected. Enter the password to view comments.', 'framework') ?></p>
<?php
return;
}
/* ----------------------------------------------------------------------------------- */
/* Display the comments + Pings
/*----------------------------------------------------------------------------------- */
if (have_comments()): // if there are comments
?>
<section class="post-comments">
<div id="comments" class="clearfix">
<h3 class="widgettitle"><?php comments_number(esc_html__('No Comments', 'framework') , esc_html__('Comment(1)', 'framework') , esc_html__('Comments(%)', 'framework')); ?></h3>
<ol class="comments">
<?php wp_list_comments('avatar_size=51&callback=imic_comment'); ?>
</ol>
<?php paginate_comments_links(); ?>
</div>
</section>
<?php
endif; ?>
<?php
/* ----------------------------------------------------------------------------------- */
/* Comment Form
/*----------------------------------------------------------------------------------- */
function adorechurch_comment_form_before()
{
echo '<div id="respond-wrap" class="clearfix">
<section class="post-comment-form">
<div class="clearfix">';
}
add_action('comment_form_before', 'adorechurch_comment_form_before');
function adorechurch_comment_form_after()
{
echo '</div></section></div>';
}
add_action('comment_form_after', 'adorechurch_comment_form_after');
function adorechurch_move_comment_fields($fields)
{
$comment_field = $fields['comment'];
unset($fields['comment']);
$fields['comment'] = $comment_field;
return $fields;
}
add_filter('comment_form_fields', 'adorechurch_move_comment_fields');
add_filter('comment_form_defaults', 'adorechurch_comment_form');
function adorechurch_comment_form($form_options)
{
$commenter = wp_get_current_commenter();
$req = get_option('require_name_email');
$aria_req = ($req ? " aria-required='true'" : '');
// Fields Array
$fields = array(
'author' => '<div class="row">
<div class="form-group">
<div class="col-md-4 col-sm-4">
<input type="text" class="form-control input-lg" name="author" id="author" value="" size="22" tabindex="1" placeholder="' . esc_html__('Your name', 'framework') . '">
</div>',
'email' => '<div class="col-md-4 col-sm-4">
<input type="email" class="form-control input-lg" name="email" id="email" value="" size="22" tabindex="2" placeholder="' . esc_html__('Your email', 'framework') . '">
</div>',
'url' => '<div class="col-md-4 col-sm-4">
<input type="url" class="form-control input-lg" name="url" id="url" value="" size="22" tabindex="3" placeholder="' . esc_html__('Website (optional)', 'framework') . '"></div>
</div>
</div>',
);
// Form Options Array
$form_options = array(
// Include Fields Array
'fields' => apply_filters('comment_form_default_fields', $fields) ,
// Template Options
'comment_field' => '<div class="row">
<div class="form-group">
<div class="col-md-12">
<textarea name="comment" class="form-control input-lg" id="comment-textarea" cols="8" rows="4" tabindex="4" placeholder="' . esc_html__('Your comment', 'framework') . '" ></textarea>
</div>
</div>
</div>',
'must_log_in' => '',
'logged_in_as' => '',
'comment_notes_before' => '',
'comment_notes_after' => '',
'submit_field' => '<div class="row"><div class="form-group"><div class="col-md-12">%1$s %2$s</div></div></div>',
'class_submit' => 'btn btn-primary',
// Rest of Options
'id_form' => 'form-comment',
'id_submit' => 'comment-submit',
'title_reply' => '
<h3 class="widgettitle">' . esc_html__('Post a comment', 'framework') ,
'title_reply_after' => '</h3>',
'title_reply_to' => esc_html__('Leave a Reply to %s', 'framework') ,
'cancel_reply_link' => esc_html__('Cancel reply', 'framework') ,
'label_submit' => esc_html__('Submit your comment', 'framework') ,
);
return $form_options;
}
comment_form();
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists