From 4624f178a3d30ffdc8a53baa18c2d53f72e59ef0 Mon Sep 17 00:00:00 2001 From: youknowriad Date: Thu, 1 Feb 2024 09:26:15 +0000 Subject: [PATCH] Editor: Remove shadow support via direct attribute. Shadow block support should always rely on the style attribute instead. Props madhudollu. Fixes #60377. Built from https://develop.svn.wordpress.org/trunk@57510 git-svn-id: http://core.svn.wordpress.org/trunk@57011 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/block-supports/shadow.php | 5 ++--- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/wp-includes/block-supports/shadow.php b/wp-includes/block-supports/shadow.php index 6fa05b248f..0ccaf3fd44 100644 --- a/wp-includes/block-supports/shadow.php +++ b/wp-includes/block-supports/shadow.php @@ -58,9 +58,8 @@ function wp_apply_shadow_support( $block_type, $block_attributes ) { $shadow_block_styles = array(); - $preset_shadow = array_key_exists( 'shadow', $block_attributes ) ? "var:preset|shadow|{$block_attributes['shadow']}" : null; - $custom_shadow = isset( $block_attributes['style']['shadow'] ) ? $block_attributes['style']['shadow'] : null; - $shadow_block_styles['shadow'] = $preset_shadow ? $preset_shadow : $custom_shadow; + $custom_shadow = $block_attributes['style']['shadow'] ?? null; + $shadow_block_styles['shadow'] = $custom_shadow; $attributes = array(); $styles = wp_style_engine_get_styles( $shadow_block_styles ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 8217115e0b..d432556803 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-alpha-57509'; +$wp_version = '6.5-alpha-57510'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.