Twenty Eleven: Don't call comments_popup_link() if post_password_required(). That'll result in double password messages. props helenyhou, fixes #17962 for trunk.

git-svn-id: http://svn.automattic.com/wordpress/trunk@18422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-07-11 17:58:43 +00:00
parent bac625849e
commit 0d9f4a7495
6 changed files with 6 additions and 6 deletions

View File

@ -17,7 +17,7 @@
<h3 class="entry-format"><?php _e( 'Aside', 'twentyeleven' ); ?></h3>
</hgroup>
<?php if ( comments_open() ) : ?>
<?php if ( comments_open() && ! post_password_required() ) : ?>
<div class="comments-link">
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
</div>

View File

@ -16,7 +16,7 @@
<h3 class="entry-format"><?php _e( 'Image', 'twentyeleven' ); ?></h3>
</hgroup>
<?php if ( comments_open() ) : ?>
<?php if ( comments_open() && ! post_password_required() ) : ?>
<div class="comments-link">
<?php comments_popup_link( '<span class="leave-reply">' . __( "Reply", 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
</div>

View File

@ -17,7 +17,7 @@
<h3 class="entry-format"><?php _e( 'Link', 'twentyeleven' ); ?></h3>
</hgroup>
<?php if ( comments_open() ) : ?>
<?php if ( comments_open() && ! post_password_required() ) : ?>
<div class="comments-link">
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
</div>

View File

@ -19,7 +19,7 @@
<?php twentyeleven_posted_on(); ?>
</div><!-- .entry-meta -->
<?php if ( comments_open() ) : ?>
<?php if ( comments_open() && ! post_password_required() ) : ?>
<div class="comments-link">
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
</div>

View File

@ -16,7 +16,7 @@
<h3 class="entry-format"><?php _e( 'Status', 'twentyeleven' ); ?></h3>
</hgroup>
<?php if ( comments_open() ) : ?>
<?php if ( comments_open() && ! post_password_required() ) : ?>
<div class="comments-link">
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
</div>

View File

@ -25,7 +25,7 @@
</div><!-- .entry-meta -->
<?php endif; ?>
<?php if ( comments_open() ) : ?>
<?php if ( comments_open() && ! post_password_required() ) : ?>
<div class="comments-link">
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
</div>