From a73ed32b9aed233dfd338bd8fe636d2bec5e8ef1 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Thu, 13 Feb 2025 11:09:11 +0800 Subject: [PATCH] Plugin: Fix typo for 'ignore_sticky_posts' REST API support (#69171) Co-authored-by: Mamaduka Co-authored-by: swissspidy --- lib/compat/wordpress-6.8/rest-api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compat/wordpress-6.8/rest-api.php b/lib/compat/wordpress-6.8/rest-api.php index fc68077b67f765..f6844184ea610c 100644 --- a/lib/compat/wordpress-6.8/rest-api.php +++ b/lib/compat/wordpress-6.8/rest-api.php @@ -80,7 +80,7 @@ function gutenberg_add_default_template_types_to_index( WP_REST_Response $respon * @param WP_Post_Type $post_type Post type object. * @return array */ -function gutenberg_modify_post_collection_paramt( $query_params, WP_Post_Type $post_type ) { +function gutenberg_modify_post_collection_param( $query_params, WP_Post_Type $post_type ) { if ( 'post' === $post_type->name && ! isset( $query_params['ignore_sticky'] ) ) { $query_params['ignore_sticky'] = array( 'description' => __( 'Whether to ignore sticky posts or not.' ), @@ -91,7 +91,7 @@ function gutenberg_modify_post_collection_paramt( $query_params, WP_Post_Type $p return $query_params; } -add_filter( 'rest_post_collection_params', 'gutenberg_modify_post_collection_paramt', 10, 2 ); +add_filter( 'rest_post_collection_params', 'gutenberg_modify_post_collection_param', 10, 2 ); /** * Modify posts query based on `ignore_sticky` parameter.