Ticket #5789: 5789.2.diff
File 5789.2.diff, 1.4 KB (added by , 15 years ago) |
---|
-
Users/denis/Sites/wp/wp-includes/comment-template.php
193 193 */ 194 194 function get_comment_author_url() { 195 195 global $comment; 196 return apply_filters('get_comment_author_url', $comment->comment_author_url); 196 $url = apply_filters('get_comment_author_url', $comment->comment_author_url); 197 if ( $url == 'http://' ) { 198 $url = ''; 199 } 200 return $url; 197 201 } 198 202 199 203 /** … … 228 232 function get_comment_author_url_link( $linktext = '', $before = '', $after = '' ) { 229 233 $url = get_comment_author_url(); 230 234 $display = ($linktext != '') ? $linktext : $url; 231 $display = str_replace( 'http://www.', '', $display ); 232 $display = str_replace( 'http://', '', $display ); 233 if ( '/' == substr($display, -1) ) 234 $display = substr($display, 0, -1); 235 $return = "$before<a href='$url' rel='external'>$display</a>$after"; 235 if ( $display ) { 236 $display = str_replace( 'http://www.', '', $display ); 237 $display = str_replace( 'http://', '', $display ); 238 if ( '/' == substr($display, -1) ) 239 $display = substr($display, 0, -1); 240 $return = "$before<a href='$url' rel='external'>$display</a>$after"; 241 } else { 242 $return = ''; 243 } 236 244 return apply_filters('get_comment_author_url_link', $return); 237 245 } 238 246