advantage_comment

The Advantage advantage comment function.

Description

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

Parameters (3)

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

Usage

  1. if ( !function_exists( 'advantage_comment' ) ) { 
  2. require_once '/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 = advantage_comment($comment, $args, $depth); 
  15.  

Defined (1)

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

/functions.php  
  1. function advantage_comment( $comment, $args, $depth ) { 
  2. $GLOBALS['comment'] = $comment; 
  3. switch ( $comment->comment_type ) { 
  4. case 'pingback' : 
  5. case 'trackback' : 
  6. ?> 
  7. <li class="post pingback"> 
  8. <p><?php _e( 'Pingback:', 'advantage' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( '<i class="icon-pencil"></i> ' . __( '[Edit]', 'advantage' ), ' ' ); ?></p> 
  9. <?php 
  10. break; 
  11. default : 
  12. ?> 
  13. <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>"> 
  14. <article id="comment-<?php comment_ID(); ?>" class="comment"> 
  15. <footer> 
  16. <div class="comment-meta"> 
  17. <?php echo get_avatar( $comment, 40 ); 
  18. printf( '<cite class="fn">%1$s</cite>', get_comment_author_link() ); ?> 
  19. <a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"><time pubdate datetime="<?php comment_time( 'c' ); ?>"> 
  20. <?php 
  21. printf( __( '%1$s at %2$s', 'advantage' ), get_comment_date(), get_comment_time() ); ?> 
  22. </time></a> 
  23. <?php edit_comment_link( '<i class="icon-pencil"></i> ' . __( '[Edit]', 'advantage' ), ' ' );  
  24. if ( $comment->comment_approved == '0' ) { ?> 
  25. <em><?php _e( 'Your comment is awaiting moderation.', 'advantage' ); ?></em> 
  26. <?php }; ?> 
  27. </div> 
  28. </footer> 
  29. <div class="comment-content"><?php comment_text(); ?></div> 
  30. <div class="reply"> 
  31. <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> 
  32. </div> 
  33. </article> 
  34. <?php 
  35. break;