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_border_serialization() WordPress Function

The wp_skip_border_serialization() function is used to prevent WordPress from serializing the border CSS properties. This function is useful when you want to add border CSS properties to an element using inline styles.

wp_skip_border_serialization( WP_Block_Type $block_type ) #

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


Description

Top ↑

See also


Top ↑

Parameters

$block_type

(WP_Block_Type)(Required)Block type.


Top ↑

Return

(bool) Whether serialization of the current block's border properties should occur.


Top ↑

Source

File: wp-includes/deprecated.php

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


Top ↑

Changelog

Changelog
VersionDescription
6.0.0Use wp_should_skip_block_supports_serialization() introduced in 6.0.0.
5.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More