WP_Navigation_Block_Renderer::handle_view_script_module_loading()
Handle view script module loading.
Method of the class: WP_Navigation_Block_Renderer{}
No Hooks.
Return
null
. Nothing (null).
Usage
$result = WP_Navigation_Block_Renderer::handle_view_script_module_loading( $attributes, $block, $inner_blocks );
- $attributes(array) (required)
- The block attributes.
- $block(WP_Block) (required)
- The parsed block.
- $inner_blocks(WP_Block_List) (required)
- The list of inner blocks.
Changelog
Since 6.5.0 | Introduced. |
WP_Navigation_Block_Renderer::handle_view_script_module_loading() WP Navigation Block Renderer::handle view script module loading code WP 6.7.1
private static function handle_view_script_module_loading( $attributes, $block, $inner_blocks ) { if ( static::is_interactive( $attributes, $inner_blocks ) ) { wp_enqueue_script_module( '@wordpress/block-library/navigation/view' ); } }