bp_dtheme_blog_comments

Template for comments and pingbacks.

Description

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

Parameters (3)

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

Usage

  1. if ( !function_exists( 'bp_dtheme_blog_comments' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bp-groupblog/themes/p2-buddypress/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 = bp_dtheme_blog_comments($comment, $args, $depth); 
  15.  

Defined (1)

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

/themes/p2-buddypress/functions.php  
  1. function bp_dtheme_blog_comments( $comment, $args, $depth ) { 
  2. $GLOBALS['comment'] = $comment; ?> 
  3.  
  4. <?php if ( 'pingback' == $comment->comment_type ) return false; ?> 
  5.  
  6. <li id="comment-<?php comment_ID(); ?>"> 
  7. <div class="comment-avatar-box"> 
  8. <div class="avb"> 
  9. <a href="<?php echo get_comment_author_url() ?>" rel="nofollow"> 
  10. <?php if ( $comment->user_id ) : ?> 
  11. <?php echo bp_core_fetch_avatar( array( 'item_id' => $comment->user_id, 'width' => 50, 'height' => 50, 'email' => $comment->comment_author_email ) ); ?> 
  12. <?php else : ?> 
  13. <?php echo get_avatar( $comment, 50 ) ?> 
  14. <?php endif; ?> 
  15. </a> 
  16. </div> 
  17. </div> 
  18.  
  19. <div class="comment-content"> 
  20.  
  21. <div class="comment-meta"> 
  22. <a href="<?php echo get_comment_author_url() ?>" rel="nofollow"><?php echo get_comment_author(); ?></a> <?php _e( 'said:', 'buddypress' ) ?> 
  23. <em><?php _e( 'On', 'buddypress' ) ?> <a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date() ?></a></em> 
  24. </div> 
  25.  
  26. <?php if ( $comment->comment_approved == '0' ) : ?> 
  27. <em class="moderate"><?php _e('Your comment is awaiting moderation.'); ?></em><br /> 
  28. <?php endif; ?> 
  29.  
  30. <?php comment_text() ?> 
  31.  
  32. <div class="comment-options"> 
  33. <?php echo comment_reply_link( array('depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ?> 
  34. <?php edit_comment_link( __( 'Edit' ), '', '' ); ?> 
  35. </div> 
  36.  
  37. </div> 
  38. </li> 
  39. <?php