Title: wp_skip_spacing_serialization
Published: May 25, 2022
Last modified: May 20, 2026

---

# wp_skip_spacing_serialization( WP_Block_Type $block_type ): bool

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/wp_skip_spacing_serialization/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/functions/wp_skip_spacing_serialization/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/functions/wp_skip_spacing_serialization/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/wp_skip_spacing_serialization/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_skip_spacing_serialization/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_skip_spacing_serialization/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_skip_spacing_serialization/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_skip_spacing_serialization/?output_format=md#wp--skip-link--target)

This function has been deprecated since 6.0.0. Use [wp_should_skip_block_supports_serialization()](https://developer.wordpress.org/reference/functions/wp_should_skip_block_supports_serialization/)
instead.

This function’s access is marked private. This means it is not intended for use 
by plugin or theme developers, only by core. It is listed here for completeness.

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

## 󠀁[Description](https://developer.wordpress.org/reference/functions/wp_skip_spacing_serialization/?output_format=md#description)󠁿

### 󠀁[See also](https://developer.wordpress.org/reference/functions/wp_skip_spacing_serialization/?output_format=md#see-also)󠁿

 * [wp_should_skip_block_supports_serialization()](https://developer.wordpress.org/reference/functions/wp_should_skip_block_supports_serialization/)

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/wp_skip_spacing_serialization/?output_format=md#parameters)󠁿

 `$block_type`[WP_Block_Type](https://developer.wordpress.org/reference/classes/wp_block_type/)
required

Block type.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_skip_spacing_serialization/?output_format=md#return)󠁿

 bool Whether to serialize spacing support styles & classes.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_skip_spacing_serialization/?output_format=md#source)󠁿

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

    	$spacing_support = $block_type->supports['spacing'] ?? false;

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

[View all references](https://developer.wordpress.org/reference/files/wp-includes/deprecated.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/deprecated.php#L4313)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/deprecated.php#L4313-L4321)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_skip_spacing_serialization/?output_format=md#related)󠁿

| Uses | Description | 
| [_deprecated_function()](https://developer.wordpress.org/reference/functions/_deprecated_function/)`wp-includes/functions.php` |

Marks a function as deprecated and inform when it has been used.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_skip_spacing_serialization/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.0.0](https://developer.wordpress.org/reference/since/6.0.0/) | Deprecated. Use wp_should_skip_block_supports_serialization() introduced in 6.0.0. | 
| [5.9.0](https://developer.wordpress.org/reference/since/5.9.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_skip_spacing_serialization%2F)
before being able to contribute a note or feedback.