-
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
Docs: Add documentation for render_block
and register_block_type_args
to Block Filters
#64118
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. |
I'm missing some guidance in this page about the mixture of PHP and JS functions. For example, registration happens on both the server and the client, so there are APIs to modify block metadata before registration on both sides, but the editor part only happens on the client, so there are only JS functions to alter this side of the block's management. This could be helpful for developers to understand (and remember) the possibilities and limitations of these filters. |
I added a section about this and also linked to the block registration guide for more info. |
Cool, thank you for improving this document 👍 |
Fixes #64037
What?
The documentation for Block Filters currently does not mention the
register_block_type_args
orender_block
/render_block_{block/name}
filters, which are some of the most used filters for extending and modifying blocks.This PR adds brief descriptions and an example for each as well as a few other edits. Further edits will be needed for this page as some of the other filters are missing examples. I will tackle that in a follow-up PR.