Skip to content

Commit

Permalink
Fix PHP lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal authored and aaronrobertshaw committed Apr 12, 2022
1 parent ce9ef9c commit 4873de1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/block-supports/border.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,9 @@ function gutenberg_generate_individual_border_classes_and_styles( $side, $border

if ( $border_color && ! $should_skip_color_serialization ) {
$has_color_preset = strpos( $border_color, 'var:preset|color|' ) !== false;

if ( $has_color_preset ) {
$named_color_slug = substr( $border_color, strrpos( $border_color, '|' ) + 1 );
$styles [] = sprintf( 'border-%s-color: var(--wp--preset--color--%s);', $side, $named_color_slug );
$styles [] = sprintf( 'border-%s-color: var(--wp--preset--color--%s);', $side, $named_color_slug );
} else {
$styles [] = sprintf( 'border-%s-color: %s;', $side, $border['color'] );
}
Expand Down

0 comments on commit 4873de1

Please sign in to comment.