Tidy comment_author_url_link just like we do on the bookmarks page

git-svn-id: http://svn.automattic.com/wordpress/trunk@3723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2006-04-19 08:36:45 +00:00
parent 7fea857c9f
commit b33778b079
1 changed files with 374 additions and 370 deletions

View File

@ -75,6 +75,10 @@ function get_comment_author_url_link( $linktext = '', $before = '', $after = ''
global $comment;
$url = get_comment_author_url();
$display = ($linktext != '') ? $linktext : $url;
$display = str_replace( 'http://www.', '', $display );
$display = str_replace( 'http://', '', $display );
if ( '/' == substr($display, -1) )
$display = substr($display, 0, -1);
$return = "$before<a href='$url' rel='external'>$display</a>$after";
return apply_filters('get_comment_author_url_link', $return);
}