Make WordPress Core

Changeset 18914


Ignore:
Timestamp:
10/07/2011 05:23:33 AM (13 years ago)
Author:
nacin
Message:

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.

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/screen.php

    r18913 r18914  
    267267 *
    268268 * @param string $option An option name.
    269  * @param mixed $args Option dependent arguments
     269 * @param mixed $args Option-dependent arguments.
    270270 * @return void
    271271 */
     
    577577     *
    578578     * @param string $option Option ID
    579      * @param array $args Associative array of arguments particular to the given $option.
     579     * @param mixed $args Option-dependent arguments.
    580580     */
    581581    public function add_option( $option, $args = array() ) {
     
    659659                'callback' => array( $this, 'render_screen_options' ),
    660660            ) );
     661            $_options_tab = array_pop( $this->_help_tabs );
     662            array_unshift( $this->_help_tabs, $_options_tab );
    661663        }
    662664
     
    758760        ?>
    759761        <form id="adv-settings" action="" method="post">
    760         <?php if ( isset( $wp_meta_boxes[ $this->id ] ) ) : ?>
     762        <?php
     763        if ( isset( $this->_options['overview'] ) )
     764            echo $this->_options['overview'];
     765        if ( isset( $wp_meta_boxes[ $this->id ] ) ) : ?>
    761766            <h5><?php _ex('Show on screen', 'Metaboxes') ?></h5>
    762767            <div class="metabox-prefs">
  • trunk/wp-admin/index.php

    r18911 r18914  
    2929
    3030
     31add_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>' );
     32
    3133// Help tabs
    32 
    33 $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>';
    34 
    35 $current_screen->add_help_tab( array(
    36     'title'   => __('Overview'),
    37     'content' => $help_overview,
    38 ) );
    3934
    4035$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>';
Note: See TracChangeset for help on using the changeset viewer.