Changeset 10641 for trunk/wp-admin/includes/template.php
- Timestamp:
- 02/24/2009 02:37:22 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/template.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r10629 r10641 3301 3301 <br class="clear" /> 3302 3302 </div></form> 3303 <?php echo screen_layout($screen); ?> 3303 3304 </div> 3304 3305 … … 3311 3312 $_wp_contextual_help = array(); 3312 3313 3313 if ( !isset($_wp_contextual_help['post']) ) { 3314 $help = drag_drop_help(); 3315 $help .= '<p>' . __('<a href="http://codex.wordpress.org/Writing_Posts" target="_blank">Writing Posts</a>') . '</p>'; 3316 $_wp_contextual_help['post'] = $help; 3317 } 3318 3319 if ( !isset($_wp_contextual_help['page']) ) { 3320 $help = drag_drop_help(); 3321 $_wp_contextual_help['page'] = $help; 3322 } 3323 3324 if ( !isset($_wp_contextual_help['dashboard']) ) { 3325 $help = drag_drop_help(); 3326 $_wp_contextual_help['dashboard'] = $help; 3327 } 3328 3329 if ( !isset($_wp_contextual_help['link']) ) { 3330 $help = drag_drop_help(); 3331 $_wp_contextual_help['link'] = $help; 3332 } 3333 3334 if ( !isset($_wp_contextual_help['options-general']) ) 3335 $_wp_contextual_help['options-general'] = __('<a href="http://codex.wordpress.org/Settings_General_SubPanel" target="_blank">General Settings</a>'); 3314 switch ( $screen ) { 3315 case 'post': 3316 if ( !isset($_wp_contextual_help['post']) ) { 3317 $help = drag_drop_help(); 3318 $help .= '<p>' . __('<a href="http://codex.wordpress.org/Writing_Posts" target="_blank">Writing Posts</a>') . '</p>'; 3319 $_wp_contextual_help['post'] = $help; 3320 } 3321 break; 3322 case 'page': 3323 if ( !isset($_wp_contextual_help['page']) ) { 3324 $help = drag_drop_help(); 3325 $_wp_contextual_help['page'] = $help; 3326 } 3327 break; 3328 case 'dashboard': 3329 if ( !isset($_wp_contextual_help['dashboard']) ) { 3330 $help = '<p>' . __('The modules on this screen can be arranged in several columns. You can select the number of columns from the Screen Options tab.') . "</p>\n"; 3331 $help .= drag_drop_help(); 3332 $_wp_contextual_help['dashboard'] = $help; 3333 } 3334 break; 3335 case 'link': 3336 if ( !isset($_wp_contextual_help['link']) ) { 3337 $help = drag_drop_help(); 3338 $_wp_contextual_help['link'] = $help; 3339 } 3340 break; 3341 case 'options-general': 3342 if ( !isset($_wp_contextual_help['options-general']) ) 3343 $_wp_contextual_help['options-general'] = __('<a href="http://codex.wordpress.org/Settings_General_SubPanel" target="_blank">General Settings</a>'); 3344 break; 3345 } 3336 3346 3337 3347 $_wp_contextual_help = apply_filters('contextual_help_list', $_wp_contextual_help, $screen); … … 3399 3409 } 3400 3410 3411 3412 function screen_layout($screen) { 3413 global $screen_layout_columns; 3414 3415 if ( 'dashboard' == $screen ) { 3416 $screen_layout_columns = get_user_option('screen_layout_dashboard'); 3417 $num = 4; 3418 /* add to the write pages? 3419 } elseif ( in_array( $screen, array('post', 'page', 'link') ) ) { 3420 $screen_layout_columns = get_user_option('screen_layout_write'); 3421 $num = 2; 3422 */ 3423 } else { 3424 $screen_layout_columns = 0; 3425 return ''; 3426 } 3427 3428 if ( ! $screen_layout_columns ) 3429 $screen_layout_columns = 2; 3430 3431 $i = 1; 3432 $return = '<h5>' . __('Screen Layout') . "</h5>\n<div class='columns-prefs'>" . __('Number of Columns:') . "\n"; 3433 while ( $i <= $num ) { 3434 $return .= "<label><input type='radio' name='screen_columns' value='$i'" . ( ($screen_layout_columns == $i) ? " checked='checked'" : "" ) . " /> $i</label>\n"; 3435 ++$i; 3436 } 3437 $return .= "</div>\n"; 3438 return $return; 3439 } 3440 3401 3441 function screen_icon($name = '') { 3402 3442 global $parent_file, $hook_suffix;
Note: See TracChangeset
for help on using the changeset viewer.