Changes between Initial Version and Version 1 of Ticket #3389, comment 4
- Timestamp:
- 11/09/2020 07:49:11 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #3389, comment 4
initial v1 4 4 5 5 The 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 7 See 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 }}} 6 15 7 16 My 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!