[wp-trac] [WordPress Trac] #43316: REST API: Support autosaves

WordPress Trac noreply at wordpress.org
Sun Mar 11 16:25:00 UTC 2018


#43316: REST API: Support autosaves
-------------------------------------------------+-------------------------
 Reporter:  kraftbj                              |       Owner:
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  5.0
Component:  REST API                             |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing needs-unit-  |     Focuses:  rest-api
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by azaozz):

 As we are on the subject of autosaves, thinking we can (finally) add the
 enhancement of creating a revision when the autosave data is significantly
 different. This will cover editing draft posts where the user doesn't do
 "Save Draft" often enough, and an error or a crash may send an empty
 autosave. Currently we would wipe the post in these cases without a way to
 recover it (as autosaves cannot guess user intentions).

 This is still going to be an "automatic" decision. We will need a good
 method of determining when the post data is sufficiently different,
 `strlen()` may work but some basic diff that counts the changes would be
 better.

 Basically we will "redirect" a draft autosave requests to so "full" save
 (update the post + create a revision) when the content of the autosave is
 sufficiently different from the last draft.

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


More information about the wp-trac mailing list