getAttribute( 'style' ); $styles = explode( ';', $style ); $z_index = (string) ( $block['attrs']['boxShadow']['zIndex'] ?? '-1' ); $z_index = str_replace( 'px', '', $z_index ); $styles[] = '--wp--custom--box-shadow--z-index:' . $z_index; $first_child->setAttribute( 'style', implode( ';', $styles ) ); $content = $dom->saveHTML(); } return $content; }