Preview fixes: different method of showing previews for published posts, now uses the proper templates. Fixes #8052

git-svn-id: https://develop.svn.wordpress.org/trunk@9509 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2008-11-04 13:00:12 +00:00
parent 9f54a77081
commit 7d45802347
5 changed files with 40 additions and 38 deletions
+1 -11
View File
@@ -223,17 +223,7 @@ case 'delete':
case 'preview':
check_admin_referer( 'autosave', 'autosavenonce' );
$id = post_preview();
if ( is_wp_error($id) )
wp_die( $id->get_error_message() );
if ( $_POST['post_status'] == 'draft' ) {
$url = get_option('home') . '/?p=' . $id . '&preview=true';
} else {
$nonce = wp_create_nonce('post_preview_' . $id);
$url = get_option('home') . '/?wp_preview=' . $id . '&preview_nonce=' . $nonce;
}
$url = post_preview();
wp_redirect($url);
exit();