Don't display an empty comment author IP link on Comments screen.

props afercia.
fixes #29766.
Built from https://develop.svn.wordpress.org/trunk@29774


git-svn-id: http://core.svn.wordpress.org/trunk@29546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2014-09-28 06:38:18 +00:00
parent d7de59cb00
commit ebdfe06843
1 changed files with 9 additions and 8 deletions

View File

@ -525,14 +525,15 @@ class WP_Comments_List_Table extends WP_List_Table {
comment_author_email_link(); comment_author_email_link();
echo '<br />'; echo '<br />';
} }
echo '<a href="edit-comments.php?s=';
comment_author_IP(); $author_ip = get_comment_author_IP();
echo '&amp;mode=detail'; if ( $author_ip ) {
if ( 'spam' == $comment_status ) $author_ip_url = add_query_arg( array( 's' => $author_ip, 'mode' => 'detail' ), 'edit-comments.php' );
echo '&amp;comment_status=spam'; if ( 'spam' == $comment_status ) {
echo '">'; $author_ip_url = add_query_arg( 'comment_status', 'spam', $author_ip_url );
comment_author_IP(); }
echo '</a>'; printf( '<a href="%s">%s</a>', esc_url( $author_ip_url ), $author_ip );
}
} }
} }