From 605d7f953977d4501bfa584efda708fa0864f63e Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Mon, 28 Apr 2025 16:05:22 +0000 Subject: [PATCH] REST API: Change posts endpoint to ignore_sticky=true by default This restores the 6.7 and below behavior for the posts endpoint which did not include sticky posts by default. Follow-up to [59801]. Props nikunj8866, SirLouen, ankitmaru, wildworks, karthikeya01, Mamaduka, spacedmonkey, jorbin. Fixes #63307. See #35907. Built from https://develop.svn.wordpress.org/trunk@60197 git-svn-id: http://core.svn.wordpress.org/trunk@59533 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../rest-api/endpoints/class-wp-rest-posts-controller.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php index c51915a974..19e399f55e 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php @@ -3075,7 +3075,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller { $query_params['ignore_sticky'] = array( 'description' => __( 'Whether to ignore sticky posts or not.' ), 'type' => 'boolean', - 'default' => false, + 'default' => true, ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index ffa17cb3d0..1f0a76e50f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.9-alpha-60195'; +$wp_version = '6.9-alpha-60197'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.