Automattic\WooCommerce\Blocks\BlockTypes
AbstractBlock::enqueue_scripts()
Register/enqueue scripts used for this block on the frontend, during render.
Метод класса: AbstractBlock{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->enqueue_scripts( $attributes );
- $attributes(массив)
- Any attributes that currently are available from the block.
По умолчанию: []
Код AbstractBlock::enqueue_scripts() AbstractBlock::enqueue scripts WC 9.8.2
protected function enqueue_scripts( array $attributes = [] ) { if ( null !== $this->get_block_type_script() ) { wp_enqueue_script( $this->get_block_type_script( 'handle' ) ); } }