Posted By

wpexplorer on 06/21/11


Tagged

wordpress wp comments Themes


Versions (?)

Better WordPress Comments


 / Published in: PHP
 

URL: http://www.wpexplorer.com/blog/better-wordpress-comments.html

  1. <?php
  2. function better_comments($comment, $args, $depth) {
  3. $GLOBALS['comment'] = $comment;
  4. ?>
  5. <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
  6. <div id="comment-<?php comment_ID(); ?>" class="comment-body">
  7. <div class="comment-body-inner">
  8. <div class="comment-avatar">
  9. <?php echo get_avatar($comment, $size = '45', $default = get_bloginfo('stylesheet_directory').'/images/default-avatar.png' ); ?>
  10. </div>
  11. <!-- END avatar -->
  12. <div class="comment-author vcard">
  13. <?php printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link()) ?>
  14. </div>
  15. <!-- END comment-author vcard -->
  16. <?php if ($comment->comment_approved == '0') : ?>
  17. <em><?php _e('Your comment is awaiting moderation.') ?></em>
  18. <br />
  19. <?php endif; ?>
  20.  
  21. <div class="comment-meta commentmetadata">
  22. <a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?></a>
  23. <?php edit_comment_link(__('(Edit)'),' ','') ?>
  24. </div>
  25. <!-- END comment-meta commentmetadata -->
  26.  
  27. <?php comment_text() ?>
  28.  
  29. <div class="reply">
  30. <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
  31. </div>
  32. <!-- END reply -->
  33. </div>
  34. <!-- END comment-body-inner -->
  35. </div>
  36. <!-- END comment -->
  37. <?php
  38. }
  39. ?>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: killjim01 on October 18, 2014

red bottom heels oakley sunglasses wholesale chi flat iron,chi hair strighteners toms wedges michael kors sale marc jacobs,marc jacobs handbags,marc jacobs bags,marc jacobs outlet moncler jackets christian louboutin,christian louboutin shoes,christian louboutin outlet fitflop coach outlet stores ugg shoes,uggs for cheap,uggs outlet,uggs for kids,ugg boots sale,uggs sale,uggs on sale,ugg gloves,ugg bailey button,ugg boots cheap,ugg moccasins,uggs canada,uggs for women,fake uggs,ugg boots,ugg uk,ugg boots on sale coach factory outlet coach cyber monday 2014,coach cyber monday,cyber monday 2014,cyber monday deals,cyber monday sales,cyber monday,louis vuitton cyber monday 2014,louis vuitton cyber monday,michael kors cyber monday 2014,michael kors cyber monday

You need to login to post a comment.