Index: wp-admin/includes/deprecated.php
===================================================================
--- wp-admin/includes/deprecated.php	(revision 19046)
+++ wp-admin/includes/deprecated.php	(working copy)
@@ -805,6 +805,16 @@
 	$current_screen->render_screen_meta();
 }
 
+/**
+ * Favorite actions were deprecated in version 3.2. Use the admin bar instead.
+ *
+ * @since 2.7.0
+ * @deprecated 3.2.0
+ */
+function favorite_actions() {
+	_deprecated_function( __FUNCTION__, '3.2', 'WP_Admin_Bar' );
+}
+
 function media_upload_image() {
 	__deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
 	return wp_media_upload_handler();
Index: wp-admin/includes/screen.php
===================================================================
--- wp-admin/includes/screen.php	(revision 19043)
+++ wp-admin/includes/screen.php	(working copy)
@@ -11,7 +11,7 @@
  *
  * @since 2.7.0
  *
- * @param string|object $screen The screen you want the headers for
+ * @param string|WP_Screen $screen The screen you want the headers for
  * @return array Containing the headers in the format id => UI String
  */
 function get_column_headers( $screen ) {
@@ -31,7 +31,7 @@
  *
  * @since 2.7.0
  *
- * @param string|object $screen The screen you want the hidden columns for
+ * @param string|WP_Screen $screen The screen you want the hidden columns for
  * @return array
  */
 function get_hidden_columns( $screen ) {
@@ -42,17 +42,17 @@
 }
 
 /**
- * {@internal Missing Short Description}}
+ * Prints the meta box preferences for screen meta.
  *
  * @since 2.7.0
  *
- * @param unknown_type $screen
+ * @param string|WP_Screen $screen
  */
 function meta_box_prefs( $screen ) {
 	global $wp_meta_boxes;
 
-	if ( is_string($screen) )
-		$screen = convert_to_screen($screen);
+	if ( is_string( $screen ) )
+		$screen = convert_to_screen( $screen );
 
 	if ( empty($wp_meta_boxes[$screen->id]) )
 		return;
@@ -81,7 +81,7 @@
  *
  * @since 2.7.0
  *
- * @param string|object $screen Screen identifier
+ * @param string|WP_Screen $screen Screen
  * @return array Hidden Meta Boxes
  */
 function get_hidden_meta_boxes( $screen ) {
@@ -90,8 +90,10 @@
 
 	$hidden = get_user_option( "metaboxhidden_{$screen->id}" );
 
+	$defaults = ! is_array( $hidden );
+
 	// Hide slug boxes by default
-	if ( !is_array( $hidden ) ) {
+	if ( $defaults ) {
 		if ( 'post' == $screen->base || 'page' == $screen->base )
 			$hidden = array('slugdiv', 'trackbacksdiv', 'postcustom', 'postexcerpt', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv');
 		else
@@ -99,140 +101,19 @@
 		$hidden = apply_filters('default_hidden_meta_boxes', $hidden, $screen);
 	}
 
-	return $hidden;
+	return apply_filters( 'hidden_meta_boxes', $hidden, $screen, $defaults );
 }
 
 /**
- * {@internal Missing Short Description}}
- *
- * @since 2.7.0
- */
-function favorite_actions( $screen = null ) {
-	$default_action = false;
-
-	if ( is_string($screen) )
-		$screen = convert_to_screen($screen);
-
-	if ( $screen->is_user )
-		return;
-
-	if ( isset($screen->post_type) ) {
-		$post_type_object = get_post_type_object($screen->post_type);
-		if ( 'add' != $screen->action )
-			$default_action = array('post-new.php?post_type=' . $post_type_object->name => array($post_type_object->labels->new_item, $post_type_object->cap->edit_posts));
-		else
-			$default_action = array('edit.php?post_type=' . $post_type_object->name => array($post_type_object->labels->name, $post_type_object->cap->edit_posts));
-	}
-
-	if ( !$default_action ) {
-		if ( $screen->is_network ) {
-			$default_action = array('sites.php' => array( __('Sites'), 'manage_sites'));
-		} else {
-			switch ( $screen->id ) {
-				case 'upload':
-					$default_action = array('media-new.php' => array(__('New Media'), 'upload_files'));
-					break;
-				case 'media':
-					$default_action = array('upload.php' => array(__('Edit Media'), 'upload_files'));
-					break;
-				case 'link-manager':
-				case 'link':
-					if ( 'add' != $screen->action )
-						$default_action = array('link-add.php' => array(__('New Link'), 'manage_links'));
-					else
-						$default_action = array('link-manager.php' => array(__('Edit Links'), 'manage_links'));
-					break;
-				case 'users':
-					$default_action = array('user-new.php' => array(__('New User'), 'create_users'));
-					break;
-				case 'user':
-					$default_action = array('users.php' => array(__('Edit Users'), 'edit_users'));
-					break;
-				case 'plugins':
-					$default_action = array('plugin-install.php' => array(__('Install Plugins'), 'install_plugins'));
-					break;
-				case 'plugin-install':
-					$default_action = array('plugins.php' => array(__('Manage Plugins'), 'activate_plugins'));
-					break;
-				case 'themes':
-					$default_action = array('theme-install.php' => array(__('Install Themes'), 'install_themes'));
-					break;
-				case 'theme-install':
-					$default_action = array('themes.php' => array(__('Manage Themes'), 'switch_themes'));
-					break;
-				default:
-					$default_action = array('post-new.php' => array(__('New Post'), 'edit_posts'));
-					break;
-			}
-		}
-	}
-
-	if ( !$screen->is_network ) {
-		$actions = array(
-			'post-new.php' => array(__('New Post'), 'edit_posts'),
-			'edit.php?post_status=draft' => array(__('Drafts'), 'edit_posts'),
-			'post-new.php?post_type=page' => array(__('New Page'), 'edit_pages'),
-			'media-new.php' => array(__('Upload'), 'upload_files'),
-			'edit-comments.php' => array(__('Comments'), 'moderate_comments')
-			);
-	} else {
-		$actions = array(
-			'sites.php' => array( __('Sites'), 'manage_sites'),
-			'users.php' => array( __('Users'), 'manage_network_users')
-		);
-	}
-
-	$default_key = array_keys($default_action);
-	$default_key = $default_key[0];
-	if ( isset($actions[$default_key]) )
-		unset($actions[$default_key]);
-	$actions = array_merge($default_action, $actions);
-	$actions = apply_filters( 'favorite_actions', $actions, $screen );
-
-	$allowed_actions = array();
-	foreach ( $actions as $action => $data ) {
-		if ( current_user_can($data[1]) )
-			$allowed_actions[$action] = $data[0];
-	}
-
-	if ( empty($allowed_actions) )
-		return;
-
-	$first = array_keys($allowed_actions);
-	$first = $first[0];
-	echo '<div id="favorite-actions">';
-	echo '<div id="favorite-first"><a href="' . $first . '">' . $allowed_actions[$first] . '</a></div><div id="favorite-toggle"><br /></div>';
-	echo '<div id="favorite-inside">';
-
-	array_shift($allowed_actions);
-
-	foreach ( $allowed_actions as $action => $label) {
-		echo "<div class='favorite-action'><a href='$action'>";
-		echo $label;
-		echo "</a></div>\n";
-	}
-	echo "</div></div>\n";
-}
-
-/**
  * Convert a screen string to a screen object
  *
  * @since 3.0.0
  *
- * @param string $screen The name of the screen
- * @return object An object containing the safe screen name and id
+ * @param string $hook_name The hook name (also known as the hook suffix) used to determine the screen.
+ * @return WP_Screen Screen object.
  */
-function convert_to_screen( $screen ) {
-	$screen = str_replace( array('.php', '-new', '-add', '-network', '-user' ), '', $screen);
-
-	if ( is_network_admin() )
-		$screen .= '-network';
-	elseif ( is_user_admin() )
-		$screen .= '-user';
-
-	$screen = (string) apply_filters( 'screen_meta_screen', $screen );
-	$screen = (object) array( 'id' => $screen, 'base' => $screen );
-	return $screen;
+function convert_to_screen( $hook_name ) {
+	return WP_Screen::get( $hook_name );
 }
 
 /**
@@ -251,7 +132,7 @@
 	if ( is_string( $screen ) )
 		$screen = convert_to_screen( $screen );
 
-	WP_Screen::add_old_compat_help( $screen->id, $help );
+	$screen->add_old_compat_help( $screen, $help );
 }
 
 /**
@@ -272,52 +153,63 @@
 	return $current_screen->add_option( $option, $args );
 }
 
+/**
+ * Displays a screen icon.
+ *
+ * @uses get_screen_icon()
+ * @since 2.7.0
+ *
+ * @param string|WP_Screen $screen Optional. Accepts a screen object (and defaults to the current screen object)
+ * 	which it uses to determine an icon HTML ID. Or, if a string is provided, it is used to form the icon HTML ID.
+ */
 function screen_icon( $screen = '' ) {
 	echo get_screen_icon( $screen );
 }
 
+/**
+ * Gets a screen icon.
+ *
+ * @since 3.2.0
+ *
+ * @param string|WP_Screen $screen Optional. Accepts a screen object (and defaults to the current screen object)
+ * 	which it uses to determine an icon HTML ID. Or, if a string is provided, it is used to form the icon HTML ID.
+ * @return string HTML for the screen icon.
+ */
 function get_screen_icon( $screen = '' ) {
-	global $current_screen, $typenow;
+	if ( empty( $screen ) )
+		$screen = get_current_screen();
+	elseif ( is_string( $screen ) )
+		$icon_id = $screen;
 
-	if ( empty($screen) )
-		$screen = $current_screen;
-	elseif ( is_string($screen) )
-		$name = $screen;
-
 	$class = 'icon32';
 
-	if ( empty($name) ) {
-		if ( !empty($screen->parent_base) )
-			$name = $screen->parent_base;
+	if ( empty( $icon_id ) ) {
+		if ( $screen->parent_base )
+			$icon_id = $screen->parent_base;
 		else
-			$name = $screen->base;
+			$icon_id = $screen->base;
 
-		if ( 'edit' == $name && isset($screen->post_type) && 'page' == $screen->post_type )
-			$name = 'edit-pages';
+		if ( 'edit' == $icon_id && $screen->post_type && 'page' == $screen->post_type )
+			$icon_id = 'edit-pages';
 
-		$post_type = '';
-		if ( isset( $screen->post_type ) )
-			$post_type = $screen->post_type;
-		elseif ( $current_screen == $screen )
-			$post_type = $typenow;
-		if ( $post_type )
-			$class .= ' ' . sanitize_html_class( 'icon32-posts-' . $post_type );
+		if ( $screen->post_type )
+			$class .= ' ' . sanitize_html_class( 'icon32-posts-' . $screen->post_type );
 	}
 
-	return '<div id="icon-' . esc_attr( $name ) . '" class="' . $class . '"><br /></div>';
+	return '<div id="icon-' . esc_attr( $icon_id ) . '" class="' . $class . '"><br /></div>';
 }
 
 /**
- *  Get the current screen object
+ * Get the current screen object
  *
- *  @since 3.1.0
+ * @since 3.1.0
  *
- * @return object Current screen object
+ * @return WP_Screen Current screen object
  */
 function get_current_screen() {
 	global $current_screen;
 
-	if ( !isset($current_screen) )
+	if ( ! isset( $current_screen ) )
 		return null;
 
 	return $current_screen;
@@ -330,25 +222,23 @@
  *
  * @uses $current_screen
  *
- * @param string $id Screen id, optional.
+ * @param string $hook_name Optional. The hook name (also known as the hook suffix) used to determine the screen,
+ * 	or an existing screen object.
  */
-function set_current_screen( $id =  '' ) {
-	global $current_screen;
-
-	$current_screen = new WP_Screen( $id );
-
-	$current_screen = apply_filters('current_screen', $current_screen);
+function set_current_screen( $hook_name =  '' ) {
+	$screen = WP_Screen::get( $hook_name );
+	$screen->set_current_screen();
 }
 
 /**
- * A class representing the current admin screen.
+ * A class representing the admin screen.
  *
  * @since 3.3.0
  * @access public
  */
 final class WP_Screen {
 	/**
-	 * Any action associated with the screen.  'add' for *-add.php and *-new.php screens.  Empty otherwise.
+	 * Any action associated with the screen. 'add' for *-add.php and *-new.php screens.  Empty otherwise.
 	 *
 	 * @since 3.3.0
 	 * @var string
@@ -440,7 +330,7 @@
  	 * @var array
  	 * @access private
  	 */
-	private static $_help_tabs = array();
+	private $_help_tabs = array();
  
  	/**
 	 * The help sidebar data associated with screens, if any.
@@ -449,7 +339,7 @@
 	 * @var string
 	 * @access private
  	 */
-	private static $_help_sidebar = array();
+	private $_help_sidebar = '';
 
 	/**
 	 * Stores old string-based help.
@@ -463,9 +353,18 @@
 	 * @var array
 	 * @access private
 	 */
-	private static $_options = array();
+	private $_options = array();
 
 	/**
+	 * The screen object registry.
+	 *
+	 * @since 3.3.0
+	 * @var array
+	 * @access private
+	 */
+	private static $_registry = array();
+
+	/**
 	 * Stores the result of the public show_screen_options function.
 	 *
 	 * @since 3.3.0
@@ -484,84 +383,157 @@
 	private $_screen_settings;
 
 	/**
-	 * Constructor
+	 * Fetches a screen object.
 	 *
 	 * @since 3.3.0
+	 * @access public
 	 *
-	 * @param string $id A screen id.  If empty, the $hook_suffix global is used to derive the ID.
+	 * @param string $hook_name Optional. The hook name (also known as the hook suffix) used to determine the screen.
+	 * 	Defaults to the current $hook_suffix global.
+	 * @return WP_Screen Screen object.
 	 */
-	public function __construct( $id = '' ) {
-		global $hook_suffix, $typenow, $taxnow;
+	public function get( $hook_name = '' ) {
 
-		$action = '';
+		if ( is_a( $hook_name, 'WP_Screen' ) )
+			return $hook_name;
 
-		if ( empty( $id ) ) {
-			$screen = $hook_suffix;
-			$screen = str_replace('.php', '', $screen);
-			if ( preg_match('/-add|-new$/', $screen) )
-				$action = 'add';
-			$screen = str_replace('-new', '', $screen);
-			$screen = str_replace('-add', '', $screen);
-			$this->id = $this->base = $screen;
-		} else {
-			$id = sanitize_key( $id );
-			if ( false !== strpos($id, '-') ) {
-				list( $id, $typenow ) = explode('-', $id, 2);
-				if ( taxonomy_exists( $typenow ) ) {
+		$action = $post_type = $taxonomy = '';
+
+		if ( $hook_name ) {
+			$id = sanitize_key( $hook_name );
+			if ( false !== strpos( $id, '-' ) ) {
+				list( $id, $second ) = explode( '-', $id, 2 );
+				if ( taxonomy_exists( $second ) ) {
 					$id = 'edit-tags';
-					$taxnow = $typenow;
-					$typenow = '';
+					$taxonomy = $second;
+				} elseif ( post_type_exists( $second ) ) {
+					$post_type = $second;
+				} else {
+					$id .= '-' . $second;
 				}
 			}
-			$this->id = $this->base = $id;
+		} else {
+			$id = $GLOBALS['hook_suffix'];
+			$id = str_replace( '.php', '', $id );
+			if ( in_array( substr( $id, -4 ), array( '-add', '-new' ) ) )
+				$action = 'add';
+			$id = str_replace( array( '-new', '-add' ), '', $id );
 		}
 
-		$this->action = $action;
+		if ( 'index' == $id )
+			$id = 'dashboard';
 
-		// Map index to dashboard
-		if ( 'index' == $this->base )
-			$this->base = 'dashboard';
-		if ( 'index' == $this->id )
-			$this->id = 'dashboard';
+		$base = $id;
 
-		if ( 'edit' == $this->id ) {
-			if ( empty($typenow) )
-				$typenow = 'post';
-			$this->id .= '-' . $typenow;
-			$this->post_type = $typenow;
-		} elseif ( 'post' == $this->id ) {
-			if ( empty($typenow) )
-				$typenow = 'post';
-			$this->id = $typenow;
-			$this->post_type = $typenow;
-		} elseif ( 'edit-tags' == $this->id ) {
-			if ( empty($taxnow) )
-				$taxnow = 'post_tag';
-			$this->id = 'edit-' . $taxnow;
-			$this->taxonomy = $taxnow;
+		// If this is the current screen, see if we can be more accurate for post types and taxonomies.
+		if ( ! $hook_name ) {
+			switch ( $base ) {
+				case 'post' :
+					if ( isset( $_GET['post'] ) )
+						$post_id = (int) $_GET['post'];
+					elseif ( isset( $_POST['post_ID'] ) )
+						$post_id = (int) $_POST['post_ID'];
+					else
+						$post_id = 0;
+
+					if ( $post_id ) {
+						$post = get_post( $post_id );
+						if ( $post )
+							$post_type = $post->post_type;
+					} elseif ( isset( $_POST['post_type'] ) && post_type_exists( $_POST['post_type'] ) ) {
+						$post_type = $_GET['post_type'];
+					} elseif ( $action == 'add' && isset( $_GET['post_type'] ) && post_type_exists( $_GET['post_type'] ) ) {
+						$post_type = $_GET['post_type'];
+					}
+					break;
+				case 'edit' :
+					if ( isset( $_GET['post_type'] ) && post_type_exists( $_GET['post_type'] ) )
+						$post_type = $_GET['post_type'];
+					break;
+				case 'edit-tags' :
+					if ( isset( $_REQUEST['taxonomy'] ) && taxonomy_exists( $_REQUEST['taxonomy'] ) )
+						$taxonomy = $_REQUEST['taxonomy'];
+					break;
+			}
 		}
 
-		$this->is_network = is_network_admin();
-		$this->is_user = is_user_admin();
+		switch ( $id ) {
+			case 'post' :
+				if ( ! $post_type )
+					$post_type = 'post';
+				$id = $post_type;
+				break;
+			case 'edit' :
+				if ( ! $post_type )
+					$post_type = 'post';
+				$id .= '-' . $post_type;
+				break;
+			case 'edit-tags' :
+				if ( ! $taxonomy )
+					$taxonomy = 'post_tag';
+				$id = 'edit-' . $taxonomy;
+				break;
+		}
 
-		if ( $this->is_network ) {
-			$this->base .= '-network';
-			$this->id .= '-network';
-		} elseif ( $this->is_user ) {
-			$this->base .= '-user';
-			$this->id .= '-user';
+		if ( is_network_admin() ) {
+			$id   .= '-network';
+			$base .= '-network';
+		} elseif ( is_user_admin() ) {
+			$id   .= '-user';
+			$base .= '-user';
 		}
 
-		if ( ! isset( self::$_help_tabs[ $this->id ] ) )
-			self::$_help_tabs[ $this->id ] = array();
-		if ( ! isset( self::$_help_sidebar[ $this->id ] ) )
-			self::$_help_sidebar[ $this->id ] = '';
-		if ( ! isset( self::$_options[ $this->id ] ) )
-			self::$_options[ $this->id ] = array();
+		if ( isset( self::$_registry[ $id ] ) )
+			return self::$_registry[ $id ];
+
+		$screen = new WP_Screen();
+		$screen->id         = $id;
+		$screen->base       = $base;
+		$screen->action     = $action;
+		$screen->post_type  = $post_type;
+		$screen->taxonomy   = $taxonomy;
+		$screen->is_user    = is_user_admin();
+		$screen->is_network = is_network_admin();
+
+		self::$_registry[ $id ] = $screen;
+
+		return $screen;
 	}
 
+	/**
+	 * Makes the screen object the current screen.
+	 *
+	 * @see set_current_screen()
+	 * @since 3.3.0
+	 */
+	function set_current_screen() {
+		global $current_screen, $taxnow, $typenow;
+		$current_screen = $this;
+		$taxnow = $this->taxonomy;
+		$typenow = $this->post_type;
+		$current_screen = apply_filters( 'current_screen', $current_screen );
+	}
+
+	/**
+	 * Constructor
+	 *
+	 * @since 3.3.0
+	 * @access private
+	 */
+	private function __construct() {}
+
+	/**
+	 * Sets the old string-based contextual help for the screen.
+	 *
+	 * For backwards compatibility.
+	 *
+	 * @since 3.3.0
+	 *
+	 * @param WP_Screen $screen A screen object.
+	 * @param string $help Help text.
+	 */
 	static function add_old_compat_help( $screen, $help ) {
-		self::$_old_compat_help[ $screen ] = $help;	
+		self::$_old_compat_help[ $screen->id ] = $help;	
 	}
 
 	/**
@@ -588,7 +560,7 @@
 	 * @param mixed $args Option-dependent arguments.
 	 */
 	public function add_option( $option, $args = array() ) {
-		self::$_options[ $this->id ][ $option ] = $args;
+		$this->_options[ $option ] = $args;
 	}
 
 	/**
@@ -599,14 +571,14 @@
 	 * @param string 
 	 */
 	public function get_option( $option, $key = false ) {
-		if ( ! isset( self::$_options[ $this->id ][ $option ] ) )
+		if ( ! isset( $this->_options[ $option ] ) )
 			return null;
 		if ( $key ) {
-			if ( isset( self::$_options[ $this->id ][ $option ][ $key ] ) )
-				return self::$_options[ $this->id ][ $option ][ $key ];
+			if ( isset( $this->_options[ $option ][ $key ] ) )
+				return $this->_options[ $option ][ $key ];
 			return null;
 		}
-		return self::$_options[ $this->id ][ $option ];
+		return $this->_options[ $option ];
 	}
 
 	/**
@@ -637,7 +609,7 @@
 		if ( ! $args['id'] || ! $args['title'] )
 			return;
 
-		self::$_help_tabs[ $this->id ][] = $args;
+		$this->_help_tabs[] = $args;
 	}
 
 	/**
@@ -649,7 +621,7 @@
 	 * @param string $content Sidebar content in plain text or HTML.
 	 */
 	public function add_help_sidebar( $content ) {
-		self::$_help_sidebar[ $this->id ] = $content;
+		$this->_help_sidebar = $content;
 	}
 
 	/**
@@ -664,7 +636,7 @@
 		// Call old contextual_help_list filter.
 		self::$_old_compat_help = apply_filters( 'contextual_help_list', self::$_old_compat_help, $this );
 
-		if ( isset( self::$_old_compat_help[ $this->id ] ) || empty(self::$_help_tabs[ $this->id ] ) ) {
+		if ( isset( self::$_old_compat_help[ $this->id ] ) || empty( $this->_help_tabs ) ) {
 			// Call old contextual_help filter.
 			if ( isset( self::$_old_compat_help[ $this->id ] ) )
 				$contextual_help = apply_filters( 'contextual_help', self::$_old_compat_help[ $this->id ], $this->id, $this );
@@ -690,8 +662,8 @@
 				'title'    => __('Screen Options'),
 				'callback' => array( $this, 'render_screen_options' ),
 			) );
-			$_options_tab = array_pop( self::$_help_tabs[ $this->id ] );
-			array_unshift( self::$_help_tabs[ $this->id ], $_options_tab );
+			$_options_tab = array_pop( $this->_help_tabs );
+			array_unshift( $this->_help_tabs, $_options_tab );
 		}
 
 		// Time to render!
@@ -701,7 +673,7 @@
 			<div id="contextual-help-wrap" class="hidden">
 				<div class="contextual-help-tabs">
 					<ul>
-					<?php foreach ( self::$_help_tabs[ $this->id ] as $i => $tab ):
+					<?php foreach ( $this->_help_tabs as $i => $tab ):
 						$link_id  = "tab-link-{$tab['id']}";
 						$panel_id = "tab-panel-{$tab['id']}";
 						$classes  = ( $i == 0 ) ? 'active' : '';
@@ -716,14 +688,14 @@
 					</ul>
 				</div>
 
-				<?php if ( ! empty( self::$_help_sidebar[ $this->id ] ) ) : ?>
+				<?php if ( ! empty( $this->_help_sidebar ) ) : ?>
 				<div class="contextual-help-sidebar">
-					<?php echo self::$_help_sidebar[ $this->id ]; ?>
+					<?php echo $this->_help_sidebar; ?>
 				</div>
 				<?php endif; ?>
 
 				<div class="contextual-help-tabs-wrap">
-					<?php foreach ( self::$_help_tabs[ $this->id ] as $i => $tab ):
+					<?php foreach ( $this->_help_tabs as $i => $tab ):
 						$panel_id = "tab-panel-{$tab['id']}";
 						$classes  = ( $i == 0 ) ? 'active' : '';
 						$classes .= ' help-tab-content';
@@ -747,7 +719,7 @@
 	}
 
 	public function show_screen_options() {
-		global $wp_meta_boxes, $wp_list_table;
+		global $wp_meta_boxes;
 
 		if ( is_bool( $this->_show_screen_options ) )
 			return $this->_show_screen_options;
@@ -759,23 +731,20 @@
 			$show_screen = true;
 
 		// Check if there are per-page options.
-		$show_screen = $show_screen || $this->get_option('per_page');
+		if ( $this->get_option( 'per_page' ) )
+			$show_screen = true;
 
 		$this->_screen_settings = apply_filters( 'screen_settings', '', $this );
 
 		switch ( $this->id ) {
 			case 'widgets':
 				$this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on">' . __('Enable accessibility mode') . '</a><a id="access-off" href="widgets.php?widgets-access=off">' . __('Disable accessibility mode') . "</a></p>\n";
-				$show_screen = true;
 				break;
 		}
 
-		if ( ! empty( $this->_screen_settings ) )
+		if ( $this->_screen_settings || $this->_options )
 			$show_screen = true;
 
-		if ( ! empty( self::$_options[ $this->id ] ) )
-			$show_screen = true;
-
 		$this->_show_screen_options = apply_filters( 'screen_options_show_screen', $show_screen, $this );
 		return $this->_show_screen_options;
 	}
@@ -786,7 +755,7 @@
 	 * @since 3.3.0
 	 */
 	public function render_screen_options() {
-		global $wp_meta_boxes, $wp_list_table;
+		global $wp_meta_boxes;
 
 		$columns = get_column_headers( $this );
 		$hidden  = get_hidden_columns( $this );
Index: wp-admin/post.php
===================================================================
--- wp-admin/post.php	(revision 19043)
+++ wp-admin/post.php	(working copy)
@@ -16,35 +16,24 @@
 
 wp_reset_vars(array('action', 'safe_mode', 'withcomments', 'posts', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder'));
 
-if ( isset($_GET['post']) )
+if ( isset( $_GET['post'] ) )
 	$post_id = (int) $_GET['post'];
-elseif ( isset($_POST['post_ID']) )
+elseif ( isset( $_POST['post_ID'] ) )
 	$post_id = (int) $_POST['post_ID'];
 else
 	$post_id = 0;
+
 $post_ID = $post_id;
-$post = null;
-$post_type_object = null;
-$post_type = null;
-if ( $post_id ) {
-	$post = get_post($post_id);
-	if ( $post ) {
-		$post_type_object = get_post_type_object($post->post_type);
-		if ( $post_type_object ) {
-			$post_type = $post->post_type;
-			$current_screen->post_type = $post->post_type;
-			$current_screen->id = $current_screen->post_type;
-		}
-	}
-} elseif ( isset($_POST['post_type']) ) {
-	$post_type_object = get_post_type_object($_POST['post_type']);
-	if ( $post_type_object ) {
-		$post_type = $post_type_object->name;
-		$current_screen->post_type = $post_type;
-		$current_screen->id = $current_screen->post_type;
-	}
+$post = $post_type = $post_type_object = null;
+
+if ( $current_screen->post_type ) {
+	$post_type = $current_screen->post_type;
+	$post_type_object = get_post_type_object( $post_type );
 }
 
+if ( $post_id )
+	$post = get_post( $post_id );
+
 /**
  * Redirect to previous page.
  *
