Automattic\WooCommerce\Blocks\BlockTypes
AbstractBlock::enqueue_assets()
Enqueue frontend assets for this block, just in time for rendering.
Метод класса: AbstractBlock{}
Хуков нет.
Возвращает
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.
Код AbstractBlock::enqueue_assets() AbstractBlock::enqueue assets WC 8.7.0
protected function enqueue_assets( array $attributes, $content, $block ) { if ( $this->enqueued_assets ) { return; } $this->enqueue_data( $attributes ); $this->enqueue_scripts( $attributes ); $this->enqueued_assets = true; }