wp_dashboard_quick_press

The timeline below displays how wordpress function wp_dashboard_quick_press has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.4

/**
 * Displays the Quick Draft widget.
 *
 * @since 3.8.0
 *
 * @global int $post_ID
 *
 * @param string|false $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    // Check if a new auto-draft (= no new post_ID) is needed or if the old can be used.
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID.
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || 'auto-draft' !== $post->post_status) {
            // auto-draft doesn't exist anymore.
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID.
        } else {
            $post->post_title = '';
            // Remove the auto draft title.
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id)), true)) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID.
        }
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        wp_admin_notice($error_msg, array('additional_classes' => array('error')));
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label for="title">
				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label for="content"><?php 
    _e('Content');
    ?></label>
			<textarea name="content" id="content" placeholder="<?php 
    esc_attr_e('What&#8217;s on your mind?');
    ?>" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 6.3

/**
 * Displays the Quick Draft widget.
 *
 * @since 3.8.0
 *
 * @global int $post_ID
 *
 * @param string|false $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    // Check if a new auto-draft (= no new post_ID) is needed or if the old can be used.
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID.
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || 'auto-draft' !== $post->post_status) {
            // auto-draft doesn't exist anymore.
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID.
        } else {
            $post->post_title = '';
            // Remove the auto draft title.
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id)), true)) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID.
        }
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label for="title">
				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label for="content"><?php 
    _e('Content');
    ?></label>
			<textarea name="content" id="content" placeholder="<?php 
    esc_attr_e('What&#8217;s on your mind?');
    ?>" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 5.8

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @global int $post_ID
 *
 * @param string|false $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    // Check if a new auto-draft (= no new post_ID) is needed or if the old can be used.
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID.
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || 'auto-draft' !== $post->post_status) {
            // auto-draft doesn't exist anymore.
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID.
        } else {
            $post->post_title = '';
            // Remove the auto draft title.
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id)), true)) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID.
        }
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label for="title">
				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label for="content"><?php 
    _e('Content');
    ?></label>
			<textarea name="content" id="content" placeholder="<?php 
    esc_attr_e('What&#8217;s on your mind?');
    ?>" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 5.7

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @global int $post_ID
 *
 * @param string|false $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID.
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || 'auto-draft' !== $post->post_status) {
            // auto-draft doesn't exist anymore.
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID.
        } else {
            $post->post_title = '';
            // Remove the auto draft title.
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id)), true)) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID.
        }
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label for="title">
				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label for="content"><?php 
    _e('Content');
    ?></label>
			<textarea name="content" id="content" placeholder="<?php 
    esc_attr_e('What&#8217;s on your mind?');
    ?>" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 5.5

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @global int $post_ID
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID.
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || 'auto-draft' !== $post->post_status) {
            // auto-draft doesn't exist anymore.
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID.
        } else {
            $post->post_title = '';
            // Remove the auto draft title.
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id)), true)) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID.
        }
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label for="title">
				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label for="content"><?php 
    _e('Content');
    ?></label>
			<textarea name="content" id="content" placeholder="<?php 
    esc_attr_e('What&#8217;s on your mind?');
    ?>" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 5.4

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @global int $post_ID
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID.
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || 'auto-draft' !== $post->post_status) {
            // auto-draft doesn't exist anymore.
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID.
        } else {
            $post->post_title = '';
            // Remove the auto draft title.
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id)))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID.
        }
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label for="title">
				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label for="content"><?php 
    _e('Content');
    ?></label>
			<textarea name="content" id="content" placeholder="<?php 
    esc_attr_e('What&#8217;s on your mind?');
    ?>" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 5.2

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @global int $post_ID
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id)))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        }
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label for="title">
				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label for="content"><?php 
    _e('Content');
    ?></label>
			<textarea name="content" id="content" placeholder="<?php 
    esc_attr_e('What&#8217;s on your mind?');
    ?>" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 5.1

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @global int $post_ID
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id)))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        }
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 4.8

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @global int $post_ID
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id)))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 4.3

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @global int $post_ID
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: .20

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 2.2

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: .10

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 4.2

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 1.6

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 1.5

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: .40

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 1.4

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: .30

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 1.3

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: .20

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 1.2

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: .10

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 4.1

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 0.6

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 0.4

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: .30

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 0.3

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: .20

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 0.2

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: .10

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 4.0

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" autocomplete="off"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 9.7

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 9.2

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: .10

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 3.9

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text">

				<?php 
    /** This filter is documented in wp-admin/edit-form-advanced.php */
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?>
			</label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 8.9

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php 
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?></label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 8.4

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php 
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?></label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: .30

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php 
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?></label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 8.3

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php 
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?></label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: .20

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php 
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?></label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 8.2

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php 
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?></label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: .10

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php 
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?></label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 3.8

/**
 * The Quick Draft widget display and creation of drafts.
 *
 * @since 3.8.0
 *
 * @param string $error_msg Optional. Error message. Default false.
 */
function wp_dashboard_quick_press($error_msg = false)
{
    global $post_ID;
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">

		<?php 
    if ($error_msg) {
        ?>
		<div class="error"><?php 
        echo $error_msg;
        ?></div>
		<?php 
    }
    ?>

		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php 
    echo apply_filters('enter_title_here', __('Title'), $post);
    ?></label>
			<input type="text" name="post_title" id="title" autocomplete="off" />
		</div>

		<div class="textarea-wrap" id="description-wrap">
			<label class="screen-reader-text prompt" for="content" id="content-prompt-text"><?php 
    _e('What&#8217;s on your mind?');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"></textarea>
		</div>

		<p class="submit">
			<input type="hidden" name="action" id="quickpost-action" value="post-quickdraft-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'primary', 'save', false, array('id' => 'save-post'));
    ?>
			<br class="clear" />
		</p>

	</form>
	<?php 
    wp_dashboard_recent_drafts();
}

WordPress Version: 7.9

