-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the block theme folders to templates and parts #36647
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not accept theme_dir
directly and remove calculation logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
templates
andparts
instead ofblock-templates
andblock-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