--- a/wp/wp-admin/edit-comments.php Tue Dec 15 15:52:01 2020 +0100
+++ b/wp/wp-admin/edit-comments.php Wed Sep 21 18:19:35 2022 +0200
@@ -31,7 +31,7 @@
$doaction = 'delete';
} elseif ( isset( $_REQUEST['delete_comments'] ) ) {
$comment_ids = $_REQUEST['delete_comments'];
- $doaction = ( '-1' !== $_REQUEST['action'] ) ? $_REQUEST['action'] : $_REQUEST['action2'];
+ $doaction = $_REQUEST['action'];
} elseif ( isset( $_REQUEST['ids'] ) ) {
$comment_ids = array_map( 'absint', explode( ',', $_REQUEST['ids'] ) );
} elseif ( wp_get_referer() ) {
@@ -120,7 +120,7 @@
$redirect_to = add_query_arg( 'deleted', $deleted, $redirect_to );
}
if ( $trashed || $spammed ) {
- $redirect_to = add_query_arg( 'ids', join( ',', $comment_ids ), $redirect_to );
+ $redirect_to = add_query_arg( 'ids', implode( ',', $comment_ids ), $redirect_to );
}
wp_safe_redirect( $redirect_to );
@@ -228,12 +228,24 @@
</h1>
<?php
+if ( $post_id ) {
+ $post_type_object = get_post_type_object( get_post_type( $post_id ) );
+
+ if ( $post_type_object ) {
+ printf(
+ '<a href="%1$s" class="comments-view-item-link">%2$s</a>',
+ get_permalink( $post_id ),
+ $post_type_object->labels->view_item
+ );
+ }
+}
+
if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
echo '<span class="subtitle">';
printf(
/* translators: %s: Search query. */
- __( 'Search results for “%s”' ),
- wp_html_excerpt( esc_html( wp_unslash( $_REQUEST['s'] ) ), 50, '…' )
+ __( 'Search results for: %s' ),
+ '<strong>' . wp_html_excerpt( esc_html( wp_unslash( $_REQUEST['s'] ) ), 50, '…' ) . '</strong>'
);
echo '</span>';
}
@@ -329,7 +341,7 @@
<?php $wp_list_table->search_box( __( 'Search Comments' ), 'comment' ); ?>
<?php if ( $post_id ) : ?>
-<input type="hidden" name="p" value="<?php echo esc_attr( intval( $post_id ) ); ?>" />
+<input type="hidden" name="p" value="<?php echo esc_attr( (int) $post_id ); ?>" />
<?php endif; ?>
<input type="hidden" name="comment_status" value="<?php echo esc_attr( $comment_status ); ?>" />
<input type="hidden" name="pagegen_timestamp" value="<?php echo esc_attr( current_time( 'mysql', 1 ) ); ?>" />