Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #54829, comment 7


Ignore:
Timestamp:
01/16/2022 05:22:49 AM (3 years ago)
Author:
costdev
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #54829, comment 7

    initial v1  
    551. 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.
    66
    7 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 indicate a block theme.
     72. 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.