mh_magazine_lite_comments

The MH Magazine lite mh magazine lite comments function.

Description

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

Parameters (3)

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

Usage

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

Defined (1)

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

/includes/mh-custom-functions.php  
  1. function mh_magazine_lite_comments($comment, $args, $depth) { 
  2. $GLOBALS['comment'] = $comment; ?> 
  3. <li id="comment-<?php comment_ID() ?>" <?php comment_class('mh-comment-item'); ?>> 
  4. <article id="div-comment-<?php comment_ID(); ?>" class="mh-comment-body"> 
  5. <footer class="mh-comment-footer clearfix"> 
  6. <figure class="mh-comment-gravatar"> 
  7. <?php echo get_avatar($comment->comment_author_email, 80); ?> 
  8. </figure> 
  9. <div class="mh-meta mh-comment-meta"> 
  10. <div class="vcard author mh-comment-meta-author"> 
  11. <span class="fn"><?php echo get_comment_author_link(); ?></span> 
  12. </div> 
  13. <a class="mh-comment-meta-date" href="<?php echo esc_url(get_comment_link($comment->comment_ID)); ?>"> 
  14. <?php printf(esc_html__('%1$s at %2$s', 'mh-magazine-lite'), get_comment_date(), get_comment_time()); ?> 
  15. </a> 
  16. </div> 
  17. </footer> 
  18. <?php if ($comment->comment_approved == '0') { ?> 
  19. <div class="mh-comment-info"> 
  20. <?php esc_html_e('Your comment is awaiting moderation.', 'mh-magazine-lite') ?> 
  21. </div> 
  22. <?php } ?> 
  23. <div class="entry-content mh-comment-content"> 
  24. <?php comment_text() ?> 
  25. </div> 
  26. <div class="mh-meta mh-comment-meta-links"><?php 
  27. edit_comment_link(esc_html__('Edit', 'mh-magazine-lite'), ' ', ''); 
  28. if (comments_open() && $args['max_depth'] != $depth) { 
  29. comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); 
  30. } ?> 
  31. </div> 
  32. </article><?php