Opened 8 months ago
Closed 7 months ago
#60358 closed enhancement (fixed)
Add: Add original_source and author_text to the templates rest API.
Reported by: | jorgefilipecosta | Owned by: | jorgefilipecosta |
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | REST API | Keywords: | has-patch has-unit-tests add-to-field-guide |
Focuses: | Cc: |
Description
For the new "All templates" UI to work properly we need the REST API to provide to additional fields original_source, and author_text.
This ticket tracks its addition to the core.
It ports the following PRs from the Gutenberg repository:
https://github.com/WordPress/gutenberg/pull/56333
https://github.com/WordPress/gutenberg/pull/56567
https://github.com/WordPress/gutenberg/pull/56990
GitHub PR for the patch at https://github.com/WordPress/wordpress-develop/pull/5940.
Attachments (1)
Change History (10)
This ticket was mentioned in PR #5940 on WordPress/wordpress-develop by @jorgefilipecosta.
8 months ago
#1
- Keywords has-unit-tests added
#2
@
8 months ago
- Owner set to jorgefilipecosta
- Resolution set to fixed
- Status changed from new to closed
In 57366:
@jorgefilipecosta commented on PR #5940:
8 months ago
#3
#4
@
8 months ago
Please milestone this ticket to 6.5
since [57366] was committed to trunk during this milestone period. Thanks @gefilipecosta!
#7
@
7 months ago
- Resolution fixed deleted
- Status changed from closed to reopened
Sorry for re-opening the ticket, but I have noticed a minor issue in the modified PHPUnit tests introduced in r57374 .
The newly expected original_source
and author_text
fields should have more appropriate message passed to the assertArrayHasKey
method, but have a copy of the message used for the parent
field.
See the attached diff.
This PR adds the fields author_text and original source to the template rest API.
Backports into the core https://github.com/WordPress/gutenberg/pull/56333/, https://github.com/WordPress/gutenberg/pull/56567/, and https://github.com/WordPress/gutenberg/pull/56990.