[wp-trac] [WordPress Trac] #45677: REST Autosaves Controller creating extra instance of a post type REST controller

WordPress Trac noreply at wordpress.org
Tue Oct 1 04:56:23 UTC 2019


#45677: REST Autosaves Controller creating extra instance of a post type REST
controller
--------------------------------------+--------------------------------
 Reporter:  pat@…                     |       Owner:  TimothyBlynJacobs
     Type:  defect (bug)              |      Status:  reopened
 Priority:  normal                    |   Milestone:  5.3
Component:  REST API                  |     Version:  5.0
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  rest-api
--------------------------------------+--------------------------------
Changes (by dlh):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 My apologies for reopening a ticket, but I wanted to offer a couple
 janitorial comments for [46272] outlined in [attachment:"45677.11.diff"]:

 - The private static `$post_type_controllers` property was added but
 doesn't appear to be used.

 - Once the controller instance is set on a `WP_Post_Type`, can it be
 returned straightaway? Can it not be because that would allow someone to
 register a post type with an arbitrary `rest_controller` property?

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


More information about the wp-trac mailing list