#55531 closed enhancement (fixed)
Editor: Make block type aware of ancestor prop
Reported by: | darerodz | Owned by: | gziolo |
---|---|---|---|
Milestone: | 6.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | has-patch has-unit-tests needs-dev-note commit needs-docs |
Focuses: | Cc: |
Description
The ancestor
prop was recently added to the block.json schema, in Gutenberg.
This new field should be handled in the WP_Block_Type
class, in the REST API endpoint for block types, and ensure it gets exposed in the get_block_editor_server_block_settings
function.
Change History (8)
This ticket was mentioned in PR #2521 on WordPress/wordpress-develop by DAreRodz.
3 years ago
#1
- Keywords has-patch has-unit-tests added
#2
@
3 years ago
- Keywords needs-dev-note added
- Summary changed from Make block type aware of ancestor prop to Editor: Make block type aware of ancestor prop
#3
@
3 years ago
- Keywords commit added
- Milestone changed from Awaiting Review to 6.0
Related PR in Gutenberg with the documentation changes opened by @fabiankaegy:
https://github.com/WordPress/gutenberg/pull/40027
This patch looks great. Thank you @darerodz for working on it.
#4
@
3 years ago
- Owner set to gziolo
- Resolution set to fixed
- Status changed from new to closed
In 53084:
3 years ago
#5
Commited with https://core.trac.wordpress.org/changeset/53084.
#7
follow-up:
↓ 8
@
3 years ago
@milana_cap, see my comment https://core.trac.wordpress.org/ticket/55531#comment:3. PR with documentation changes is ready for review: https://github.com/WordPress/gutenberg/pull/40027.
#8
in reply to:
↑ 7
@
3 years ago
Replying to gziolo:
@milana_cap, see my comment https://core.trac.wordpress.org/ticket/55531#comment:3. PR with documentation changes is ready for review: https://github.com/WordPress/gutenberg/pull/40027.
Thank you. I marked this one to have it in our custom query.
This simple PR adds support for the new
ancestor
property, making theWP_Block_Type
class aware of it and exposing it from the `block-types` REST API endpoint and the `get_block_editor_server_block_settings` function.The property was recently added to the block.json schema (see https://github.com/WordPress/gutenberg/pull/39894).
Trac ticket: https://core.trac.wordpress.org/ticket/55531#ticket