Index: wp-includes/taxonomy.php
===================================================================
--- wp-includes/taxonomy.php	(revision 15608)
+++ wp-includes/taxonomy.php	(working copy)
@@ -2693,3 +2693,46 @@

 	return false;
 }
+
+
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $post_id
+ * @return unknown
+ */
+function get_tags_to_edit( $post_id, $taxonomy = 'post_tag' ) {
+	return get_terms_to_edit( $post_id, $taxonomy);
+}
+
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $post_id
+ * @return unknown
+ */
+function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) {
+	$post_id = (int) $post_id;
+	if ( !$post_id )
+		return false;
+
+	$tags = wp_get_post_terms($post_id, $taxonomy, array());
+
+	if ( !$tags )
+		return false;
+
+	if ( is_wp_error($tags) )
+		return $tags;
+
+	foreach ( $tags as $tag )
+		$tag_names[] = $tag->name;
+	$tags_to_edit = join( ',', $tag_names );
+	$tags_to_edit = esc_attr( $tags_to_edit );
+	$tags_to_edit = apply_filters( 'terms_to_edit', $tags_to_edit, $taxonomy );
+
+	return $tags_to_edit;
+}
Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 15608)
+++ wp-includes/post.php	(working copy)
@@ -4713,3 +4713,212 @@
 		add_filter('the_preview', '_set_preview');
 	}
 }
