// 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.' );
$_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;
break;
case 'preview':
- check_admin_referer( 'autosave', 'autosavenonce' );
+ check_admin_referer( 'update-post_' . $post_id );
$url = post_preview();