Opened 3 weeks ago
Last modified 3 weeks ago
#62701 new enhancement
Post controller: support for grouping results by parent-child relationship
Reported by: | oandregal | Owned by: | |
---|---|---|---|
Milestone: | 6.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | REST API | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description
The current wp-admin displays hierarchical posts grouped/sorted by hierarchy. To implement the same behaviour in the site editor, we need to the REST API to support the same functionality.
See details in the related issues/PRs:
- Showcase hierarchy in table/list layout https://github.com/WordPress/gutenberg/issues/55957
- Gutenberg PR https://github.com/WordPress/gutenberg/pull/66479
- Backport PR https://github.com/WordPress/wordpress-develop/pull/8014
Change History (1)
This ticket was mentioned in PR #8014 on WordPress/wordpress-develop by @oandregal.
3 weeks ago
#1
- Keywords has-unit-tests added
Note: See
TracTickets for help on using
tickets.
Trac ticket https://core.trac.wordpress.org/ticket/62701#ticket
See related Gutenberg issues/PRs:
## What
This PR expands the post controller to allow returning the data by parent-child relationship (sort by hierarchy).
## Why
We want to display data in a hierarchical way in the site editor, similarly to what we do in wp-admin:
## How to test
Added a new test suite to test the logic. Without the related Gutenberg PR this is difficult to test.