[wp-trac] [WordPress Trac] #44786: Autosave: Conditionally allow revisions to be saved
WordPress Trac
noreply at wordpress.org
Thu Aug 16 02:58:40 UTC 2018
#44786: Autosave: Conditionally allow revisions to be saved
--------------------------------------+------------------------------
Reporter: jblz | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Revisions | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------------------
Changes (by jblz):
* keywords: has-patch needs-unit-tests => has-patch has-unit-tests
Comment:
Thanks for taking a look, @adamsilverstein & for pointing me at #43316.
> it would be great to have something like this built into the core
autosave endpoint.
+1. It looks like `WP_REST_Autosaves_Controller::create_item` is in sync
w/ Gutenberg -- I'll follow up w/ a PR there so we can see the usage in
action a bit.
The
[https://core.trac.wordpress.org/attachment/ticket/44786/44786.withtests.patch
latest patch] introduces a new test to cover the filter.
----
@jorbin Thanks for
[https://wordpress.slack.com/archives/C02RQBWTW/p1534365403000100 the
suggestions].
I inverted the filter, chose a different filter name that is more in line
with the rest of the surrounding code, & included the `$post_id` in the
filter application.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44786#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list