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

Auto-enable the template editor for themes with theme.json only #32858

Merged
merged 1 commit into from
Jun 21, 2021

Conversation

youknowriad
Copy link
Contributor

@youknowriad youknowriad commented Jun 21, 2021

Per feedback and discussions in the 5.8 leads channel, we're making the template editor opt-in for classic themes and opt-out for themes with theme.json and FSE themes.

To test this PR, you should have WP 5.7 or prior as, this flag is enabled in Core trunk and the effect of this PR won't be noticeable.

  • Test that by default classic themes have template editor disabled.
  • Test that if you add a "theme.json" file to a classic themes, the template editor is enabled.

@youknowriad youknowriad 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 [Feature] Template Editing Mode Related to the template editor available in the Block Editor labels Jun 21, 2021
@youknowriad youknowriad requested a review from desrosj June 21, 2021 16:56
@youknowriad youknowriad self-assigned this Jun 21, 2021
@youknowriad youknowriad requested review from aristath and a team June 21, 2021 16:58
@youknowriad youknowriad force-pushed the add/block-supports-theme-json branch from 19b8a58 to 769d68a Compare June 21, 2021 18:30
Copy link
Contributor

@ntsekouras ntsekouras left a comment

Choose a reason for hiding this comment

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

Looks good - thanks!

@youknowriad youknowriad merged commit 46df095 into trunk Jun 21, 2021
@youknowriad youknowriad deleted the add/block-supports-theme-json branch June 21, 2021 19:18
@github-actions github-actions bot added this to the Gutenberg 11.0 milestone Jun 21, 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 Jun 21, 2021
add_theme_support( 'block-templates' );

/**
* Enable the block templates (editor mode) for themes with theme.json.
Copy link
Member

Choose a reason for hiding this comment

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

the first "the" could be removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Template Editing Mode Related to the template editor available in the Block Editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants