From 677af117a92fc93cb58c7b0632f45b65e8420f62 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 5 Sep 2020 00:31:03 +0000 Subject: [PATCH] Comments: Rename `WP_Comments_List_Table::comment_status_dropdown()` to `::comment_type_dropdown()`. This better reflects the purpose of the method, which doesn't have anything to do with a comment status. Follow-up to [48521]. Props davidbaumwald, johnbillion, SergeyBiryukov. Fixes #51248. git-svn-id: https://develop.svn.wordpress.org/trunk@48943 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-comments-list-table.php | 5 +++-- tests/phpunit/tests/admin/includesListTable.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/includes/class-wp-comments-list-table.php b/src/wp-admin/includes/class-wp-comments-list-table.php index 872d101cb0..bae551f08e 100644 --- a/src/wp-admin/includes/class-wp-comments-list-table.php +++ b/src/wp-admin/includes/class-wp-comments-list-table.php @@ -396,7 +396,7 @@ class WP_Comments_List_Table extends WP_List_Table { if ( 'top' === $which ) { ob_start(); - $this->comment_status_dropdown( $comment_type ); + $this->comment_type_dropdown( $comment_type ); /** * Fires just before the Filter submit button for comment types. @@ -475,10 +475,11 @@ class WP_Comments_List_Table extends WP_List_Table { * Displays a comment type drop-down for filtering on the Comments list table. * * @since 5.5.0 + * @since 5.6.0 Renamed from `comment_status_dropdown()` to `comment_type_dropdown()`. * * @param string $comment_type The current comment type slug. */ - protected function comment_status_dropdown( $comment_type ) { + protected function comment_type_dropdown( $comment_type ) { /** * Filters the comment types shown in the drop-down menu on the Comments list table. * diff --git a/tests/phpunit/tests/admin/includesListTable.php b/tests/phpunit/tests/admin/includesListTable.php index 6ca5b61a4b..a6b77af5b8 100644 --- a/tests/phpunit/tests/admin/includesListTable.php +++ b/tests/phpunit/tests/admin/includesListTable.php @@ -319,7 +319,7 @@ class Tests_Admin_includesListTable extends WP_UnitTestCase { /** * @ticket 40188 */ - public function test_filter_comment_status_dropdown_should_be_shown_if_there_are_comments() { + public function test_filter_comment_type_dropdown_should_be_shown_if_there_are_comments() { $post_id = self::factory()->post->create(); $comment_id = self::factory()->comment->create( array(