Automattic\WooCommerce\EmailEditor\Integrations\Utils

Styles_Helper::get_styles_from_blockpublic staticWC 1.0

Wrapper for wp_style_engine_get_styles which ensures all values are returned.

Method of the class: Styles_Helper{}

No Hooks.

Returns

Array.

Usage

$result = Styles_Helper::get_styles_from_block( $block_styles, $skip_convert_vars );
$block_styles(array) (required)
Array of block styles.
$skip_convert_vars(true|false)
If true, --wp_preset--spacing--x type values will be left in the original var:preset:spacing:x format.
Default: false

Styles_Helper::get_styles_from_block() code WC 10.4.3

public static function get_styles_from_block( array $block_styles, $skip_convert_vars = false ) {
	return wp_parse_args(
		wp_style_engine_get_styles( $block_styles, array( 'convert_vars_to_classnames' => $skip_convert_vars ) ),
		self::$empty_block_styles
	);
}