diff --git a/gutenberg.php b/gutenberg.php index 51e6846fe..62342b124 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -14,7 +14,7 @@ ### BEGIN AUTO-GENERATED DEFINES define( 'GUTENBERG_VERSION', '19.6.0' ); -define( 'GUTENBERG_GIT_COMMIT', 'fbdc0f97dc463f2a2860de10b8d08cda3d8f69da' ); +define( 'GUTENBERG_GIT_COMMIT', '99d22755b4e92b5bc09856b2c14a9564fb6797fc' ); ### END AUTO-GENERATED DEFINES defined( 'GUTENBERG_MINIMUM_WP_VERSION' ) or define( 'GUTENBERG_MINIMUM_WP_VERSION', '6.5' ); diff --git a/lib/compat/wordpress-6.7/blocks.php b/lib/compat/wordpress-6.7/blocks.php index 1a8e7f574..e73980800 100644 --- a/lib/compat/wordpress-6.7/blocks.php +++ b/lib/compat/wordpress-6.7/blocks.php @@ -59,6 +59,16 @@ function gutenberg_add_format_query_vars_to_query_loop_block( $query, $block ) { return $query; } + // Return early if the query already contains a post format. This is to avoid duplication if the + // WordPress core filter is already applied. + if ( ! empty( $query['tax_query'] ) ) { + foreach ( $query['tax_query'] as $taxquery ) { + if ( isset( $taxquery['taxonomy'] ) && 'post_format' === $taxquery['taxonomy'] ) { + return $query; + } + } + } + $formats = $block->context['query']['format']; /* * Validate that the format is either `standard` or a supported post format.