-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Blocks: Introduce helper function to retrieve hooked blocks #5239
Conversation
Looking good overall, just one request regarding tests. For the other PRs we've filed for block hooks, I've actually filed separate tickets; it'd be great if we could do the same here 😊 (I can do that if you're busy with other things.) Finally, just noting that I agree that we should eventually cache |
Feel free to open another ticket. Otherwise, I'm fine referencing the existing ticket that covers the block hooks feature. |
2105b3c
to
d2cfe58
Compare
I addressed the feedback, and I will open a ticket for this functionality now that I have some additional time. |
The ticket is https://core.trac.wordpress.org/ticket/59383. |
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.
Thank you very much! Let's update the two @ticket
references in the tests to use the new number, and it's ready to go 🎉
Co-authored-by: Bernie Reiter <96308+ockham@users.noreply.github.com>
Committed with https://core.trac.wordpress.org/changeset/56610. |
Trac ticket: https://core.trac.wordpress.org/ticket/59383
In order to implement Block Hooks (see #59313), we added
block_hooks
field to theWP_Block_Type
class, as well as to block registration related functions. In this follow-up, new helper function gets introduced that is going to compute the list of hooked blocks by other registered blocks for a given block type.Extracted from #5158 and covered with unit tests.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.