Core Function
View Source on Trac ↗ register_block_script_handle()
register_block_script_handle( mixed $metadata, mixed $field_name, mixed $index = 0 ) Finds a script handle for the selected block metadata field. It detects
Parameters 3 required
| Name / Type | Description |
|---|---|
| $metadata array | Block metadata. Required |
| $field_name string | Field name to pick from metadata. Required |
| int | $index Optional. Index of the script to register when multiple items passed. Default 0. Required |
Return Value
((string)
(string | false) Script handle provided directly or created through
script's registration, or false on failure.
Function Information
Since Version
5.5.0
Source File
wp-includes/blocks.php
Advertisement