firstChild; $style = $first_child->getAttribute( 'style' ); $styles = \explode( ';', $style ); $styles[] = '--wp--custom--box-shadow--z-index:' . $block['attrs']['boxShadow']['zIndex']; $first_child->setAttribute( 'style', \implode( ';', $styles ) ); $content = $dom->saveHTML(); } if ( 'core/columns' !== $block['blockName'] ) { return $content; } $class = 'is-stacked-on-mobile'; if ( isset( $block['attrs']['isStackedOnMobile'] ) && $block['attrs']['isStackedOnMobile'] === false ) { $class = 'is-not-stacked-on-mobile'; } if ( 'is-stacked-on-mobile' === $class ) { $content = str_replace( 'wp-block-columns', 'wp-block-columns is-stacked-on-mobile', $content ); } return $content; }