register_block_script_handle


register_block_script_handle ( $metadata, $field_name )

Parameters:
  • (array) metadata Block metadata.
  • (string) field_name Field name to pick from metadata.
Returns:
  • (string|bool) Script handle provided directly or created through script's registration, or false on failure.
Defined at:

Description

Finds a script handle for the selected block metadata field. It detects when a path to file was provided and finds a corresponding asset file with details necessary to register the script under automatically generated handle name. It returns unprocessed script handle otherwise.

Related Functions

register_block_style_handle, register_block_style, unregister_block_style, register_block_core_calendar, wp_enqueue_registered_block_scripts_and_styles

Top Google Results

User discussions

wpseek mobile