#54493 closed task (blessed) (fixed)
Block Themes: Update the theme folders to be templates and parts
Reported by: | youknowriad | Owned by: | youknowriad |
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Themes | Keywords: | has-patch |
Focuses: | Cc: |
Description (last modified by )
This ticket is here to track the backport of https://github.com/WordPress/gutenberg/issues/36548 implemented in https://github.com/WordPress/gutenberg/pull/36647
The idea is to use "templates" and "parts" as folders instead of "block-templates" and "block-template-parts" for block themes while retaining backward compatibility for the latter.
While there are already themes that use the previous folders here, we prefer to update the folders while the number of themes is small 20/30 early adopters to ensure consistency in theme folders for all FSE themes (we expect a far bigger number in the future).
Existing FSE themes will continue to work properly without any change, backward compatibility for the previous folders will be kept.
Delaying this change to 6.0 would be more impactful since more themes would exist at that point and plugins might start relying on the presence of the old folders.
Change History (8)
This ticket was mentioned in PR #1932 on WordPress/wordpress-develop by youknowriad.
3 years ago
#1
- Keywords has-patch added
3 years ago
#2
Gutenberg counterpart PR: https://github.com/WordPress/gutenberg/pull/36647
3 years ago
#3
This LGTM. Unfortunately, I can't currently test manually (some issue with MySQL in my local dev setup, probably yet another collision with my GB dev setup 🙄 ).
Instead, I've tested these changes on top of #1920 (by running unit tests), and they're unfortunately failing 😕
There were 3 failures: 1) Block_Template_Test::test_child_theme_block_template_takes_precedence_over_equally_specific_parent_theme_php_template Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'/var/www/src/wp-includes/template-canvas.php' +'/var/www/tests/phpunit/includes/../data/themedir1/block-theme/page-1.php' /var/www/tests/phpunit/tests/block-template.php:153 2) Block_Template_Test::test_custom_page_block_template_takes_precedence_over_all_other_templates Failed asserting that two strings are identical. --- Expected +++ Actual @@ @@ -'Content' +' +<p>Page Template</p> +' /var/www/tests/phpunit/tests/block-template.php:193
Would it make sense to get #1920 in first for added confidence?
#6
@
3 years ago
- Owner set to youknowriad
- Resolution set to fixed
- Status changed from new to closed
In 52247:
youknowriad commented on PR #1932:
3 years ago
#7
committed in https://core.trac.wordpress.org/changeset/52247
Backport the theme folders change from the Gutenberg plugin.
Trac ticket: https://core.trac.wordpress.org/ticket/54493