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:

functions.php
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.

  1. UpdraftPlus: WP Backup & Migration Plugin icon UpdraftPlus: WP Backup & Migration Plugin4+ million installs do_action( 'enqueue_block_assets' ) central/modules/posts.php:513
  2. Jetpack icon 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
  3. Eventin icon Eventin10,000+ installs do_action( 'enqueue_block_assets' ) base/Enqueue/admin.php:130
  4. Block Animations, Motion & Scroll Effects icon Block Animations, Motion & Scroll Effects6,000+ installs do_action( 'enqueue_block_assets' ) settings/index.php:78
  5. UpdraftCentral Dashboard icon UpdraftCentral Dashboard5,000+ installs do_action( 'enqueue_block_assets' ) classes/class-editor.php:390
  6. Block Manager icon Block Manager4,000+ installs do_action( 'enqueue_block_assets' ) classes/class-admin.php:50
  7. News Element icon News Element200+ installs do_action( 'enqueue_block_assets' ) modules/page-css-compiler/includes/class-page-css-compiler.php:438
  8. BrandNestor icon BrandNestor100+ installs do_action( 'enqueue_block_assets' ) src/Admin/Dashboard.php:108
  9. SD AI Agent icon SD AI Agent100+ installs do_action( 'enqueue_block_assets' ) includes/Admin/BlockValidatorPage.php:104
  10. FooConvert icon FooConvert100+ installs do_action( 'enqueue_block_assets' ) includes/AI/PopupBuilder/Admin.php:132
  11. Acadlix LMS icon Acadlix LMS50+ installs do_action( 'enqueue_block_assets' ) includes/Common/Submenu/Submenu_Lessons.php:184
  12. MailerHub icon 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.