From b05fb903acdd1ac845b19f2f515f0bf3eaaf31f0 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 15 Nov 2013 22:28:57 +0000 Subject: [PATCH] Revert these action blocks in wp-admin/post.php to their pre-[26144] state. see #25824. git-svn-id: https://develop.svn.wordpress.org/trunk@26231 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/post.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/wp-admin/post.php b/src/wp-admin/post.php index c6d4f81da7..e96982b731 100644 --- a/src/wp-admin/post.php +++ b/src/wp-admin/post.php @@ -118,18 +118,9 @@ case 'post-quickdraft-save': case 'postajaxpost': case 'post': - // Check nonce and capabilities - $nonce = $_REQUEST['_wpnonce']; - $error_msg = false; - if ( ! wp_verify_nonce( $nonce, 'add-post' ) ) - $error_msg = 'Unable to submit this form, please refresh and try again.'; - - if ( ! current_user_can( 'edit_posts' ) ) - $error_msg = "Oops, you don't have access to add new drafts."; - + check_admin_referer( 'add-' . $post_type ); $post_id = 'postajaxpost' == $action ? edit_post() : write_post(); - - redirect_post($post_id); + redirect_post( $post_id ); exit(); break;