[wp-trac] [WordPress Trac] #60131: Global styles revisions controller: extend with WP_REST_Revisions_Controller

WordPress Trac noreply at wordpress.org
Fri Dec 22 03:28:13 UTC 2023


#60131: Global styles revisions controller: extend with
WP_REST_Revisions_Controller
-------------------------+-----------------------------
 Reporter:  ramonopoly   |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  REST API     |    Version:  trunk
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 The global styles revisions controller was introduced in
 [https://github.com/WordPress/gutenberg/pull/49974
 WordPress/gutenberg#49974].

 Originally, global styles revisions were a bit new and had the following
 characteristics:

 - Didn't, and still doesn't, return excerpt, content, guid fields
 - Had to do some JSON parsing when preparing the response


 Back then, it was more code to override the parent class's functions, and
 I thought having it as a stand alone class left more elbow room for
 subsequent tweaks and changes. Especially since global styles revisions
 were new and evolving.

 Now that global styles revisions have "settled", and shares more methods
 with WP_REST_Revisions_Controller, it makes sense to change the base class
 for more consistent interface, less code and less maintenance burden.

 See discussion:
 [https://github.com/WordPress/gutenberg/pull/55827#discussion_r1399856581
 WordPress/gutenberg#55827 (comment)]

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60131>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list