Skip to content

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

Merged
oandregal merged 2 commits intotrunkfrom
update/layout-allowed-settings
Jul 12, 2021
Merged

Specify what settings can be part of settings.layout#33303
oandregal merged 2 commits intotrunkfrom
update/layout-allowed-settings

Conversation

@oandregal
Copy link
Copy Markdown
Member

Stems from #33280

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

@oandregal oandregal requested a review from spacedmonkey as a code owner July 8, 2021 17:14
@oandregal oandregal self-assigned this Jul 8, 2021
@oandregal oandregal added Backport to WP Beta/RC Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Jul 8, 2021
),
'custom' => null,
'layout' => null,
'layout' => array(
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

WFM 👍

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