1340 | | if ( 'div' == $args['style'] ) { |
1341 | | $tag = 'div'; |
1342 | | $add_below = 'comment'; |
1343 | | } else { |
1344 | | $tag = 'li'; |
1345 | | $add_below = 'div-comment'; |
1346 | | } |
1347 | | ?> |
1348 | | <<?php echo $tag ?> <?php comment_class(empty( $args['has_children'] ) ? '' : 'parent') ?> id="comment-<?php comment_ID() ?>"> |
1349 | | <?php if ( 'div' != $args['style'] ) : ?> |
1350 | | <div id="div-comment-<?php comment_ID() ?>" class="comment-body"> |
1351 | | <?php endif; ?> |
1352 | | <div class="comment-author vcard"> |
1353 | | <?php if ($args['avatar_size'] != 0) echo get_avatar( $comment, $args['avatar_size'] ); ?> |
1354 | | <?php printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link()) ?> |
1355 | | </div> |
1356 | | <?php if ($comment->comment_approved == '0') : ?> |
1357 | | <em class="comment-awaiting-moderation"><?php _e('Your comment is awaiting moderation.') ?></em> |
1358 | | <br /> |
1359 | | <?php endif; ?> |
| 1340 | $list_tag = ( 'div' == $style ) ? 'div' : 'li'; |
| 1341 | $wrapper_tag = ( 'html5' == strtolower( $markup ) ) ? 'article' : 'div'; |
1370 | | <div class="reply"> |
1371 | | <?php comment_reply_link(array_merge( $args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?> |
1372 | | </div> |
1373 | | <?php if ( 'div' != $args['style'] ) : ?> |
1374 | | </div> |
1375 | | <?php endif; ?> |
1376 | | <?php |
| 1351 | <?php else : // Proceed with normal comments. ?> |
| 1352 | |
| 1353 | <<?php echo $list_tag; ?> <?php comment_class( empty( $has_children ) ? '' : 'parent' ); ?> id="comment-<?php comment_ID(); ?>"> |
| 1354 | <<?php echo $wrapper_tag; ?> id="div-comment-<?php comment_ID(); ?>" class="comment-body"> |
| 1355 | |
| 1356 | <?php if ( 'html5' == strtolower( $markup ) ) : ?> |
| 1357 | |
| 1358 | <header class="comment-meta comment-author vcard"> |
| 1359 | <?php if ( 0 < $avatar_size ) echo get_avatar( $comment, $avatar_size ); ?> |
| 1360 | <?php printf( __( '<cite class="fn">%s</cite> <span class="says">says:</span>' ), get_comment_author_link() ); ?> |
| 1361 | <?php printf( '<a href="%1$s"><time pubdate datetime="%2$s">%3$s</time></a>', |
| 1362 | esc_url( get_comment_link( $comment->comment_ID ) ), |
| 1363 | get_comment_time( 'c' ), |
| 1364 | /* translators: 1: date, 2: time */ |
| 1365 | sprintf( __( '%1$s at %2$s' ), get_comment_date(), get_comment_time() ) |
| 1366 | ); ?> |
| 1367 | <?php edit_comment_link( __( '(Edit)' ), '<span class="edit-link">', '</span>' ); ?> |
| 1368 | </header><!-- .comment-meta --> |
| 1369 | |
| 1370 | <?php else : ?> |
| 1371 | |
| 1372 | <div class="comment-author vcard"> |
| 1373 | <?php if ( 0 < $avatar_size ) echo get_avatar( $comment, $avatar_size ); ?> |
| 1374 | <?php printf( __( '<cite class="fn">%s</cite> <span class="says">says:</span>' ), get_comment_author_link() ); ?> |
| 1375 | </div><!-- .comment-author --> |
| 1376 | |
| 1377 | <div class="comment-meta commentmetadata"> |
| 1378 | <a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"> |
| 1379 | <?php printf( __( '%1$s at %2$s' ), get_comment_date(), get_comment_time() ); /* translators: 1: date, 2: time */ ?></a> |
| 1380 | <?php edit_comment_link( __( '(Edit)' ), '<span class="edit-link">', '</span>' ); ?> |
| 1381 | </div><!-- .comment-meta --> |
| 1382 | |
| 1383 | <?php endif; ?> |
| 1384 | |
| 1385 | <?php if ( '0' == $comment->comment_approved ) : ?> |
| 1386 | <p class="comment-awaiting-moderation"><em><?php _e( 'Your comment is awaiting moderation.' ); ?></em><p> |
| 1387 | <?php endif; ?> |
| 1388 | |
| 1389 | <?php if ( $comment_content_wrapper ) : ?><div class="comment-content"><?php endif; ?> |
| 1390 | <?php comment_text(); ?> |
| 1391 | <?php if ( $comment_content_wrapper ) : ?></div><!-- .comment-content --><?php endif; ?> |
| 1392 | |
| 1393 | <div class="reply"> |
| 1394 | <?php comment_reply_link( array_merge( $args, array( 'add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $max_depth ) ) ); ?> |
| 1395 | </div><!-- .reply --> |
| 1396 | |
| 1397 | </<?php echo $wrapper_tag; ?>><!-- div-comment-## --> |
| 1398 | |
| 1399 | <?php endif; // end comment_type check |
1388 | | function end_el(&$output, $comment, $depth = 0, $args = array() ) { |
1389 | | if ( !empty($args['end-callback']) ) { |
1390 | | call_user_func($args['end-callback'], $comment, $args, $depth); |
| 1411 | function end_el( &$output, $comment, $depth = 0, $args = array() ) { |
| 1412 | if ( !empty( $args['end-callback'] ) ) { |
| 1413 | call_user_func( $args['end-callback'], $comment, $args, $depth ); |
1420 | | $defaults = array('walker' => null, 'max_depth' => '', 'style' => 'ul', 'callback' => null, 'end-callback' => null, 'type' => 'all', |
1421 | | 'page' => '', 'per_page' => '', 'avatar_size' => 32, 'reverse_top_level' => null, 'reverse_children' => ''); |
| 1442 | $defaults = array( 'walker' => null, 'max_depth' => '', 'style' => 'ul', 'callback' => null, 'end-callback' => null, 'type' => 'all', |
| 1443 | 'page' => '', 'per_page' => '', 'avatar_size' => 32, 'reverse_top_level' => null, 'reverse_children' => '', 'short_ping' => false, |
| 1444 | 'markup' => '' ); |