Don't allow previewing auto-draft. Props duck_. fixes #12859

git-svn-id: https://develop.svn.wordpress.org/trunk@14643 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-05-14 18:30:43 +00:00
parent c5ef0f8fc5
commit 3ed5168fbe

View File

@ -1283,7 +1283,8 @@ function wp_create_post_autosave( $post_id ) {
function post_preview() {
$post_ID = (int) $_POST['post_ID'];
if ( $post_ID < 1 )
$status = get_post_status( $post_ID );
if ( 'auto-draft' == $status )
wp_die( __('Preview not available. Please save as a draft first.') );
if ( isset($_POST['catslist']) )