Advertisement
Guest User

Untitled

a guest
Feb 6th, 2012
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. <?php
  2. function bp_dtheme_blog_comments( $comment, $args, $depth ) {
  3. $GLOBALS['comment'] = $comment;
  4.  
  5. if ( 'pingback' == $comment->comment_type )
  6. return false;
  7.  
  8. if ( 1 == $depth )
  9. $avatar_size = 150;
  10. else
  11. $avatar_size = 100;
  12. ?>
  13.  
  14. <li <?php comment_class() ?> id="comment-<?php comment_ID() ?>">
  15. <div class="comment-avatar-box">
  16. <div class="avb">
  17. <a href="<?php echo get_comment_author_url() ?>" rel="nofollow">
  18. <?php if ( $comment->user_id ) : ?>
  19. <?php echo bp_core_fetch_avatar( array( 'item_id' => $comment->user_id, 'width' => $avatar_size, 'height' => $avatar_size, 'email' => $comment->comment_author_email ) ) ?>
  20. <?php else : ?>
  21. <?php echo get_avatar( $comment, $avatar_size ) ?>
  22. <?php endif; ?>
  23. </a>
  24. </div>
  25. </div>
  26.  
  27. <div class="comment-content">
  28. <div class="comment-meta">
  29. <p>
  30. <?php
  31. /* translators: 1: comment author url, 2: comment author name, 3: comment permalink, 4: comment date/timestamp*/
  32. printf( __( '<a href="%1$s" rel="nofollow">%2$s</a> said on <a href="%3$s"><span class="time-since">%4$s</span></a>', 'buddypress' ), get_comment_author_url(), get_comment_author(), get_comment_link(), get_comment_date() );
  33. ?>
  34. </p>
  35. </div>
  36.  
  37. <div class="comment-entry">
  38. <?php if ( $comment->comment_approved == '0' ) : ?>
  39. <em class="moderate"><?php _e( 'Your comment is awaiting moderation.', 'buddypress' ); ?></em>
  40. <?php endif; ?>
  41.  
  42. <?php comment_text() ?>
  43. </div>
  44.  
  45. <div class="comment-options">
  46. <?php if ( comments_open() ) : ?>
  47. <?php comment_reply_link( array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ); ?>
  48. <?php endif; ?>
  49.  
  50. <?php if ( current_user_can( 'edit_comment', $comment->comment_ID ) ) : ?>
  51. <?php printf( '<a class="button comment-edit-link bp-secondary-action" href="%1$s" title="%2$s">%3$s</a> ', get_edit_comment_link( $comment->comment_ID ), esc_attr__( 'Edit comment', 'buddypress' ), __( 'Edit', 'buddypress' ) ) ?>
  52. <?php endif; ?>
  53.  
  54. </div>
  55.  
  56. </div>
  57.  
  58. <?php
  59. }
  60. endif;
  61. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement