Automattic\WooCommerce\Blocks\BlockTypes

AbstractBlock::get_block_type_style()protectedWC 1.0

Get the frontend style handle for this block type.

Метод класса: AbstractBlock{}

Хуков нет.

Возвращает

Строку[]|null.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_block_type_style();

Код AbstractBlock::get_block_type_style() WC 8.1.1

protected function get_block_type_style() {
	if ( wc_current_theme_is_fse_theme() ) {
		$this->asset_api->register_style( 'wc-blocks-style-' . $this->block_name, $this->asset_api->get_block_asset_build_path( $this->block_name, 'css' ), [], 'all', true );
		return [ 'wc-blocks-style', 'wc-blocks-style-' . $this->block_name ];
	}

	return [ 'wc-all-blocks-style' ];
}