-
Notifications
You must be signed in to change notification settings - Fork 7
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
How to extend a WordPress block #283
Comments
While working on this article, it's become clear that this topic is too big for one article and instead should be two. One dedicated article focused on extending blocks using Block Filters, and another covering the remaining topics in the description. The first, more technical, article would be "How to extend Core WordPress blocks" and the second would be "Do you really need a custom block? Exploring alternatives to block development in WordPress". The second article would heavily reference the code techniques demonstrated in the first article and focus more on examples. What do you think @bph and @juanmaguitar? |
Having two part tutorial, should work, indeed. Go for it. I could also see a few more granular scenarios where the filter is only applied when a block is an InnerBlock, but not when it's used stand alone. |
Sounds good @ndiego 👍 |
This article is ready for an initial review: https://docs.google.com/document/d/1LcFuIbbmynZwItnCHPRMmAvtD0KfjgAbv346Omi8cb0/edit |
Good job, @ndiego! Just a few suggestions in the doc. |
I did a second review and left some minor suggestions, but the article is rock solid and ready to be shipped! ✅ |
Pre-publishing checklist:
Post-publishing checklist
|
Social copy:
|
This article has been published: https://developer.wordpress.org/news/2024/08/15/how-to-extend-a-wordpress-block/ |
Social scheduled for 8/21/2024 |
Discussed in #278
Originally posted by ndiego June 20, 2024
Custom block development is powerful, but often you don’t need to go through the hassle of building a custom block to achieve your goals.
This article will explore 4-5 scenarios where alternatives to custom blocks might be more effective. Often, this will be in the form of block patterns. These non-block alternatives will feature one or more of the following tools:
allowedBlocks
The goal is to showcase the flexibility and power of the pattern "toolset" and other non-block alternatives in WordPress. Each example will link to further resources, both on the Dev Blog and in the documentation, where readers can learn more about each tool.
Additionally, the Block Editor Handbook will be updated to ensure that each tool covered in this post is thoroughly documented.
Edit: I (@ndiego) have updated the title to reflect the change of direction noted below.
The text was updated successfully, but these errors were encountered: