Core Function
View Source on Trac ↗ register_block_style_handle()
register_block_style_handle( mixed $metadata, mixed $field_name, mixed $index = 0 ) Finds a style handle for the block metadata field. It detects when a path
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 style to register when multiple items passed. Default 0. Required |
Return Value
((string)
(string | false) Style handle provided directly or created through
style's registration, or false on failure.
Function Information
Since Version
5.5.0
Source File
wp-includes/blocks.php
Advertisement