[wp-trac] [WordPress Trac] #38342: Quick Draft: Leverage REST API endpoints

WordPress Trac noreply at wordpress.org
Sun Nov 20 21:33:59 UTC 2016


#38342: Quick Draft: Leverage REST API endpoints
---------------------------------+-----------------------------------
 Reporter:  adamsilverstein      |       Owner:
     Type:  enhancement          |      Status:  new
 Priority:  normal               |   Milestone:  Future Release
Component:  Administration       |     Version:
 Severity:  normal               |  Resolution:
 Keywords:  has-patch 4.8-early  |     Focuses:  javascript, rest-api
---------------------------------+-----------------------------------

Comment (by joehoyle):

 > Also, one more wrinkle that hasn't been discussed much yet: the need to
 use wp_localize_script to pass settings such as site offset to the client.
 This is an ok solution for clients that live within the admin, but:

 I agree this isn't ideal - I mentioned in #38883 that adding the offset to
 `/wp-json/` along with url / name / description could be a way to go here.
 However, it might be worth adding that the use of `wp_localize_script`
 _is_ valid for actual localization strings etc as this isn't REST API /
 data related.

 For the date / date_gmt issue / discussion - I opened #38883 to track that
 problem, however I don't think this issue affects this ticket anyway, as
 we want to show dates in the timezone of the admin, not the user who is
 viewing the admin. This means `date` is actually the field we want in this
 case. I recognise this might not be true for other decoupled
 implementations but I don't think it should hold up this task. We are
 trying to improve the API is many ways in other tickets, we don't need to
 make this the ticket to represent every use case for the API.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38342#comment:51>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list