diff --git a/src/wp-admin/post.php b/src/wp-admin/post.php index 3df1c5fc6e..f378c22061 100644 --- a/src/wp-admin/post.php +++ b/src/wp-admin/post.php @@ -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;