[wp-trac] [WordPress Trac] #58540: Templates API: return post modified datetime in response
WordPress Trac
noreply at wordpress.org
Fri Jul 14 16:38:02 UTC 2023
#58540: Templates API: return post modified datetime in response
-------------------------------------------------+-------------------------
Reporter: ramonopoly | Owner:
| isabel_brison
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.3
Component: REST API | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests gutenberg- | Focuses:
merge add-to-field-guide |
-------------------------------------------------+-------------------------
Changes (by milana_cap):
* keywords: has-patch has-unit-tests gutenberg-merge => has-patch has-
unit-tests gutenberg-merge add-to-field-guide
Old description:
> In order to display the latest modified date in the site editor for
> template and template parts we need to add `modified` to the template and
> template part objects in the rest response for
> `WP_REST_Templates_Controller` 😄
>
> See https://github.com/WordPress/gutenberg/issues/49597 for reference to
> the designs and context.
>
> For theme templates, it will add the modified value when we have a post
> id (which is once the template is first save after user change)
>
> The modified property will be returned when a template is created,
> updated and fetched.
>
> Gutenberg PR that introduced this change to the plugin:
>
> https://github.com/WordPress/gutenberg/pull/51362
New description:
In order to display the latest modified date in the site editor for
template and template parts we need to add `modified` to the template and
template part objects in the rest response for
`WP_REST_Templates_Controller`
See https://github.com/WordPress/gutenberg/issues/49597 for reference to
the designs and context.
For theme templates, it will add the modified value when we have a post id
(which is once the template is first save after user change)
The modified property will be returned when a template is created, updated
and fetched.
Gutenberg PR that introduced this change to the plugin:
https://github.com/WordPress/gutenberg/pull/51362
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58540#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list