PageRenderTime 41ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/themes/best/inc/comments-and-pingbacks.php

https://github.com/ActivateNY/activateny.org
PHP | 62 lines | 48 code | 9 blank | 5 comment | 5 complexity | 62f3b2f7b432f936459f97f1bc171bc4 MD5 | raw file
Possible License(s): GPL-2.0, AGPL-1.0, LGPL-2.1
  1. <?php
  2. /* =============================================================
  3. * Template for Comments and Pingbacks
  4. * ============================================================= */
  5. function respond_comment( $comment, $args, $depth ) {
  6. $GLOBALS['comment'] = $comment;
  7. switch ( $comment->comment_type ) :
  8. case 'pingback' :
  9. case 'trackback' :
  10. ?>
  11. <li class="post pingback">
  12. <p><?php echo 'Pingback:'; ?> <?php comment_author_link(); ?><?php edit_comment_link( 'Edit &#x270E;', '<span class="edit-link">', '</span>' ); ?></p>
  13. <?php
  14. break;
  15. default :
  16. ?>
  17. <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
  18. <article id="comment-<?php comment_ID(); ?>" class="comment clearfix">
  19. <footer class="comment-meta">
  20. <div class="comment-author vcard clearfix">
  21. <?php
  22. $avatar_size = 48;
  23. if ( '0' != $comment->comment_parent )
  24. $avatar_size = 48;
  25. echo get_avatar( $comment, $avatar_size );
  26. /* translators: 1: comment author, 2: date and time */
  27. printf( '%1$s %2$s',
  28. sprintf( '<span class="fn">%s</span><br/>', get_comment_author_link() ),
  29. sprintf( '<a href="%1$s"><time datetime="%2$s">%3$s</time></a>',
  30. esc_url( get_comment_link( $comment->comment_ID ) ),
  31. get_comment_time( 'c' ),
  32. /* translators: 1: date, 2: time */
  33. sprintf( '%1$s at %2$s', get_comment_date(), get_comment_time() )
  34. )
  35. );
  36. ?>
  37. </div><!-- .comment-author .vcard -->
  38. <?php if ( $comment->comment_approved == '0' ) : ?>
  39. <em class="comment-awaiting-moderation"><?php echo 'Your comment is awaiting moderation.'; ?></em>
  40. <br />
  41. <?php endif; ?>
  42. </footer>
  43. <div class="comment-content"><?php comment_text(); ?></div>
  44. <div class="edit-reply">
  45. <?php edit_comment_link( 'Edit &#x270E;', '<span class="edit-link">', '</span>' ); ?>
  46. <?php comment_reply_link( array_merge( $args, array( 'reply_text' => 'Reply <span>&#x21A9;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
  47. </div><!-- .reply -->
  48. </article><!-- #comment-## -->
  49. <?php
  50. break;
  51. endswitch;
  52. }
  53. ?>