[wp-trac] [WordPress Trac] #43316: REST API: Support autosaves
WordPress Trac
noreply at wordpress.org
Wed Oct 17 09:14:20 UTC 2018
#43316: REST API: Support autosaves
---------------------------------------------+-----------------------
Reporter: kraftbj | Owner: rmccue
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.0
Component: REST API | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests commit | Focuses: rest-api
---------------------------------------------+-----------------------
Comment (by birgire):
The {{{WP_Test_REST_Autosaves_Controller}}} runs before
{{{WP_Test_REST_Revisions_Controller}}} when the {{{restapi}}} group is
tested.
I did verify that changing the execution order, by changing the filename
from {{{rest-autosaves-controller.php}}} to {{{rest-zautosaves-
controller.php}}}, will run the tests successfully.
We could try to filter {{{DOING_AUTOSAVE}}} out from the test methods, but
that would need some extra changes to core functions.
There is no filterable {{{wp_doing_autosave()}}} that we could use in
{{{wp_save_post_revision()}}}.
So I searched for any open tickets for this, and found #44786 and #43760.
So if we want to use the filter approach, to run the tests successfully,
then this ticket would be blocked by those tickets.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43316#comment:107>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list