Changeset 23696
- Timestamp:
- 03/14/2013 04:36:14 PM (12 years ago)
- Location:
- trunk/wp-content/themes/twentythirteen
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentythirteen/comments.php
r23690 r23696 31 31 32 32 <ol class="comment-list"> 33 <?php wp_list_comments( array( 'callback' => 'twentythirteen_comment', 'style' => 'ol' ) ); ?> 33 <?php 34 wp_list_comments( array( 35 'style' => 'ol', 36 'format' => 'html5', 37 'short_ping' => true, 38 'avatar_size' => 74, 39 ) ); 40 ?> 34 41 </ol><!-- .comment-list --> 35 42 -
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 /** -
trunk/wp-content/themes/twentythirteen/rtl.css
r23690 r23696 592 592 593 593 .comment-author { 594 float: right;595 594 margin-left: 50px; 596 595 margin-right: auto; 596 left: auto; 597 right: 0; 597 598 } 598 599 -
trunk/wp-content/themes/twentythirteen/style.css
r23690 r23696 511 511 .nav-links:after, 512 512 .gallery:after, 513 .comment :after {513 .comment-body:after { 514 514 clear: both; 515 515 } … … 531 531 .gallery:before, 532 532 .gallery:after, 533 .comment :before,534 .comment :after {533 .comment-body:before, 534 .comment-body:after { 535 535 content: ""; 536 536 display: table; … … 2259 2259 } 2260 2260 2261 .comment {2261 .comment-body { 2262 2262 padding: 24px 0; 2263 position: relative; 2263 2264 } 2264 2265 2265 2266 .comment-author { 2266 float: left;2267 margin-right: 50px;2268 2267 max-width: 74px; 2268 position: absolute; 2269 left: 0; 2269 2270 } 2270 2271 … … 2275 2276 2276 2277 .comment-author .fn, 2278 .comment-author .url, 2277 2279 .comment-reply-link { 2278 2280 color: #ed331c; … … 2281 2283 } 2282 2284 2285 .says { 2286 display: none; 2287 } 2288 2283 2289 .no-avatars .comment-author { 2284 float: none;2285 2290 margin: 0 0 5px; 2286 2291 max-width: 100%; 2292 position: relative; 2287 2293 } 2288 2294 … … 2330 2336 .comment-awaiting-moderation { 2331 2337 color: #a2a2a2; 2338 margin: 20px 0 0; 2332 2339 } 2333 2340 … … 2350 2357 } 2351 2358 2352 .comment +#respond {2353 margin-bottom: 30px;2359 .comment #respond { 2360 margin-bottom: 20px; 2354 2361 padding: 20px; 2355 2362 } … … 3118 3125 /* Comments */ 3119 3126 .comment-author { 3120 float: none;3121 3127 margin: 0 0 5px; 3122 3128 max-width: 100%; 3129 position: relative; 3123 3130 } 3124 3131
Note: See TracChangeset
for help on using the changeset viewer.