Ticket #12859: preview-blank.diff
File preview-blank.diff, 1.2 KB (added by , 15 years ago) |
---|
-
wp-admin/includes/post.php
1284 1284 */ 1285 1285 function post_preview() { 1286 1286 1287 $post_ID = (int) $_POST['post_ID']; 1288 if ( $post_ID < 1 ) 1287 if ( isset( $_POST['auto_draft'] ) && '1' == $_POST['auto_draft'] ) 1289 1288 wp_die( __('Preview not available. Please save as a draft first.') ); 1290 1289 1291 1290 if ( isset($_POST['catslist']) ) … … 1297 1296 if ( $_POST['post_type'] == 'page' || empty($_POST['post_category']) ) 1298 1297 unset($_POST['post_category']); 1299 1298 1299 $post_ID = (int) $_POST['post_ID']; 1300 1300 $_POST['ID'] = $post_ID; 1301 1301 $post = get_post($post_ID); 1302 1302 -
wp-includes/js/autosave.dev.js
144 144 145 145 function autosave_update_post_ID( postID ) { 146 146 if ( !isNaN(postID) && postID > 0 ) { 147 if ( postID == parseInt(jQuery('#post_ID').val(), 10) ) { return; } // no need to do this more than once148 147 notSaved = false; 149 148 autosave_enable_buttons(); 150 149 jQuery('#delete-action a.submitdelete').fadeIn();