Move the Screen Options tab to the top and introduce a new 'overview' screen option, which accepts content for the top of this tab. see #18785.

git-svn-id: https://develop.svn.wordpress.org/trunk@18914 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2011-10-07 05:23:33 +00:00
parent e6292eed96
commit fa861b4bf3
2 changed files with 10 additions and 10 deletions

View File

@ -266,7 +266,7 @@ function add_contextual_help($screen, $help) {
* @since 3.1.0
*
* @param string $option An option name.
* @param mixed $args Option dependent arguments
* @param mixed $args Option-dependent arguments.
* @return void
*/
function add_screen_option( $option, $args = array() ) {
@ -576,7 +576,7 @@ final class WP_Screen {
* @since 3.3.0
*
* @param string $option Option ID
* @param array $args Associative array of arguments particular to the given $option.
* @param mixed $args Option-dependent arguments.
*/
public function add_option( $option, $args = array() ) {
$this->_options[ $option ] = $args;
@ -658,6 +658,8 @@ final class WP_Screen {
'title' => __('Screen Options'),
'callback' => array( $this, 'render_screen_options' ),
) );
$_options_tab = array_pop( $this->_help_tabs );
array_unshift( $this->_help_tabs, $_options_tab );
}
// Time to render!
@ -757,7 +759,10 @@ final class WP_Screen {
?>
<form id="adv-settings" action="" method="post">
<?php if ( isset( $wp_meta_boxes[ $this->id ] ) ) : ?>
<?php
if ( isset( $this->_options['overview'] ) )
echo $this->_options['overview'];
if ( isset( $wp_meta_boxes[ $this->id ] ) ) : ?>
<h5><?php _ex('Show on screen', 'Metaboxes') ?></h5>
<div class="metabox-prefs">
<?php meta_box_prefs( $this ); ?>

View File

@ -28,15 +28,10 @@ else
add_screen_option('layout_columns', array('max' => 4, 'default' => 2) );
add_screen_option( 'overview', '<p>' . __( 'Welcome to your WordPress Dashboard! This is the screen you will see when you log in to your site, and gives you access to all the site management features of WordPress. You can get help for any screen by clicking the Help tab in the top bar.' ) . '</p>' );
// Help tabs
$help_overview = '<p>' . __('Welcome to your WordPress Dashboard! This is the screen you will see when you log in to your site, and gives you access to all the site management features of WordPress. You can get help for any screen by clicking the Help tab in the top bar.') . '</p>';
$current_screen->add_help_tab( array(
'title' => __('Overview'),
'content' => $help_overview,
) );
$help_navigation = '<p>' . __('The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.') . '</p>';
$help_navigation .= '<p>' . __('Links in the &#8220;admin bar&#8221; at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.') . '</p>';