Make WordPress Core


Ignore:
Timestamp:
08/22/2013 05:00:36 PM (12 years ago)
Author:
lancewillett
Message:

Twenty Fourteen: Use HTML5 comment markup, props obenland. Fixes #25045.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php

    r25023 r25087  
    8585endif;
    8686
    87 if ( ! function_exists( 'twentyfourteen_comment' ) ) :
    88 /**
    89  * Template for comments and pingbacks.
    90  *
    91  * Used as a callback by wp_list_comments() for displaying the comments.
    92  *
    93  */
    94 function twentyfourteen_comment( $comment, $args, $depth ) {
    95     $GLOBALS['comment'] = $comment;
    96     switch ( $comment->comment_type ) :
    97         case 'pingback' :
    98         case 'trackback' :
    99     ?>
    100     <li class="post pingback">
    101         <p><?php _e( 'Pingback:', 'twentyfourteen' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'twentyfourteen' ), ' ' ); ?></p>
    102     <?php
    103             break;
    104         default :
    105     ?>
    106     <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
    107         <article id="comment-<?php comment_ID(); ?>" class="comment">
    108             <footer>
    109                 <div class="comment-author vcard">
    110                     <span class="comment-author-avatar"><?php echo get_avatar( $comment, 32 ); ?></span>
    111                     <?php printf( __( '%s', 'twentyfourteen' ), sprintf( '<cite class="fn">%s</cite> says:', get_comment_author_link() ) ); ?>
    112                 </div><!-- .comment-author .vcard -->
    113             </footer>
    114 
    115             <div class="comment-content">
    116                 <?php comment_text(); ?>
    117                 <?php if ( $comment->comment_approved == '0' ) : ?>
    118                     <p><em><?php _e( 'Your comment is awaiting moderation.', 'twentyfourteen' ); ?></em></p>
    119                 <?php endif; ?>
    120             </div>
    121 
    122             <div class="comment-meta commentmetadata">
    123                 <a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"><time pubdate datetime="<?php comment_time( 'c' ); ?>">
    124                 <?php
    125                     /* translators: 1: date, 2: time */
    126                     printf( __( '%1$s at %2$s', 'twentyfourteen' ), get_comment_date(), get_comment_time() ); ?>
    127                 </time></a>
    128                 <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    129                 <?php edit_comment_link( __( 'Edit', 'twentyfourteen' ), ' ' );
    130                 ?>
    131             </div><!-- .comment-meta .commentmetadata -->
    132         </article><!-- #comment-## -->
    133 
    134     <?php
    135             break;
    136     endswitch;
    137 }
    138 endif; // ends check for twentyfourteen_comment()
    139 
    14087if ( ! function_exists( 'twentyfourteen_posted_on' ) ) :
    14188/**
Note: See TracChangeset for help on using the changeset viewer.