From c054a28c0f6751d7e8d765d565658492d92e253f Mon Sep 17 00:00:00 2001 From: Matias Benedetto Date: Tue, 6 Feb 2024 11:52:56 -0300 Subject: [PATCH] avoid multiple unset calls --- .../class-wp-rest-font-families-controller.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/compat/wordpress-6.5/fonts/class-wp-rest-font-families-controller.php b/lib/compat/wordpress-6.5/fonts/class-wp-rest-font-families-controller.php index 231d756b247e7..b79a9d649e9f0 100644 --- a/lib/compat/wordpress-6.5/fonts/class-wp-rest-font-families-controller.php +++ b/lib/compat/wordpress-6.5/fonts/class-wp-rest-font-families-controller.php @@ -385,13 +385,15 @@ public function get_collection_params() { $query_params = parent::get_collection_params(); // Remove unneeded params. - unset( $query_params['after'] ); - unset( $query_params['modified_after'] ); - unset( $query_params['before'] ); - unset( $query_params['modified_before'] ); - unset( $query_params['search'] ); - unset( $query_params['search_columns'] ); - unset( $query_params['status'] ); + unset( + $query_params['after'], + $query_params['modified_after'], + $query_params['before'], + $query_params['modified_before'], + $query_params['search'], + $query_params['search_columns'], + $query_params['status'] + ); $query_params['orderby']['default'] = 'id'; $query_params['orderby']['enum'] = array( 'id', 'include' );