wp_skip_dimensions_serialization

函数


wp_skip_dimensions_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 4273
引入
5.9.0
弃用
6.0.0

检查是否应对当前区块的维度属性进行序列化。

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

	$dimensions_support = _wp_array_get( $block_type->supports, array( '__experimentalDimensions' ), false );

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