WordPress at Your Fingertips
function is not described

wp_has_border_feature_support() WP 5.8.0

Checks whether the current block type supports the border feature requested.

If the __experimentalBorder support flag is a boolean true all border support features are available. Otherwise, the specific feature's support flag nested under experimentalBorder must be enabled for the feature to be opted into.

No Hooks.

Return

true|false. Whether or not the feature is supported.

Usage

wp_has_border_feature_support( $block_type, $feature, $default );
$block_type(WP_Block_Type) (required)
Block type to check for support.
$feature(string) (required)
Name of the feature to check support for.
$default(mixed)
Fallback value for feature support.
Default: false

Changelog

Since 5.8.0 Introduced.

Code of wp_has_border_feature_support() WP 5.8.1

function wp_has_border_feature_support( $block_type, $feature, $default = false ) {
	// Check if all border support features have been opted into via `"__experimentalBorder": true`.
	if (
		property_exists( $block_type, 'supports' ) &&
		( true === _wp_array_get( $block_type->supports, array( '__experimentalBorder' ), $default ) )
	) {
		return true;
	}

	// Check if the specific feature has been opted into individually
	// via nested flag under `__experimentalBorder`.
	return block_has_support( $block_type, array( '__experimentalBorder', $feature ), $default );
}