Some basic help for screens that have postboxes

git-svn-id: https://develop.svn.wordpress.org/trunk@10089 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2008-12-06 20:54:51 +00:00
parent 9791e0dd60
commit 9155619b9e
2 changed files with 32 additions and 8 deletions

View File

@ -3312,10 +3312,31 @@ function screen_meta($screen) {
if ( !isset($_wp_contextual_help) )
$_wp_contextual_help = array();
if ( !isset($_wp_contextual_help['post']) )
$_wp_contextual_help['post'] = __('<a href="http://codex.wordpress.org/Writing_Posts" target="_blank">Writing Posts</a>');
if ( !isset($_wp_contextual_help['post']) ) {
$help = drag_drop_help();
$help .= '<p>' . __('<a href="http://codex.wordpress.org/Writing_Posts" target="_blank">Writing Posts</a>') . '</p>';
$_wp_contextual_help['post'] = $help;
}
if ( !isset($_wp_contextual_help['page']) ) {
$help = drag_drop_help();
$_wp_contextual_help['page'] = $help;
}
if ( !isset($_wp_contextual_help['dashboard']) ) {
$help = drag_drop_help();
$_wp_contextual_help['dashboard'] = $help;
}
if ( !isset($_wp_contextual_help['link']) ) {
$help = drag_drop_help();
$_wp_contextual_help['link'] = $help;
}
if ( !isset($_wp_contextual_help['options-general']) )
$_wp_contextual_help['options-general'] = __('<a href="http://codex.wordpress.org/Settings_General_SubPanel" target="_blank">General Settings</a>');
$_wp_contextual_help = apply_filters('contextual_help_list', $_wp_contextual_help, $screen);
?>
<div id="contextual-help-wrap" class="hidden">
@ -3373,6 +3394,13 @@ function add_contextual_help($screen, $help) {
$_wp_contextual_help[$screen] = $help;
}
function drag_drop_help() {
return '
<p>' . __('Most of the modules on this screen can be moved. If you hover your mouse over the title bar of a module youll notice the 4 arrow cursor appears to let you know it is movable. Click on it, hold down the mouse button and start dragging the module to a new location. As you drag the module, notice the dotted gray box that also moves. This box indicates where the module will be placed when you release the mouse button.') . '</p>
<p>' . __('The same modules can be expanded and collapsed by clicking once on their title bar and also completely hidden from the Screen Options tab.') . '</p>
';
}
function screen_icon($name = '') {
global $parent_file, $hook_suffix;

View File

@ -2308,8 +2308,7 @@ fieldset {
#screen-options-wrap h5,
#contextual-help-wrap h5 {
padding: 10px 0 0 15px;
margin: 0;
margin: 8px 0;
font-size: 13px;
}
@ -2319,16 +2318,13 @@ fieldset {
border-top: 0 none;
border-width: 0 1px 1px;
margin: 0 15px;
padding: 8px 12px 12px;
-moz-border-radius: 0 0 0 4px;
-webkit-border-bottom-left-radius: 4px;
-khtml-border-bottom-left-radius: 4px;
border-bottom-left-radius: 4px;
}
.metabox-prefs {
padding: 5px 5px 10px 10px;
}
.metabox-prefs label {
padding-right: 15px;
white-space: nowrap;