Roadmap item 18 (P2).
Problem
Template\Template::NAMESPACE is the literal ucsc-2022. Injected block templates are created as wp_template posts tagged with that wp_theme term, which binds them to one specific theme by slug. Renaming the theme directory, forking it, or switching themes silently orphans every plugin-provided template — no error, the templates just stop resolving, and the stale posts stay in the database.
Options
- Derive the namespace from
get_stylesheet() at runtime, so templates follow the active theme.
- Keep it explicit but make it filterable / a constant a site can override.
- Detect a mismatch and surface an admin notice rather than failing silently.
Option 1 is the smallest correct change; option 3 is worth adding regardless, since the current failure mode is invisible.
Whichever is chosen, decide what happens to already-created template posts under the old term — a migration or a cleanup path is needed, and it overlaps with the uninstall work in #108.
Acceptance
Location: src/Template/Template.php:14
Roadmap item 18 (P2).
Problem
Template\Template::NAMESPACEis the literalucsc-2022. Injected block templates are created aswp_templateposts tagged with thatwp_themeterm, which binds them to one specific theme by slug. Renaming the theme directory, forking it, or switching themes silently orphans every plugin-provided template — no error, the templates just stop resolving, and the stale posts stay in the database.Options
get_stylesheet()at runtime, so templates follow the active theme.Option 1 is the smallest correct change; option 3 is worth adding regardless, since the current failure mode is invisible.
Whichever is chosen, decide what happens to already-created template posts under the old term — a migration or a cleanup path is needed, and it overlaps with the uninstall work in #108.
Acceptance
ucsc-2022-tagged templates are migrated or cleaned upLocation: src/Template/Template.php:14