wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_has_spacing_feature_support › WordPress Function

Since5.8.0
Deprecatedn/a
wp_has_spacing_feature_support ( $block_type, $feature, $default = false )
Access:
  • private
Parameters: (3)
  • (WP_Block_Type) $block_type Block type to check for support.
    Required: Yes
  • (string) $feature Name of the feature to check support for.
    Required: Yes
  • (mixed) $default Fallback value for feature support. Default false.
    Required: No
    Default: false
Returns:
  • (bool) Whether the feature is supported.
Defined at:
Codex:

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



Source

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