Change the 'per page' screen options strings. fixes #12872, props caesarsgrunt.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-04-18 17:15:58 +00:00
parent b4da392519
commit a1c0cee221
1 changed files with 15 additions and 24 deletions

View File

@ -3581,11 +3581,8 @@ function screen_meta($screen) {
}
$show_screen = false;
$show_on_screen = false;
if ( !empty($wp_meta_boxes[$screen->id]) || !empty($column_screens) ) {
if ( !empty($wp_meta_boxes[$screen->id]) || !empty($column_screens) )
$show_screen = true;
$show_on_screen = true;
}
$screen_options = screen_options($screen);
if ( $screen_options )
@ -3609,7 +3606,6 @@ function screen_meta($screen) {
?>
<div id="screen-options-wrap" class="hidden">
<form id="adv-settings" action="" method="post">
<?php if ( $show_on_screen ) : ?>
<h5><?php _e('Show on screen') ?></h5>
<div class="metabox-prefs">
<?php
@ -3619,7 +3615,6 @@ function screen_meta($screen) {
?>
<br class="clear" />
</div>
<?php endif; ?>
<?php echo screen_layout($screen); ?>
<?php echo $screen_options; ?>
<?php echo $settings; ?>
@ -3749,34 +3744,31 @@ function screen_options($screen) {
switch ( $screen->base ) {
case 'edit':
$per_page_label = __('Posts per page:');
break;
case 'edit-pages':
$per_page_label = __('Pages per page:');
$post_type = 'post';
if ( isset($_GET['post_type']) && in_array( $_GET['post_type'], get_post_types( array('public' => true ) ) ) )
$post_type = $_GET['post_type'];
$post_type_object = get_post_type_object($post_type);
$per_page_label = $post_type_object->label;
break;
case 'ms-sites':
$per_page_label = __('Sites per page:');
$per_page_label = __('Sites');
break;
case 'ms-users':
$per_page_label = __('Users per page:');
$per_page_label = __('Users');
break;
case 'edit-comments':
$per_page_label = __('Comments per page:');
$per_page_label = __('Comments');
break;
case 'upload':
$per_page_label = __('Media items per page:');
$per_page_label = __('Media items');
break;
case 'edit-tags':
global $taxonomy, $tax;
if ( 'post_tag' == $taxonomy )
$per_page_label = __('Tags per page:');
elseif ( 'category' == $taxonomy )
$per_page_label = __('Categories per page:');
else
$per_page_label = sprintf(_x('%s per page:', '%s: plural taxonomy name'), $tax->label);
global $tax;
$per_page_label = $tax->label;
break;
case 'plugins':
$per_page_label = __('Plugins per page:');
$per_page_label = __('Plugins');
break;
default:
return '';
@ -3805,10 +3797,9 @@ function screen_options($screen) {
else
$per_page = apply_filters( $option, $per_page );
$return = '<h5>' . __('Options') . "</h5>\n";
$return .= "<div class='screen-options'>\n";
$return = "<div class='screen-options'>\n";
if ( !empty($per_page_label) )
$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";
$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";
$return .= "<input type='submit' class='button' value='" . esc_attr__('Apply') . "' />";
$return .= "<input type='hidden' name='wp_screen_options[option]' value='" . esc_attr($option) . "' />";
$return .= "</div>\n";