Make WordPress Core


Ignore:
Timestamp:
11/12/2008 05:11:49 PM (15 years ago)
Author:
ryan
Message:

screen_meta() and contextual help improvements from filosofo. fixes #8172

File:
1 edited

Legend:

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

    r9634 r9636  
    31753175}
    31763176
    3177 function screen_meta($screen) {
     3177function screen_meta($screen, $suffix = '') {
    31783178    global $wp_meta_boxes;
    31793179
     
    32223222    <div id="contextual-help-wrap" class="hidden">
    32233223    <?php
    3224     if ( !apply_filters('contextual_help', '', $screen) ) {
    3225         if ( isset($help[$screen]) ) {
    3226             if ( isset($title) )
    3227                 echo '<h5>' . sprintf(__('Get help with "%s"'), $title) . '</h5>';
    3228             else
    3229                 echo '<h5>' . __('Get help with this page') . '</h5>';
    3230             echo '<div class="metabox-prefs">' . $help[$screen] . "</div>\n";
    3231    
    3232             echo '<h5>' . __('Other Help') . '</h5>';
    3233         } else {
    3234             echo '<h5>' . __('Help') . '</h5>';
    3235         }
    3236 
    3237         echo '<div class="metabox-prefs">';
    3238         _e('<a href="http://codex.wordpress.org/" target="_blank">Documentation</a>');
    3239         echo '<br />';
    3240         _e('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>');
    3241         echo "</div>\n";
    3242     }
     3224    $contextual_help = '';
     3225    if ( isset($help[$screen]) ) {
     3226        if ( isset($title) )
     3227            $contextual_help .= '<h5>' . sprintf(__('Get help with "%s"'), $title) . '</h5>';
     3228        else
     3229            $contextual_help .= '<h5>' . __('Get help with this page') . '</h5>';
     3230        $contextual_help .= '<div class="metabox-prefs">' . $help[$screen] . "</div>\n";
     3231
     3232        $contextual_help .= '<h5>' . __('Other Help') . '</h5>';
     3233    } else {
     3234        $contextual_help .= '<h5>' . __('Help') . '</h5>';
     3235    }
     3236
     3237    $contextual_help .= '<div class="metabox-prefs">';
     3238    $contextual_help .= __('<a href="http://codex.wordpress.org/" target="_blank">Documentation</a>');
     3239    $contextual_help .= '<br />';
     3240    $contextual_help .= __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>');
     3241    $contextual_help .= "</div>\n";
     3242    echo apply_filters('contextual_help', $contextual_help, $screen, $suffix);
    32433243    ?>
    32443244    </div>
Note: See TracChangeset for help on using the changeset viewer.