[wp-hackers] opinions about post versioning

Will Anderson will at itsananderson.com
Sat Mar 20 12:40:31 UTC 2010

I'm not sure I actually care for the first idea. Once a post is saved
(whether it's published or not), you begin editing it. Makes sense to do
that in edit.php. I haven't looked at the source, so I could quite easily be
wrong, but my guess would be that you're gonna have to duplicate logic from
edit.php into post.php to do this.

The second idea makes tons of sense though. There's no need to save content
when it's exactly the same.

As an extension to this idea, WordPress stores the entire post content in
each revision, right? Since it already has diff code builtin for revision
comparison, would it be terribly difficult to store post revisions as diffs
in the database? What I'm thinking is that you'd have a full version of the
latest revision, then diffs going back to the original revision. This would
add a bit of complication to the revision storage/retrieval codebase, but it
might still be worth considering.

More information about the wp-hackers mailing list