-
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
Navigation Block: Remove obsolete Block Hooks filters #64676
Conversation
47d632c
to
d4a6878
Compare
d4a6878
to
fed8038
Compare
Flaky tests detected in 6bc486d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11933328108
|
This might require a counterpart PR in Core that moves the functions we're removing here into |
fed8038
to
779de94
Compare
779de94
to
a49161f
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. |
What?
Remove a number of Block Hooks related filters from the Navigation block.
Why?
As of WP 6.6, Core takes care of these things (by adding its own filters):
block_core_navigation_set_ignored_hooked_blocks_metadata
was a helper that was only used byblock_core_navigation_update_ignore_hooked_blocks_meta
.block_core_navigation_update_ignore_hooked_blocks_meta
was replaced byupdate_ignored_hooked_blocks_postmeta
, which is added as a default filter here.block_core_navigation_insert_hooked_blocks_into_rest_response
was replaced byinsert_hooked_blocks_into_rest_response
, which is added as a default filter here.And per #67117, 6.6 is the minimum required WordPress version for the Gutenberg plugin.
How?
By removing code.
Note
There's a companion PR in
wordpress-develop
to move these functions intodeprecated.php
: WordPress/wordpress-develop#7849Testing Instructions
This should be covered by unit tests (which are run both against the current and previous WP versions).
In addition, you can smoke-test Block Hooks in the Navigation block as described in other related PRs, e.g. #59021.