From 5951c60aed020b363692c6829646327e7731e630 Mon Sep 17 00:00:00 2001 From: Jorge Costa Date: Tue, 3 Aug 2021 18:13:46 +0000 Subject: [PATCH] Block Editor: Add missing border setting on button block. This commit fixes a regression on WordPress 5.8 that made the border radius setting on the buttons block disappear. Props Mamaduka, daisyo, priethor, desrosj, mikeschroder. Fixes #53702. git-svn-id: https://develop.svn.wordpress.org/trunk@51538 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-theme-json.php | 6 ++++++ src/wp-includes/theme.json | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/wp-includes/class-wp-theme-json.php b/src/wp-includes/class-wp-theme-json.php index 227ae7c224..a35ee1b795 100644 --- a/src/wp-includes/class-wp-theme-json.php +++ b/src/wp-includes/class-wp-theme-json.php @@ -179,6 +179,9 @@ class WP_Theme_JSON { * @var array */ const ALLOWED_SETTINGS = array( + 'border' => array( + 'customRadius' => null, + ), 'color' => array( 'custom' => null, 'customDuotone' => null, @@ -211,6 +214,9 @@ class WP_Theme_JSON { * @var array */ const ALLOWED_STYLES = array( + 'border' => array( + 'radius' => null, + ), 'color' => array( 'background' => null, 'gradient' => null, diff --git a/src/wp-includes/theme.json b/src/wp-includes/theme.json index 21dae95faf..17389579ea 100644 --- a/src/wp-includes/theme.json +++ b/src/wp-includes/theme.json @@ -1,6 +1,9 @@ { "version": 1, "settings": { + "border": { + "customRadius": false + }, "color": { "custom": true, "customDuotone": true, @@ -209,6 +212,13 @@ "size": "42px" } ] + }, + "blocks": { + "core/button": { + "border": { + "customRadius": true + } + } } } }