From 1ec2c3c3e908e6063c86a3f80f93a4318c1c2341 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 1 Nov 2011 21:15:18 +0000 Subject: [PATCH] No need to setup current screen in wp-fullscreen-save-post handler. see #18785 git-svn-id: https://develop.svn.wordpress.org/trunk@19106 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/admin-ajax.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index 0fbf0d52f8..0ea02a98a9 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -1518,19 +1518,13 @@ case 'wp-fullscreen-save-post' : $post = get_post($post_id); if ( $post ) { $post_type_object = get_post_type_object($post->post_type); - if ( $post_type_object ) { + if ( $post_type_object ) $post_type = $post->post_type; - $current_screen->post_type = $post->post_type; - $current_screen->id = $current_screen->post_type; - } } } elseif ( isset($_POST['post_type']) ) { $post_type_object = get_post_type_object($_POST['post_type']); - if ( $post_type_object ) { + if ( $post_type_object ) $post_type = $post_type_object->name; - $current_screen->post_type = $post_type; - $current_screen->id = $current_screen->post_type; - } } check_ajax_referer('update-' . $post_type . '_' . $post_id, '_wpnonce');