Core Function
View Source on Trac ↗ block_has_support()
block_has_support( mixed $block_type, mixed $feature, mixed $default_value = false ) Checks whether the current block type supports the feature requested.
Parameters 2 required
| Name / Type | Description |
|---|---|
| $block_type WP_Block_Type | Block type to check for support. Required |
| (string | | array) $feature Feature slug, or path to a specific feature to check support for. Required |
| $default_value mixed | Optional. Fallback value for feature support. Default false. |
Return Value
(bool)
Whether the feature is supported.
Function Information
Since Version
5.8.0
Source File
wp-includes/blocks.php
Advertisement