WordPress.org

Make WordPress Core

Changeset 9557


Ignore:
Timestamp:
11/06/08 22:21:27 (5 years ago)
Author:
ryan
Message:

screen_meta() fixes. Show Help on more pages.

Location:
trunk/wp-admin
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/categories.php

    r9545 r9557  
    132132?> 
    133133 
    134 <?php screen_meta('category') ?> 
     134<?php screen_meta('edit-categories') ?> 
    135135 
    136136<div class="wrap nosubsub"> 
  • trunk/wp-admin/edit-comments.php

    r9556 r9557  
    8282$search = attribute_escape( $search_dirty ); ?> 
    8383 
    84 <?php screen_meta('comment') ?> 
     84<?php screen_meta('edit-comments') ?> 
    8585 
    8686<div class="wrap"> 
  • trunk/wp-admin/edit-form-advanced.php

    r9555 r9557  
    472472 
    473473?> 
    474 <?php screen_meta('post', 1, 'edit-post'); ?> 
     474<?php screen_meta('post'); ?> 
    475475 
    476476<?php if ( (isset($mode) && 'bookmarklet' == $mode) || isset($_GET['popupurl']) ): ?> 
  • trunk/wp-admin/edit-link-categories.php

    r9545 r9557  
    6161$messages[6] = __('Categories deleted.'); ?> 
    6262 
    63 <?php screen_meta('link-category') ?> 
     63<?php screen_meta('edit-link-categories') ?> 
    6464 
    6565<div class="wrap nosubsub"> 
  • trunk/wp-admin/edit-link-form.php

    r9545 r9557  
    310310add_meta_box('linkadvanceddiv', __('Advanced'), 'link_advanced_meta_box', 'link', 'normal', 'core'); ?> 
    311311 
    312 <?php screen_meta('link', 1) ?> 
     312<?php screen_meta('link') ?> 
    313313 
    314314<div class="wrap"> 
  • trunk/wp-admin/edit-page-form.php

    r9545 r9557  
    377377?> 
    378378 
    379 <?php screen_meta('page', 1); ?> 
     379<?php screen_meta('page'); ?> 
    380380 
    381381<div class="wrap"> 
  • trunk/wp-admin/edit-pages.php

    r9556 r9557  
    101101require_once('admin-header.php'); ?> 
    102102 
    103 <?php screen_meta('page') ?> 
     103<?php screen_meta('edit-pages') ?> 
    104104 
    105105<div class="wrap"> 
  • trunk/wp-admin/edit-tags.php

    r9545 r9557  
    130130$messages[6] = __('Tags deleted.'); ?> 
    131131 
    132 <?php screen_meta('tag') ?> 
     132<?php screen_meta('edit-tags') ?> 
    133133 
    134134<div class="wrap nosubsub"> 
  • trunk/wp-admin/edit.php

    r9556 r9557  
    9191    $mode = attribute_escape($_GET['mode']); ?> 
    9292 
    93 <?php screen_meta('post') ?> 
     93<?php screen_meta('edit-posts') ?> 
    9494 
    9595<div class="wrap"> 
  • trunk/wp-admin/includes/template.php

    r9556 r9557  
    823823            return apply_filters('manage_users_columns', $columns); 
    824824        default : 
    825             return apply_filters('manage_' . $page . '_columns', $columns); 
    826     } 
    827  
    828     return $columns; 
     825            return apply_filters('manage_' . $page . '_columns', array()); 
     826    } 
    829827} 
    830828 
     
    31233121} 
    31243122 
    3125 function screen_meta($screen, $metabox = false, $page = '') { 
     3123function screen_meta($screen) { 
     3124    global $wp_meta_boxes; 
     3125 
     3126    $column_screens = array('edit-posts' => 'post', 'edit-pages' => 'page', 'edit-tags' => 'tag', 'edit-categories' => 'category', 
     3127        'edit-link-categories' => 'link-category', 'edit-links' => 'link', 'edit-users' => 'user', 'edit-media' => 'media', 
     3128        'edit-comments' => 'comment'); 
     3129 
     3130    $show_screen = false; 
     3131    if ( !empty($wp_meta_boxes[$screen]) || !empty($column_screens[$screen]) ) 
     3132        $show_screen = true; 
    31263133?> 
    31273134<div id="screen-meta"> 
     3135<?php 
     3136    if ( $show_screen ) : 
     3137?> 
    31283138<div id="screen-options-wrap" class="hidden"> 
    31293139    <h5><?php _e('Show on screen') ?></h5> 
     
    31313141    <div class="metabox-prefs"> 
    31323142<?php  
    3133     if ( $metabox ) { 
    3134         meta_box_prefs($screen); 
    3135     } else { 
    3136         manage_columns_prefs($screen); 
     3143    if ( !meta_box_prefs($screen) ) { 
     3144        manage_columns_prefs($column_screens[$screen]); 
    31373145        wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false );  
    31383146    } 
     
    31433151 
    31443152<?php 
    3145     if ( '' != $page ) { 
    3146 // Allow a plugin to short-circuit 
    3147         $help = apply_filters('contextual_help', '', $page); 
    3148         if ( !empty($help) ) 
    3149             return; 
    3150      
    3151         global $title; 
    3152  
    3153         $help['edit-post'] =  __('<a href="http://codex.wordpress.org/Writing_Posts" target="_blank">Writing Posts</a>'); 
    3154         $help['general-settings'] =  __('<a href="http://codex.wordpress.org/Settings_General_SubPanel" target="_blank">General Settings</a>'); 
     3153    endif; 
     3154 
     3155    global $title; 
     3156 
     3157    $help['post'] =  __('<a href="http://codex.wordpress.org/Writing_Posts" target="_blank">Writing Posts</a>'); 
     3158    $help['general-settings'] =  __('<a href="http://codex.wordpress.org/Settings_General_SubPanel" target="_blank">General Settings</a>'); 
    31553159    ?> 
    31563160    <div id="contextual-help-wrap" class="hidden"> 
    31573161    <?php 
    3158         if ( isset($help[$page]) ) { 
    3159             if ( isset($title) && 'edit-post' != $page ) 
     3162    if ( !apply_filters('contextual_help', '', $screen) ) { 
     3163        if ( isset($help[$screen]) ) { 
     3164            if ( isset($title) ) 
    31603165                echo '<h5>' . sprintf(__('Get help with "%s"'), $title) . '</h5>'; 
    31613166            else 
    31623167                echo '<h5>' . __('Get help with this page') . '</h5>'; 
    3163             echo '<div class="metabox-prefs">' . $help[$page] . "</div>\n"; 
     3168            echo '<div class="metabox-prefs">' . $help[$screen] . "</div>\n"; 
    31643169     
    31653170            echo '<h5>' . __('Other Help') . '</h5>'; 
     
    31733178        _e('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>'); 
    31743179        echo "</div>\n"; 
     3180    } 
    31753181    ?> 
    31763182    </div> 
    3177     <?php 
    3178     } 
    3179 ?> 
    31803183 
    31813184<div id="screen-meta-links"> 
    3182 <?php if ( '' != $page ) { ?> 
    31833185<div id="contextual-help-link-wrap" class="hide-if-no-js screen-meta-toggle"> 
    31843186<a href="#contextual-help" id="contextual-help-link" class="show-settings"><?php _e('Help') ?></a> 
    31853187</div> 
    3186 <?php } ?> 
     3188<?php if ( $show_screen ) { ?> 
    31873189<div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle"> 
    31883190<a href="#screen-options" id="show-settings-link" class="show-settings"><?php _e('Screen Options') ?></a> 
    31893191</div> 
     3192<?php } ?> 
    31903193</div> 
    31913194</div> 
  • trunk/wp-admin/index.php

    r9545 r9557  
    2929?> 
    3030 
    31 <?php screen_meta('dashboard', 1); ?> 
     31<?php screen_meta('dashboard'); ?> 
    3232 
    3333<div class="wrap"> 
  • trunk/wp-admin/link-manager.php

    r9545 r9557  
    7575} ?> 
    7676 
    77 <?php screen_meta('link') ?> 
     77<?php screen_meta('edit-links') ?> 
    7878 
    7979<div class="wrap nosubsub"> 
  • trunk/wp-admin/upload.php

    r9556 r9557  
    146146require_once('admin-header.php'); ?> 
    147147 
    148 <?php screen_meta('media') ?> 
     148<?php screen_meta('edit-media') ?> 
    149149 
    150150<?php 
  • trunk/wp-admin/users.php

    r9556 r9557  
    238238    endif; ?> 
    239239 
    240 <?php screen_meta('user') ?> 
     240<?php screen_meta('edit-users') ?> 
    241241 
    242242<?php if ( isset($errors) && is_wp_error( $errors ) ) : ?> 
Note: See TracChangeset for help on using the changeset viewer.