layers_comment

The Layers layers comment function.

Description

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

Parameters (3)

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

Usage

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

Defined (1)

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

/core/helpers/post.php  
  1. function layers_comment($comment, $args, $depth) { 
  2. $GLOBALS['comment'] = $comment;?> 
  3. <?php if( 2 < $depth && isset( $GLOBALS['lastdepth'] ) && $depth != $GLOBALS['lastdepth'] ) { ?> 
  4. <div class="grid comments-nested push-top"> 
  5. <?php } ?> 
  6. <div <?php comment_class( 'content well' ); ?> id="comment-<?php comment_ID(); ?>"> 
  7. <div class="avatar push-bottom clearfix"> 
  8. <?php edit_comment_link(__('(Edit)' , 'layerswp' ), '<small class="pull-right">', '</small>') ?> 
  9. <a class="avatar-image" href=""> 
  10. <?php echo get_avatar($comment, $size = '70'); ?> 
  11. </a> 
  12. <div class="avatar-body"> 
  13. <h5 class="avatar-name"><?php echo get_comment_author_link(); ?></h5> 
  14. <small><?php printf(__('%1$s at %2$s' , 'layerswp' ), get_comment_date(), get_comment_time()) ?></small> 
  15. </div> 
  16. </div> 
  17.  
  18. <div class="copy small"> 
  19. <?php if ($comment->comment_approved == '0') : ?> 
  20. <em><?php _e('Your comment is awaiting moderation.' , 'layerswp' ) ?></em> 
  21. <br /> 
  22. <?php endif; ?> 
  23. <?php comment_text() ?> 
  24. <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?> 
  25. </div> 
  26. <?php if( 2 < $depth && isset( $GLOBALS['lastdepth'] ) && $depth == $GLOBALS['lastdepth'] ) { ?> 
  27. </div> 
  28. <?php } ?> 
  29.  
  30. <?php $GLOBALS['lastdepth'] = $depth; ?> 
  31. <?php }