Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify what settings can be part of settings.layout #33303

Merged
merged 2 commits into from
Jul 12, 2021

Conversation

oandregal
Copy link
Member

Stems from #33280

This PR makes it so that only the specific allowed settings can be part of settings.layout.

@oandregal oandregal self-assigned this Jul 8, 2021
@oandregal oandregal added Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Jul 8, 2021
@@ -92,7 +92,10 @@ class WP_Theme_JSON_Gutenberg {
'palette' => null,
),
'custom' => null,
'layout' => null,
'layout' => array(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think later we'll have "type" and a different shape of layout depending of the "type". Maybe it's fine for now to have this but I thought I'd mention in case it's any impactful.

Copy link
Member Author

@oandregal oandregal Jul 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When/If we have those new fields we can add them all and/or have some specific logic for layout to make sure only the ones that make sense depending on type are allowed.

By porting this to WordPress core we won't allow anything else than what it's shipped in v1 (the two fields in use atm) without the plugin. With the plugin, consumers will have those new things available. Makes sense?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WFM 👍

@oandregal oandregal force-pushed the update/layout-allowed-settings branch from 5a7da4e to 3493a0a Compare July 12, 2021 08:29
@oandregal oandregal merged commit c3c29eb into trunk Jul 12, 2021
@oandregal oandregal deleted the update/layout-allowed-settings branch July 12, 2021 08:56
@github-actions github-actions bot added this to the Gutenberg 11.1 milestone Jul 12, 2021
@youknowriad youknowriad removed the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants