Index: wp-admin/includes/template.php
===================================================================
--- wp-admin/includes/template.php	(revision 19011)
+++ wp-admin/includes/template.php	(working copy)
@@ -839,13 +839,20 @@
  * @param string $id String for use in the 'id' attribute of tags.
  * @param string $title Title of the meta box.
  * @param string $callback Function that fills the box with the desired content. The function should echo its output.
- * @param string $page The type of edit page on which to show the box (post, page, link).
+ * @param string|object $screen The screen on which to show the box (post, page, link).
  * @param string $context The context within the page where the boxes should show ('normal', 'advanced').
  * @param string $priority The priority within the context where the boxes should show ('high', 'low').
  */
-function add_meta_box($id, $title, $callback, $page, $context = 'advanced', $priority = 'default', $callback_args=null) {
+function add_meta_box($id, $title, $callback, $screen, $context = 'advanced', $priority = 'default', $callback_args=null) {
 	global $wp_meta_boxes;
 
+	if ( empty( $screen ) )
+		$screen = get_current_screen();
+	elseif ( is_string( $screen ) )
+		$screen = convert_to_screen( $screen );
+
+	$page = $screen->id;
+
 	if ( !isset($wp_meta_boxes) )
 		$wp_meta_boxes = array();
 	if ( !isset($wp_meta_boxes[$page]) )
@@ -899,17 +906,24 @@
  *
  * @since 2.5.0
  *
- * @param string $page page identifier, also known as screen identifier
+ * @param string|object $screen Screen identifier
  * @param string $context box context
  * @param mixed $object gets passed to the box callback function as first parameter
  * @return int number of meta_boxes
  */
-function do_meta_boxes($page, $context, $object) {
+function do_meta_boxes( $screen, $context, $object ) {
 	global $wp_meta_boxes;
 	static $already_sorted = false;
 
-	$hidden = get_hidden_meta_boxes($page);
+	if ( empty( $screen ) )
+		$screen = get_current_screen();
+	elseif ( is_string( $screen ) )
+		$screen = convert_to_screen( $screen );
 
+	$page = $screen->id;
+
+	$hidden = get_hidden_meta_boxes( $screen );
+
 	printf('<div id="%s-sortables" class="meta-box-sortables">', htmlspecialchars($context));
 
 	$i = 0;
@@ -919,7 +933,7 @@
 			foreach ( $sorted as $box_context => $ids ) {
 				foreach ( explode(',', $ids ) as $id ) {
 					if ( $id && 'dashboard_browser_nag' !== $id )
-						add_meta_box( $id, null, null, $page, $box_context, 'sorted' );
+						add_meta_box( $id, null, null, $screen, $box_context, 'sorted' );
 				}
 			}
 		}
@@ -961,12 +975,19 @@
  * @since 2.6.0
  *
  * @param string $id String for use in the 'id' attribute of tags.
- * @param string $page The type of edit page on which to show the box (post, page, link).
+ * @param string|object $screen The screen on which to show the box (post, page, link).
  * @param string $context The context within the page where the boxes should show ('normal', 'advanced').
  */
-function remove_meta_box($id, $page, $context) {
+function remove_meta_box($id, $screen, $context) {
 	global $wp_meta_boxes;
 
+	if ( empty( $screen ) )
+		$screen = get_current_screen();
+	elseif ( is_string( $screen ) )
+		$screen = convert_to_screen( $screen );
+
+	$page = $screen->id;
+
 	if ( !isset($wp_meta_boxes) )
 		$wp_meta_boxes = array();
 	if ( !isset($wp_meta_boxes[$page]) )
Index: wp-admin/edit-form-advanced.php
===================================================================
--- wp-admin/edit-form-advanced.php	(revision 19011)
+++ wp-admin/edit-form-advanced.php	(working copy)
@@ -99,10 +99,10 @@
 // All meta boxes should be defined and added before the first do_meta_boxes() call (or potentially during the do_meta_boxes action).
 require_once('./includes/meta-boxes.php');
 
-add_meta_box('submitdiv', __('Publish'), 'post_submit_meta_box', $post_type, 'side', 'core');
+add_meta_box('submitdiv', __('Publish'), 'post_submit_meta_box', 0, 'side', 'core');
 
 if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post_type, 'post-formats' ) )
-	add_meta_box( 'formatdiv', _x( 'Format', 'post format' ), 'post_format_meta_box', $post_type, 'side', 'core' );
+	add_meta_box( 'formatdiv', _x( 'Format', 'post format' ), 'post_format_meta_box', 0, 'side', 'core' );
 
 // all taxonomies
 foreach ( get_object_taxonomies($post_type) as $tax_name ) {
@@ -113,43 +113,43 @@
 	$label = $taxonomy->labels->name;
 
 	if ( !is_taxonomy_hierarchical($tax_name) )
-		add_meta_box('tagsdiv-' . $tax_name, $label, 'post_tags_meta_box', $post_type, 'side', 'core', array( 'taxonomy' => $tax_name ));
+		add_meta_box('tagsdiv-' . $tax_name, $label, 'post_tags_meta_box', 0, 'side', 'core', array( 'taxonomy' => $tax_name ));
 	else
-		add_meta_box($tax_name . 'div', $label, 'post_categories_meta_box', $post_type, 'side', 'core', array( 'taxonomy' => $tax_name ));
+		add_meta_box($tax_name . 'div', $label, 'post_categories_meta_box', 0, 'side', 'core', array( 'taxonomy' => $tax_name ));
 }
 
 if ( post_type_supports($post_type, 'page-attributes') )
-	add_meta_box('pageparentdiv', 'page' == $post_type ? __('Page Attributes') : __('Attributes'), 'page_attributes_meta_box', $post_type, 'side', 'core');
+	add_meta_box('pageparentdiv', 'page' == $post_type ? __('Page Attributes') : __('Attributes'), 'page_attributes_meta_box', 0, 'side', 'core');
 
 if ( current_theme_supports( 'post-thumbnails', $post_type ) && post_type_supports( $post_type, 'thumbnail' ) )
-		add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', $post_type, 'side', 'low');
+		add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', 0, 'side', 'low');
 
 if ( post_type_supports($post_type, 'excerpt') )
-	add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', $post_type, 'normal', 'core');
+	add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', 0, 'normal', 'core');
 
 if ( post_type_supports($post_type, 'trackbacks') )
-	add_meta_box('trackbacksdiv', __('Send Trackbacks'), 'post_trackback_meta_box', $post_type, 'normal', 'core');
+	add_meta_box('trackbacksdiv', __('Send Trackbacks'), 'post_trackback_meta_box', 0, 'normal', 'core');
 
 if ( post_type_supports($post_type, 'custom-fields') )
-	add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', $post_type, 'normal', 'core');
+	add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', 0, 'normal', 'core');
 
 do_action('dbx_post_advanced');
 if ( post_type_supports($post_type, 'comments') )
-	add_meta_box('commentstatusdiv', __('Discussion'), 'post_comment_status_meta_box', $post_type, 'normal', 'core');
+	add_meta_box('commentstatusdiv', __('Discussion'), 'post_comment_status_meta_box', 0, 'normal', 'core');
 
 if ( ('publish' == $post->post_status || 'private' == $post->post_status) && post_type_supports($post_type, 'comments') )
-	add_meta_box('commentsdiv', __('Comments'), 'post_comment_meta_box', $post_type, 'normal', 'core');
+	add_meta_box('commentsdiv', __('Comments'), 'post_comment_meta_box', 0, 'normal', 'core');
 
 if ( !( 'pending' == $post->post_status && !current_user_can( $post_type_object->cap->publish_posts ) ) )
-	add_meta_box('slugdiv', __('Slug'), 'post_slug_meta_box', $post_type, 'normal', 'core');
+	add_meta_box('slugdiv', __('Slug'), 'post_slug_meta_box', 0, 'normal', 'core');
 
 if ( post_type_supports($post_type, 'author') ) {
 	if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) )
-		add_meta_box('authordiv', __('Author'), 'post_author_meta_box', $post_type, 'normal', 'core');
+		add_meta_box('authordiv', __('Author'), 'post_author_meta_box', 0, 'normal', 'core');
 }
 
 if ( post_type_supports($post_type, 'revisions') && 0 < $post_ID && wp_get_post_revisions( $post_ID ) )
-	add_meta_box('revisionsdiv', __('Revisions'), 'post_revisions_meta_box', $post_type, 'normal', 'core');
+	add_meta_box('revisionsdiv', __('Revisions'), 'post_revisions_meta_box', 0, 'normal', 'core');
 
 do_action('add_meta_boxes', $post_type, $post);
 do_action('add_meta_boxes_' . $post_type, $post);
@@ -347,11 +347,11 @@
 	$side_meta_boxes = do_meta_boxes($post_type, 'side', $post);
 }
 
-do_meta_boxes($post_type, 'normal', $post);
+do_meta_boxes(0, 'normal', $post);
 
 ( 'page' == $post_type ) ? do_action('edit_page_form') : do_action('edit_form_advanced');
 
-do_meta_boxes($post_type, 'advanced', $post);
+do_meta_boxes(0, 'advanced', $post);
 
 do_action('dbx_post_sidebar'); ?>
 
