Index: wp-admin/includes/template.php
===================================================================
--- wp-admin/includes/template.php	(revision 17533)
+++ wp-admin/includes/template.php	(working copy)
@@ -1672,16 +1672,181 @@
 	return $screen;
 }
 
-function screen_meta($screen) {
-	global $wp_meta_boxes, $_wp_contextual_help, $wp_list_table, $wp_current_screen_options;
+/**
+ * Displays the screen meta for the current page.
+ *
+ * @uses do_screen_meta()
+ *
+ * @param string $screen The name of the screen
+ */
+function screen_meta( $screen ) {
+	?>
+	<div id="screen-meta">
+		<?php do_screen_meta( $screen->id ); ?>
+	</div><!-- #screen-meta -->
+	<?php
+}
 
-	if ( is_string($screen) )
-		$screen = convert_to_screen($screen);
+/**
+ * Adds a new screen meta tab.
+ *
+ * @since 3.2.0
+ *
+ * @param string $id Identifier.
+ * @param string $label Label used for the tab's display name.
+ * @param string $capability capability required to view this tab
+ * @param int $priority which one first.
+ * @param string $screens Which page to add the tab to.
+ */
+function add_screen_meta_tab( $id, $label, $capability, $screen, $priority = 10 ) {
+	global $wp_screen_meta;
 
+	if ( !isset($wp_screen_meta) )
+		$wp_screen_meta = array();
+	if ( !isset( $wp_screen_meta[$screen] ) )
+		$wp_screen_meta[$screen] = array();
+
+	if ( !$label )
+		$label = $id;
+
+	$args = array(
+		'id' => $id,
+		'label' => $label,
+		'capability' => $capability,
+	);
+
+	$wp_screen_meta[$screen][$priority][$id] = $args;
+}
+
+/**
+ * Adds a new section to a screen tab.
+ *
+ * @since 3.2.0
+ *
+ * @param string $id Identifier for the content.
+ * @param string $callback Callback function used to output the content.
+ * @param string $tab A string or array of tabs to add the content to.
+ * @param string $priority Priority to display this content.
+ * @param string $callback_args Optional. Additional arguments to pass to the callback.
+ */
+function add_screen_meta_section( $id, $callback, $tab, $priority = 10, $callback_args = null ) {
+	global $wp_screen_meta_data;
+	
+	if ( !isset($wp_screen_meta_data) )
+		$wp_screen_meta_data = array();
+
+	$args = array(
+		'id' => $id,
+		'callback' => $callback,
+		'tab' => $tab,
+		'priority' => $priority,
+		'callback_args' => $callback_args,
+	);
+
+	$wp_screen_meta_data[$tab][$priority][$id] = $args;
+}
+
+/**
+ * Displays the screen meta tabs and their content based on the current screen.
+ *
+ * @since 3.2.0
+ *
+ * @param string $screen Identifier of the screen.
+ */
+function do_screen_meta( $screen ) {
+	global $wp_screen_meta, $wp_screen_meta_data;
+	
+	add_screen_meta_tab( 'screen-options', __( 'Screen Options' ), 'read', 'global' );
+	add_screen_meta_tab( 'contextual-help', __( 'Help' ), 'read', 'global', 1 );
+
+	add_screen_meta_section( 'contextual-help', 'wp_screen_meta_contextual_help', 'contextual-help' );
+	add_screen_meta_section( 'screen-settings', 'wp_screen_meta_screen_settings', 'screen-options' );
+
+	do_action( 'screen_meta', $screen );
+	do_action( 'screen_meta_' . $screen );
+
+	// Get the registered tabs from the global and $screen scope.
+	$tabs = !empty( $wp_screen_meta['global'] ) ? $wp_screen_meta['global'] : array();	
+	$tabs = !empty( $wp_screen_meta[$screen] ) ? $wp_screen_meta[$screen] + $tabs : $tabs;
+
+	// Bail if no tabs are registered
+	if ( empty( $tabs ) )
+		return;
+
+	// Sort tabs by priority
+	ksort( $tabs );
+
+	$screen_meta = array();
+	foreach ( $tabs as $priority => $tab ) {
+		foreach ( $tab as $tab_id => $tab_info ) {
+
+			// Check for permissions
+			if ( !current_user_can( $tab_info['capability'] ) )
+				continue;
+
+			// Check to see if the tab has any data
+			if ( empty( $wp_screen_meta_data[ $tab_id ] ) )
+				continue;
+
+			// Store all the tab data in $screen_meta
+			$screen_meta[$priority] = $tab;
+			
+			// Sort the content by priority
+			if ( isset( $wp_screen_meta_data[$tab_id] ) )
+				ksort( $wp_screen_meta_data[$tab_id] );
+		}
+	}
+	?>
+	<div id="screen-meta" class="screen-meta">
+		<?php
+		foreach ( $screen_meta as $priority => $tabs ) {
+			foreach ( $tabs as $tab_id => $tab ) {
+				?>
+				<div id="<?php echo esc_attr( $tab_id ); ?>-wrap" class="hidden screen-meta-tab-wrap">
+					<?php
+					foreach ( $wp_screen_meta_data[$tab_id] as $priority => $_tab_data ) {
+						foreach ( $_tab_data as $tab_data_id => $tab_data ) {
+							call_user_func( $tab_data['callback'], $screen, $tab_data['callback_args'] );
+						}
+					}
+					?>
+				</div><!-- .screen-meta-tab-wrap -->
+				<?php
+			}
+		}
+		?>
+		<div id="screen-meta-links">
+			<?php
+			foreach ( $screen_meta as $priority => $tab ) {
+				foreach ($tab as $tab_id => $tab_info ) {
+					?>
+					<div id="<?php echo esc_attr( $tab_id ); ?>-link-wrap" class="hide-if-no-js screen-meta-toggle"> 
+						<a href="#<?php echo esc_attr( $tab_id ); ?>-wrap" id="<?php echo esc_attr( $tab_id ); ?>-link" class="show-settings"><?php echo esc_html( $tab_info['label'] ); ?></a>
+					</div><!-- .screen-meta-toggle -->
+					<?php
+				}
+			}
+			?>
+		</div><!-- #screen-meta-links -->
+	</div><!-- #screen-meta -->
+	<?php
+}
+
+/**
+ * Outputs various screen settings for the current page.
+ *
+ * @since 3.2.0
+ *
+ * @param string $screen The current page's screen.
+ */
+function wp_screen_meta_screen_settings( $screen ) {
+	global $wp_meta_boxes, $wp_current_screen_options;
+
+	$screen = convert_to_screen( $screen );
 	$columns = get_column_headers( $screen );
 	$hidden = get_hidden_columns( $screen );
 
-	$meta_screens = array('index' => 'dashboard');
+	$meta_screens = array( 'index' => 'dashboard' );
 
 	if ( isset($meta_screens[$screen->id]) ) {
 		$screen->id = $meta_screens[$screen->id];
@@ -1692,111 +1857,104 @@
 	if ( !empty($wp_meta_boxes[$screen->id]) || !empty($columns) )
 		$show_screen = true;
 
-	$screen_options = screen_options($screen);
+	$screen_options = screen_options( $screen );
 	if ( $screen_options )
 		$show_screen = true;
 
-	if ( !isset($_wp_contextual_help) )
-		$_wp_contextual_help = array();
+	$settings = apply_filters( 'screen_settings', '', $screen );
 
-	$settings = apply_filters('screen_settings', '', $screen);
-
 	switch ( $screen->id ) {
 		case 'widgets':
 			$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( $settings ) )
 		$show_screen = true;
 
 	if ( !empty($wp_current_screen_options) )
 		$show_screen = true;
+	?>
+	<form id="adv-settings" action="" method="post">
+		<?php if ( isset($wp_meta_boxes[$screen->id]) ) : ?>
+			<h5><?php _ex( 'Show on screen', 'Metaboxes' ); ?></h5>
+			<div class="metabox-prefs">
+				<?php meta_box_prefs( $screen ); ?>
+				<br class="clear" />
+			</div>
+			<?php endif;
+			if ( ! empty($columns) ) : ?>
+			<h5><?php echo ( isset( $columns['_title'] ) ?  $columns['_title'] :  _x('Show on screen', 'Columns') ) ?></h5>
+			<div class="metabox-prefs">
+		<?php
+		$special = array('_title', 'cb', 'comment', 'media', 'name', 'title', 'username', 'blogname');
 
-?>
-<div id="screen-meta">
-<?php if ( $show_screen ) : ?>
-<div id="screen-options-wrap" class="hidden">
-	<form id="adv-settings" action="" method="post">
-	<?php if ( isset($wp_meta_boxes[$screen->id]) ) : ?>
-		<h5><?php _ex('Show on screen', 'Metaboxes') ?></h5>
-		<div class="metabox-prefs">
-			<?php meta_box_prefs($screen); ?>
-			<br class="clear" />
-		</div>
+		foreach ( $columns as $column => $title ) {
+			// Can't hide these for they are special
+			if ( in_array( $column, $special ) )
+				continue;
+			if ( empty( $title ) )
+				continue;
+
+			if ( 'comments' == $column )
+				$title = __( 'Comments' );
+			$id = "$column-hide";
+			echo '<label for="' . $id . '">';
+			echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" id="' . $id . '" value="' . $column . '"' . checked( !in_array($column, $hidden), true, false ) . ' />';
+			echo "$title</label>\n";
+		}
+		?>
+				<br class="clear" />
+			</div>
 		<?php endif;
-		if ( ! empty($columns) ) : ?>
-		<h5><?php echo ( isset( $columns['_title'] ) ?  $columns['_title'] :  _x('Show on screen', 'Columns') ) ?></h5>
-		<div class="metabox-prefs">
-<?php
-	$special = array('_title', 'cb', 'comment', 'media', 'name', 'title', 'username', 'blogname');
+		echo screen_layout( $screen );
 
-	foreach ( $columns as $column => $title ) {
-		// Can't hide these for they are special
-		if ( in_array( $column, $special ) )
-			continue;
-		if ( empty( $title ) )
-			continue;
+		if ( !empty( $screen_options ) ) {
+			?>
+			<h5><?php _ex('Show on screen', 'Screen Options') ?></h5>
+			<?php
+		}
 
-		if ( 'comments' == $column )
-			$title = __( 'Comments' );
-		$id = "$column-hide";
-		echo '<label for="' . $id . '">';
-		echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" id="' . $id . '" value="' . $column . '"' . checked( !in_array($column, $hidden), true, false ) . ' />';
-		echo "$title</label>\n";
-	}
-?>
-			<br class="clear" />
-		</div>
-	<?php endif;
-	echo screen_layout($screen);
+		echo $screen_options;
+		echo $settings; ?>
+		<div><?php wp_nonce_field( 'screen-options-nonce', 'screenoptionnonce', false ); ?></div>
+	</form><!-- #adv-settings -->
+	<?php
+}
 
-	if ( !empty( $screen_options ) ) {
-		?>
-		<h5><?php _ex('Show on screen', 'Screen Options') ?></h5>
-		<?php
-	}
+/**
+ * Outputs the contextual help content.
+ *
+ * @since 3.2.0
+ *
+ * @param string $screen The current page's screen.
+ */
+function wp_screen_meta_contextual_help( $screen ) {
+	global $_wp_contextual_help;
 
-	echo $screen_options;
-	echo $settings; ?>
-<div><?php wp_nonce_field( 'screen-options-nonce', 'screenoptionnonce', false ); ?></div>
-</form>
-</div>
+	if ( !isset($_wp_contextual_help) )
+		$_wp_contextual_help = array();
 
-<?php endif; // $show_screen
+	$_wp_contextual_help = apply_filters( 'contextual_help_list', $_wp_contextual_help, $screen );
+	
+	$contextual_help = '';
 
-	$_wp_contextual_help = apply_filters('contextual_help_list', $_wp_contextual_help, $screen);
-	?>
-	<div id="contextual-help-wrap" class="hidden">
-	<?php
-	$contextual_help = '';
-	if ( isset($_wp_contextual_help[$screen->id]) ) {
-		$contextual_help .= '<div class="metabox-prefs">' . $_wp_contextual_help[$screen->id] . "</div>\n";
+	if ( isset($_wp_contextual_help[$screen]) ) {
+		$contextual_help .= '<div class="metabox-prefs">' . $_wp_contextual_help[$screen] . "</div>\n";
 	} else {
 		$contextual_help .= '<div class="metabox-prefs">';
-		$default_help = __('<a href="http://codex.wordpress.org/" target="_blank">Documentation</a>');
+		$default_help = __( '<a href="http://codex.wordpress.org/" target="_blank">Documentation</a>' );
 		$default_help .= '<br />';
-		$default_help .= __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>');
-		$contextual_help .= apply_filters('default_contextual_help', $default_help);
+		$default_help .= __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' );
+		$contextual_help .= apply_filters( 'default_contextual_help', $default_help );
 		$contextual_help .= "</div>\n";
 	}
+	
+	// Backwards compat.
+	$screen_object = convert_to_screen( $screen );
 
-	echo apply_filters('contextual_help', $contextual_help, $screen->id, $screen);
-	?>
-	</div>
-
-<div id="screen-meta-links">
-<div id="contextual-help-link-wrap" class="hide-if-no-js screen-meta-toggle">
-<a href="#contextual-help" id="contextual-help-link" class="show-settings"><?php _e('Help') ?></a>
-</div>
-<?php if ( $show_screen ) { ?>
-<div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle">
-<a href="#screen-options" id="show-settings-link" class="show-settings"><?php _e('Screen Options') ?></a>
-</div>
-<?php } ?>
-</div>
-</div>
-<?php
+	echo apply_filters( 'contextual_help', $contextual_help, $screen, $screen_object );
 }
 
 /**
Index: wp-admin/js/common.dev.js
===================================================================
--- wp-admin/js/common.dev.js	(revision 17533)
+++ wp-admin/js/common.dev.js	(working copy)
@@ -207,37 +207,26 @@
 	$('div.wrap h2:first').nextAll('div.updated, div.error').addClass('below-h2');
 	$('div.updated, div.error').not('.below-h2, .inline').insertAfter( $('div.wrap h2:first') );
 
-	// screen settings tab
-	$('#show-settings-link').click(function () {
-		if ( ! $('#screen-options-wrap').hasClass('screen-options-open') )
-			$('#contextual-help-link-wrap').css('visibility', 'hidden');
+	// screen meta tabs
+	$('.screen-meta a.show-settings').click(function(e) {	
+		var id = $(e.target).attr('href');
+		id = id.substring( 0, id.length - 5 ); // remove the -wrap
 
-		$('#screen-options-wrap').slideToggle('fast', function(){
-			if ( $(this).hasClass('screen-options-open') ) {
-				$('#show-settings-link').css({'backgroundPosition':'top '+bgx});
-				$('#contextual-help-link-wrap').css('visibility', '');
-				$(this).removeClass('screen-options-open');
-			} else {
-				$('#show-settings-link').css({'backgroundPosition':'bottom '+bgx});
-				$(this).addClass('screen-options-open');
-			}
-		});
-		return false;
-	});
+		// Maybe hide all other tabs if we're closing.
+		if ( ! $(id + '-wrap' ).hasClass('screen-tab-open') )
+			$('.screen-meta-toggle').not( id + '-link-wrap').css( 'visibility', 'hidden' );
 
-	// help tab
-	$('#contextual-help-link').click(function () {
-		if ( ! $('#contextual-help-wrap').hasClass('contextual-help-open') )
-			$('#screen-options-link-wrap').css('visibility', 'hidden');
-
-		$('#contextual-help-wrap').slideToggle('fast', function() {
-			if ( $(this).hasClass('contextual-help-open') ) {
-				$('#contextual-help-link').css({'backgroundPosition':'top '+bgx});
-				$('#screen-options-link-wrap').css('visibility', '');
-				$(this).removeClass('contextual-help-open');
+		// Open the clicked tab.
+		$(id + '-wrap').slideToggle('fast', function(e) {
+			// If a tab is open, close it and make the other tabs visible.
+			if ( $(this).hasClass( 'screen-tab-open' ) ) {
+				$(id + '-link').css( { 'backgroundPosition' : 'top ' + bgx } );
+				$('.screen-meta-toggle').not( id +'-link-wrap' ).css( 'visibility', '' );
+				$(this).removeClass( 'screen-tab-open' );
+			// Open a tab.
 			} else {
-				$('#contextual-help-link').css({'backgroundPosition':'bottom '+bgx});
-				$(this).addClass('contextual-help-open');
+				$(id + '-link').css( { 'backgroundPosition' : 'bottom ' + bgx } );
+				$(this).addClass( 'screen-tab-open' );
 			}
 		});
 		return false;
Index: wp-admin/css/colors-classic.dev.css
===================================================================
--- wp-admin/css/colors-classic.dev.css	(revision 17533)
+++ wp-admin/css/colors-classic.dev.css	(working copy)
@@ -1279,6 +1279,7 @@
 	color: #D54E21;
 }
 
+.screen-meta-tab-wrap,
 #screen-options-wrap,
 #contextual-help-wrap {
 	background-color: #F8F7F3;
Index: wp-admin/css/wp-admin.dev.css
===================================================================
--- wp-admin/css/wp-admin.dev.css	(revision 17533)
+++ wp-admin/css/wp-admin.dev.css	(working copy)
@@ -776,6 +776,7 @@
 	text-decoration: none;
 }
 
+.screen-meta-tab-wrap h5,
 #screen-options-wrap h5,
 #contextual-help-wrap h5 {
 	margin: 8px 0;