+
+/**
+ * Default post information to use when populating the "Write Post" form.
+ *
+ * @since unknown
+ *
+ *@param string A post type string, defaults to 'post'.
+ * @return object stdClass object containing all the default post data as attributes
+ */
+function get_default_post_to_edit( $post_type = 'post', $create_in_db = false ) {
+	global $wpdb;
+
+	$post_title = '';
+	if ( !empty( $_REQUEST['post_title'] ) )
+		$post_title = esc_html( stripslashes( $_REQUEST['post_title'] ));
+
+	$post_content = '';
+	if ( !empty( $_REQUEST['content'] ) )
+		$post_content = esc_html( stripslashes( $_REQUEST['content'] ));
+
+	$post_excerpt = '';
+	if ( !empty( $_REQUEST['excerpt'] ) )
+		$post_excerpt = esc_html( stripslashes( $_REQUEST['excerpt'] ));
+
+	if ( $create_in_db ) {
+		// Cleanup old auto-drafts more than 7 days old
+		$old_posts = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_status = 'auto-draft' AND DATE_SUB( NOW(), INTERVAL 7 DAY ) > post_date" );
+		foreach ( (array) $old_posts as $delete )
+			wp_delete_post( $delete, true ); // Force delete
+		$post_id = wp_insert_post( array( 'post_title' => __( 'Auto Draft' ), 'post_type' => $post_type, 'post_status' => 'auto-draft' ) );
+		$post = get_post( $post_id );
+	} else {
+		$post->ID = 0;
+		$post->post_author = '';
+		$post->post_date = '';
+		$post->post_date_gmt = '';
+		$post->post_password = '';
+		$post->post_type = $post_type;
+		$post->post_status = 'draft';
+		$post->to_ping = '';
+		$post->pinged = '';
+		$post->comment_status = get_option( 'default_comment_status' );
+		$post->ping_status = get_option( 'default_ping_status' );
+		$post->post_pingback = get_option( 'default_pingback_flag' );
+		$post->post_category = get_option( 'default_category' );
+		$post->page_template = 'default';
+		$post->post_parent = 0;
+		$post->menu_order = 0;
+	}
+
+	$post->post_content = apply_filters( 'default_content', $post_content, $post );
+	$post->post_title   = apply_filters( 'default_title',   $post_title, $post   );
+	$post->post_excerpt = apply_filters( 'default_excerpt', $post_excerpt, $post );
+	$post->post_name = '';
+
+	return $post;
+}
+
+
+/**
+ * Returns or echos a form containing a post box
+ *
+ */
+function wp_quickpress_form( $args = array(), $post_type = 'post'){
+
+	global $post_ID;
+
+	$fields = array(
+		'title' => array(
+			'capability' => '', // Capability to check before outputing field
+			'output' => '<h4 id="%s-title"><label for="title">'. __('Title') .'</label></h4>
+		<div class="input-text-wrap">
+			<input type="text" name="post_title" id="%s-title" tabindex="%d" autocomplete="off" value="'. esc_attr( $post->post_title ).'" />
+		</div>'
+		),
+		'media_buttons' => array(
+			'capability' => 'upload_files',
+			'output' => '<div id="%s-media-buttons" class="hide-if-no-js">'. get_media_buttons() .'</div>',
+		),
+		'content' => array(
+			'capability' => '',
+			'output' => '<h4 id="%s-content-label"><label for="content">'. __('Content') .'</label></h4>
+		<div class="textarea-wrap">
+			<textarea name="content" id="%s-content" class="mceEditor" rows="3" cols="15" tabindex="%d">'. $post->post_content.'</textarea>
+		</div>
+			'."	<script type='text/javascript'>edCanvas = document.getElementById('content');edInsertContent = null;</script>
+		"
+
+		),
+		'tags' => array(
+			'capability' =>'',
+			'output' => '
+			<h4><label for="%s-tags-input">'. __('Tags') .'</label></h4>
+			<div class="input-text-wrap">
+				<input type="text" name="%s-tags_input" id="tags-input" tabindex="%d" value="'. get_tags_to_edit( $post->ID ) .'" />
+			</div>
+'
+		),
+
+	);
+
+	$hidden_fields = array(
+	'action' => '<input type="hidden" name="action" id="quickpost-action" value="'.$post_type.'-quickpress-save" />',
+	'post_id' => '<input type="hidden" name="quickpress_post_ID" value="'. $post_ID .'" />',
+	'post_type' => '<input type="hidden" name="post_type" value="'.$post_type.'" />',
+
+
+	);
+
+	$submit_fields = array(
+	'save' => '<input type="submit" name="save" id="save-post" class="button" tabindex="%s" value="'.  esc_attr('Save Draft') .'" />',
+	'reset' => '<input type="reset" tabindex="%s" value="'. esc_attr( 'Reset' ).'" class="button" />',
+	);
+
+	$publishing_action = current_user_can('publish_posts') ? esc_attr('Publish') : esc_attr('Submit for Review');
+
+	$publishing_fields = array(
+	'submit' => '<input type="submit" name="publish" id="publish" accesskey="p" tabindex="%s" class="button-primary" value="' . $publishing_action . '" />',
+	/*'test' => '<input type="submit" name="publish" id="publish" accesskey="p" tabindex="%n" class="button-primary" value="'. esc_attr('Publish') .'" />', */
+
+	);
+
+
+	$defaults = array(
+		'action' => admin_url( 'post.php' ),
+		'fields' => $fields,
+		'form_id' => '',
+		'default_cap' => 'edit_posts',
+		'tabindex_start' => '1',
+		'ajax' => true,
+		'hidden_fields' => $hidden_fields,
+		'submit_fields' => $submit_fields,
+		'publishing_fields' => $publishing_fields,
+		'submit_class' => 'submit',
+		'publish_action_container' => 'span',
+		'publish_action_id' => 'publishing-action',
+		'hidden_and_submit_fields_container' => 'p',
+		'hidden_and_submit_fields_container_class' => 'submit',
+	);
+
+
+	$args = wp_parse_args($args, $defaults);
+
+	$tabindex =  apply_filters( $args['form_id'] . '_quickpress_tabindex_start', $args['tabindex_start'] );
+
+	if (current_user_can( $args['default_cap'] ) ): ?>
+		<?php do_action($args['form_id'] . '_quickpress_form_before_form') ?>
+		<form name="post" action="<?php echo $args['action'] ?>" method="post" id="<?php echo $args['form_id']; ?>_quick-press">
+			<?php do_action($args['form_id'] . '_quickpress_form_before_fields');
+
+			$fields = apply_filters( $args['form_id'] . '_quickpress_fields',  $args['fields'] );
+			foreach ($fields as $title => $field){
+				$capability = ($field['capability'] === '') ? $args['default_cap'] : $field['capability'];
+				if ( current_user_can($capability) ){
+					_e( sprintf( $field['output'], $args['form_id'], $args['form_id'], $tabindex ) );
+					$tabindex++;
+				}
+			}
+			//Hidden Fields
+			do_action($args['form_id'] . '_quickpress_form_after_fields');
+
+			echo "<{$args['hidden_and_submit_fields_container']} class='{$args['hidden_and_submit_fields_container_class']}'>";
+
+			$hidden_fields = apply_filters( $args['form_id'] . '_quickpress_hidden_fields', $args['hidden_fields'] );
+
+			foreach( $hidden_fields as $hidden_field )
+				echo $hidden_field;
+
+
+			//nonce
+			wp_nonce_field('add-post');
+
+			//submit
+
+			foreach($args['submit_fields'] as $submit_field){
+				_e( sprintf( $submit_field, $tabindex ) );
+					$tabindex++;
+			}
+
+
+			// publish
+
+			echo "<{$args['publish_action_container']} id='{$args['publish_action_id']}'>";
+
+			foreach($args['publishing_fields'] as $publishing_field){
+				_e( sprintf( $publishing_field, $tabindex ) );
+					$tabindex++;
+			}
+
+
+			if ($args['ajax'] == true)
+				echo '<img class="waiting" src="'. esc_url( admin_url( 'images/wpspin_light.gif' ) ) .'" />';
+
+
+
+			echo "</{$args['publish_action_container']}>";
+			echo "<br class='clear' />";
+			do_action($args['form_id'] . '_quickpress_form_after_submit_fields');
+
+			echo "</{$args['hidden_and_submit_fields_container']}";
+		do_action($args['form_id'] . '_quickpress_form_after_form_content');
+		echo '</form>';
+		do_action($args['form_id'] . '_quickpress_form_after_form');
+	else:
+		do_action($args['form_id'] . '_quickpress_form_no_form');
+
+	endif;
+
+}

