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.' );
+ if ( ! current_user_can( 'edit_posts' ) ) {
+ exit;
+ }
if ( $error_msg )
return wp_dashboard_quick_press( $error_msg );