Afetec_Web/referencia/plantillas/positive-premium-multipurpose-wordpress-theme/positive/comments.php
david ca1c2fb259 Cambios
git-svn-id: https://192.168.0.254/svn/Proyectos.Afetec_Web/trunk@2 828b2857-b6d9-ce4d-95e2-bbc4707c23a3
2011-10-21 20:29:19 +00:00

72 lines
2.7 KiB
PHP

<?php
// Do not delete these lines
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');
if ( post_password_required() ) { ?>
<p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.','cloudfw'); ?></p>
<?php
return;
}
?>
<div id="comments">
<?php if ( post_password_required() ) : ?>
<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view comments.', 'cloudfw' ); ?></p>
<?php
return;
endif;
?>
<?php if ( have_comments() ) : ?>
<h2 id="comments-title"><?php
switch( $comments_count = get_comments_number() ):
case 1:
printf(__( 'One Response to \'%2$s\'', 'cloudfw'), number_format_i18n($comments_count), __translate( get_the_title() ) );
break;
default:
printf(__( '%1$s Responses to \'%2$s\'', 'cloudfw'), number_format_i18n($comments_count), __translate( get_the_title() ) );
break;
endswitch;
?></h2>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<div class="navigation">
<div class="nav-previous"><span class="meta-nav">&larr;</span><?php previous_comments_link( __( 'Older Comments', 'cloudfw' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments', 'cloudfw' ) ); ?> <span class="meta-nav">&rarr;</span></div>
</div> <!-- .navigation -->
<?php endif; // check for comment navigation ?>
<div class="commentlist">
<?php
wp_list_comments( array('style' => 'div', 'callback' => 'cloudfw_comment_list' ) );
?>
</div>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<div class="navigation">
<div class="nav-previous"><span class="meta-nav">&larr;</span><?php previous_comments_link( __( 'Older Comments', 'cloudfw' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments', 'cloudfw' ) ); ?> <span class="meta-nav">&rarr;</span></div>
</div><!-- /.navigation -->
<?php endif; // check for comment navigation ?>
<?php else : // or, if we don't have comments:
/* If there are no comments and comments are closed,
* let's leave a little note, shall we?
*/
if ( ! comments_open() ) :
?>
<p class="nocomments"><?php _e( 'Comments are closed.', 'cloudfw' ); ?></p>
<?php endif; // end ! comments_open() ?>
<?php endif; // end have_comments() ?>
<?php get_template_part("includes/layouts/comment","form");?>
</div><!-- /#comments -->