responsive_II_comment

Template for comments and pingbacks.

Description

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

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( 'responsive_II_comment' ) ) { 
  2. require_once '/includes/functions-template-tags.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 = responsive_II_comment($comment, $args, $depth); 
  15.  

Defined (1)

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

/includes/functions-template-tags.php  
  1. function responsive_II_comment( $comment, $args, $depth ) { 
  2. $GLOBALS['comment'] = $comment; 
  3.  
  4. if ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?> 
  5.  
  6. <li id="comment-<?php comment_ID(); ?>" <?php comment_class(); ?>> 
  7. <div class="comment-body"> 
  8. <?php _e( 'Pingback:', 'responsive-II' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Edit', 'responsive-II' ), '<span class="edit-link">', '</span>' ); ?> 
  9. </div> 
  10.  
  11. <?php else : ?> 
  12.  
  13. <li id="comment-<?php comment_ID(); ?>" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>> 
  14. <article id="div-comment-<?php comment_ID(); ?>" class="comment-body"> 
  15. <footer class="comment-meta"> 
  16. <div class="comment-author vcard"> 
  17. <?php if ( 0 != $args['avatar_size'] ) { 
  18. echo get_avatar( $comment, $args['avatar_size'] ); 
  19. } ?> 
  20. <?php printf( __( '%s <span class="says">says:</span>', 'responsive-II' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?> 
  21. </div> 
  22. <!-- .comment-author --> 
  23.  
  24. <div class="comment-metadata"> 
  25. <a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"> 
  26. <time datetime="<?php comment_time( 'c' ); ?>"> 
  27. <?php printf( _x( '%1$s at %2$s', '1: date, 2: time', 'responsive-II' ), get_comment_date(), get_comment_time() ); ?> 
  28. </time> 
  29. </a> 
  30. <?php edit_comment_link( __( 'Edit', 'responsive-II' ), '<span class="edit-link">', '</span>' ); ?> 
  31. </div> 
  32. <!-- .comment-metadata --> 
  33.  
  34. <?php if ( '0' == $comment->comment_approved ) : ?> 
  35. <p class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'responsive-II' ); ?></p> 
  36. <?php endif; ?> 
  37. </footer> 
  38. <!-- .comment-meta --> 
  39.  
  40. <div class="comment-content"> 
  41. <?php comment_text(); ?> 
  42. </div> 
  43. <!-- .comment-content --> 
  44.  
  45. <?php 
  46. comment_reply_link( array_merge( $args, array( 
  47. 'add_below' => 'div-comment',  
  48. 'depth' => $depth,  
  49. 'max_depth' => $args['max_depth'],  
  50. 'before' => '<div class="reply">',  
  51. 'after' => '</div>',  
  52. ) ) ); 
  53. ?> 
  54. </article> 
  55. <!-- .comment-body --> 
  56.  
  57. <?php 
  58. endif;