Automattic\WooCommerce\Blocks\BlockTypes

ClassicShortcode::get_container_classes()protectedWC 1.0

Get the list of classes to apply to this block.

Method of the class: ClassicShortcode{}

No Hooks.

Return

String. space-separated list of classes.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_container_classes( $attributes );
$attributes(array)
Block attributes.
Default: empty array

ClassicShortcode::get_container_classes() code WC 9.0.1

protected function get_container_classes( $attributes = array() ) {
	$classes = array( 'woocommerce', 'wp-block-group' );

	if ( isset( $attributes['align'] ) ) {
		$classes[] = "align{$attributes['align']}";
	}

	return implode( ' ', $classes );
}