Opened 3 years ago
Closed 3 years ago
#60358 closed enhancement (fixed)
Add: Add original_source and author_text to the templates rest API.
| Reported by: | jorgefilipecosta | Owned by: | jorgefilipecosta |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.5 |
| Component: | REST API | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests add-to-field-guide |
| Cc: | Focuses: |
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.
3 years ago
#1
- Keywords has-unit-tests added
@jorgefilipecosta commented on PR #5940:
3 years ago
#3
#4
@
3 years ago
Please milestone this ticket to 6.5 since [57366] was committed to trunk during this milestone period. Thanks @gefilipecosta!
#7
@
3 years ago
- Resolution fixed
- Status closed → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.