Advertisement
Guest User

Sahifa User Pro Comments Integration

a guest
May 13th, 2014
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. <?php
  2. function custom_comments( $comment, $args, $depth ) {
  3. global $userpro;
  4. $GLOBALS['comment'] = $comment ;
  5. ?>
  6. <li id="comment-<?php comment_ID(); ?>">
  7. <div <?php comment_class('comment-wrap'); ?> >
  8. <div class="comment-avatar"><?php echo get_avatar( $comment, 60); ?></div>
  9. <div class="comment-date">
  10. <div><?php printf( __( '%1$s at %2$s', 'tie' ), get_comment_date(), get_comment_time() ); ?></a> </div>
  11. <div class="comment-edit">
  12. <?php edit_comment_link( __( '(Edit)', 'tie' ), ' ' ); ?>
  13. </div>
  14. </div>
  15.  
  16. <div class="author-comment">
  17. <?php if ($comment->user_id) { ?>
  18.  
  19. <?php printf( '<cite class="fn">%s</cite>', '<a href="'.$userpro->permalink( $comment->user_id ).'">'.userpro_profile_data('display_name', $comment->user_id) . '</a>'); ?>
  20.  
  21. <?php } else { ?>
  22.  
  23. <?php printf( '<cite class="fn">%s</cite>', get_comment_author_link() ); ?>
  24.  
  25. <?php } ?><?php echo userpro_show_badges( $comment->user_id, $inline=true ); ?>
  26. </div>
  27. <div class="clear"></div>
  28. <div class="comment-content">
  29. <?php if ( $comment->comment_approved == '0' ) : ?>
  30. <em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'tie' ); ?></em>
  31. <br />
  32. <?php endif; ?>
  33.  
  34. <?php comment_text(); ?>
  35. </div>
  36. <div class="reply"><?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?></div><!-- .reply -->
  37. </div><!-- #comment-## -->
  38.  
  39. <?php
  40. }
  41.  
  42. function custom_pings($comment, $args, $depth) {
  43. $GLOBALS['comment'] = $comment; ?>
  44. <li class="comment pingback">
  45. <p><?php _e( 'Pingback:', 'tie' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'tie' ), ' ' ); ?></p>
  46. <?php
  47. }
  48. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement