Skip to content
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

Block Hooks: Update the compatibility layer #58468

Closed
wants to merge 9 commits into from

Conversation

ockham
Copy link
Contributor

@ockham ockham commented Jan 30, 2024

What?

Update lib/compat/wordpress-6.4/block-hooks.php to better reflect Block Hooks code as present in WP 6.4.

Why?

We've found that we might need a more faithful copy of the Block Hooks code as found in Core in order to unlock some new features, e.g. #58388. In addition, this might be a blocker to WordPress/wordpress-develop#5726.

How?

By copying code from Core, and carefully replacing existing functions with it.

Testing Instructions

TBD, but basically: Test on WP 6.3, 6.4, trunk.

Questions

What's our back-compat policy for Gutenberg? This PR is removing a number of functions, plus the gutenberg_serialize_blocks filter.

TODO

  • Insertion into Comment Template block isn't working in the editor. (That's a pattern, so probably that's not working?)
  • Make sure we're not missing theme attribute injection anywhere.
  • Include compat layer for WP 6.5.

@ockham ockham self-assigned this Jan 30, 2024
Copy link

github-actions bot commented Jan 30, 2024

This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress.

If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged.

If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack.

Thank you! ❤️

View changed files
❔ lib/compat/wordpress-6.4/block-hooks.php
❔ lib/compat/wordpress-6.4/class-gutenberg-rest-block-patterns-controller.php

@ockham
Copy link
Contributor Author

ockham commented Jan 30, 2024

FYI @tjcafferkey 🙂

Copy link

Flaky tests detected in 83bcd66.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7716025527
📝 Reported issues:

@ockham
Copy link
Contributor Author

ockham commented Mar 21, 2024

Closing. WordPress 6.5 is going to be released in less than a week, which will raise the minimum required WordPress version for Gutenberg to 6.4, making the 6.4 compat layer obsolete.

@ockham ockham closed this Mar 21, 2024
@ockham ockham deleted the update/block-hooks-compat-layer branch March 21, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant