[wp-trac] [WordPress Trac] #60631: block_core_navigation_render_inner_blocks block taxonomy type is 'tag', should be 'post_tag'
WordPress Trac
noreply at wordpress.org
Mon Feb 26 20:46:07 UTC 2024
#60631: block_core_navigation_render_inner_blocks block taxonomy type is 'tag',
should be 'post_tag'
--------------------------------+------------------------------
Reporter: anaid | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version:
Severity: normal | Resolution:
Keywords: dev-feedback close | Focuses:
--------------------------------+------------------------------
Changes (by swissspidy):
* keywords: => dev-feedback close
* focuses: multisite =>
* component: Taxonomy => Editor
Comment:
From what I can see, the `type` attribute for the `core/navigation-link`
block does not map 1:1 to a taxonomy type. Type refers to the ''type of
link''. It could be "page", "post", "category", "tag", or something
custom.
In this regard the code you shared is flawed as `$item["attr"]["type"]`
does not actually mean it's about a taxonomy.
`block_core_navigation_link_build_variations` and
`build_variation_for_navigation_link` then create block variations for
every registered post type and taxonomy. There, there is a mapping to
`post_tag` as expected.
See
https://github.com/WordPress/gutenberg/blob/705d77cd19b36ec36a04b7918aeab7282747d4a7/packages
/block-library/src/navigation-link/index.php#L269-L326
So from what I can see it works as expected.
Please note that tickets related to the Gutenberg Editor should be filed
on the [https://github.com/WordPress/gutenberg/issues/new/choose Gutenberg
GitHub Repository] in general. So if you still think there is something
that needs to be changed, please open an issue there for discussion.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60631#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list