[wp-trac] [WordPress Trac] #58540: Templates API: return post modified datetime in response

WordPress Trac noreply at wordpress.org
Thu Jun 15 06:21:26 UTC 2023


#58540: Templates API: return post modified datetime in response
--------------------------+-----------------------------
 Reporter:  ramonopoly    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  REST API      |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list