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 ); ?>