enqueue_block_assets WordPress Action Hook

This hook is called when a block is registered. It allows for extra assets to be enqueued when needed by the block.

do_action( 'enqueue_block_assets' ) #

Fires after enqueuing block assets for both editor and front-end.


Description

Call add_action on any hook before ‘wp_enqueue_scripts’.

In the function call you supply, simply use wp_enqueue_script and wp_enqueue_style to add your functionality to the Gutenberg editor.


Top ↑

Source

File: wp-includes/script-loader.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More