wpseek.com
A WordPress-centric search engine for devs and theme authors
block_has_support › WordPress Function
Since5.8.0
Deprecatedn/a
› block_has_support ( $block_type, $feature, $default = false )
Parameters: (3) |
|
Returns: |
|
Defined at: |
|
Codex: |
Checks whether the current block type supports the feature requested.
Related Functions: wp_http_supports, get_theme_support, remove_theme_support, wp_is_https_supported, post_type_supports
Source
function block_has_support( $block_type, $feature, $default = false ) { $block_support = $default; if ( $block_type && property_exists( $block_type, 'supports' ) ) { $block_support = _wp_array_get( $block_type->supports, $feature, $default ); } return true === $block_support || is_array( $block_support ); }