From a0a496d2d170f21973d49684c2bbd69db08c2a42 Mon Sep 17 00:00:00 2001 From: ramon Date: Mon, 27 May 2024 08:41:36 +1000 Subject: [PATCH] Pulling change from https://github.com/WordPress/gutenberg/pull/61387 --- src/wp-includes/block-supports/background.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/block-supports/background.php b/src/wp-includes/block-supports/background.php index e3873e9783373..ff50be3206837 100644 --- a/src/wp-includes/block-supports/background.php +++ b/src/wp-includes/block-supports/background.php @@ -65,7 +65,7 @@ function wp_render_background_support( $block_content, $block ) { $background_styles = array(); $background_styles['backgroundImage'] = isset( $block_attributes['style']['background']['backgroundImage'] ) ? $block_attributes['style']['background']['backgroundImage'] : array(); - if ( isset( $background_styles['backgroundImage']['url'] ) ) { + if ( ! empty( $background_styles['backgroundImage'] ) ) { $background_styles['backgroundSize'] = isset( $block_attributes['style']['background']['backgroundSize'] ) ? $block_attributes['style']['background']['backgroundSize'] : 'cover'; $background_styles['backgroundPosition'] = isset( $block_attributes['style']['background']['backgroundPosition'] ) ? $block_attributes['style']['background']['backgroundPosition'] : null; $background_styles['backgroundRepeat'] = isset( $block_attributes['style']['background']['backgroundRepeat'] ) ? $block_attributes['style']['background']['backgroundRepeat'] : null;