everbox_comments

Post comments.

Description

(string) everbox_comments( (string) $comment, (string) $args, (string) $depth ); 

Returns (string)

Parameters (3)

0. $comment (string)
The comment.
1. $args (string)
The args.
2. $depth (string)
The depth.

Usage

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

Defined (1)

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

/inc/extras.php  
  1. function everbox_comments( $comment , $args , $depth ) { 
  2.  
  3. $GLOBALS['comment'] = $comment; 
  4. $comment_post = get_post($comment->comment_post_ID); 
  5. ?> 
  6. <!-- commment --> 
  7. <li id="comment-<?php echo $comment->comment_ID; ?>" <?php comment_class(); ?>> 
  8. <?php 
  9. $avatar_size = 48; 
  10. ?> 
  11. <div class="commentator-avatar-wrap"> 
  12. <div class="commentator-avatar"> 
  13. <?php echo get_avatar($comment, $avatar_size); ?> 
  14. </div> 
  15. </div> 
  16. <div class="comment-body"> 
  17. <div class="comment-heading"> 
  18. <span class="comment-author"><?php comment_author(); ?></span> 
  19. <span>•</span> 
  20. <span class="comment-meta"><?php echo get_comment_date(); ?></span> 
  21. <span>•</span> 
  22. <span class="comment-reply"><?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?></span> 
  23. <?php 
  24. if ( $comment_post ) { 
  25. if ( $comment->user_id === $comment_post->post_author ) { 
  26. ?> 
  27. <span>•</span> 
  28. <span class="comment-byauthor"><?php _e('Author', 'everbox' ); ?></span> 
  29. <?php 
  30. ?> 
  31.  
  32. </div> 
  33. <?php if ($comment->comment_approved == '0') : ?> 
  34. <div class="alert alert-info"><?php _e('Your comment is awaiting approval.', 'everbox');?></div> 
  35. <?php endif; ?> 
  36.  
  37. <?php comment_text(); ?> 
  38. </div> 
  39. </li> 
  40. <!-- End commment --> 
  41. <?php