wp_get_layout_style example

$block_spacing      = _wp_array_get( $block, array( 'attrs', 'style', 'spacing' ), null );

        /* * If a block's block.json skips serialization for spacing or spacing.blockGap, * don't apply the user-defined value to the styles. */
        $should_skip_gap_serialization = wp_should_skip_block_supports_serialization( $block_type, 'spacing', 'blockGap' );

        $block_gap             = _wp_array_get( $global_settings, array( 'spacing', 'blockGap' ), null );
        $has_block_gap_support = isset( $block_gap );

        $style = wp_get_layout_style(
            ".$container_class.$container_class",
            $used_layout,
            $has_block_gap_support,
            $gap_value,
            $should_skip_gap_serialization,
            $fallback_gap_value,
            $block_spacing
        );

        // Only add container class and enqueue block support styles if unique styles were generated.         if ( ! empty( $style ) ) {
            
Home | Imprint | This part of the site doesn't use cookies.