[sourcecode language=”php”]
function kw_dofollow($str)
{
$str = preg_replace(
‘~<a ([^>]*)s*(["|’]{1}w*)s*nofollow([^>]*)>~U’,
‘<a ${1}${2}${3}>’, $str);
return str_replace(array(‘ rel=""’, " rel=”"), ”, $str);
}
remove_filter(‘pre_comment_content’, ‘wp_rel_nofollow’);
add_filter (‘get_comment_author_link’, ‘kw_dofollow’);
add_filter (‘post_comments_link’, ‘kw_dofollow’);
add_filter (‘comment_reply_link’, ‘kw_dofollow’);
add_filter (‘comment_text’, ‘kw_dofollow’);
[/sourcecode]