WordPress.org

Make WordPress Core

Changeset 18422


Ignore:
Timestamp:
07/11/11 17:58:43 (3 years ago)
Author:
nacin
Message:

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.

Location:
trunk/wp-content/themes/twentyeleven
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyeleven/content-aside.php

    r18348 r18422  
    1818            </hgroup> 
    1919 
    20             <?php if ( comments_open() ) : ?> 
     20            <?php if ( comments_open() && ! post_password_required() ) : ?> 
    2121            <div class="comments-link"> 
    2222                <?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?> 
  • trunk/wp-content/themes/twentyeleven/content-image.php

    r18348 r18422  
    1717            </hgroup> 
    1818 
    19             <?php if ( comments_open() ) : ?> 
     19            <?php if ( comments_open() && ! post_password_required() ) : ?> 
    2020            <div class="comments-link"> 
    2121                <?php comments_popup_link( '<span class="leave-reply">' . __( "Reply", 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?> 
  • trunk/wp-content/themes/twentyeleven/content-link.php

    r18348 r18422  
    1818            </hgroup> 
    1919 
    20             <?php if ( comments_open() ) : ?> 
     20            <?php if ( comments_open() && ! post_password_required() ) : ?> 
    2121            <div class="comments-link"> 
    2222                <?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?> 
  • trunk/wp-content/themes/twentyeleven/content-quote.php

    r18403 r18422  
    2020            </div><!-- .entry-meta --> 
    2121 
    22             <?php if ( comments_open() ) : ?> 
     22            <?php if ( comments_open() && ! post_password_required() ) : ?> 
    2323            <div class="comments-link"> 
    2424                <?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?> 
  • trunk/wp-content/themes/twentyeleven/content-status.php

    r18348 r18422  
    1717            </hgroup> 
    1818 
    19             <?php if ( comments_open() ) : ?> 
     19            <?php if ( comments_open() && ! post_password_required() ) : ?> 
    2020            <div class="comments-link"> 
    2121                <?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?> 
  • trunk/wp-content/themes/twentyeleven/content.php

    r18348 r18422  
    2626            <?php endif; ?> 
    2727 
    28             <?php if ( comments_open() ) : ?> 
     28            <?php if ( comments_open() && ! post_password_required() ) : ?> 
    2929            <div class="comments-link"> 
    3030                <?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?> 
Note: See TracChangeset for help on using the changeset viewer.