Remove two new strings from post_preview().
see #25272, #27453. git-svn-id: https://develop.svn.wordpress.org/trunk@27612 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
877e12ee33
commit
d3a873840e
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user