Skip to content

Commit

Permalink
Make skip serialization check consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Apr 13, 2022
1 parent 84f4f4b commit ea485d5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/block-supports/border.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,10 @@ function gutenberg_generate_individual_border_classes_and_styles( $side, $border

$border_color = _wp_array_get( $border, array( 'color' ), null );

$should_skip_color_serialization = gutenberg_should_skip_block_supports_serialization( $block_type, '__experimentalBorder', 'color' );

if ( $border_color && ! $should_skip_color_serialization ) {
if (
$border_color &&
! gutenberg_should_skip_block_supports_serialization( $block_type, '__experimentalBorder', 'color' )
) {
$has_color_preset = strpos( $border_color, 'var:preset|color|' ) !== false;
if ( $has_color_preset ) {
$named_color_slug = substr( $border_color, strrpos( $border_color, '|' ) + 1 );
Expand Down

0 comments on commit ea485d5

Please sign in to comment.