Advertisement
acegiak

Untitled

Jun 20th, 2013
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //attaches in-reply-to classes to the first link in the post
  2. function the_content_in_reply_to_filter($content) {
  3.   return preg_replace('`\<[aA] (.*?)>(.*?)\@(.*?)</[aA]>`','<a class="u-in-reply-to" rel="in-reply-to" $1>$2@$3</a>',$content,1);
  4. }
  5.  
  6. add_filter( 'the_content', 'the_content_in_reply_to_filter' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement