You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PR removes the misleading "Disable access to the Template Editor" section from curating the editor experience documentation page.
Why?
Removing theme support for block-templates entirely disables block templates for a theme, including rendering them on the frontend. The theme support flags shouldn't be used to restrict access to certain editor features.
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.
If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
I do think there is value in removing this theme support in classic themes which is why it was added. But that isn't clear from the section.
Right, it's not related to curating the editor experience. It's more of a theme configuration when a classic theme wants to use the theme.json, but opts out of the block templates support.
The theme handbook might be a better place to document this.
While I also came to the conclusion that removing this theme support breaks rendering for block themes I am a bit stumped that the solution to this is to just remove it from the docs and be done.
I mean it was in the docs and hence an officially mandated way to remove access to the Template Editor. 😕
The way it was described here in the block editor handbook left some space to interpret it as only being intended for use with a Classic Theme. Fair enough.
But there also is another mention on the developer blog by @ndiego that much more explicitly recommends this approach to "conditionally disable the Template Editor when editing posts" a mere 15 months ago.
But whatever, no point in arguing over that.
The problem though is that also in a block theme I think it is a valid requirement to be able to disable the changing of templates. So, @Mamaduka without removing theme support for block-templates - what is the right way to do this?
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Closes #63822.
PR removes the misleading "Disable access to the Template Editor" section from curating the editor experience documentation page.
Why?
Removing theme support for
block-templates
entirely disables block templates for a theme, including rendering them on the frontend. The theme support flags shouldn't be used to restrict access to certain editor features.Testing Instructions
None.