From ab9c4659aeb35a9d906dbb1d66f1c317c56025b4 Mon Sep 17 00:00:00 2001 From: hellofromTonya Date: Mon, 23 Oct 2023 23:39:20 +0000 Subject: [PATCH] Editor: Fix render_duotone_support() to be compatible with enhanced pagination. Some blocks do not have content. For duotone support, blocks without content still need to run through the `render_duotone_support()` to render their duotone CSS. This fix makes the duotone compatible with the enhanced pagination (introduced in 6.4.0) by making sure that the CSS is always on the page, even when the posts have no featured image. It also prevents the duotone from interfering with other blocks using `wp_unique_id()`. References: * [https://github.com/WordPress/gutenberg/pull/55415 Gutenberg PR 55415] Follow-up to [56226]. Props cbravobernal, luisherranz, hellofromTonya, isabel_brison, jorbin. Fixes #59694. Built from https://develop.svn.wordpress.org/trunk@56991 git-svn-id: http://core.svn.wordpress.org/trunk@56502 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-duotone.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-wp-duotone.php b/wp-includes/class-wp-duotone.php index 1bb8bea5cd..813258c10d 100644 --- a/wp-includes/class-wp-duotone.php +++ b/wp-includes/class-wp-duotone.php @@ -1074,7 +1074,7 @@ class WP_Duotone { * @return string Filtered block content. */ public static function render_duotone_support( $block_content, $block, $wp_block ) { - if ( empty( $block_content ) || ! $block['blockName'] ) { + if ( ! $block['blockName'] ) { return $block_content; } $duotone_selector = self::get_selector( $wp_block->block_type ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 1164086864..8bfeb3b5e6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-alpha-56990'; +$wp_version = '6.5-alpha-56991'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.