WordPress / WordPress/create-block-theme

Add support for Template Activation

Open
#797 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
417
Forks
66
PR merge metrics
No merged PRs in 30d

Description

We should add support for Template Activation, which is currently under an experiment in Gutenberg: https://github.com/WordPress/gutenberg/pull/73252

When this is stabilised, it will likely land in WordPress 7.0, so we should make sure the plugin works with this new template functionality before then.

Tasks

  • Update get_block_templates() calls to explicitly request inactive templates when needed (e.g., when clearing customisations or exporting all templates): https://github.com/WordPress/create-block-theme/pull/798
  • Modify clear_user_templates_customizations() and clear_user_template_parts_customizations() to include inactive templates: https://github.com/WordPress/create-block-theme/pull/798
  • Add activation state checking to template filtering logic by modifying should_include_template()
  • Add options to control whether inactive templates are included in exports
  • Consider how to handle duplicate templates (same slug, different IDs) when saving to theme files

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Gutenberg Template Activation experiment and the referenced create-block-theme PR 798. Trace get_block_templates(), clear_user_templates_customizations(), clear_user_template_parts_customizations(), and should_include_template() to understand inactive-template handling. Done means exports, filtering, clearing customizations, and duplicate-template behavior follow the agreed activation rules.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.