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

do_action('enqueue_block_assets') is found 2 times:

  • /wp-includes/block-editor.php line 340
    	 * 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
    	 * `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: