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:
  • 6: .
  • 6: .

Description

Generates the name for an asset based on the name of the block and the field name provided.

Related Functions

get_block_asset_url, register_block_style_handle, register_block_script_handle, register_core_block_style_handles, render_block_core_file

Top Google Results

User discussions

wpseek mobile