In create_initial_rest_routes (hooked on rest_api_init) for post-types that are not attachments, autosave routes are registered.
There doesn’t seem to be a great way to prevent that registration.
When a new CPT is registered one of the registration arguments is rest_controller_class with the intent to override the WP_REST_Posts_Controller.
I would like to either avoid registering or override the autosave class.
Aside from filtering rest_endpoints, is there a good way to do that I’m missing?
- The topic ‘extending WP_REST_Autosaves_Controller’ is closed to new replies.