diff --git a/wp-includes/blocks.php b/wp-includes/blocks.php index 58e03d0155..4a9cf545e6 100644 --- a/wp-includes/blocks.php +++ b/wp-includes/blocks.php @@ -2564,8 +2564,10 @@ function build_query_vars_from_query_block( $block, $page ) { */ $query['post__in'] = ! empty( $sticky ) ? $sticky : array( 0 ); $query['ignore_sticky_posts'] = 1; - } else { + } elseif ( 'exclude' === $block->context['query']['sticky'] ) { $query['post__not_in'] = array_merge( $query['post__not_in'], $sticky ); + } elseif ( 'ignore' === $block->context['query']['sticky'] ) { + $query['ignore_sticky_posts'] = 1; } } if ( ! empty( $block->context['query']['exclude'] ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 8bfb82aef0..78bb666236 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59865'; +$wp_version = '6.8-alpha-59866'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.