View difference between Paste ID: jKcBBAPk and biiCALxs
SHOW: | | - or go back to the newest paste.
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] `','<a class="u-in-reply-to in-reply-to"',$content,1);
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' );