-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Rename wp_register_block_template() to register_block_template() #65958
Rename wp_register_block_template() to register_block_template() #65958
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Flaky tests detected in f942c09. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11244989720
|
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.
LGTM 👍
Any concerns @peterwilsoncc @ndiego |
Not on my end, as I would consider this fixing a "bug" in the original implementation, but I have alerted the other 6.7 release leads in WP Slack and will follow up when there is a consensus. |
I'd consider this fixing a bug 👍 |
Given the 👍 on this comment above. I have no concerns moving forward. As an aside, this change will be highlighted in the What's new for developers article later this week on the Developer Blog. |
According to the docs we will also need to raise a Core PR to manually back port these changes to WP Core. cc @kevin940726 for confidence check. |
The WP core backport PR is this one: WordPress/wordpress-develop#7543. Sorry I forgot to add the link in the PR description. 😅 |
I just cherry-picked this PR to the wp/6.7 branch to get it included in the next release: ffb2e13 |
…dPress#65958) Co-authored-by: Aljullu <aljullu@git.wordpress.org> Co-authored-by: youknowriad <youknowriad@git.wordpress.org> Co-authored-by: ndiego <ndiego@git.wordpress.org> Co-authored-by: getdave <get_dave@git.wordpress.org>
What?
As discussed in #61577, we want to remove the
wp_
prefix fromwp_register_block_template()
andwp_unregister_block_template()
.Backport PR in core: WordPress/wordpress-develop#7543.
Why?
To keep it consistent with other functions like
register_block_type
,register_block_pattern
andregister_block_style
.How?
This PR directly replaces the old functions with the new ones, it doesn't deprecate them. Given that they were not shipped in WordPress core my understanding is that we don't need to keep backwards compatibility. But please, correct me if I'm wrong.
Testing Instructions
/category/test-category/
) and verify the Plugin Template contents are rendered.Plugin Template
appears with the correct title and description.