enqueue_block_assets

enqueue_block_assets

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

do_action('enqueue_block_assets') is found 2 times:

  • /wp-includes/block-editor.php line 340
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    * We don't want to load EDITOR scripts in the iframe, only enqueue
     * front-end assets for the content.
     */
    add_filter( 'should_load_block_editor_scripts_and_styles', '__return_false' );
    do_action( 'enqueue_block_assets' );
    remove_filter( 'should_load_block_editor_scripts_and_styles', '__return_false' );
     
    $block_registry = WP_Block_Type_Registry::get_instance();
     
    /*
     * Additionally, do enqueue `editorStyle` assets for all blocks, which
  • /wp-includes/script-loader.php line 2456
    2452
    2453
    2454
    2455
    2456
    2457
    2458
    2459
    2460
    2461
    2462
         * `wp_enqueue_style` to add your functionality to the Gutenberg editor.
         *
         * @since 5.0.0
         */
        do_action( 'enqueue_block_assets' );
    }
     
    /**
     * Applies a filter to the list of style nodes that comes from WP_Theme_JSON::get_style_nodes().
     *
     * This particular filter removes all of the blocks from the array.

See this hook used in plugins: