]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/post.php
WordPress 3.9
[autoinstalls/wordpress.git] / wp-admin / post.php
index a4f5cc7408d27e99bb1f79fbf3d36b4f474fc3cc..f378c22061a7763ec26c56d5c0e97ab69c37e052 100644 (file)
@@ -106,6 +106,10 @@ case 'post-quickdraft-save':
        // Check nonce and capabilities
        $nonce = $_REQUEST['_wpnonce'];
        $error_msg = false;
+
+       // For output of the quickdraft dashboard widget
+       require_once ABSPATH . 'wp-admin/includes/dashboard.php';
+
        if ( ! wp_verify_nonce( $nonce, 'add-post' ) )
                $error_msg = __( 'Unable to submit this form, please refresh and try again.' );
 
@@ -122,8 +126,6 @@ case 'post-quickdraft-save':
        $_POST['ping_status'] = get_option( 'default_ping_status' );
 
        edit_post();
-       // output the quickdraft dashboard widget
-       require_once(ABSPATH . 'wp-admin/includes/dashboard.php');
        wp_dashboard_quick_press();
        exit;
        break;
@@ -307,7 +309,7 @@ case 'delete':
        break;
 
 case 'preview':
-       check_admin_referer( 'autosave', 'autosavenonce' );
+       check_admin_referer( 'update-post_' . $post_id );
 
        $url = post_preview();