wp_skip_spacing_serialization

函数


wp_skip_spacing_serialization ( $block_type )
Access
Private
参数
  • (WP_Block_Type)
    $block_type
    Block type.
    Required:
返回值
  • (bool) Whether to serialize spacing support styles & classes.
相关
  • wp_should_skip_block_supports_serialization()
定义位置
  • wp-includes/deprecated.php
    , line 4295
引入
5.9.0
弃用
6.0.0

Checks whether serialization of the current block’s spacing properties should occur.

function wp_skip_spacing_serialization( $block_type ) {
	_deprecated_function( __FUNCTION__, '6.0.0', 'wp_should_skip_block_supports_serialization()' );

	$spacing_support = _wp_array_get( $block_type->supports, array( 'spacing' ), false );

	return is_array( $spacing_support ) &&
		array_key_exists( '__experimentalSkipSerialization', $spacing_support ) &&
		$spacing_support['__experimentalSkipSerialization'];
}