function wp_dashboard_quick_press()
{
    global $post_ID;
    $drafts = false;
    if ('post' === strtolower($_SERVER['REQUEST_METHOD']) && isset($_POST['action']) && 0 === strpos($_POST['action'], 'post-quickpress') && (int) $_POST['post_ID']) {
        $view = get_permalink($_POST['post_ID']);
        $edit = esc_url(get_edit_post_link($_POST['post_ID']));
        if ('post-quickpress-publish' == $_POST['action']) {
            if (current_user_can('publish_posts')) {
                printf('<div class="updated"><p>' . __('Post published. <a href="%s">View post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url($view), $edit);
            } else {
                printf('<div class="updated"><p>' . __('Post submitted. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url(add_query_arg('preview', 1, $view)), $edit);
            }
        } else {
            printf('<div class="updated"><p>' . __('Draft saved. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url(add_query_arg('preview', 1, $view)), $edit);
            $drafts_query = new WP_Query(array('post_type' => 'post', 'post_status' => 'draft', 'author' => $GLOBALS['current_user']->ID, 'posts_per_page' => 1, 'orderby' => 'modified', 'order' => 'DESC'));
            if ($drafts_query->posts) {
                $drafts =& $drafts_query->posts;
            }
        }
        printf('<p class="easy-blogging">' . __('You can also try %s, easy blogging from anywhere on the Web.') . '</p>', '<a href="' . esc_url(admin_url('tools.php')) . '">' . __('Press This') . '</a>');
        $_REQUEST = array();
        // hack for get_default_post_to_edit()
    }
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    $media_settings = array('id' => $post->ID, 'nonce' => wp_create_nonce('update-post_' . $post->ID));
    if (current_theme_supports('post-thumbnails', $post->post_type) && post_type_supports($post->post_type, 'thumbnail')) {
        $featured_image_id = get_post_meta($post->ID, '_thumbnail_id', true);
        $media_settings['featuredImageId'] = $featured_image_id ? $featured_image_id : -1;
    }
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press">
		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php 
    _e('Enter title here');
    ?></label>
			<input type="text" name="post_title" id="title" autocomplete="off" value="<?php 
    echo esc_attr($post->post_title);
    ?>" />
		</div>

		<?php 
    if (current_user_can('upload_files')) {
        ?>
		<div id="wp-content-wrap" class="wp-editor-wrap hide-if-no-js wp-media-buttons">
			<?php 
        do_action('media_buttons', 'content');
        ?>
		</div>
		<?php 
    }
    ?>

		<div class="textarea-wrap">
			<label class="screen-reader-text" for="content"><?php 
    _e('Content');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"><?php 
    echo esc_textarea($post->post_content);
    ?></textarea>
		</div>

		<script type="text/javascript">
		edCanvas = document.getElementById('content');
		edInsertContent = null;
		<?php 
    if ($_POST) {
        ?>
		wp.media.editor.remove('content');
		wp.media.view.settings.post = <?php 
        echo json_encode($media_settings);
        // big juicy hack. 
        ?>;
		wp.media.editor.add('content');
		<?php 
    }
    ?>
		</script>

		<div class="input-text-wrap" id="tags-input-wrap">
			<label class="screen-reader-text prompt" for="tags-input" id="tags-input-prompt-text"><?php 
    _e('Tags (separate with commas)');
    ?></label>
			<input type="text" name="tags_input" id="tags-input" value="<?php 
    echo get_tags_to_edit($post->ID);
    ?>" />
		</div>

		<p class="submit">
			<span id="publishing-action">
				<input type="submit" name="publish" id="publish" accesskey="p" class="button-primary" value="<?php 
    current_user_can('publish_posts') ? esc_attr_e('Publish') : esc_attr_e('Submit for Review');
    ?>" />
				<span class="spinner"></span>
			</span>
			<input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'button', 'save', false, array('id' => 'save-post'));
    ?>
			<input type="reset" value="<?php 
    esc_attr_e('Reset');
    ?>" class="button" />
			<br class="clear" />
		</p>

	</form>

<?php 
    if ($drafts) {
        wp_dashboard_recent_drafts($drafts);
    }
}

WordPress Version: 7.5

function wp_dashboard_quick_press()
{
    global $post_ID;
    $drafts = false;
    if ('post' === strtolower($_SERVER['REQUEST_METHOD']) && isset($_POST['action']) && 0 === strpos($_POST['action'], 'post-quickpress') && (int) $_POST['post_ID']) {
        $view = get_permalink($_POST['post_ID']);
        $edit = esc_url(get_edit_post_link($_POST['post_ID']));
        if ('post-quickpress-publish' == $_POST['action']) {
            if (current_user_can('publish_posts')) {
                printf('<div class="updated"><p>' . __('Post published. <a href="%s">View post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url($view), $edit);
            } else {
                printf('<div class="updated"><p>' . __('Post submitted. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url(add_query_arg('preview', 1, $view)), $edit);
            }
        } else {
            printf('<div class="updated"><p>' . __('Draft saved. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url(add_query_arg('preview', 1, $view)), $edit);
            $drafts_query = new WP_Query(array('post_type' => 'post', 'post_status' => 'draft', 'author' => $GLOBALS['current_user']->ID, 'posts_per_page' => 1, 'orderby' => 'modified', 'order' => 'DESC'));
            if ($drafts_query->posts) {
                $drafts =& $drafts_query->posts;
            }
        }
        printf('<p class="easy-blogging">' . __('You can also try %s, easy blogging from anywhere on the Web.') . '</p>', '<a href="' . esc_url(admin_url('tools.php')) . '">' . __('Press This') . '</a>');
        $_REQUEST = array();
        // hack for get_default_post_to_edit()
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    $media_settings = array('id' => $post->ID, 'nonce' => wp_create_nonce('update-post_' . $post->ID));
    if (current_theme_supports('post-thumbnails', $post->post_type) && post_type_supports($post->post_type, 'thumbnail')) {
        $featured_image_id = get_post_meta($post->ID, '_thumbnail_id', true);
        $media_settings['featuredImageId'] = $featured_image_id ? $featured_image_id : -1;
    }
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press">
		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php 
    _e('Enter title here');
    ?></label>
			<input type="text" name="post_title" id="title" autocomplete="off" value="<?php 
    echo esc_attr($post->post_title);
    ?>" />
		</div>

		<?php 
    if (current_user_can('upload_files')) {
        ?>
		<div id="wp-content-wrap" class="wp-editor-wrap hide-if-no-js wp-media-buttons">
			<?php 
        do_action('media_buttons', 'content');
        ?>
		</div>
		<?php 
    }
    ?>

		<div class="textarea-wrap">
			<label class="screen-reader-text" for="content"><?php 
    _e('Content');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"><?php 
    echo esc_textarea($post->post_content);
    ?></textarea>
		</div>

		<script type="text/javascript">
		edCanvas = document.getElementById('content');
		edInsertContent = null;
		<?php 
    if ($_POST) {
        ?>
		wp.media.editor.remove('content');
		wp.media.view.settings.post = <?php 
        echo json_encode($media_settings);
        // big juicy hack. 
        ?>;
		wp.media.editor.add('content');
		<?php 
    }
    ?>
		</script>

		<div class="input-text-wrap" id="tags-input-wrap">
			<label class="screen-reader-text prompt" for="tags-input" id="tags-input-prompt-text"><?php 
    _e('Tags (separate with commas)');
    ?></label>
			<input type="text" name="tags_input" id="tags-input" value="<?php 
    echo get_tags_to_edit($post->ID);
    ?>" />
		</div>

		<p class="submit">
			<span id="publishing-action">
				<input type="submit" name="publish" id="publish" accesskey="p" class="button-primary" value="<?php 
    current_user_can('publish_posts') ? esc_attr_e('Publish') : esc_attr_e('Submit for Review');
    ?>" />
				<span class="spinner"></span>
			</span>
			<input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'button', 'save', false, array('id' => 'save-post'));
    ?>
			<input type="reset" value="<?php 
    esc_attr_e('Reset');
    ?>" class="button" />
			<br class="clear" />
		</p>

	</form>

<?php 
    if ($drafts) {
        wp_dashboard_recent_drafts($drafts);
    }
}

WordPress Version: .40

function wp_dashboard_quick_press()
{
    global $post_ID;
    $drafts = false;
    if ('post' === strtolower($_SERVER['REQUEST_METHOD']) && isset($_POST['action']) && 0 === strpos($_POST['action'], 'post-quickpress') && (int) $_POST['post_ID']) {
        $view = get_permalink($_POST['post_ID']);
        $edit = esc_url(get_edit_post_link($_POST['post_ID']));
        if ('post-quickpress-publish' == $_POST['action']) {
            if (current_user_can('publish_posts')) {
                printf('<div class="updated"><p>' . __('Post published. <a href="%s">View post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url($view), $edit);
            } else {
                printf('<div class="updated"><p>' . __('Post submitted. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url(add_query_arg('preview', 1, $view)), $edit);
            }
        } else {
            printf('<div class="updated"><p>' . __('Draft saved. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url(add_query_arg('preview', 1, $view)), $edit);
            $drafts_query = new WP_Query(array('post_type' => 'post', 'post_status' => 'draft', 'author' => $GLOBALS['current_user']->ID, 'posts_per_page' => 1, 'orderby' => 'modified', 'order' => 'DESC'));
            if ($drafts_query->posts) {
                $drafts =& $drafts_query->posts;
            }
        }
        printf('<p class="easy-blogging">' . __('You can also try %s, easy blogging from anywhere on the Web.') . '</p>', '<a href="' . esc_url(admin_url('tools.php')) . '">' . __('Press This') . '</a>');
        $_REQUEST = array();
        // hack for get_default_post_to_edit()
    }
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    $media_settings = array('id' => $post->ID, 'nonce' => wp_create_nonce('update-post_' . $post->ID));
    if (current_theme_supports('post-thumbnails', $post->post_type) && post_type_supports($post->post_type, 'thumbnail')) {
        $featured_image_id = get_post_meta($post->ID, '_thumbnail_id', true);
        $media_settings['featuredImageId'] = $featured_image_id ? $featured_image_id : -1;
    }
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press">
		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php 
    _e('Enter title here');
    ?></label>
			<input type="text" name="post_title" id="title" autocomplete="off" value="<?php 
    echo esc_attr($post->post_title);
    ?>" />
		</div>

		<?php 
    if (current_user_can('upload_files')) {
        ?>
		<div id="wp-content-wrap" class="wp-editor-wrap hide-if-no-js wp-media-buttons">
			<?php 
        do_action('media_buttons', 'content');
        ?>
		</div>
		<?php 
    }
    ?>

		<div class="textarea-wrap">
			<label class="screen-reader-text" for="content"><?php 
    _e('Content');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"><?php 
    echo esc_textarea($post->post_content);
    ?></textarea>
		</div>

		<script type="text/javascript">
		edCanvas = document.getElementById('content');
		edInsertContent = null;
		<?php 
    if ($_POST) {
        ?>
		wp.media.editor.remove('content');
		wp.media.view.settings.post = <?php 
        echo json_encode($media_settings);
        // big juicy hack. 
        ?>;
		wp.media.editor.add('content');
		<?php 
    }
    ?>
		</script>

		<div class="input-text-wrap" id="tags-input-wrap">
			<label class="screen-reader-text prompt" for="tags-input" id="tags-input-prompt-text"><?php 
    _e('Tags (separate with commas)');
    ?></label>
			<input type="text" name="tags_input" id="tags-input" value="<?php 
    echo get_tags_to_edit($post->ID);
    ?>" />
		</div>

		<p class="submit">
			<span id="publishing-action">
				<input type="submit" name="publish" id="publish" accesskey="p" class="button-primary" value="<?php 
    current_user_can('publish_posts') ? esc_attr_e('Publish') : esc_attr_e('Submit for Review');
    ?>" />
				<span class="spinner"></span>
			</span>
			<input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'button', 'save', false, array('id' => 'save-post'));
    ?>
			<input type="reset" value="<?php 
    esc_attr_e('Reset');
    ?>" class="button" />
			<br class="clear" />
		</p>

	</form>

<?php 
    if ($drafts) {
        wp_dashboard_recent_drafts($drafts);
    }
}

WordPress Version: 7.4

function wp_dashboard_quick_press()
{
    global $post_ID;
    $drafts = false;
    if ('post' === strtolower($_SERVER['REQUEST_METHOD']) && isset($_POST['action']) && 0 === strpos($_POST['action'], 'post-quickpress') && (int) $_POST['post_ID']) {
        $view = get_permalink($_POST['post_ID']);
        $edit = esc_url(get_edit_post_link($_POST['post_ID']));
        if ('post-quickpress-publish' == $_POST['action']) {
            if (current_user_can('publish_posts')) {
                printf('<div class="updated"><p>' . __('Post published. <a href="%s">View post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url($view), $edit);
            } else {
                printf('<div class="updated"><p>' . __('Post submitted. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url(add_query_arg('preview', 1, $view)), $edit);
            }
        } else {
            printf('<div class="updated"><p>' . __('Draft saved. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url(add_query_arg('preview', 1, $view)), $edit);
            $drafts_query = new WP_Query(array('post_type' => 'post', 'post_status' => 'draft', 'author' => $GLOBALS['current_user']->ID, 'posts_per_page' => 1, 'orderby' => 'modified', 'order' => 'DESC'));
            if ($drafts_query->posts) {
                $drafts =& $drafts_query->posts;
            }
        }
        printf('<p class="easy-blogging">' . __('You can also try %s, easy blogging from anywhere on the Web.') . '</p>', '<a href="' . esc_url(admin_url('tools.php')) . '">' . __('Press This') . '</a>');
        $_REQUEST = array();
        // hack for get_default_post_to_edit()
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    $media_settings = array('id' => $post->ID, 'nonce' => wp_create_nonce('update-post_' . $post->ID));
    if (current_theme_supports('post-thumbnails', $post->post_type) && post_type_supports($post->post_type, 'thumbnail')) {
        $featured_image_id = get_post_meta($post->ID, '_thumbnail_id', true);
        $media_settings['featuredImageId'] = $featured_image_id ? $featured_image_id : -1;
    }
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press">
		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php 
    _e('Enter title here');
    ?></label>
			<input type="text" name="post_title" id="title" autocomplete="off" value="<?php 
    echo esc_attr($post->post_title);
    ?>" />
		</div>

		<?php 
    if (current_user_can('upload_files')) {
        ?>
		<div id="wp-content-wrap" class="wp-editor-wrap hide-if-no-js wp-media-buttons">
			<?php 
        do_action('media_buttons', 'content');
        ?>
		</div>
		<?php 
    }
    ?>

		<div class="textarea-wrap">
			<label class="screen-reader-text" for="content"><?php 
    _e('Content');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"><?php 
    echo esc_textarea($post->post_content);
    ?></textarea>
		</div>

		<script type="text/javascript">
		edCanvas = document.getElementById('content');
		edInsertContent = null;
		<?php 
    if ($_POST) {
        ?>
		wp.media.editor.remove('content');
		wp.media.view.settings.post = <?php 
        echo json_encode($media_settings);
        // big juicy hack. 
        ?>;
		wp.media.editor.add('content');
		<?php 
    }
    ?>
		</script>

		<div class="input-text-wrap" id="tags-input-wrap">
			<label class="screen-reader-text prompt" for="tags-input" id="tags-input-prompt-text"><?php 
    _e('Tags (separate with commas)');
    ?></label>
			<input type="text" name="tags_input" id="tags-input" value="<?php 
    echo get_tags_to_edit($post->ID);
    ?>" />
		</div>

		<p class="submit">
			<span id="publishing-action">
				<input type="submit" name="publish" id="publish" accesskey="p" class="button-primary" value="<?php 
    current_user_can('publish_posts') ? esc_attr_e('Publish') : esc_attr_e('Submit for Review');
    ?>" />
				<span class="spinner"></span>
			</span>
			<input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'button', 'save', false, array('id' => 'save-post'));
    ?>
			<input type="reset" value="<?php 
    esc_attr_e('Reset');
    ?>" class="button" />
			<br class="clear" />
		</p>

	</form>

<?php 
    if ($drafts) {
        wp_dashboard_recent_drafts($drafts);
    }
}

WordPress Version: .30

function wp_dashboard_quick_press()
{
    global $post_ID;
    $drafts = false;
    if ('post' === strtolower($_SERVER['REQUEST_METHOD']) && isset($_POST['action']) && 0 === strpos($_POST['action'], 'post-quickpress') && (int) $_POST['post_ID']) {
        $view = get_permalink($_POST['post_ID']);
        $edit = esc_url(get_edit_post_link($_POST['post_ID']));
        if ('post-quickpress-publish' == $_POST['action']) {
            if (current_user_can('publish_posts')) {
                printf('<div class="updated"><p>' . __('Post published. <a href="%s">View post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url($view), $edit);
            } else {
                printf('<div class="updated"><p>' . __('Post submitted. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url(add_query_arg('preview', 1, $view)), $edit);
            }
        } else {
            printf('<div class="updated"><p>' . __('Draft saved. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url(add_query_arg('preview', 1, $view)), $edit);
            $drafts_query = new WP_Query(array('post_type' => 'post', 'post_status' => 'draft', 'author' => $GLOBALS['current_user']->ID, 'posts_per_page' => 1, 'orderby' => 'modified', 'order' => 'DESC'));
            if ($drafts_query->posts) {
                $drafts =& $drafts_query->posts;
            }
        }
        printf('<p class="easy-blogging">' . __('You can also try %s, easy blogging from anywhere on the Web.') . '</p>', '<a href="' . esc_url(admin_url('tools.php')) . '">' . __('Press This') . '</a>');
        $_REQUEST = array();
        // hack for get_default_post_to_edit()
    }
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    $media_settings = array('id' => $post->ID, 'nonce' => wp_create_nonce('update-post_' . $post->ID));
    if (current_theme_supports('post-thumbnails', $post->post_type) && post_type_supports($post->post_type, 'thumbnail')) {
        $featured_image_id = get_post_meta($post->ID, '_thumbnail_id', true);
        $media_settings['featuredImageId'] = $featured_image_id ? $featured_image_id : -1;
    }
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press">
		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php 
    _e('Enter title here');
    ?></label>
			<input type="text" name="post_title" id="title" autocomplete="off" value="<?php 
    echo esc_attr($post->post_title);
    ?>" />
		</div>

		<?php 
    if (current_user_can('upload_files')) {
        ?>
		<div id="wp-content-wrap" class="wp-editor-wrap hide-if-no-js wp-media-buttons">
			<?php 
        do_action('media_buttons', 'content');
        ?>
		</div>
		<?php 
    }
    ?>

		<div class="textarea-wrap">
			<label class="screen-reader-text" for="content"><?php 
    _e('Content');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"><?php 
    echo esc_textarea($post->post_content);
    ?></textarea>
		</div>

		<script type="text/javascript">
		edCanvas = document.getElementById('content');
		edInsertContent = null;
		<?php 
    if ($_POST) {
        ?>
		wp.media.editor.remove('content');
		wp.media.view.settings.post = <?php 
        echo json_encode($media_settings);
        // big juicy hack. 
        ?>;
		wp.media.editor.add('content');
		<?php 
    }
    ?>
		</script>

		<div class="input-text-wrap" id="tags-input-wrap">
			<label class="screen-reader-text prompt" for="tags-input" id="tags-input-prompt-text"><?php 
    _e('Tags (separate with commas)');
    ?></label>
			<input type="text" name="tags_input" id="tags-input" value="<?php 
    echo get_tags_to_edit($post->ID);
    ?>" />
		</div>

		<p class="submit">
			<span id="publishing-action">
				<input type="submit" name="publish" id="publish" accesskey="p" class="button-primary" value="<?php 
    current_user_can('publish_posts') ? esc_attr_e('Publish') : esc_attr_e('Submit for Review');
    ?>" />
				<span class="spinner"></span>
			</span>
			<input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'button', 'save', false, array('id' => 'save-post'));
    ?>
			<input type="reset" value="<?php 
    esc_attr_e('Reset');
    ?>" class="button" />
			<br class="clear" />
		</p>

	</form>

<?php 
    if ($drafts) {
        wp_dashboard_recent_drafts($drafts);
    }
}

WordPress Version: 7.3

function wp_dashboard_quick_press()
{
    global $post_ID;
    $drafts = false;
    if ('post' === strtolower($_SERVER['REQUEST_METHOD']) && isset($_POST['action']) && 0 === strpos($_POST['action'], 'post-quickpress') && (int) $_POST['post_ID']) {
        $view = get_permalink($_POST['post_ID']);
        $edit = esc_url(get_edit_post_link($_POST['post_ID']));
        if ('post-quickpress-publish' == $_POST['action']) {
            if (current_user_can('publish_posts')) {
                printf('<div class="updated"><p>' . __('Post published. <a href="%s">View post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url($view), $edit);
            } else {
                printf('<div class="updated"><p>' . __('Post submitted. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url(add_query_arg('preview', 1, $view)), $edit);
            }
        } else {
            printf('<div class="updated"><p>' . __('Draft saved. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url(add_query_arg('preview', 1, $view)), $edit);
            $drafts_query = new WP_Query(array('post_type' => 'post', 'post_status' => 'draft', 'author' => $GLOBALS['current_user']->ID, 'posts_per_page' => 1, 'orderby' => 'modified', 'order' => 'DESC'));
            if ($drafts_query->posts) {
                $drafts =& $drafts_query->posts;
            }
        }
        printf('<p class="easy-blogging">' . __('You can also try %s, easy blogging from anywhere on the Web.') . '</p>', '<a href="' . esc_url(admin_url('tools.php')) . '">' . __('Press This') . '</a>');
        $_REQUEST = array();
        // hack for get_default_post_to_edit()
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    $media_settings = array('id' => $post->ID, 'nonce' => wp_create_nonce('update-post_' . $post->ID));
    if (current_theme_supports('post-thumbnails', $post->post_type) && post_type_supports($post->post_type, 'thumbnail')) {
        $featured_image_id = get_post_meta($post->ID, '_thumbnail_id', true);
        $media_settings['featuredImageId'] = $featured_image_id ? $featured_image_id : -1;
    }
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press">
		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php 
    _e('Enter title here');
    ?></label>
			<input type="text" name="post_title" id="title" autocomplete="off" value="<?php 
    echo esc_attr($post->post_title);
    ?>" />
		</div>

		<?php 
    if (current_user_can('upload_files')) {
        ?>
		<div id="wp-content-wrap" class="wp-editor-wrap hide-if-no-js wp-media-buttons">
			<?php 
        do_action('media_buttons', 'content');
        ?>
		</div>
		<?php 
    }
    ?>

		<div class="textarea-wrap">
			<label class="screen-reader-text" for="content"><?php 
    _e('Content');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"><?php 
    echo esc_textarea($post->post_content);
    ?></textarea>
		</div>

		<script type="text/javascript">
		edCanvas = document.getElementById('content');
		edInsertContent = null;
		<?php 
    if ($_POST) {
        ?>
		wp.media.editor.remove('content');
		wp.media.view.settings.post = <?php 
        echo json_encode($media_settings);
        // big juicy hack. 
        ?>;
		wp.media.editor.add('content');
		<?php 
    }
    ?>
		</script>

		<div class="input-text-wrap" id="tags-input-wrap">
			<label class="screen-reader-text prompt" for="tags-input" id="tags-input-prompt-text"><?php 
    _e('Tags (separate with commas)');
    ?></label>
			<input type="text" name="tags_input" id="tags-input" value="<?php 
    echo get_tags_to_edit($post->ID);
    ?>" />
		</div>

		<p class="submit">
			<span id="publishing-action">
				<input type="submit" name="publish" id="publish" accesskey="p" class="button-primary" value="<?php 
    current_user_can('publish_posts') ? esc_attr_e('Publish') : esc_attr_e('Submit for Review');
    ?>" />
				<span class="spinner"></span>
			</span>
			<input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'button', 'save', false, array('id' => 'save-post'));
    ?>
			<input type="reset" value="<?php 
    esc_attr_e('Reset');
    ?>" class="button" />
			<br class="clear" />
		</p>

	</form>

<?php 
    if ($drafts) {
        wp_dashboard_recent_drafts($drafts);
    }
}

WordPress Version: .20

function wp_dashboard_quick_press()
{
    global $post_ID;
    $drafts = false;
    if ('post' === strtolower($_SERVER['REQUEST_METHOD']) && isset($_POST['action']) && 0 === strpos($_POST['action'], 'post-quickpress') && (int) $_POST['post_ID']) {
        $view = get_permalink($_POST['post_ID']);
        $edit = esc_url(get_edit_post_link($_POST['post_ID']));
        if ('post-quickpress-publish' == $_POST['action']) {
            if (current_user_can('publish_posts')) {
                printf('<div class="updated"><p>' . __('Post published. <a href="%s">View post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url($view), $edit);
            } else {
                printf('<div class="updated"><p>' . __('Post submitted. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url(add_query_arg('preview', 1, $view)), $edit);
            }
        } else {
            printf('<div class="updated"><p>' . __('Draft saved. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url(add_query_arg('preview', 1, $view)), $edit);
            $drafts_query = new WP_Query(array('post_type' => 'post', 'post_status' => 'draft', 'author' => $GLOBALS['current_user']->ID, 'posts_per_page' => 1, 'orderby' => 'modified', 'order' => 'DESC'));
            if ($drafts_query->posts) {
                $drafts =& $drafts_query->posts;
            }
        }
        printf('<p class="easy-blogging">' . __('You can also try %s, easy blogging from anywhere on the Web.') . '</p>', '<a href="' . esc_url(admin_url('tools.php')) . '">' . __('Press This') . '</a>');
        $_REQUEST = array();
        // hack for get_default_post_to_edit()
    }
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    $media_settings = array('id' => $post->ID, 'nonce' => wp_create_nonce('update-post_' . $post->ID));
    if (current_theme_supports('post-thumbnails', $post->post_type) && post_type_supports($post->post_type, 'thumbnail')) {
        $featured_image_id = get_post_meta($post->ID, '_thumbnail_id', true);
        $media_settings['featuredImageId'] = $featured_image_id ? $featured_image_id : -1;
    }
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press">
		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php 
    _e('Enter title here');
    ?></label>
			<input type="text" name="post_title" id="title" autocomplete="off" value="<?php 
    echo esc_attr($post->post_title);
    ?>" />
		</div>

		<?php 
    if (current_user_can('upload_files')) {
        ?>
		<div id="wp-content-wrap" class="wp-editor-wrap hide-if-no-js wp-media-buttons">
			<?php 
        do_action('media_buttons', 'content');
        ?>
		</div>
		<?php 
    }
    ?>

		<div class="textarea-wrap">
			<label class="screen-reader-text" for="content"><?php 
    _e('Content');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"><?php 
    echo esc_textarea($post->post_content);
    ?></textarea>
		</div>

		<script type="text/javascript">
		edCanvas = document.getElementById('content');
		edInsertContent = null;
		<?php 
    if ($_POST) {
        ?>
		wp.media.editor.remove('content');
		wp.media.view.settings.post = <?php 
        echo json_encode($media_settings);
        // big juicy hack. 
        ?>;
		wp.media.editor.add('content');
		<?php 
    }
    ?>
		</script>

		<div class="input-text-wrap" id="tags-input-wrap">
			<label class="screen-reader-text prompt" for="tags-input" id="tags-input-prompt-text"><?php 
    _e('Tags (separate with commas)');
    ?></label>
			<input type="text" name="tags_input" id="tags-input" value="<?php 
    echo get_tags_to_edit($post->ID);
    ?>" />
		</div>

		<p class="submit">
			<span id="publishing-action">
				<input type="submit" name="publish" id="publish" accesskey="p" class="button-primary" value="<?php 
    current_user_can('publish_posts') ? esc_attr_e('Publish') : esc_attr_e('Submit for Review');
    ?>" />
				<span class="spinner"></span>
			</span>
			<input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'button', 'save', false, array('id' => 'save-post'));
    ?>
			<input type="reset" value="<?php 
    esc_attr_e('Reset');
    ?>" class="button" />
			<br class="clear" />
		</p>

	</form>

<?php 
    if ($drafts) {
        wp_dashboard_recent_drafts($drafts);
    }
}

WordPress Version: 7.2

function wp_dashboard_quick_press()
{
    global $post_ID;
    $drafts = false;
    if ('post' === strtolower($_SERVER['REQUEST_METHOD']) && isset($_POST['action']) && 0 === strpos($_POST['action'], 'post-quickpress') && (int) $_POST['post_ID']) {
        $view = get_permalink($_POST['post_ID']);
        $edit = esc_url(get_edit_post_link($_POST['post_ID']));
        if ('post-quickpress-publish' == $_POST['action']) {
            if (current_user_can('publish_posts')) {
                printf('<div class="updated"><p>' . __('Post published. <a href="%s">View post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url($view), $edit);
            } else {
                printf('<div class="updated"><p>' . __('Post submitted. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url(add_query_arg('preview', 1, $view)), $edit);
            }
        } else {
            printf('<div class="updated"><p>' . __('Draft saved. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url(add_query_arg('preview', 1, $view)), $edit);
            $drafts_query = new WP_Query(array('post_type' => 'post', 'post_status' => 'draft', 'author' => $GLOBALS['current_user']->ID, 'posts_per_page' => 1, 'orderby' => 'modified', 'order' => 'DESC'));
            if ($drafts_query->posts) {
                $drafts =& $drafts_query->posts;
            }
        }
        printf('<p class="easy-blogging">' . __('You can also try %s, easy blogging from anywhere on the Web.') . '</p>', '<a href="' . esc_url(admin_url('tools.php')) . '">' . __('Press This') . '</a>');
        $_REQUEST = array();
        // hack for get_default_post_to_edit()
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    $media_settings = array('id' => $post->ID, 'nonce' => wp_create_nonce('update-post_' . $post->ID));
    if (current_theme_supports('post-thumbnails', $post->post_type) && post_type_supports($post->post_type, 'thumbnail')) {
        $featured_image_id = get_post_meta($post->ID, '_thumbnail_id', true);
        $media_settings['featuredImageId'] = $featured_image_id ? $featured_image_id : -1;
    }
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press">
		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php 
    _e('Enter title here');
    ?></label>
			<input type="text" name="post_title" id="title" autocomplete="off" value="<?php 
    echo esc_attr($post->post_title);
    ?>" />
		</div>

		<?php 
    if (current_user_can('upload_files')) {
        ?>
		<div id="wp-content-wrap" class="wp-editor-wrap hide-if-no-js wp-media-buttons">
			<?php 
        do_action('media_buttons', 'content');
        ?>
		</div>
		<?php 
    }
    ?>

		<div class="textarea-wrap">
			<label class="screen-reader-text" for="content"><?php 
    _e('Content');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"><?php 
    echo esc_textarea($post->post_content);
    ?></textarea>
		</div>

		<script type="text/javascript">
		edCanvas = document.getElementById('content');
		edInsertContent = null;
		<?php 
    if ($_POST) {
        ?>
		wp.media.editor.remove('content');
		wp.media.view.settings.post = <?php 
        echo json_encode($media_settings);
        // big juicy hack. 
        ?>;
		wp.media.editor.add('content');
		<?php 
    }
    ?>
		</script>

		<div class="input-text-wrap" id="tags-input-wrap">
			<label class="screen-reader-text prompt" for="tags-input" id="tags-input-prompt-text"><?php 
    _e('Tags (separate with commas)');
    ?></label>
			<input type="text" name="tags_input" id="tags-input" value="<?php 
    echo get_tags_to_edit($post->ID);
    ?>" />
		</div>

		<p class="submit">
			<span id="publishing-action">
				<input type="submit" name="publish" id="publish" accesskey="p" class="button-primary" value="<?php 
    current_user_can('publish_posts') ? esc_attr_e('Publish') : esc_attr_e('Submit for Review');
    ?>" />
				<span class="spinner"></span>
			</span>
			<input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'button', 'save', false, array('id' => 'save-post'));
    ?>
			<input type="reset" value="<?php 
    esc_attr_e('Reset');
    ?>" class="button" />
			<br class="clear" />
		</p>

	</form>

<?php 
    if ($drafts) {
        wp_dashboard_recent_drafts($drafts);
    }
}

WordPress Version: .10

function wp_dashboard_quick_press()
{
    global $post_ID;
    $drafts = false;
    if ('post' === strtolower($_SERVER['REQUEST_METHOD']) && isset($_POST['action']) && 0 === strpos($_POST['action'], 'post-quickpress') && (int) $_POST['post_ID']) {
        $view = get_permalink($_POST['post_ID']);
        $edit = esc_url(get_edit_post_link($_POST['post_ID']));
        if ('post-quickpress-publish' == $_POST['action']) {
            if (current_user_can('publish_posts')) {
                printf('<div class="updated"><p>' . __('Post published. <a href="%s">View post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url($view), $edit);
            } else {
                printf('<div class="updated"><p>' . __('Post submitted. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url(add_query_arg('preview', 1, $view)), $edit);
            }
        } else {
            printf('<div class="updated"><p>' . __('Draft saved. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url(add_query_arg('preview', 1, $view)), $edit);
            $drafts_query = new WP_Query(array('post_type' => 'post', 'post_status' => 'draft', 'author' => $GLOBALS['current_user']->ID, 'posts_per_page' => 1, 'orderby' => 'modified', 'order' => 'DESC'));
            if ($drafts_query->posts) {
                $drafts =& $drafts_query->posts;
            }
        }
        printf('<p class="easy-blogging">' . __('You can also try %s, easy blogging from anywhere on the Web.') . '</p>', '<a href="' . esc_url(admin_url('tools.php')) . '">' . __('Press This') . '</a>');
        $_REQUEST = array();
        // hack for get_default_post_to_edit()
    }
    if (!current_user_can('edit_posts')) {
        return;
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    $media_settings = array('id' => $post->ID, 'nonce' => wp_create_nonce('update-post_' . $post->ID));
    if (current_theme_supports('post-thumbnails', $post->post_type) && post_type_supports($post->post_type, 'thumbnail')) {
        $featured_image_id = get_post_meta($post->ID, '_thumbnail_id', true);
        $media_settings['featuredImageId'] = $featured_image_id ? $featured_image_id : -1;
    }
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press">
		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php 
    _e('Enter title here');
    ?></label>
			<input type="text" name="post_title" id="title" autocomplete="off" value="<?php 
    echo esc_attr($post->post_title);
    ?>" />
		</div>

		<?php 
    if (current_user_can('upload_files')) {
        ?>
		<div id="wp-content-wrap" class="wp-editor-wrap hide-if-no-js wp-media-buttons">
			<?php 
        do_action('media_buttons', 'content');
        ?>
		</div>
		<?php 
    }
    ?>

		<div class="textarea-wrap">
			<label class="screen-reader-text" for="content"><?php 
    _e('Content');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"><?php 
    echo esc_textarea($post->post_content);
    ?></textarea>
		</div>

		<script type="text/javascript">
		edCanvas = document.getElementById('content');
		edInsertContent = null;
		<?php 
    if ($_POST) {
        ?>
		wp.media.editor.remove('content');
		wp.media.view.settings.post = <?php 
        echo json_encode($media_settings);
        // big juicy hack. 
        ?>;
		wp.media.editor.add('content');
		<?php 
    }
    ?>
		</script>

		<div class="input-text-wrap" id="tags-input-wrap">
			<label class="screen-reader-text prompt" for="tags-input" id="tags-input-prompt-text"><?php 
    _e('Tags (separate with commas)');
    ?></label>
			<input type="text" name="tags_input" id="tags-input" value="<?php 
    echo get_tags_to_edit($post->ID);
    ?>" />
		</div>

		<p class="submit">
			<span id="publishing-action">
				<input type="submit" name="publish" id="publish" accesskey="p" class="button-primary" value="<?php 
    current_user_can('publish_posts') ? esc_attr_e('Publish') : esc_attr_e('Submit for Review');
    ?>" />
				<span class="spinner"></span>
			</span>
			<input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'button', 'save', false, array('id' => 'save-post'));
    ?>
			<input type="reset" value="<?php 
    esc_attr_e('Reset');
    ?>" class="button" />
			<br class="clear" />
		</p>

	</form>

<?php 
    if ($drafts) {
        wp_dashboard_recent_drafts($drafts);
    }
}

WordPress Version: 3.7

function wp_dashboard_quick_press()
{
    global $post_ID;
    $drafts = false;
    if ('post' === strtolower($_SERVER['REQUEST_METHOD']) && isset($_POST['action']) && 0 === strpos($_POST['action'], 'post-quickpress') && (int) $_POST['post_ID']) {
        $view = get_permalink($_POST['post_ID']);
        $edit = esc_url(get_edit_post_link($_POST['post_ID']));
        if ('post-quickpress-publish' == $_POST['action']) {
            if (current_user_can('publish_posts')) {
                printf('<div class="updated"><p>' . __('Post published. <a href="%s">View post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url($view), $edit);
            } else {
                printf('<div class="updated"><p>' . __('Post submitted. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url(add_query_arg('preview', 1, $view)), $edit);
            }
        } else {
            printf('<div class="updated"><p>' . __('Draft saved. <a href="%s">Preview post</a> | <a href="%s">Edit post</a>') . '</p></div>', esc_url(add_query_arg('preview', 1, $view)), $edit);
            $drafts_query = new WP_Query(array('post_type' => 'post', 'post_status' => 'draft', 'author' => $GLOBALS['current_user']->ID, 'posts_per_page' => 1, 'orderby' => 'modified', 'order' => 'DESC'));
            if ($drafts_query->posts) {
                $drafts =& $drafts_query->posts;
            }
        }
        printf('<p class="easy-blogging">' . __('You can also try %s, easy blogging from anywhere on the Web.') . '</p>', '<a href="' . esc_url(admin_url('tools.php')) . '">' . __('Press This') . '</a>');
        $_REQUEST = array();
        // hack for get_default_post_to_edit()
    }
    /* Check if a new auto-draft (= no new post_ID) is needed or if the old can be used */
    $last_post_id = (int) get_user_option('dashboard_quick_press_last_post_id');
    // Get the last post_ID
    if ($last_post_id) {
        $post = get_post($last_post_id);
        if (empty($post) || $post->post_status != 'auto-draft') {
            // auto-draft doesn't exists anymore
            $post = get_default_post_to_edit('post', true);
            update_user_option(get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID);
            // Save post_ID
        } else {
            $post->post_title = '';
            // Remove the auto draft title
        }
    } else {
        $post = get_default_post_to_edit('post', true);
        $user_id = get_current_user_id();
        // Don't create an option if this is a super admin who does not belong to this site.
        if (!(is_super_admin($user_id) && !in_array(get_current_blog_id(), array_keys(get_blogs_of_user($user_id))))) {
            update_user_option($user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID);
        }
        // Save post_ID
    }
    $post_ID = (int) $post->ID;
    $media_settings = array('id' => $post->ID, 'nonce' => wp_create_nonce('update-post_' . $post->ID));
    if (current_theme_supports('post-thumbnails', $post->post_type) && post_type_supports($post->post_type, 'thumbnail')) {
        $featured_image_id = get_post_meta($post->ID, '_thumbnail_id', true);
        $media_settings['featuredImageId'] = $featured_image_id ? $featured_image_id : -1;
    }
    ?>

	<form name="post" action="<?php 
    echo esc_url(admin_url('post.php'));
    ?>" method="post" id="quick-press">
		<div class="input-text-wrap" id="title-wrap">
			<label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php 
    _e('Enter title here');
    ?></label>
			<input type="text" name="post_title" id="title" autocomplete="off" value="<?php 
    echo esc_attr($post->post_title);
    ?>" />
		</div>

		<?php 
    if (current_user_can('upload_files')) {
        ?>
		<div id="wp-content-wrap" class="wp-editor-wrap hide-if-no-js wp-media-buttons">
			<?php 
        do_action('media_buttons', 'content');
        ?>
		</div>
		<?php 
    }
    ?>

		<div class="textarea-wrap">
			<label class="screen-reader-text" for="content"><?php 
    _e('Content');
    ?></label>
			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15"><?php 
    echo esc_textarea($post->post_content);
    ?></textarea>
		</div>

		<script type="text/javascript">
		edCanvas = document.getElementById('content');
		edInsertContent = null;
		<?php 
    if ($_POST) {
        ?>
		wp.media.editor.remove('content');
		wp.media.view.settings.post = <?php 
        echo json_encode($media_settings);
        // big juicy hack. 
        ?>;
		wp.media.editor.add('content');
		<?php 
    }
    ?>
		</script>

		<div class="input-text-wrap" id="tags-input-wrap">
			<label class="screen-reader-text prompt" for="tags-input" id="tags-input-prompt-text"><?php 
    _e('Tags (separate with commas)');
    ?></label>
			<input type="text" name="tags_input" id="tags-input" value="<?php 
    echo get_tags_to_edit($post->ID);
    ?>" />
		</div>

		<p class="submit">
			<span id="publishing-action">
				<input type="submit" name="publish" id="publish" accesskey="p" class="button-primary" value="<?php 
    current_user_can('publish_posts') ? esc_attr_e('Publish') : esc_attr_e('Submit for Review');
    ?>" />
				<span class="spinner"></span>
			</span>
			<input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" />
			<input type="hidden" name="post_ID" value="<?php 
    echo $post_ID;
    ?>" />
			<input type="hidden" name="post_type" value="post" />
			<?php 
    wp_nonce_field('add-post');
    ?>
			<?php 
    submit_button(__('Save Draft'), 'button', 'save', false, array('id' => 'save-post'));
    ?>
			<input type="reset" value="<?php 
    esc_attr_e('Reset');
    ?>" class="button" />
			<br class="clear" />
		</p>

	</form>

<?php 
    if ($drafts) {
        wp_dashboard_recent_drafts($drafts);
    }
}