generate_block_asset_handle
generate_block_asset_handle ( $block_name, $field_name, $index = 0 )
Parameters:- (string) block_name Name of the block.
- (string) field_name Name of the metadata field.
- (int) index Optional. Index of the asset when multiple items passed. Default 0.
Returns:- (string) Generated asset name for the block's field.
Defined at:Change Log: - Introduced in WordPress: 5.5.0
- Deprecated in WordPress: —
Description
Generates the name for an asset based on the name of the block
and the field name provided.