Skip to content

Instantly share code, notes, and snippets.

@Abromeit
Created May 7, 2012 17:20
Show Gist options
  • Select an option

  • Save Abromeit/2629080 to your computer and use it in GitHub Desktop.

Select an option

Save Abromeit/2629080 to your computer and use it in GitHub Desktop.
Entfernung von ?rel=author aus dem Link eines WordPress-Kommentators
<?php
function sm_preprocess_comment($comment)
{
if( !empty($comment['comment_author_url']) )
{
$comment['comment_author_url'] = preg_replace(
'/(plus\.google\.com.*?)\?rel\=author/i', '$1', $comment['comment_author_url']
);
}
return $comment;
}
add_filter('preprocess_comment','sm_preprocess_comment');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment