Core Function
View Source on Trac ↗ wp_get_block_css_selector()
wp_get_block_css_selector( mixed $block_type, mixed $target = 'root', mixed $fallback = false ) Determines the CSS selector for the block type and property provided,
Parameters 2 required
| Name / Type | Description |
|---|---|
| $block_type WP_Block_Type | The block's type. Required |
| (string | | array) $target The desired selector's target, `root` or array path. Required |
| $fallback boolean | Whether to fall back to broader selector. |
Return Value
((string)
| null) CSS selector or `null` if no selector available.
Function Information
Since Version
6.3.0
Source File
wp-includes/global-styles-and-settings.php
Advertisement