getAttribute( 'style' ) ); if ( isset( $box_shadow['inset'] ) && $box_shadow['inset'] ) { $styles['--wp--custom--box-shadow--inset'] = 'inset'; } if ( $box_shadow['x'] ?? null ) { $styles['--wp--custom--box-shadow--x'] = $box_shadow['x'] . 'px'; } if ( $box_shadow['y'] ?? null ) { $styles['--wp--custom--box-shadow--y'] = $box_shadow['y'] . 'px'; } if ( $box_shadow['blur'] ?? null ) { $styles['--wp--custom--box-shadow--blur'] = $box_shadow['blur'] . 'px'; } if ( $box_shadow['spread'] ?? null ) { $styles['--wp--custom--box-shadow--spread'] = $box_shadow['spread'] . 'px'; } if ( $box_shadow['color'] ?? null ) { $styles['--wp--custom--box-shadow--color'] = $box_shadow['color']; } if ( $styles ) { $first->setAttribute( 'style', css_array_to_string( $styles ) ); } $classes = explode( ' ', $first->getAttribute( 'class' ) ); if ( ( $box_shadow['useDefault'] ?? $styles ) ) { if ( ! in_array( 'has-box-shadow', $classes, true ) ) { $classes[] = 'has-box-shadow'; } $first->setAttribute( 'class', implode( ' ', $classes ) ); } return $dom->saveHTML(); }