Tidy comment_author_url_link just like we do on the bookmarks page

git-svn-id: https://develop.svn.wordpress.org/trunk@3723 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2006-04-19 08:36:45 +00:00
parent e997c85341
commit 8658f214f8
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);
}