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

WordPress Trac noreply at wordpress.org
Fri Mar 23 12:48:05 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 aduth):

 >If the autosave content is significantly different, create a revision. I
 used a value of 250 (characters)

 "Significantly different" is a hard thing to define (and the target of
 many an algorithm). I could write a haiku, blast it away and start from
 scratch, and it's surely significantly different, though doesn't qualify
 by this definition. This is where @azaozz's suggestion of percentage
 difference may work better (though still not so much for my haiku
 destruction). As implemented, it's based on the addition of characters
 from the new content, meaning also that eliminating content doesn't
 qualify (absolute difference). Finally, if we follow-through with this
 metric, would we want these thresholds to be filterable?

 Related:

 - http://www.php.net/manual/en/function.similar-text.php
 - http://us1.php.net/manual/en/function.levenshtein.php

 (To prior notes of performance, both of these may have poor performance
 characteristics for comparing long texts)

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


More information about the wp-trac mailing list