Changeset 14157
- Timestamp:
- 04/18/2010 05:15:58 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r14156 r14157 3582 3582 3583 3583 $show_screen = false; 3584 $show_on_screen = false; 3585 if ( !empty($wp_meta_boxes[$screen->id]) || !empty($column_screens) ) { 3584 if ( !empty($wp_meta_boxes[$screen->id]) || !empty($column_screens) ) 3586 3585 $show_screen = true; 3587 $show_on_screen = true;3588 }3589 3586 3590 3587 $screen_options = screen_options($screen); … … 3610 3607 <div id="screen-options-wrap" class="hidden"> 3611 3608 <form id="adv-settings" action="" method="post"> 3612 <?php if ( $show_on_screen ) : ?>3613 3609 <h5><?php _e('Show on screen') ?></h5> 3614 3610 <div class="metabox-prefs"> … … 3620 3616 <br class="clear" /> 3621 3617 </div> 3622 <?php endif; ?>3623 3618 <?php echo screen_layout($screen); ?> 3624 3619 <?php echo $screen_options; ?> … … 3750 3745 switch ( $screen->base ) { 3751 3746 case 'edit': 3752 $per_page_label = __('Posts per page:');3753 break;3754 3747 case 'edit-pages': 3755 $per_page_label = __('Pages per page:'); 3748 $post_type = 'post'; 3749 if ( isset($_GET['post_type']) && in_array( $_GET['post_type'], get_post_types( array('public' => true ) ) ) ) 3750 $post_type = $_GET['post_type']; 3751 $post_type_object = get_post_type_object($post_type); 3752 $per_page_label = $post_type_object->label; 3756 3753 break; 3757 3754 case 'ms-sites': 3758 $per_page_label = __('Sites per page:');3755 $per_page_label = __('Sites'); 3759 3756 break; 3760 3757 case 'ms-users': 3761 $per_page_label = __('Users per page:');3758 $per_page_label = __('Users'); 3762 3759 break; 3763 3760 case 'edit-comments': 3764 $per_page_label = __('Comments per page:');3761 $per_page_label = __('Comments'); 3765 3762 break; 3766 3763 case 'upload': 3767 $per_page_label = __('Media items per page:');3764 $per_page_label = __('Media items'); 3768 3765 break; 3769 3766 case 'edit-tags': 3770 global $taxonomy, $tax; 3771 if ( 'post_tag' == $taxonomy ) 3772 $per_page_label = __('Tags per page:'); 3773 elseif ( 'category' == $taxonomy ) 3774 $per_page_label = __('Categories per page:'); 3775 else 3776 $per_page_label = sprintf(_x('%s per page:', '%s: plural taxonomy name'), $tax->label); 3767 global $tax; 3768 $per_page_label = $tax->label; 3777 3769 break; 3778 3770 case 'plugins': 3779 $per_page_label = __('Plugins per page:');3771 $per_page_label = __('Plugins'); 3780 3772 break; 3781 3773 default: … … 3806 3798 $per_page = apply_filters( $option, $per_page ); 3807 3799 3808 $return = '<h5>' . __('Options') . "</h5>\n"; 3809 $return .= "<div class='screen-options'>\n"; 3800 $return = "<div class='screen-options'>\n"; 3810 3801 if ( !empty($per_page_label) ) 3811 $return .= "< label for='$option'>$per_page_label</label> <input type='text' class='screen-per-page' name='wp_screen_options[value]' id='$option' maxlength='3' value='$per_page' />\n";3802 $return .= "<input type='text' class='screen-per-page' name='wp_screen_options[value]' id='$option' maxlength='3' value='$per_page' /> <label for='$option'>$per_page_label</label>\n"; 3812 3803 $return .= "<input type='submit' class='button' value='" . esc_attr__('Apply') . "' />"; 3813 3804 $return .= "<input type='hidden' name='wp_screen_options[option]' value='" . esc_attr($option) . "' />";
Note: See TracChangeset
for help on using the changeset viewer.