Make WordPress Core

Changeset 21486


Ignore:
Timestamp:
08/09/2012 05:22:44 PM (12 years ago)
Author:
lancewillett
Message:

Twenty Ten: code readability in twentyten_comment, props kovshenin, fixes #21474. (And minor pinking shears.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyten/functions.php

    r20983 r21486  
    116116        'admin-head-callback' => 'twentyten_admin_header_style',
    117117    );
    118    
     118
    119119    add_theme_support( 'custom-header', $custom_header_support );
    120    
     120
    121121    if ( ! function_exists( 'get_custom_header' ) ) {
    122122        // This is all for compatibility with versions of WordPress prior to 3.4.
     
    331331    <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
    332332        <div id="comment-<?php comment_ID(); ?>">
    333         <div class="comment-author vcard">
    334             <?php echo get_avatar( $comment, 40 ); ?>
    335             <?php printf( __( '%s <span class="says">says:</span>', 'twentyten' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
    336         </div><!-- .comment-author .vcard -->
    337         <?php if ( $comment->comment_approved == '0' ) : ?>
    338             <em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?></em>
    339             <br />
    340         <?php endif; ?>
    341 
    342         <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
    343             <?php
    344                 /* translators: 1: date, 2: time */
    345                 printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(),  get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' );
    346             ?>
    347         </div><!-- .comment-meta .commentmetadata -->
    348 
    349         <div class="comment-body"><?php comment_text(); ?></div>
    350 
    351         <div class="reply">
    352             <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    353         </div><!-- .reply -->
    354     </div><!-- #comment-##  -->
     333            <div class="comment-author vcard">
     334                <?php echo get_avatar( $comment, 40 ); ?>
     335                <?php printf( __( '%s <span class="says">says:</span>', 'twentyten' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
     336            </div><!-- .comment-author .vcard -->
     337            <?php if ( $comment->comment_approved == '0' ) : ?>
     338                <em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?></em>
     339                <br />
     340            <?php endif; ?>
     341
     342            <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
     343                <?php
     344                    /* translators: 1: date, 2: time */
     345                    printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(),  get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' );
     346                ?>
     347            </div><!-- .comment-meta .commentmetadata -->
     348
     349            <div class="comment-body"><?php comment_text(); ?></div>
     350
     351            <div class="reply">
     352                <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
     353            </div><!-- .reply -->
     354        </div><!-- #comment-##  -->
    355355
    356356    <?php
Note: See TracChangeset for help on using the changeset viewer.