Warning: This function has been deprecated. Use wp_should_skip_block_supports_serialization() instead.

Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness. Use wp_should_skip_block_supports_serialization() instead.

wp_skip_dimensions_serialization( WP_Block_type $block_type ): bool

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


Description

Top ↑

See also


Top ↑

Parameters

$block_type WP_Block_type Required
Block type.

Top ↑

Return

bool Whether to serialize spacing support styles & classes.


Top ↑

Source

File: wp-includes/deprecated.php. View all references

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'];
}


Top ↑

Changelog

Changelog
Version Description
6.0.0 Use wp_should_skip_block_supports_serialization() introduced in 6.0.0.
5.9.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.