From ecab3c353580393a8a02374ce0580478f1962501 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 19 Mar 2014 05:49:14 +0000 Subject: [PATCH] Remove two new strings from post_preview(). see #25272, #27453. Built from https://develop.svn.wordpress.org/trunk@27612 git-svn-id: http://core.svn.wordpress.org/trunk@27455 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/post.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 8fa5cb9e42..030be77d26 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -1379,11 +1379,13 @@ function post_preview() { $post_ID = (int) $_POST['post_ID']; $_POST['ID'] = $post_ID; - if ( ! $post = get_post( $post_ID ) ) - wp_die( __('You attempted to preview a non existing item.') ); + if ( ! $post = get_post( $post_ID ) ) { + wp_die( __( 'You are not allowed to edit this post.' ) ); + } - if ( ! current_user_can( 'edit_post', $post->ID ) ) - wp_die( __('You are not allowed to preview this item.') ); + if ( ! current_user_can( 'edit_post', $post->ID ) ) { + wp_die( __( 'You are not allowed to edit this post.' ) ); + } $is_autosave = false;