+ if ( 'post-quickpress-publish' == $action )
+ $_POST['publish'] = 'publish'; // tell write_post() to publish
+
+ if ( 'post-quickpress-publish' == $action || 'post-quickpress-save' == $action ) {
+ $_POST['comment_status'] = get_option('default_comment_status');
+ $_POST['ping_status'] = get_option('default_ping_status');
+ }
+
+ if ( !empty( $_POST['quickpress_post_ID'] ) ) {
+ $_POST['post_ID'] = (int) $_POST['quickpress_post_ID'];
+ $post_ID = edit_post();
+ } else {
+ $post_ID = 'postajaxpost' == $action ? edit_post() : write_post();
+ }
+
+ if ( 0 === strpos( $action, 'post-quickpress' ) ) {
+ $_POST['post_ID'] = $post_ID;
+ // output the quickpress dashboard widget
+ require_once(ABSPATH . 'wp-admin/includes/dashboard.php');
+ wp_dashboard_quick_press();
+ exit;
+ }