Index: wp-includes/media.php
===================================================================
--- wp-includes/media.php	(revision 15608)
+++ wp-includes/media.php	(working copy)
@@ -1395,3 +1395,63 @@
 	$oembed = _wp_oembed_get_object();
 	$oembed->providers[$format] = array( $provider, $regex );
 }
+
+/**
+ *
+ *
+ *
+ */
+function get_media_buttons(){
+	$do_image = $do_audio = $do_video = true;
+	if ( is_multisite() ) {
+		$media_buttons = get_site_option( 'mu_media_buttons' );
+		if ( empty($media_buttons['image']) )
+			$do_image = false;
+		if ( empty($media_buttons['audio']) )
+			$do_audio = false;
+		if ( empty($media_buttons['video']) )
+			$do_video = false;
+	}
+	$out = '';
+
+	if ( $do_image )
+		$out .= _media_button(__('Add an Image'), 'images/media-button-image.gif?ver=20100531', 'image');
+	if ( $do_video )
+		$out .= _media_button(__('Add Video'), 'images/media-button-video.gif?ver=20100531', 'video');
+	if ( $do_audio )
+		$out .= _media_button(__('Add Audio'), 'images/media-button-music.gif?ver=20100531', 'audio');
+
+	$out .= _media_button(__('Add Media'), 'images/media-button-other.gif?ver=20100531', 'media');
+
+	$context = apply_filters('media_buttons_context', __('Upload/Insert %s'));
+
+	return sprintf($context, $out);
+
+
+}
+
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ */
+function media_buttons() {
+	echo get_media_buttons();
+}
+add_action( 'media_buttons', 'media_buttons' );
+
+function _media_button($title, $icon, $type) {
+	return "<a href='" . esc_url( get_upload_iframe_src($type) ) . "' id='add_$type' class='thickbox' title='$title'><img src='" . esc_url( admin_url( $icon ) ) . "' alt='$title' /></a>";
+}
+
+function get_upload_iframe_src($type) {
+	global $post_ID, $temp_ID;
+	$uploading_iframe_ID = (int) (0 == $post_ID ? $temp_ID : $post_ID);
+	$upload_iframe_src = add_query_arg('post_id', $uploading_iframe_ID, 'media-upload.php');
+
+	if ( 'media' != $type )
+		$upload_iframe_src = add_query_arg('type', $type, $upload_iframe_src);
+	$upload_iframe_src = apply_filters($type . '_upload_iframe_src', $upload_iframe_src);
+
+	return add_query_arg('TB_iframe', true, $upload_iframe_src);
+}
Index: wp-admin/includes/taxonomy.php
===================================================================
--- wp-admin/includes/taxonomy.php	(revision 15608)
+++ wp-admin/includes/taxonomy.php	(working copy)
@@ -194,48 +194,6 @@
  *
  * @since unknown
  *
