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].

Reviewed by desrosj.
Merges [60197] to the 6.8 branch.

Props nikunj8866, SirLouen, ankitmaru, wildworks, karthikeya01, Mamaduka, spacedmonkey, jorbin.
Fixes #63307. See #35907.

Built from https://develop.svn.wordpress.org/branches/6.8@60200


git-svn-id: http://core.svn.wordpress.org/branches/6.8@59536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Aaron Jorbin
2025-04-28 16:49:20 +00:00
parent 703e5d5e92
commit 0091259a72
2 changed files with 2 additions and 2 deletions

View File

@@ -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,
);
}

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.8.1-alpha-60199';
$wp_version = '6.8.1-alpha-60200';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.