Add documentation for contentRole and listView block supports#75903
Add documentation for contentRole and listView block supports#75903
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. |
| - Type: `boolean` | ||
| - Default value: `false` | ||
|
|
||
| Marks the block itself as content. It is intended primarily for blocks that do not declare `content` attributes, or whose content is expressed only through their inner blocks. When enabled, content-only editing modes can still edit these blocks and allow inner blocks to be added or removed. |
There was a problem hiding this comment.
LGTM, but double checking with @tellthemachines who has been looking at this role for other blocks in #75812
There was a problem hiding this comment.
Yeah LGTM! #75812 doesn't change the behaviour of contentRole, it only changes the ability to insert blocks in containers with content attributes.
|
I would like to backport this PR to the {
"$schema": "https://schemas.wp.org/wp/7.0/block.json"
} |
Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: youknowriad <youknowriad@git.wordpress.org> Co-authored-by: ramonjd <ramonopoly@git.wordpress.org> Co-authored-by: tellthemachines <isabel_brison@git.wordpress.org>
|
For some reason, the GitHub Action is failing, but the cherry-pick to the 7.0 branch itself was successful. |
What?
Since
contentRoleandlistViewblock supports are public APIs, this PR updates the documentation and block.json schema.The
contentRolewas actually already available in WP 6.9 but was temporarily undocumented due to a small bug, which should now be fixed. #72695Testing Instructions
Suggestions for better descriptions are welcome!