skt_corp_comment

Template for comments and pingbacks.

Description

skt_corp_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( 'skt_corp_comment' ) ) { 
  2. require_once '/inc/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 = skt_corp_comment($comment, $args, $depth); 
  15.  

Defined (1)

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

/inc/template-tags.php  
  1. function skt_corp_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:', 'skt-corp' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Edit', 'skt-corp' ), '<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'] ) echo get_avatar( $comment, 34 ); ?> 
  18. </div><!-- .comment-author --> 
  19.  
  20. <div class="comment-metadata"> 
  21. <?php printf( __( sprintf( '<cite class="fn">%s</cite> on', get_comment_author_link() ) ) ); ?> 
  22. <a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"> 
  23. <time datetime="<?php comment_time( 'c' ); ?>"> 
  24. <?php printf( _x( '%1$s', '1: date', 'skt-corp' ), get_comment_date(), get_comment_time() ); ?> 
  25. </time> 
  26. </a> 
  27. <?php edit_comment_link( __( 'Edit', 'skt-corp' ), '<span class="edit-link">', '</span>' ); ?> 
  28. </div><!-- .comment-metadata --> 
  29.  
  30. <?php if ( '0' == $comment->comment_approved ) : ?> 
  31. <p class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'skt-corp' ); ?></p> 
  32. <?php endif; ?> 
  33. </footer><!-- .comment-meta --> 
  34.  
  35. <div class="comment-content"> 
  36. <?php comment_text(); ?> 
  37. </div><!-- .comment-content --> 
  38.  
  39. <?php 
  40. comment_reply_link( array_merge( $args, array( 
  41. 'add_below' => 'div-comment',  
  42. 'depth' => $depth,  
  43. 'max_depth' => $args['max_depth'],  
  44. 'before' => '<div class="reply">',  
  45. 'after' => '</div>',  
  46. ) ) ); 
  47. ?> 
  48. </article><!-- .comment-body --> 
  49.  
  50. <?php 
  51. endif;