Update the block theme folders to templates and parts#36647
Update the block theme folders to templates and parts#36647youknowriad merged 2 commits intotrunkfrom
Conversation
|
Theme Check also needs to be updated, otherwise themes will not be able to be uploaded to WordPress.org |
|
@ockham Do you think you can help with the php unit failures here? I'm not sure I understand the results I'm having and the previous assertions. |
| * | ||
| * @return array Folder names used by block themes. | ||
| */ | ||
| function get_block_theme_folders( $theme_stylesheet = null ) { |
There was a problem hiding this comment.
Why not accept theme_dir directly and remove calculation logic?
There was a problem hiding this comment.
From an API point of view, I felt that accepting a them stylesheet (or id) is a bit better.
There was a problem hiding this comment.
No strong preference. I was just curious :)
@youknowriad I'll have a look! |
|
All of the |
|
Is it possible that the reason for this issue is that the test (end dev) env is using Core The reason why I think this might be the case is as follows: If I move the text fixture files back from |
|
@ockham that makes sense, I guess we need to make the fix in both places at the same time. |
|
I think actually that we should remove the unit test from here, now that these functions are just in Gutenberg to support old versions. |
Let's just make sure that we've carried them over to |
Looks like we still have to backport them: https://github.com/WordPress/wordpress-develop/blob/d87196b560203345b385bef6bef9666e7147bb46/tests/phpunit/tests/block-template.php |
I've started a PR: WordPress/wordpress-develop#1920 |
|
|
The tests here are passing, so this should be good to land now. |
See #36548
This PR updates the block themes to use
templatesandpartsinstead ofblock-templatesandblock-template-parts.It also keeps backward compatibility, that said a theme can not have "templates" and "block-template-parts" or "block-templates" and "parts". I also updated all the documentation we have.
Notes
The issue also mentions the future of patterns and styles, I think these are not requirements for 5.9
Testing instructions