[wp-trac] [WordPress Trac] #45677: REST Autosaves Controller creating extra instance of a post type REST controller
WordPress Trac
noreply at wordpress.org
Tue Jan 29 18:21:23 UTC 2019
#45677: REST Autosaves Controller creating extra instance of a post type REST
controller
--------------------------+-----------------------
Reporter: pat@… | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.2
Component: REST API | Version: 5.0
Severity: normal | Resolution:
Keywords: | Focuses: rest-api
--------------------------+-----------------------
Comment (by TimothyBlynJacobs):
I don't love the idea of these filters being registered in the class
constructor, they could possible go in `register_routes`. That being said
we should probably reuse the same instance anyways, and we have it
available when instantiating the autosaves controller.
We should probably make the parameter optional as well and instantiate it
if not passed to maintain BC.
@patrelentlesstechnologycom Do you want to work on a patch for this?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45677#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list