From c809980aeeeab1fa2c5a455800082f036e65ca5b Mon Sep 17 00:00:00 2001 From: Jason Crist Date: Thu, 7 Jan 2021 12:39:00 -0500 Subject: [PATCH] Add support for border configuration to theme With this change a block can be configured to allow a theme to define border color, width and style in addition to the already available radius. --- lib/class-wp-theme-json.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/class-wp-theme-json.php b/lib/class-wp-theme-json.php index 6b140156f65db..72ee649c6fd89 100644 --- a/lib/class-wp-theme-json.php +++ b/lib/class-wp-theme-json.php @@ -92,6 +92,9 @@ class WP_Theme_JSON { 'styles' => array( 'border' => array( 'radius' => null, + 'color' => null, + 'style' => null, + 'width' => null, ), 'color' => array( 'background' => null, @@ -120,6 +123,9 @@ class WP_Theme_JSON { 'settings' => array( 'border' => array( 'customRadius' => null, + 'customColor' => null, + 'customStyle' => null, + 'customWidth' => null, ), 'color' => array( 'custom' => null, @@ -251,6 +257,18 @@ class WP_Theme_JSON { 'value' => array( 'border', 'radius' ), 'support' => array( '__experimentalBorder', 'radius' ), ), + 'borderColor' => array( + 'value' => array( 'border', 'color' ), + 'support' => array( '__experimentalBorder', 'color' ), + ), + 'borderWidth' => array( + 'value' => array( 'border', 'width' ), + 'support' => array( '__experimentalBorder', 'width' ), + ), + 'borderStyle' => array( + 'value' => array( 'border', 'style' ), + 'support' => array( '__experimentalBorder', 'style' ), + ), 'color' => array( 'value' => array( 'color', 'text' ), 'support' => array( 'color' ),