Changes between Initial Version and Version 7 of Ticket #29276
- Timestamp:
- 02/23/2015 04:51:42 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #29276
- Property Keywords needs-patch added
-
Ticket #29276 – Description
initial v7 1 1 It would be great if the revision management functionality could include a way to preview any revision. From a quick look at the source code, wp-includes/revision.php declares a function called 2 2 {{{ 3 3 _set_preview($post) 4 4 }}} 5 5 By default it loads the most recent autosave with: 6 6 {{{ 7 7 $preview = wp_get_post_autosave($post->ID); 8 8 }}} 9 9 I would like to propose that that line be changed into: 10 10 {{{ 11 11 $preview = !empty($_GET['preview_id'])?get_post($_GET['preview_id']):wp_get_post_autosave($post->ID); 12 13 The nonce has already been verified in _show_post_preview(), so there should be no security implications of this change.12 }}} 13 The nonce has already been verified in `_show_post_preview()`, so there should be no security implications of this change. 14 14 15 15 With this change, the Revisions meta box (Edit Post screen) could display a "preview" icon/link that includes the appropriate nonce and does the same thing as the main "Preview" button.