Changeset 23696 for trunk/wp-content/themes/twentythirteen/functions.php
- Timestamp:
- 03/14/2013 04:36:14 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentythirteen/functions.php
r23680 r23696 352 352 endif; 353 353 354 if ( ! function_exists( 'twentythirteen_comment' ) ) :355 /**356 * Template for comments and pingbacks.357 *358 * To override this walker in a child theme without modifying the comments359 * template simply create your own twentythirteen_comment(), and that function360 * will be used instead.361 *362 * Used as a callback by wp_list_comments() for displaying the comments.363 *364 * @since Twenty Thirteen 1.0365 *366 * @param object $comment Comment to display.367 * @param array $args Optional args.368 * @param int $depth Depth of comment.369 * @return void370 */371 372 function twentythirteen_comment( $comment, $args, $depth ) {373 $GLOBALS['comment'] = $comment;374 switch ( $comment->comment_type ) :375 case 'pingback' :376 case 'trackback' :377 // Display trackbacks differently than normal comments.378 ?>379 <li id="comment-<?php comment_ID(); ?>" <?php comment_class(); ?>>380 <p><?php _e( 'Pingback:', 'twentythirteen' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Edit', 'twentythirteen' ), '<span class="ping-meta"><span class="edit-link">', '</span></span>' ); ?></p>381 <?php382 break;383 default :384 // Proceed with normal comments.385 ?>386 <li id="li-comment-<?php comment_ID(); ?>">387 <article id="comment-<?php comment_ID(); ?>" <?php comment_class(); ?>>388 <div class="comment-author vcard">389 <?php echo get_avatar( $comment, 74 ); ?>390 <cite class="fn"><?php comment_author_link(); ?></cite>391 </div><!-- .comment-author -->392 393 <header class="comment-meta">394 <?php395 printf( '<a href="%1$s"><time datetime="%2$s">%3$s</time></a>',396 esc_url( get_comment_link( $comment->comment_ID ) ),397 get_comment_time( 'c' ),398 sprintf( _x( '%1$s at %2$s', '1: date, 2: time', 'twentythirteen' ), get_comment_date(), get_comment_time() )399 );400 edit_comment_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' );401 ?>402 </header><!-- .comment-meta -->403 404 <?php if ( '0' == $comment->comment_approved ) : ?>405 <p class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentythirteen' ); ?></p>406 <?php endif; ?>407 408 <div class="comment-content">409 <?php comment_text(); ?>410 </div><!-- .comment-content -->411 412 <div class="reply">413 <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'twentythirteen' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>414 </div><!-- .reply -->415 </article><!-- #comment-## -->416 <?php417 break;418 endswitch; // End comment_type check.419 }420 endif;421 422 354 if ( ! function_exists( 'twentythirteen_entry_meta' ) ) : 423 355 /**
Note: See TracChangeset
for help on using the changeset viewer.