inkthemes_comment

Template for comments and pingbacks.

Description

inkthemes_comment( $comment, $args, $depth ); 

To override this walker in a child theme without modifying the comments template simply create your own inkthemes_comment(), and that function will be used instead.

Used as a callback by wp_list_comments() for displaying the comments.

Parameters (3)

0. $comment
The comment.
1. $args
The args.
2. $depth
The depth.

Usage

  1. if ( !function_exists( 'inkthemes_comment' ) ) { 
  2. require_once '/functions/inkthemes-functions.php'; 
  3.  
  4. // The comment. 
  5. $comment = null; 
  6.  
  7. // The args. 
  8. $args = null; 
  9.  
  10. // The depth. 
  11. $depth = null; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = inkthemes_comment($comment, $args, $depth); 
  15.  

Defined (1)

The function is defined in the following location(s).

/functions/inkthemes-functions.php  
  1. function inkthemes_comment($comment, $args, $depth) { 
  2. $GLOBALS['comment'] = $comment; 
  3. switch ($comment->comment_type) : 
  4. case '' : 
  5. ?> 
  6. <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>"> 
  7. <div id="comment-<?php comment_ID(); ?>"> 
  8. <div class="comment-author vcard"> <?php echo get_avatar($comment, 40); ?> <?php printf('%s <span class="says">says:</span>' . sprintf('<cite class="fn">%s</cite>', get_comment_author_link())); ?> </div> 
  9. <!-- .comment-author .vcard --> 
  10. <?php if ($comment->comment_approved == '0') : ?> 
  11. <em> <?php echo ('Your comment is awaiting moderation.'); ?> </em> <br /> 
  12. <?php endif; ?> 
  13. <div class="comment-meta commentmetadata"><a href="<?php echo esc_url(get_comment_link($comment->comment_ID)); ?>"> 
  14. <?php 
  15. /** translators: 1: date, 2: time */ 
  16. printf('%1$s at %2$s' . get_comment_date(), get_comment_time()); 
  17. ?> 
  18. </a> 
  19. <?php edit_comment_link('(Edit)', ' '); 
  20. ?> 
  21. </div> 
  22. <!-- .comment-meta .commentmetadata --> 
  23. <div class="comment-body"> 
  24. <?php comment_text(); ?> 
  25. </div> 
  26. <div class="reply"> 
  27. <?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?> 
  28. </div> 
  29. <!-- .reply --> 
  30. </div> 
  31. <!-- #comment-## --> 
  32. <?php 
  33. break; 
  34. case 'pingback' : 
  35. case 'trackback' : 
  36. ?> 
  37. <li class="post pingback"> 
  38. <p> <?php echo ('Pingback:'); ?> 
  39. <?php comment_author_link(); ?> 
  40. <?php edit_comment_link('(Edit)', ' '); ?> 
  41. </p> 
  42. <?php 
  43. break; 
  44. endswitch;