getAttribute( 'style' ) ); $palette = wp_get_global_settings()['color']['palette']['theme'] ?? []; foreach ( $palette as $theme_color ) { if ( $theme_color['color'] === $color ) { $styles['--wp--custom--box-shadow--color'] = "var(--wp--preset--color--{$theme_color['slug']})"; } if ( $theme_color['color'] === $hover_color ) { $styles['--wp--custom--box-shadow--hover--color'] = "var(--wp--preset--color--{$theme_color['slug']})"; } } $first->setAttribute( 'style', css_array_to_string( $styles ) ); $html = $dom->saveHTML(); } return $html; }