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

props afercia.
fixes #29766.

git-svn-id: https://develop.svn.wordpress.org/trunk@29774 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2014-09-28 06:37:10 +00:00
parent 5f0598234b
commit 9e5beefd72

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 );
}
} }
} }