Skip to content

Commit

Permalink
Specify what settings can be part of settings.layout (#33303)
Browse files Browse the repository at this point in the history
  • Loading branch information
nosolosw authored and youknowriad committed Jul 13, 2021
1 parent 9d54d06 commit 8bdf9e9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/class-wp-theme-json-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ class WP_Theme_JSON_Gutenberg {
'palette' => null,
),
'custom' => null,
'layout' => null,
'layout' => array(
'contentSize' => null,
'wideSize' => null,
),
'spacing' => array(
'customMargin' => null,
'customPadding' => null,
Expand Down
7 changes: 7 additions & 0 deletions phpunit/class-wp-theme-json-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ function test_get_settings() {
'color' => array(
'custom' => false,
),
'layout' => array(
'contentSize' => 'value',
'invalid/key' => 'value',
),
'invalid/key' => 'value',
'blocks' => array(
'core/group' => array(
Expand Down Expand Up @@ -44,6 +48,9 @@ function test_get_settings() {
'color' => array(
'custom' => false,
),
'layout' => array(
'contentSize' => 'value',
),
'blocks' => array(
'core/group' => array(
'color' => array(
Expand Down

0 comments on commit 8bdf9e9

Please sign in to comment.