WordPress.org

Make WordPress Core

Ticket #19095: 19095.diff

File 19095.diff, 1.6 KB (added by nacin, 7 years ago)
  • wp-admin/includes/dashboard.php

     
    550550
    551551                <p class="submit">
    552552                        <input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" />
    553                         <input type="hidden" name="quickpress_post_ID" value="<?php echo $post_ID; ?>" />
     553                        <input type="hidden" name="post_ID" value="<?php echo $post_ID; ?>" />
    554554                        <input type="hidden" name="post_type" value="post" />
    555555                        <?php wp_nonce_field('add-post'); ?>
    556556                        <?php submit_button( __( 'Save Draft' ), 'button', 'save', false, array( 'id' => 'save-post', 'tabindex'=> 4 ) ); ?>
  • wp-admin/post.php

     
    2020        $post_id = $post_ID = (int) $_GET['post'];
    2121elseif ( isset( $_POST['post_ID'] ) )
    2222        $post_id = $post_ID = (int) $_POST['post_ID'];
    23  else
     23else
    2424        $post_id = $post_ID = 0;
    2525
    2626$post = $post_type = $post_type_object = null;
     
    102102        if ( 'post-quickpress-publish' == $action || 'post-quickpress-save' == $action ) {
    103103                $_POST['comment_status'] = get_option('default_comment_status');
    104104                $_POST['ping_status'] = get_option('default_ping_status');
    105         }
    106 
    107         if ( !empty( $_POST['quickpress_post_ID'] ) ) {
    108                 $_POST['post_ID'] = (int) $_POST['quickpress_post_ID'];
    109105                $post_id = edit_post();
    110106        } else {
    111107                $post_id = 'postajaxpost' == $action ? edit_post() : write_post();