WordPress.org

Make WordPress Core

Changeset 9545


Ignore:
Timestamp:
11/06/2008 08:13:50 AM (10 years ago)
Author:
azaozz
Message:

Help tab

Location:
trunk/wp-admin
Files:
16 edited

Legend:

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

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

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

    r9528 r9545  
    472472
    473473?>
    474 
    475 <?php screen_options('post', 1) ?>
     474<?php screen_meta('post', 1, 'edit-post'); ?>
    476475
    477476<?php if ( (isset($mode) && 'bookmarklet' == $mode) || isset($_GET['popupurl']) ): ?>
  • trunk/wp-admin/edit-link-categories.php

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

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

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

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

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

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

    r9529 r9545  
    31233123}
    31243124
    3125 function screen_options($screen, $metabox = false) {
     3125function screen_meta($screen, $metabox = false, $page = '') {
    31263126?>
    3127 <div id="screen-options">
    3128     <div id="screen-options-wrap" class="hidden">
     3127<div id="screen-meta">
     3128<div id="screen-options-wrap" class="hidden">
    31293129    <h5><?php _e('Show on screen') ?></h5>
    31303130    <form id="adv-settings" action="" method="get">
     
    31403140    <br class="clear" />
    31413141    </div></form>
     3142</div>
     3143
     3144<?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">Writing Posts</a>');
     3154        $help['general-settings'] =  __('<a href="http://codex.wordpress.org/Settings_General_SubPanel">General Settings</a>');
     3155    ?>
     3156    <div id="contextual-help-wrap" class="hidden">
     3157    <?php
     3158        if ( isset($help[$page]) ) {
     3159            if ( isset($title) && 'edit-post' != $page )
     3160                echo '<h5>' . sprintf(__('Get help with "%s"'), $title) . '</h5>';
     3161            else
     3162                echo '<h5>' . __('Get help with this page') . '</h5>';
     3163            echo '<div class="metabox-prefs">' . $help[$page] . "</div>\n";
     3164   
     3165            echo '<h5>' . __('Other Help') . '</h5>';
     3166        } else {
     3167            echo '<h5>' . __('Help') . '</h5>';
     3168        }
     3169   
     3170        echo '<div class="metabox-prefs">';
     3171        _e('<a href="http://codex.wordpress.org/">Documentation</a>');
     3172        echo '<br />';
     3173        _e('<a href="http://wordpress.org/support/">Support Forums</a>');
     3174        echo "</div>\n";
     3175    ?>
    31423176    </div>
    3143 
    3144     <div id="screen-options-link-wrap" class="hide-if-no-js screen-options-closed">
    3145     <a href="#screen-options" id="show-settings-link" class="show-settings"><?php _e('Screen Options') ?></a>
    3146     </div>
     3177    <?php
     3178    }
     3179?>
     3180
     3181
     3182<div id="screen-meta-links">
     3183<?php if ( '' != $page ) { ?>
     3184<div id="contextual-help-link-wrap" class="hide-if-no-js screen-meta-toggle">
     3185<a href="#contextual-help" id="contextual-help-link" class="show-settings"><?php _e('Help') ?></a>
     3186</div>
     3187<?php } ?>
     3188<div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle">
     3189<a href="#screen-options" id="show-settings-link" class="show-settings"><?php _e('Screen Options') ?></a>
     3190</div>
     3191</div>
    31473192</div>
    31483193<?php
     3194
     3195}
     3196
     3197function contextual_help(  ) {
     3198   
    31493199}
    31503200
  • trunk/wp-admin/index.php

    r9408 r9545  
    2929?>
    3030
    31 <?php screen_options('dashboard', 1); ?>
     31<?php screen_meta('dashboard', 1); ?>
    3232
    3333<div class="wrap">
  • trunk/wp-admin/js/settings-box.js

    r9454 r9545  
    11jQuery(document).ready( function($) {
    22    $('#show-settings-link').click(function () {
    3         $('#screen-options-wrap').slideToggle('normal', function(){
     3        $('#screen-options-wrap').slideToggle('fast', function(){
    44            if ( $(this).hasClass('screen-options-open') ) {
    55                $('#show-settings-link').css({'backgroundImage':'url("images/screen-options-right.gif")'});
     6                $('#contextual-help-link-wrap').removeClass('invisible');
    67                $(this).removeClass('screen-options-open');
     8               
    79            } else {
    810                $('#show-settings-link').css({'backgroundImage':'url("images/screen-options-right-up.gif")'});
     11                $('#contextual-help-link-wrap').addClass('invisible');
    912                $(this).addClass('screen-options-open');
     13            }
     14        });
     15        return false;
     16    }).parent();
     17    $('#contextual-help-link').click(function () {
     18        $('#contextual-help-wrap').slideToggle('fast', function(){
     19            if ( $(this).hasClass('contextual-help-open') ) {
     20                $('#contextual-help-link').css({'backgroundImage':'url("images/screen-options-right.gif")'});
     21                $('#screen-options-link-wrap').removeClass('invisible');
     22                $(this).removeClass('contextual-help-open');
     23            } else {
     24                $('#contextual-help-link').css({'backgroundImage':'url("images/screen-options-right-up.gif")'});
     25                $('#screen-options-link-wrap').addClass('invisible');
     26                $(this).addClass('contextual-help-open');
    1027            }
    1128        });
  • trunk/wp-admin/link-manager.php

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

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

    r9369 r9545  
    238238    endif; ?>
    239239
    240 <?php screen_options('user') ?>
     240<?php screen_meta('user') ?>
    241241
    242242<?php if ( isset($errors) && is_wp_error( $errors ) ) : ?>
  • trunk/wp-admin/wp-admin.css

    r9538 r9545  
     1
     2
     3
     4#wpbody {
     5    clear: both;
     6}
     7
    18.plugins .name,
    29#pass-strength-result.strong,
     
    14951502    padding: 6px 7px;
    14961503    margin: 0 0 10px;
     1504    line-height: 1;
    14971505}
    14981506
     
    15031511    border-width: 1px;
    15041512    border-style: solid;
     1513    line-height: 1;
    15051514    -moz-border-radius: 6px;
    15061515    -khtml-border-radius: 6px;
     
    23562365/* show/hide settings */
    23572366
    2358 #screen-options {
     2367#screen-meta {
    23592368    position: relative;
    23602369    clear: both;
    23612370}
    23622371
    2363 #wpbody {
    2364     clear: both;
    2365 }
    2366 
    2367 #screen-options-link-wrap {
     2372#screen-meta-links {
     2373    margin: 0 20px 0 0;
     2374}
     2375
     2376#screen-meta .invisible {
     2377    visibility: hidden;
     2378}
     2379
     2380#screen-options-link-wrap,
     2381#contextual-help-link-wrap {
    23682382    float: right;
    23692383    background: transparent url( images/screen-options-left.gif ) no-repeat 0 0;
     
    23712385    height: 23px;
    23722386    padding: 0;
    2373     position: relative;
    2374     right: 100px;
    2375     top: -1px;
    2376 }
    2377 
    2378 #screen-options a.show-settings {
     2387    margin: -1px 10px 0 0;
     2388}
     2389
     2390#screen-meta a.show-settings {
    23792391    text-decoration: none;
    23802392    z-index: 1;
     
    23892401}
    23902402
    2391 #screen-options a#show-settings-link {
     2403#screen-meta a.show-settings {
    23922404    background-image: url( images/screen-options-right.gif );
    23932405}
    23942406
    2395 #screen-options a#hide-settings-link {
    2396     background-image: url( images/screen-options-right-up.gif );
    2397 }
    2398 
    2399 #screen-options a.show-settings:hover {
     2407#screen-meta a.show-settings:hover {
    24002408    text-decoration: none;
    24012409}
    24022410
    2403 #screen-options-wrap h5 {
     2411#screen-options-wrap h5,
     2412#contextual-help-wrap h5 {
    24042413    padding: 10px 0 0 15px;
    24052414    margin: 0;
     
    24072416}
    24082417
    2409 #screen-options-wrap {
     2418#screen-options-wrap,
     2419#contextual-help-wrap {
    24102420    border-style: none solid solid;
    24112421    border-top: 0 none;
Note: See TracChangeset for help on using the changeset viewer.