WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #43760, comment 3


Ignore:
Timestamp:
06/26/2019 08:12:09 AM (2 years ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #43760, comment 3

    initial v1  
    33However counting lines may be somehow problematic. It is possible to have all of post_content on one line which would mean lots of revisions with minimal changes. Thinking we should be counting something else, perhaps number of changed places + size of changes, or just added + deleted characters.
    44
    5 Also thinking it would be good to keep the "sliding scale" based on string length of post_content. So for longer posts the percentage of changes would be less. That will catch vases like having a post with 10 paragraphs and adding another one, vs. having a post with 3 paragraphs and editing few words in one of them.
     5Also thinking it would be good to keep the "sliding scale" based on string length of post_content. So for longer posts the percentage of changes would be less. That will catch cases like having a post with 10 paragraphs and adding another one (we want a revision), vs. having a post with 3 paragraphs and editing few words in one of them (we don't want a revision).
    66
    77Also perhaps the `wp_create_revision_for_autosave_threshold` that filters the percentage of changes needed to trigger a revision may be a bit of overkill? Plugins that would want to look there will be able to do everything they need by using the `wp_create_revision_for_autosave` filter.