Skip to:
Content

bbPress.org

Changes between Initial Version and Version 1 of Ticket #3389, comment 4


Ignore:
Timestamp:
11/09/2020 07:49:11 PM (11 months ago)
Author:
johnjamesjacoby
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3389, comment 4

    initial v1  
    44
    55The problem is that, at least for bbPress, WordPress revisions should not be saved ''after'' updates, but ''before''. By saving them afterwards, there isn't a way to get ''ahead'' of the update to grab the old post content and store it. Hence, we end up with this off-by-one scenario where that first revision is always lost, either from the original topic/reply, or the first edit to it.
     6
     7See the PHP Doc for `wp_save_post_revision()`:
     8
     9{{{
     10 * Creates a revision for the current version of a post.
     11 *
     12 * Typically used immediately after a post update, as every update is a revision,
     13 * and the most recent revision always matches the current post.
     14}}}
    615
    716My revised patch takes what I learned from your ticket and patch, and moves some existing code around (with improvements) so that revisions simply always get saved. Yay!