Editor: Soft deprecate block supports functions.

Reinstate the functions hard deprecated in [53076]: `wp_skip_border_serialization()`, `wp_skip_dimensions_serialization()` and `wp_skip_spacing_serialization()`.

Props ramonopoly.
See #55505.


Built from https://develop.svn.wordpress.org/trunk@53082


git-svn-id: http://core.svn.wordpress.org/trunk@52671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Peter Wilson 2022-04-06 04:24:05 +00:00
parent 419262f0cd
commit da07ae873e
2 changed files with 61 additions and 1 deletions

View File

@ -4225,3 +4225,63 @@ function wp_render_duotone_filter_preset( $preset ) {
_deprecated_function( __FUNCTION__, '5.9.1', 'wp_get_duotone_filter_property()' );
return wp_get_duotone_filter_property( $preset );
}
/**
* Checks whether serialization of the current block's border properties should
* occur.
*
* @since 5.8.0
* @access private
* @deprecated 6.0.0 Use `wp_should_skip_block_supports_serialization` introduced in 6.0.0.
*
* @param WP_Block_Type $block_type Block type.
* @return bool Whether serialization of the current block's border properties
* should occur.
*/
function wp_skip_border_serialization( $block_type ) {
_deprecated_function( __FUNCTION__, '6.0.0', 'wp_should_skip_block_supports_serialization()' );
$border_support = _wp_array_get( $block_type->supports, array( '__experimentalBorder' ), false );
return is_array( $border_support ) &&
array_key_exists( '__experimentalSkipSerialization', $border_support ) &&
$border_support['__experimentalSkipSerialization'];
}
/**
* Checks whether serialization of the current block's dimensions properties
* should occur.
*
* @since 5.9.0
* @access private
* @deprecated 6.0.0 Use `wp_should_skip_block_supports_serialization` introduced in 6.0.0.
*
* @param WP_Block_type $block_type Block type.
* @return bool Whether to serialize spacing support styles & classes.
*/
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'];
}
/**
* Checks whether serialization of the current block's spacing properties should
* occur.
*
* @since 5.9.0
* @access private
* @deprecated 6.0.0 Use `wp_should_skip_block_supports_serialization` introduced in 6.0.0.
*
* @param WP_Block_Type $block_type Block type.
* @return bool Whether to serialize spacing support styles & classes.
*/
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'];
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.0-alpha-53077';
$wp_version = '6.0-alpha-53082';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.