Core Function
View Source on Trac ↗ generate_block_asset_handle()
generate_block_asset_handle( mixed $block_name, mixed $field_name, mixed $index = 0 ) Generates the name for an asset based on the name of the block
Parameters 3 required
| Name / Type | Description |
|---|---|
| $block_name string | Name of the block. Required |
| $field_name string | Name of the metadata field. Required |
| int | $index Optional. Index of the asset when multiple items passed. Default 0. Required |
Return Value
(string)
Generated asset name for the block's field.
Function Information
Since Version
5.5.0
Source File
wp-includes/blocks.php
Advertisement