Changeset 53076 for trunk/src/wp-includes/block-supports/dimensions.php
- Timestamp:
- 04/05/2022 12:06:48 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-supports/dimensions.php
r52302 r53076 5 5 * This does not include the `spacing` block support even though that visually 6 6 * appears under the "Dimensions" panel in the editor. It remains in its 7 * original `spacing.php` file for backwards compatibility.7 * original `spacing.php` file for compatibility with core. 8 8 * 9 9 * @package WordPress … … 52 52 */ 53 53 function wp_apply_dimensions_support( $block_type, $block_attributes ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable 54 if ( wp_s kip_dimensions_serialization( $block_type) ) {54 if ( wp_should_skip_block_supports_serialization( $block_type, '__experimentalDimensions' ) ) { 55 55 return array(); 56 56 } … … 64 64 } 65 65 66 /**67 * Checks whether serialization of the current block's dimensions properties68 * should occur.69 *70 * @since 5.9.071 * @access private72 *73 * @param WP_Block_type $block_type Block type.74 * @return bool Whether to serialize spacing support styles & classes.75 */76 function wp_skip_dimensions_serialization( $block_type ) {77 $dimensions_support = _wp_array_get( $block_type->supports, array( '__experimentalDimensions' ), false );78 return is_array( $dimensions_support ) &&79 array_key_exists( '__experimentalSkipSerialization', $dimensions_support ) &&80 $dimensions_support['__experimentalSkipSerialization'];81 }82 83 66 // Register the block support. 84 67 WP_Block_Supports::get_instance()->register(
Note: See TracChangeset
for help on using the changeset viewer.