-
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
Button Block: Add back compat for WP6.4 regarding HTML Tag Processor #63082
Conversation
b5fe20b
to
9a038af
Compare
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 7835c9f. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9778816524
|
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.
@t-hamano I'd be grateful if you could address my comment below. Thank you.
Thanks for addressing this. I realize it was my mistake that's lead to this situation.
Given 18.8 is released after WordPress 6.6, I think support for WordPress 6.4 can be dropped in 18.8. Perhaps this PR can be shipped in a Gutenberg 18.7.1 release (I'm happy to handle the release process). |
Re-add conditional statement Co-authored-by: Anton Vlasenko <[email protected]>
Thank you everyone for your feedback. I think I've made the appropriate changes to the code, but I'd appreciate it if you could also check that this comment is clear.
That is very much appreciated 🙇♂️ |
Yep, I think it's very clear 👍 |
…63082) * Button Block: Add back compat for WP6.4 regarding HTML tag processor * Don't use conditional statement * Update packages/block-library/src/button/index.php Re-add conditional statement Co-authored-by: Anton Vlasenko <[email protected]> * Fix lint and update comment * Remove space --------- Co-authored-by: t-hamano <[email protected]> Co-authored-by: dmsnell <[email protected]> Co-authored-by: anton-vlasenko <[email protected]> Co-authored-by: talldan <[email protected]> Co-authored-by: ndiego <[email protected]> Co-authored-by: beckej13820 <[email protected]>
I've cherry picked this to the 18.7 release branch - b6310be |
…ordPress#63082) * Button Block: Add back compat for WP6.4 regarding HTML tag processor * Don't use conditional statement * Update packages/block-library/src/button/index.php Re-add conditional statement Co-authored-by: Anton Vlasenko <[email protected]> * Fix lint and update comment * Remove space --------- Co-authored-by: t-hamano <[email protected]> Co-authored-by: dmsnell <[email protected]> Co-authored-by: anton-vlasenko <[email protected]> Co-authored-by: talldan <[email protected]> Co-authored-by: ndiego <[email protected]> Co-authored-by: beckej13820 <[email protected]>
Fixes #62986
What?
This PR fixes a fatal error in the Button block, caused by the
WP_HTML_Tag_Processor
class in WP6.4 not yet having thenext_token()
method.How?
A class with the next_token method exists in the Gutenberg plugin as
Gutenberg_HTML_Tag_Processor_6_5
. I set it up so that this class is used if theIS_GUTENBERG_PLUGIN
variable istrue
. This prevents a critical error that occurs when the Gutenberg plugin is used in WP6.4.In my opinion, the following flow would allow us to maintain full backward compatibility:
Testing Instructions