sprintf( 'content-box content-box--variant-%s content-box--%s %s %s', esc_attr($block_variant), esc_attr($shape_type), esc_attr($lightness_class), esc_attr($align_class) ), 'style' => sprintf( '--content-box-text-color:%s;--content-box-background-color:%s', esc_attr($text_color ? $text_color : 'inherit'), esc_attr($bg_css) ), ), isset($block) ? $block : null ); $show_shapes = $background_color && in_array($shape_type, array('shapeA', 'shapeB', 'shapeC'), true); $shape_fill = 'none'; $shape_stroke = 'none'; if ($show_shapes) { if ('backgrounded' === $block_variant) { $shape_fill = $background_color; $shape_stroke = 'none'; } elseif ('framed' === $block_variant) { $shape_fill = 'none'; $shape_stroke = $border_color ? $border_color : 'none'; } elseif ('framed-backgrounded' === $block_variant) { $shape_fill = $background_color; $shape_stroke = $border_color ? $border_color : 'none'; } else { $show_shapes = false; } } $shape_fill_attr = esc_attr($shape_fill); $shape_stroke_attr = esc_attr($shape_stroke && 'none' !== $shape_stroke ? $shape_stroke : 'none'); $stroke_width = ($shape_stroke && 'none' !== $shape_stroke) ? '2px' : '0'; ?>
>