From b315d4ec015572f17848cad3960b20b7cd4da0f1 Mon Sep 17 00:00:00 2001 From: Isabel Brison Date: Mon, 8 Jan 2024 06:21:02 +0000 Subject: [PATCH] Editor: add setting to disable layout content and wide size controls. Adds support for an `allowCustomContentAndWideSize` setting in `WP_Theme_JSON` valid settings. Props andrewserong. Fixes #60133. git-svn-id: https://develop.svn.wordpress.org/trunk@57247 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-theme-json.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/class-wp-theme-json.php b/src/wp-includes/class-wp-theme-json.php index 9fea12a8d3e99..4826de8648acd 100644 --- a/src/wp-includes/class-wp-theme-json.php +++ b/src/wp-includes/class-wp-theme-json.php @@ -344,6 +344,7 @@ class WP_Theme_JSON { * @since 6.3.0 Added support for `typography.textColumns`, removed `layout.definitions`. * @since 6.4.0 Added support for `layout.allowEditing`, `background.backgroundImage`, * `typography.writingMode`, `lightbox.enabled` and `lightbox.allowEditing`. + * @since 6.5.0 Added support for `layout.allowCustomContentAndWideSize`. * @var array */ const VALID_SETTINGS = array( @@ -380,9 +381,10 @@ class WP_Theme_JSON { 'minHeight' => null, ), 'layout' => array( - 'contentSize' => null, - 'wideSize' => null, - 'allowEditing' => null, + 'contentSize' => null, + 'wideSize' => null, + 'allowEditing' => null, + 'allowCustomContentAndWideSize' => null, ), 'lightbox' => array( 'enabled' => null,