Changeset 31696
- Timestamp:
- 03/10/2015 03:31:54 PM (10 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/common.css
r31641 r31696 1505 1505 .metabox-prefs label a { 1506 1506 display: none; 1507 } 1508 1509 .metabox-prefs .screen-options { 1510 padding-top: 10px; 1511 } 1512 1513 .metabox-prefs .screen-options input, 1514 .metabox-prefs .screen-options label { 1515 margin-top: 0; 1516 margin-bottom: 0; 1517 vertical-align: middle; 1518 } 1519 1520 .metabox-prefs .screen-options .screen-per-page { 1521 margin-right: 15px; 1522 } 1523 1524 .metabox-prefs .screen-options label { 1525 line-height: 28px; 1526 padding-right: 0; 1507 1527 } 1508 1528 -
trunk/src/wp-admin/edit-comments.php
r31200 r31696 110 110 $title = __('Comments'); 111 111 112 add_screen_option( 'per_page' , array('label' => _x( 'Comments', 'comments per page (screen options)' )));112 add_screen_option( 'per_page' ); 113 113 114 114 get_current_screen()->add_help_tab( array( -
trunk/src/wp-admin/edit-tags.php
r31247 r31696 40 40 } 41 41 42 add_screen_option( 'per_page', array( ' label' => $title, 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page' ) );42 add_screen_option( 'per_page', array( 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page' ) ); 43 43 44 44 $location = false; -
trunk/src/wp-admin/edit.php
r31200 r31696 166 166 wp_enqueue_script('heartbeat'); 167 167 168 $title = $post_type_object->labels->name;169 170 168 if ( 'post' == $post_type ) { 171 169 get_current_screen()->add_help_tab( array( … … 235 233 } 236 234 237 add_screen_option( 'per_page', array( ' label' => $title, 'default' => 20, 'option' => 'edit_' . $post_type . '_per_page' ) );235 add_screen_option( 'per_page', array( 'default' => 20, 'option' => 'edit_' . $post_type . '_per_page' ) ); 238 236 239 237 $bulk_counts = array( -
trunk/src/wp-admin/includes/screen.php
r31200 r31696 1128 1128 */ 1129 1129 public function render_per_page_options() { 1130 if ( ! $this->get_option( 'per_page' ) )1130 if ( null === $this->get_option( 'per_page' ) ) { 1131 1131 return; 1132 } 1132 1133 1133 1134 $per_page_label = $this->get_option( 'per_page', 'label' ); 1135 if ( null === $per_page_label ) { 1136 $per_page_label = __( 'Number of items per page:' ); 1137 } 1134 1138 1135 1139 $option = $this->get_option( 'per_page', 'option' ); 1136 if ( ! $option ) 1140 if ( ! $option ) { 1137 1141 $option = str_replace( '-', '_', "{$this->id}_per_page" ); 1142 } 1138 1143 1139 1144 $per_page = (int) get_user_option( $option ); 1140 1145 if ( empty( $per_page ) || $per_page < 1 ) { 1141 1146 $per_page = $this->get_option( 'per_page', 'default' ); 1142 if ( ! $per_page ) 1147 if ( ! $per_page ) { 1143 1148 $per_page = 20; 1149 } 1144 1150 } 1145 1151 … … 1166 1172 <div class="screen-options"> 1167 1173 <?php if ( $per_page_label ) : ?> 1174 <label for="<?php echo esc_attr( $option ); ?>"><?php echo $per_page_label; ?></label> 1168 1175 <input type="number" step="1" min="1" max="999" class="screen-per-page" name="wp_screen_options[value]" 1169 1176 id="<?php echo esc_attr( $option ); ?>" maxlength="3" 1170 1177 value="<?php echo esc_attr( $per_page ); ?>" /> 1171 <label for="<?php echo esc_attr( $option ); ?>">1172 <?php echo esc_html( $per_page_label ); ?>1173 </label>1174 1178 <?php endif; 1175 1179 1176 1180 echo get_submit_button( __( 'Apply' ), 'button', 'screen-options-apply', false ); ?> 1177 <input type= 'hidden' name='wp_screen_options[option]' value='<?php echo esc_attr($option); ?>'/>1181 <input type="hidden" name="wp_screen_options[option]" value="<?php echo esc_attr( $option ); ?>" /> 1178 1182 </div> 1179 1183 <?php -
trunk/src/wp-admin/network/site-themes.php
r31658 r31696 128 128 129 129 add_thickbox(); 130 add_screen_option( 'per_page' , array( 'label' => _x( 'Themes', 'themes per page (screen options)' ) ));130 add_screen_option( 'per_page' ); 131 131 132 132 $site_url_no_http = preg_replace( '#^http(s)?://#', '', get_blogaddress_by_id( $id ) ); -
trunk/src/wp-admin/network/site-users.php
r31658 r31696 156 156 } 157 157 158 add_screen_option( 'per_page' , array( 'label' => _x( 'Users', 'users per page (screen options)' ) ));158 add_screen_option( 'per_page' ); 159 159 160 160 $site_url_no_http = preg_replace( '#^http(s)?://#', '', get_blogaddress_by_id( $id ) ); -
trunk/src/wp-admin/network/sites.php
r31658 r31696 23 23 $parent_file = 'sites.php'; 24 24 25 add_screen_option( 'per_page' , array( 'label' => _x( 'Sites', 'sites per page (screen options)' ) ));25 add_screen_option( 'per_page' ); 26 26 27 27 get_current_screen()->add_help_tab( array( -
trunk/src/wp-admin/network/themes.php
r31681 r31696 221 221 add_thickbox(); 222 222 223 add_screen_option( 'per_page' , array('label' => _x( 'Themes', 'themes per page (screen options)' )));223 add_screen_option( 'per_page' ); 224 224 225 225 get_current_screen()->add_help_tab( array( -
trunk/src/wp-admin/network/users.php
r31658 r31696 30 30 <p><?php _e( 'You have chosen to delete the user from all networks and sites.' ); ?></p> 31 31 <?php endif; ?> 32 32 33 33 <form action="users.php?action=dodelete" method="post"> 34 34 <input type="hidden" name="dodelete" /> … … 109 109 <p><?php _e( 'Once you hit “Confirm Deletion”, the user will be permanently removed.' ); ?></p> 110 110 <?php endif; 111 111 112 112 submit_button( __('Confirm Deletion'), 'delete' ); 113 113 ?> 114 114 </form> 115 115 <?php 116 116 return true; 117 117 } … … 137 137 confirm_delete_users( $_POST['allusers'] ); 138 138 echo '</div>'; 139 140 139 require_once( ABSPATH . 'wp-admin/admin-footer.php' ); 140 } else { 141 141 wp_redirect( network_admin_url( 'users.php' ) ); 142 142 } … … 253 253 $parent_file = 'users.php'; 254 254 255 add_screen_option( 'per_page' , array('label' => _x( 'Users', 'users per page (screen options)' )));255 add_screen_option( 'per_page' ); 256 256 257 257 get_current_screen()->add_help_tab( array( -
trunk/src/wp-admin/plugins.php
r31681 r31696 362 362 add_thickbox(); 363 363 364 add_screen_option( 'per_page', array( 'label' => _x( 'Plugins', 'plugins per page (screen options)' ),'default' => 999 ) );364 add_screen_option( 'per_page', array( 'default' => 999 ) ); 365 365 366 366 get_current_screen()->add_help_tab( array( -
trunk/src/wp-admin/upload.php
r31624 r31696 174 174 wp_enqueue_script( 'media' ); 175 175 176 add_screen_option( 'per_page' , array('label' => _x( 'Media items', 'items per page (screen options)' )));176 add_screen_option( 'per_page' ); 177 177 178 178 get_current_screen()->add_help_tab( array( -
trunk/src/wp-admin/users.php
r31200 r31696 18 18 $parent_file = 'users.php'; 19 19 20 add_screen_option( 'per_page' , array('label' => _x( 'Users', 'users per page (screen options)' )));20 add_screen_option( 'per_page' ); 21 21 22 22 // contextual help - choose Help on the top right of admin panel to preview this.
Note: See TracChangeset
for help on using the changeset viewer.