Make WordPress Core

Opened 7 months ago

Closed 7 months ago

#64107 closed enhancement (fixed)

Block Bindings: Add/update sources for use with Navigation blocks

Reported by: bernhard-reiter's profile Bernhard Reiter Owned by: bernhard-reiter's profile Bernhard Reiter
Milestone: 6.9 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:

Description

Block Bindings can be used with the Navigation Link and Navigation Submenu blocks to make sure that the link destination is kept up-to-date based on other attributes, even when the destination changes. Specifically, a Navigation Link or Submenu can point to a given post object or taxonomy term page; these can be specified by a combination of kind (e.g. post-type), type (e.g. page), and id attributes. (The destination can change if e.g. pretty permalinks are used, and a given page's slug is changed.)

The core/post-data source lends itself for the case of post-type links; however, it needs to expose the given post object's link field. For taxonomy terms, a new core/term-data source should be introduced.

Change History (3)

This ticket was mentioned in PR #10305 on WordPress/wordpress-develop by @Bernhard Reiter.


7 months ago
#1

  • Keywords has-patch added

Carry over changes to the core/post-data source from https://github.com/WordPress/gutenberg/pull/72165.

Trac ticket: https://core.trac.wordpress.org/ticket/64107

@Bernhard Reiter commented on PR #10305:


7 months ago
#2

Failing CI jobs seem to be unrelated (and present on all recently filed PRs); they seem to be related to the Gutenberg build system (some TypeScript build error specifically?)

I've asked in WordPress Slack.

#3 @Bernhard Reiter
7 months ago

  • Owner set to Bernhard Reiter
  • Resolution set to fixed
  • Status changed from assigned to closed

In 60946:

Block Bindings: Add core/term-data source; extend core/post-data.

Add a new core/term-data source to make information about a taxonomy term available for use in Block Bindings.
Additionally, expose a post object's permalink through the core/post-data source.

Props bernhard-reiter, get_dave, jeryj, cbravobernal.
Fixes #64107.

Note: See TracTickets for help on using tickets.