Changeset 9556 for trunk/wp-admin/edit.php
- Timestamp:
- 11/06/2008 09:56:29 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit.php
r9545 r9556 125 125 $status_links = array(); 126 126 $num_posts = wp_count_posts( 'post', 'readable' ); 127 $total_posts = array_sum( (array) $num_posts ); 127 128 $class = empty( $_GET['post_status'] ) ? ' class="current"' : ''; 128 $status_links[] = "<li><a href='edit.php' $class>" . __('All Posts') . '</a>'; 129 $status_links[] = "<li><a href='edit.php' $class>" . sprintf( __ngettext( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts ), number_format_i18n( $total_posts ) ) . '</a>'; 130 131 129 132 foreach ( $post_stati as $status => $label ) { 130 133 $class = ''; … … 138 141 $class = ' class="current"'; 139 142 140 $status_links[] = "<li><a href='edit.php?post_status=$status' $class>" . 141 sprintf( __ngettext( $label[2][0], $label[2][1], $num_posts->$status ), number_format_i18n( $num_posts->$status ) ) . '</a>'; 142 } 143 echo implode( ' | </li>', $status_links ) . '</li>'; 143 $status_links[] = "<li><a href='edit.php?post_status=$status' $class>" . sprintf( __ngettext( $label[2][0], $label[2][1], $num_posts->$status ), number_format_i18n( $num_posts->$status ) ) . '</a>'; 144 } 145 echo implode( " |</li>\n", $status_links ) . '</li>'; 144 146 unset( $status_links ); 145 147 endif; … … 224 226 225 227 <?php if ( $page_links ) { ?> 226 <div class="tablenav-pages"><?php echo $page_links; ?></div> 228 <div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s-%s of %s' ) . '</span>' . __( '%s' ), 229 number_format_i18n( ( $_GET['paged'] - 1 ) * $wp_query->query_vars['posts_per_page'] + 1 ), 230 number_format_i18n( min( $_GET['paged'] * $wp_query->query_vars['posts_per_page'], $wp_query->found_posts ) ), 231 number_format_i18n( $wp_query->found_posts ), 232 $page_links 233 ); echo $page_links_text; ?></div> 227 234 <?php } ?> 228 235 … … 243 250 <?php 244 251 if ( $page_links ) 245 echo "<div class='tablenav-pages'>$page_links </div>";252 echo "<div class='tablenav-pages'>$page_links_text</div>"; 246 253 ?> 247 254
Note: See TracChangeset
for help on using the changeset viewer.