- * @param unknown_type $post_id
- * @return unknown
- */
-function get_tags_to_edit( $post_id, $taxonomy = 'post_tag' ) {
-	return get_terms_to_edit( $post_id, $taxonomy);
-}
-
-/**
- * {@internal Missing Short Description}}
- *
- * @since unknown
- *
- * @param unknown_type $post_id
- * @return unknown
- */
-function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) {
-	$post_id = (int) $post_id;
-	if ( !$post_id )
-		return false;
-
-	$tags = wp_get_post_terms($post_id, $taxonomy, array());
-
-	if ( !$tags )
-		return false;
-
-	if ( is_wp_error($tags) )
-		return $tags;
-
-	foreach ( $tags as $tag )
-		$tag_names[] = $tag->name;
-	$tags_to_edit = join( ',', $tag_names );
-	$tags_to_edit = esc_attr( $tags_to_edit );
-	$tags_to_edit = apply_filters( 'terms_to_edit', $tags_to_edit, $taxonomy );
-
-	return $tags_to_edit;
-}
-
-/**
- * {@internal Missing Short Description}}
- *
- * @since unknown
- *
  * @param unknown_type $tag_name
  * @return unknown
  */
Index: wp-admin/includes/post.php
===================================================================
--- wp-admin/includes/post.php	(revision 15608)
+++ wp-admin/includes/post.php	(working copy)
@@ -348,63 +348,8 @@
 	return array( 'updated' => $updated, 'skipped' => $skipped, 'locked' => $locked );
 }

