SHARE
TWEET

wp_comment_at

a guest Nov 28th, 2018 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. // Comment At
  3. function wp_comment_at ($comment_text, $comment = ''){
  4.     if ($comment->comment_parent > 0) {
  5.         $parrent        = $comment->comment_parent;
  6.         $parrent_author = get_comment_author($parrent);
  7.         $comment_text   = '@<a href="#comment-' . $parrent . '">' . $parrent_author .'</a> : '.$comment_text;
  8.     }
  9.     return $comment_text;
  10. }
  11. add_filter('comment_text', 'wp_comment_at', 20, 2);
  12. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top