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

WordPress Trac noreply at wordpress.org
Fri Nov 18 02:54:51 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 aduth):

 To address remaining concerns with recreating filters and text formatting
 on the client, the latest patch takes an approach of adding a new REST API
 endpoint for Quick Drafts, extending `WP_REST_Posts_Controller` in a new
 `wp-admin/v1` namespace, including only attributes relevant for display of
 Quick Drafts and allowing creation by the same endpoint. Benefits of this
 include having full control to customize the endpoint request and response
 structure, downside being significantly more boilerplate to support the
 new endpoint.

 Changes:

 - Create new WP_REST_Quick_Drafts_Controller endpoint for listing and
 creating Quick Drafts
 - Re-render draft form on save attempt to reflect accurate entry validity
 - Limit list to four entries even after having created new drafts
 - Remove now-unused wp.formatting.trimWords JavaScript implementation
 - Bump version on dashboard script to ensure cachebust

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


More information about the wp-trac mailing list