Skip to content

Commit eb019e4

Browse files
Move note exclusion logic to comments list table class
1 parent 2e3574c commit eb019e4

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/wp-admin/edit-comments.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@
1616
);
1717
}
1818

19-
// Never show notes on the comments page.
20-
if ( 'note' === $_REQUEST['comment_type'] ) {
21-
unset( $_REQUEST['comment_type'] );
22-
}
23-
2419
$wp_list_table = _get_list_table( 'WP_Comments_List_Table' );
2520
$pagenum = $wp_list_table->get_pagenum();
2621

src/wp-admin/includes/class-wp-comments-list-table.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ public function prepare_items() {
100100
}
101101

102102
$comment_type = ! empty( $_REQUEST['comment_type'] ) ? $_REQUEST['comment_type'] : '';
103+
$comment_type = 'note' === $comment_type ? '' : $comment_type;
103104

104105
$search = ( isset( $_REQUEST['s'] ) ) ? $_REQUEST['s'] : '';
105106

0 commit comments

Comments
 (0)