Make WordPress Core


Ignore:
Timestamp:
10/07/2011 05:23:33 AM (15 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.

File:
1 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">
Note: See TracChangeset for help on using the changeset viewer.