Automattic\WooCommerce\Blocks\BlockTypes\OrderConfirmation
Downloads::enqueue_assets
Enqueue frontend assets for this block, just in time for rendering.
Метод класса: Downloads{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->enqueue_assets( $attributes, $content, $block );
- $attributes(массив) (обязательный)
- Any attributes that currently are available from the block.
- $content(строка) (обязательный)
- The block content.
- $block(WP_Block) (обязательный)
- The block object.
Код Downloads::enqueue_assets() Downloads::enqueue assets WC 10.4.0
protected function enqueue_assets( array $attributes, $content, $block ) {
parent::enqueue_assets( $attributes, $content, $block );
$styles = $this->get_inline_styles( $attributes );
wp_add_inline_style( 'wc-blocks-style', $styles );
}