[wp-trac] [WordPress Trac] #54829: Allow classic themes to be optionally block themes if 'templates' and 'parts' folders exists

WordPress Trac noreply at wordpress.org
Fri Feb 11 07:33:37 UTC 2022


#54829: Allow classic themes to be optionally block themes if 'templates' and
'parts' folders exists
----------------------------------------------------+---------------------
 Reporter:  exstheme                                |       Owner:  (none)
     Type:  enhancement                             |      Status:  new
 Priority:  normal                                  |   Milestone:  6.0
Component:  Themes                                  |     Version:  5.9
 Severity:  normal                                  |  Resolution:
 Keywords:  has-patch has-unit-tests needs-testing  |     Focuses:
----------------------------------------------------+---------------------

Comment (by exstheme):

 Hello, @costdev !

 Can you please tell about any plans to merge your PR ?

 Replying to [comment:7 costdev]:
 > Thanks for the feedback @poena!
 >
 > Here are two further potential use cases to allow us to make sure that
 we've explored this ticket's proposal for multiple use cases:
 >
 > 1. Backwards compatibility: If an existing classic theme has a
 `templates/index.html` file, it will be deemed a block theme after
 updating to 5.9. This could be the case when using a templating engine,
 for example. The filter would allow the classic theme developer to
 correctly identify their theme as a classic theme rather than restructure
 their codebase and update references. In the event that said classic theme
 is no longer maintained, one line in `functions.php` would prevent a UI
 change for end users, and is a more straightforward fix for the support
 forum to advise.
 >
 > 2. Extensibility: As we expand FSE, we may add alternative prerequisites
 to determine if a theme is a block theme (we changed `block-templates` to
 `templates` for example). By adding this filter, PRs to the Gutenberg
 repo, or feature plugins, can add the new prerequisites and write tests
 for them without having to modify Core. This would also allow manual
 testing to be carried out by a wider audience without each tester needing
 to make manual changes to `WP_Theme` - a plugin could simply add a setting
 to enable an experimental feature, which in turn would add a filter
 callback with additional ways to determine a block theme.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54829#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list