getAttribute( 'style' ) ); $styles['--wp--style--block-gap'] = format_custom_property( $block_gap ); $div->setAttribute( 'style', css_array_to_string( $styles ) ); $html = $dom->saveHTML(); } $columns = $block['attrs']['displayLayout']['columns'] ?? null; if ( $columns && str_contains( $html, 'nowrap' ) ) { $dom = dom( $html ); $div = get_dom_element( 'div', $dom ); if ( $div ) { $styles = css_string_to_array( $div->getAttribute( 'style' ) ); $styles['--columns'] = $columns; $div->setAttribute( 'style', css_array_to_string( $styles ) ); $html = $dom->saveHTML(); } } return $html; }