Commit Graph

14 Commits

Author SHA1 Message Date
Andrew Ozz
51826e4cde Revisions: remove the new _wp_last_revision_matches_current_post(), can be replaced by a simple revisions version check. Fixes #23913
git-svn-id: http://core.svn.wordpress.org/trunk@23885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-02 19:39:48 +00:00
Sergey Biryukov
90dd5c458e Make sure the autosave post exists before getting its meta. props kovshenin. fixes #23539.
git-svn-id: http://core.svn.wordpress.org/trunk@23867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-29 16:37:46 +00:00
Sergey Biryukov
48f5701214 Move _show_post_preview() back next to _set_preview(). see #23539.
git-svn-id: http://core.svn.wordpress.org/trunk@23866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-29 16:31:33 +00:00
Mark Jaquith
1127ad37a8 Use the revisioned post format metadata when previewing.
fixes #23539. props kovshenin.

git-svn-id: http://core.svn.wordpress.org/trunk@23862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-29 12:08:42 +00:00
Mark Jaquith
8b3f9ab751 Revision our post format postmeta.
props kovshenin, WraithKenny. see #20564.

git-svn-id: http://core.svn.wordpress.org/trunk@23859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-29 10:37:44 +00:00
Andrew Ozz
7b831aabd3 Post revisions:
- Always update the revision version when updating post authors.
- Check if revisions have been updated and return early.
- Update the revisions by direct query to avoid resetting post_modified.
- Fix a bug where we may be comparing with an autosave but need to compare with the latest revision.

Fixes #16215.

git-svn-id: http://core.svn.wordpress.org/trunk@23849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-29 05:28:44 +00:00
Mark Jaquith
cccb2939db Fix a longstanding "off by one" revision authorship bug.
* Fixes old revision data on the fly when you open a post for editing.
* Uses post_name of revisions to store a post version number (-v1), so we know what has been fixed.
* Latest version should also have a revision stored, whereas before it did not.

props adamsilverstein, mdawaffe. fixes #16215.

git-svn-id: http://core.svn.wordpress.org/trunk@23823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-27 20:21:38 +00:00
Mark Jaquith
acfeb6f20f Take revision control out of the realm of a pure constant. Make it filterable.
* New filter: wp_revisions_to_keep

props ethitter, SergeyBiryukov. fixes #22289.

git-svn-id: http://core.svn.wordpress.org/trunk@23818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-27 18:11:56 +00:00
Mark Jaquith
576e487663 Minor revisions PHP reorg, code cleanup, restores _post_restored_from functionality.
props adamsilverstein. see #23497

git-svn-id: http://core.svn.wordpress.org/trunk@23811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-27 11:56:28 +00:00
Peter Westwood
9d6988a221 Revisions: UI Update.
* Refines the UI to make it clearer and easier to use
* Introduces weighted tickmarks
* Fixes comparison bugs.

See #23497 props adamsilverstein


git-svn-id: http://core.svn.wordpress.org/trunk@23769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-21 15:54:11 +00:00
Andrew Ozz
30ad180d6a Create one autosave per user rather than a single autosave for all users. Remove unused code from autosave.js and wp_ajax_autosave(). See #23665.
git-svn-id: http://core.svn.wordpress.org/trunk@23735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-16 21:15:43 +00:00
Ryan Boren
315bfb019a Use wp_unslash() instead of stripslashes() and stripslashes_deep(). Use wp_slash() instead of add_magic_quotes().
see #21767


git-svn-id: http://core.svn.wordpress.org/trunk@23594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-03 21:11:40 +00:00
Ryan Boren
43a7e695e9 Revert 23416, 23419, 23445 except for wp_reset_vars() changes. We are going a different direction with the slashing cleanup, so resetting to a clean slate. see #21767
git-svn-id: http://core.svn.wordpress.org/trunk@23554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 16:28:40 +00:00
Andrew Nacin
b88b1c1f53 Move revisions/autosave and post format functions from wp-includes/post.php into revision.php and post-formats.php.
git-svn-id: http://core.svn.wordpress.org/trunk@23466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-21 21:24:34 +00:00