Changeset 9556 for trunk/wp-admin/upload.php
- Timestamp:
- 11/06/2008 09:56:29 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/upload.php
r9545 r9556 186 186 $type_links = array(); 187 187 $_num_posts = (array) wp_count_attachments(); 188 $_total_posts = array_sum( $_num_posts ); 188 189 $matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts)); 189 190 foreach ( $matches as $type => $reals ) … … 192 193 193 194 $class = empty($_GET['post_mime_type']) && ! isset($_GET['detached']) ? ' class="current"' : ''; 194 $type_links[] = "<li><a href= \"upload.php\"$class>".__('All Types')."</a>";195 $type_links[] = "<li><a href='upload.php'$class>" . sprintf( __ngettext( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $_total_posts ), number_format_i18n( $_total_posts ) ) . '</a>'; 195 196 foreach ( $post_mime_types as $mime_type => $label ) { 196 197 $class = ''; … … 202 203 $class = ' class="current"'; 203 204 204 $type_links[] = "<li><a href=\"upload.php?post_mime_type=$mime_type\"$class>" . 205 sprintf(__ngettext($label[2][0], $label[2][1], $num_posts[$mime_type]), number_format_i18n( $num_posts[$mime_type] )) . '</a>'; 205 $type_links[] = "<li><a href='upload.php?post_mime_type=$mime_type'$class>" . sprintf( __ngettext( $label[2][0], $label[2][1], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</a>'; 206 206 } 207 207 $class = isset($_GET['detached']) ? ' class="current"' : ''; 208 208 $type_links[] = '<li><a href="upload.php?detached=1"' . $class . '>' . __('Unattached') . '</a>'; 209 209 210 echo implode( ' | </li>', $type_links) . '</li>';210 echo implode( " |</li>\n", $type_links) . '</li>'; 211 211 unset($type_links); 212 212 ?> … … 236 236 )); 237 237 238 if ( $page_links ) 239 echo "<div class='tablenav-pages'>$page_links</div>"; 240 ?> 238 if ( $page_links ) : ?> 239 <div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s-%s of %s' ) . '</span>' . __( '%s' ), 240 number_format_i18n( ( $_GET['paged'] - 1 ) * $wp_query->query_vars['posts_per_page'] + 1 ), 241 number_format_i18n( min( $_GET['paged'] * $wp_query->query_vars['posts_per_page'], $wp_query->found_posts ) ), 242 number_format_i18n( $wp_query->found_posts ), 243 $page_links 244 ); echo $page_links_text; ?></div> 245 <?php endif; ?> 241 246 242 247 <div class="alignleft actions"> … … 387 392 <?php 388 393 if ( $page_links ) 389 echo "<div class='tablenav-pages'>$page_links </div>";394 echo "<div class='tablenav-pages'>$page_links_text</div>"; 390 395 ?> 391 396
Note: See TracChangeset
for help on using the changeset viewer.