WordPress action hook · part of WordPress core
enqueue_block_assets
A WordPress core action that 12 plugins also fire themselves, running on 7M+ sites between them.
How to use enqueue_block_assets
It's an action: your callback runs at that point. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'enqueue_block_assets', function() {
// Your code runs here.
}, 10, 1 );Argument names come from UpdraftPlus: WP Backup & Migration Plugin's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
12 plugins that fire enqueue_block_assets
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
UpdraftPlus: WP Backup & Migration Plugin4+ million installs
do_action( 'enqueue_block_assets' )central/modules/posts.php:513 -
Jetpack3+ million installs
do_action( 'enqueue_block_assets' )_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-block-editor-assets.php:223 -
Eventin10,000+ installs
do_action( 'enqueue_block_assets' )base/Enqueue/admin.php:130 -
Block Animations, Motion & Scroll Effects6,000+ installs
do_action( 'enqueue_block_assets' )settings/index.php:78 -
UpdraftCentral Dashboard5,000+ installs
do_action( 'enqueue_block_assets' )classes/class-editor.php:390 -
Block Manager4,000+ installs
do_action( 'enqueue_block_assets' )classes/class-admin.php:50 -
News Element200+ installs
do_action( 'enqueue_block_assets' )modules/page-css-compiler/includes/class-page-css-compiler.php:438 -
BrandNestor100+ installs
do_action( 'enqueue_block_assets' )src/Admin/Dashboard.php:108 -
SD AI Agent100+ installs
do_action( 'enqueue_block_assets' )includes/Admin/BlockValidatorPage.php:104 -
FooConvert100+ installs
do_action( 'enqueue_block_assets' )includes/AI/PopupBuilder/Admin.php:132 -
Acadlix LMS50+ installs
do_action( 'enqueue_block_assets' )includes/Common/Submenu/Submenu_Lessons.php:184 -
MailerHubFewer than 10 installs
do_action( 'enqueue_block_assets' )core/modules/automation/automation.php:53
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.