Don't allow previewing auto-draft. Props duck_. fixes #12859
git-svn-id: http://svn.automattic.com/wordpress/trunk@14643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
23e3b38d4f
commit
c4aca99445
|
@ -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']) )
|
||||
|
|
Loading…
Reference in New Issue