register_block_style_handle
register_block_style_handle ( $metadata, $field_name, $index = 0 )
Parameters:- (array) metadata Block metadata.
- (string) field_name Field name to pick from metadata.
- (int) index Optional. Index of the style to register when multiple items passed. Default 0.
Returns:- (string|false) Style handle provided directly or created through style's registration, or false on failure.
Defined at:Change Log: - Introduced in WordPress: 5.5.0
- Deprecated in WordPress: —
Description
Finds a style handle for the block metadata field. It detects when a path
to file was provided and registers the style under automatically
generated handle name. It returns unprocessed style handle otherwise.