92 lines
2.5 KiB
PHP
92 lines
2.5 KiB
PHP
<?php
|
|
global $post;
|
|
|
|
if( $post->comment_status != 'closed' ):
|
|
if( post_password_required() ):
|
|
?>
|
|
|
|
<div id="hr_container"><div class="hr hr-wide gap-big"></div></div>
|
|
|
|
<div id="comments">
|
|
<p class="nopassword">
|
|
<?php _e( 'This post is password protected. Enter the password to view any comments.', LANGUAGE_ZONE ); ?>
|
|
</p>
|
|
</div>
|
|
<?php
|
|
/* Stop the rest of comments.php from being processed,
|
|
* but don't kill the script entirely -- we still have
|
|
* to fully load the template.
|
|
*/
|
|
return;
|
|
endif;
|
|
?>
|
|
|
|
<?php if ( have_comments() ): ?>
|
|
|
|
<div id="hr_container"><div class="hr hr-wide gap-big"></div></div>
|
|
|
|
<div id="comments">
|
|
<h2><?php
|
|
comments_number(
|
|
'',
|
|
__('1 comment:', LANGUAGE_ZONE),
|
|
__('% comments:', LANGUAGE_ZONE)
|
|
);
|
|
?></h2>
|
|
<div class="comments-container">
|
|
<?php
|
|
global $wp_query;
|
|
|
|
wp_list_comments(
|
|
array(
|
|
'max_depth' => 5,
|
|
'style' => 'div',
|
|
'callback' => 'dt_single_comments',
|
|
'end-callback' => 'dt_comments_end_callback',
|
|
'comments_nmbr' => count($wp_query->comments)
|
|
)
|
|
);
|
|
?>
|
|
<?php paginate_comments_links(); ?>
|
|
</div><!-- .commwnts-container -->
|
|
</div><!-- #comments -->
|
|
<?php endif; ?>
|
|
<?php
|
|
global $user_identity, $user_email, $user_login;
|
|
$user = $email = '';
|
|
|
|
get_currentuserinfo();
|
|
if( is_user_logged_in() ) {
|
|
$user = $user_identity;
|
|
$email = $user_email;
|
|
}
|
|
|
|
?>
|
|
<div id="hr_container"><div class="hr hr-wide gap-big"></div></div>
|
|
<div class="share_com" id="comment-form">
|
|
<div id="form_prev_holder">
|
|
<div id="form-holder">
|
|
<?php
|
|
if(comments_open()){
|
|
|
|
echo "<div class='comment_container'>";
|
|
|
|
echo "<span class='minitext'>Want to join the discussion?<br/>Feel free to contribute!</span>";
|
|
comment_form();
|
|
echo "</div>";
|
|
|
|
}
|
|
else if(get_comments_number())
|
|
{
|
|
/* If there are no comments and comments are closed,
|
|
* let's leave a little note, shall we?
|
|
*/
|
|
|
|
|
|
}
|
|
?>
|
|
</div><!-- form_holder -->
|
|
</div><!-- form_prev_holder -->
|
|
</div><!-- share-com -->
|
|
<?php endif; ?>
|