Changeset 33894
- Timestamp:
- 09/03/2015 11:22:32 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-comments-list-table.php
r33830 r33894 637 637 638 638 $author_url = get_comment_author_url( $comment->comment_ID ); 639 if ( 'http://' == $author_url ) { 640 $author_url = ''; 641 } 642 643 $author_url_display = preg_replace( '|http://(www\.)?|i', '', $author_url ); 639 640 $author_url_display = untrailingslashit( preg_replace( '|^http(s)?://(www\.)?|i', '', $author_url ) ); 644 641 if ( strlen( $author_url_display ) > 50 ) { 645 642 $author_url_display = wp_html_excerpt( $author_url_display, 49, '…' ); 646 643 } 647 644 648 649 645 echo "<strong>"; comment_author( $comment->comment_ID ); echo '</strong><br />'; 650 if ( ! empty( $author_url) ) {651 echo "<a title='$author_url' href='$author_url'>$author_url_display</a><br />";646 if ( ! empty( $author_url_display ) ) { 647 printf( '<a href="%s">%s</a><br />', esc_url( $author_url ), esc_html( $author_url_display ) ); 652 648 } 653 649
Note: See TracChangeset
for help on using the changeset viewer.