diff --git a/php/class-post-type.php b/php/class-post-type.php index dcea36b2..ffb42127 100644 --- a/php/class-post-type.php +++ b/php/class-post-type.php @@ -285,8 +285,6 @@ public function filter_post_row_actions( $actions, $post ) { $actions ); } else { - unset( $actions['inline hide-if-no-js'] ); - if ( isset( $actions['edit'] ) ) { $actions['edit'] = sprintf( '%s', @@ -297,6 +295,9 @@ public function filter_post_row_actions( $actions, $post ) { ); } } + + unset( $actions['inline hide-if-no-js'] ); + return $actions; } diff --git a/tests/php/test-class-post-type.php b/tests/php/test-class-post-type.php index 54fb17a6..d95023fd 100644 --- a/tests/php/test-class-post-type.php +++ b/tests/php/test-class-post-type.php @@ -198,7 +198,7 @@ public function test_filter_post_row_actions() { wp_set_current_user( $admin_user_id ); $filtered_actions = apply_filters( 'post_row_actions', $original_actions, get_post( $post_id ) ); - $this->assertArrayHasKey( 'inline hide-if-no-js', $filtered_actions ); + $this->assertArrayNotHasKey( 'inline hide-if-no-js', $filtered_actions ); $this->assertArrayHasKey( 'customize', $filtered_actions ); $this->assertArrayHasKey( 'front-view', $filtered_actions );