Changeset 12719 for trunk/wp-admin/edit.php
- Timestamp:
- 01/13/2010 06:49:56 PM (15 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin
- Property svn:ignore deleted
-
trunk/wp-admin/edit.php
r12706 r12719 138 138 } 139 139 140 list($post_stati, $avail_post_stati)= wp_edit_posts_query();140 $avail_post_stati = wp_edit_posts_query(); 141 141 142 142 require_once('admin-header.php'); … … 221 221 $status_links[] = "<li><a href='edit.php{$allposts}'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts, 'posts' ), number_format_i18n( $total_posts ) ) . '</a>'; 222 222 223 foreach ( $post_stati as $status => $label) {223 foreach ( get_post_stati(array(), 'objects') as $status ) { 224 224 $class = ''; 225 225 226 if ( !in_array( $status, $avail_post_stati ) ) 226 $status_name = $status->name; 227 228 if ( !in_array( $status_name, $avail_post_stati ) ) 227 229 continue; 228 230 229 if ( empty( $num_posts->$status ) )231 if ( empty( $num_posts->$status_name ) ) 230 232 continue; 231 233 232 if ( isset($_GET['post_status']) && $status == $_GET['post_status'] )234 if ( isset($_GET['post_status']) && $status_name == $_GET['post_status'] ) 233 235 $class = ' class="current"'; 234 236 235 $status_links[] = "<li><a href='edit.php?post_status=$status &post_type=$post_type'$class>" . sprintf( _n( $label[2][0], $label[2][1], $num_posts->$status ), number_format_i18n( $num_posts->$status) ) . '</a>';237 $status_links[] = "<li><a href='edit.php?post_status=$status_name&post_type=$post_type'$class>" . sprintf( _n( $status->label_count[0], $status->label_count[1], $num_posts->$status_name ), number_format_i18n( $num_posts->$status_name ) ) . '</a>'; 236 238 } 237 239 echo implode( " |</li>\n", $status_links ) . '</li>';
Note: See TracChangeset
for help on using the changeset viewer.