Skip to content

Commit

Permalink
Pulling change from WordPress/gutenberg#61387
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed May 26, 2024
1 parent 467e432 commit cf2da5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-includes/block-supports/background.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cf2da5e

Please sign in to comment.