-/**
- * Default post information to use when populating the "Write Post" form.
- *
- * @since unknown
- *
- * @param string $post_type A post type string, defaults to 'post'.
- * @return object stdClass object containing all the default post data as attributes
- */
-function get_default_post_to_edit( $post_type = 'post', $create_in_db = false ) {
-	global $wpdb;

-	$post_title = '';
-	if ( !empty( $_REQUEST['post_title'] ) )
-		$post_title = esc_html( stripslashes( $_REQUEST['post_title'] ));

-	$post_content = '';
-	if ( !empty( $_REQUEST['content'] ) )
-		$post_content = esc_html( stripslashes( $_REQUEST['content'] ));
-
-	$post_excerpt = '';
-	if ( !empty( $_REQUEST['excerpt'] ) )
-		$post_excerpt = esc_html( stripslashes( $_REQUEST['excerpt'] ));
-
-	if ( $create_in_db ) {
-		// Cleanup old auto-drafts more than 7 days old
-		$old_posts = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_status = 'auto-draft' AND DATE_SUB( NOW(), INTERVAL 7 DAY ) > post_date" );
-		foreach ( (array) $old_posts as $delete )
-			wp_delete_post( $delete, true ); // Force delete
-		$post_id = wp_insert_post( array( 'post_title' => __( 'Auto Draft' ), 'post_type' => $post_type, 'post_status' => 'auto-draft' ) );
-		$post = get_post( $post_id );
-	} else {
-		$post->ID = 0;
-		$post->post_author = '';
-		$post->post_date = '';
-		$post->post_date_gmt = '';
-		$post->post_password = '';
-		$post->post_type = $post_type;
-		$post->post_status = 'draft';
-		$post->to_ping = '';
-		$post->pinged = '';
-		$post->comment_status = get_option( 'default_comment_status' );
-		$post->ping_status = get_option( 'default_ping_status' );
-		$post->post_pingback = get_option( 'default_pingback_flag' );
-		$post->post_category = get_option( 'default_category' );
-		$post->page_template = 'default';
-		$post->post_parent = 0;
-		$post->menu_order = 0;
-	}
-
-	$post->post_content = apply_filters( 'default_content', $post_content, $post );
-	$post->post_title   = apply_filters( 'default_title',   $post_title, $post   );
-	$post->post_excerpt = apply_filters( 'default_excerpt', $post_excerpt, $post );
-	$post->post_name = '';
-
-	return $post;
-}
-
 /**
  * Get the default page information to use.
  *
Index: wp-admin/includes/dashboard.php
===================================================================
--- wp-admin/includes/dashboard.php	(revision 15608)
+++ wp-admin/includes/dashboard.php	(working copy)
@@ -429,49 +429,9 @@
 	}

 	$post_ID = (int) $post->ID;
-?>

-	<form name="post" action="<?php echo esc_url( admin_url( 'post.php' ) ); ?>" method="post" id="quick-press">
-		<h4 id="quick-post-title"><label for="title"><?php _e('Title') ?></label></h4>
-		<div class="input-text-wrap">
-			<input type="text" name="post_title" id="title" tabindex="1" autocomplete="off" value="<?php echo esc_attr( $post->post_title ); ?>" />
-		</div>
+	wp_quickpress_form( array('form_id' => 'dashboard') );

-		<?php if ( current_user_can( 'upload_files' ) ) : ?>
-		<div id="media-buttons" class="hide-if-no-js">
-			<?php do_action( 'media_buttons' ); ?>
-		</div>
-		<?php endif; ?>
-
-		<h4 id="content-label"><label for="content"><?php _e('Content') ?></label></h4>
-		<div class="textarea-wrap">
-			<textarea name="content" id="content" class="mceEditor" rows="3" cols="15" tabindex="2"><?php echo $post->post_content; ?></textarea>
-		</div>
-
-		<script type="text/javascript">edCanvas = document.getElementById('content');edInsertContent = null;</script>
-
-		<h4><label for="tags-input"><?php _e('Tags') ?></label></h4>
-		<div class="input-text-wrap">
-			<input type="text" name="tags_input" id="tags-input" tabindex="3" value="<?php echo get_tags_to_edit( $post->ID ); ?>" />
-		</div>
-
-		<p class="submit">
-			<input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" />
-			<input type="hidden" name="quickpress_post_ID" value="<?php echo $post_ID; ?>" />
-			<input type="hidden" name="post_type" value="post" />
-			<?php wp_nonce_field('add-post'); ?>
-			<input type="submit" name="save" id="save-post" class="button" tabindex="4" value="<?php esc_attr_e('Save Draft'); ?>" />
-			<input type="reset" value="<?php esc_attr_e( 'Reset' ); ?>" class="button" />
-			<span id="publishing-action">
-				<input type="submit" name="publish" id="publish" accesskey="p" tabindex="5" class="button-primary" value="<?php current_user_can('publish_posts') ? esc_attr_e('Publish') : esc_attr_e('Submit for Review'); ?>" />
-				<img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" />
-			</span>
-			<br class="clear" />
-		</p>
-
-	</form>
-
-<?php
 	if ( $drafts )
 		wp_dashboard_recent_drafts( $drafts );
 }
Index: wp-admin/includes/media.php
===================================================================
--- wp-admin/includes/media.php	(revision 15608)
+++ wp-admin/includes/media.php	(working copy)
@@ -349,56 +349,7 @@
  * {@internal Missing Short Description}}
  *
  * @since unknown
- */
-function media_buttons() {
-	$do_image = $do_audio = $do_video = true;
-	if ( is_multisite() ) {
-		$media_buttons = get_site_option( 'mu_media_buttons' );
-		if ( empty($media_buttons['image']) )
-			$do_image = false;
-		if ( empty($media_buttons['audio']) )
-			$do_audio = false;
-		if ( empty($media_buttons['video']) )
-			$do_video = false;
-	}
-	$out = '';
-
-	if ( $do_image )
-		$out .= _media_button(__('Add an Image'), 'images/media-button-image.gif?ver=20100531', 'image');
-	if ( $do_video )
-		$out .= _media_button(__('Add Video'), 'images/media-button-video.gif?ver=20100531', 'video');
-	if ( $do_audio )
-		$out .= _media_button(__('Add Audio'), 'images/media-button-music.gif?ver=20100531', 'audio');
-
-	$out .= _media_button(__('Add Media'), 'images/media-button-other.gif?ver=20100531', 'media');
-
-	$context = apply_filters('media_buttons_context', __('Upload/Insert %s'));
-
-	printf($context, $out);
-}
-add_action( 'media_buttons', 'media_buttons' );
-
-function _media_button($title, $icon, $type) {
-	return "<a href='" . esc_url( get_upload_iframe_src($type) ) . "' id='add_$type' class='thickbox' title='$title'><img src='" . esc_url( admin_url( $icon ) ) . "' alt='$title' /></a>";
-}
-
-function get_upload_iframe_src($type) {
-	global $post_ID, $temp_ID;
-	$uploading_iframe_ID = (int) (0 == $post_ID ? $temp_ID : $post_ID);
-	$upload_iframe_src = add_query_arg('post_id', $uploading_iframe_ID, 'media-upload.php');
-
-	if ( 'media' != $type )
-		$upload_iframe_src = add_query_arg('type', $type, $upload_iframe_src);
-	$upload_iframe_src = apply_filters($type . '_upload_iframe_src', $upload_iframe_src);
-
-	return add_query_arg('TB_iframe', true, $upload_iframe_src);
-}
-
-/**
- * {@internal Missing Short Description}}
  *
- * @since unknown
- *
  * @return unknown
  */
 function media_upload_form_handler() {
Index: wp-admin/js/dashboard.dev.js
===================================================================
--- wp-admin/js/dashboard.dev.js	(revision 15608)
+++ wp-admin/js/dashboard.dev.js	(working copy)
@@ -47,7 +47,7 @@
 	/* QuickPress */
 	quickPressLoad = function() {
 		var act = $('#quickpost-action'), t;
-		t = $('#quick-press').submit( function() {
+		t = $('#dashboard_quick-press').submit( function() {
 			$('#dashboard_quick_press #publishing-action img.waiting').css('visibility', 'visible');
 			$('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').attr('disabled','disabled');

Index: wp-admin/css/dashboard.dev.css
===================================================================
--- wp-admin/css/dashboard.dev.css	(revision 15608)
+++ wp-admin/css/dashboard.dev.css	(working copy)
@@ -282,13 +282,13 @@
 	margin: 0 0 1em 5em;
 }

-#dashboard_quick_press #media-buttons {
+#dashboard_quick_press #dashboard-media-buttons {
 	margin: 0 0 .5em 5em;
 	padding: 0 0 0 10px;
 	font-size: 11px;
 }

-#dashboard_quick_press #media-buttons a {
+#dashboard_quick_press #dashboard-media-buttons a {
 	vertical-align: bottom;
 }

@@ -314,6 +314,21 @@
 	margin: 4px 6px 0 0;
 }

+#dashboard-media-buttons {
+	cursor: default;
+	padding: 8px 8px 0;
+}
+
+#dashboard-media-buttons a {
+	cursor: pointer;
+	padding: 0 0 5px 10px;
+}
+
+#dashboard-media-buttons img,
+{
+	vertical-align: middle;
+}
+
 /* Recent Drafts */
 #dashboard_recent_drafts ul {
 	margin: 0;
