-if ( isset($_GET['deleted']) && (int) $_GET['deleted'] ) {
- printf( _n( 'Item permanently deleted.', '%s items permanently deleted.', $_GET['deleted'] ), number_format_i18n( $_GET['deleted'] ) );
- unset($_GET['deleted']);
-}
-
-if ( isset($_GET['trashed']) && (int) $_GET['trashed'] ) {
- printf( _n( 'Item moved to the trash.', '%s items moved to the trash.', $_GET['trashed'] ), number_format_i18n( $_GET['trashed'] ) );
- $ids = isset($_GET['ids']) ? $_GET['ids'] : 0;
- echo ' <a href="' . esc_url( wp_nonce_url( "edit.php?post_type=$post_type&doaction=undo&action=untrash&ids=$ids", "bulk-posts" ) ) . '">' . __('Undo') . '</a><br />';
- unset($_GET['trashed']);
-}
-
-if ( isset($_GET['untrashed']) && (int) $_GET['untrashed'] ) {
- printf( _n( 'Item restored from the Trash.', '%s items restored from the Trash.', $_GET['untrashed'] ), number_format_i18n( $_GET['untrashed'] ) );
- unset($_GET['undeleted']);
-}
-
-$_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed'), $_SERVER['REQUEST_URI'] );
-?>
-</p></div>
-<?php } ?>
-
-<form id="posts-filter" action="<?php echo admin_url('edit.php'); ?>" method="get">
-
-<ul class="subsubsub">
-<?php
-if ( empty($locked_post_status) ) :
-$status_links = array();
-$num_posts = wp_count_posts( $post_type, 'readable' );
-$class = '';
-$allposts = '';
-
-if ( $user_posts ) {
- if ( isset( $_GET['author'] ) && ( $_GET['author'] == $current_user->ID ) )
- $class = ' class="current"';
- $status_links[] = "<li><a href='edit.php?post_type=$post_type&author=$current_user->ID'$class>" . sprintf( _nx( 'Mine <span class="count">(%s)</span>', 'Mine <span class="count">(%s)</span>', $user_posts_count, 'posts' ), number_format_i18n( $user_posts_count ) ) . '</a>';
- $allposts = '&all_posts=1';
-}
-
-$total_posts = array_sum( (array) $num_posts );
-
-// Subtract post types that are not included in the admin all list.
-foreach ( get_post_stati( array('show_in_admin_all_list' => false) ) as $state )
- $total_posts -= $num_posts->$state;
-
-$class = empty($class) && empty($_GET['post_status']) ? ' class="current"' : '';
-$status_links[] = "<li><a href='edit.php?post_type=$post_type{$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>';
-
-foreach ( get_post_stati(array('show_in_admin_status_list' => true), 'objects') as $status ) {
- $class = '';
+get_current_screen()->set_screen_reader_content( array(
+ 'heading_views' => $post_type_object->labels->filter_items_list,
+ 'heading_pagination' => $post_type_object->labels->items_list_navigation,
+ 'heading_list' => $post_type_object->labels->items_list,
+) );
+
+add_screen_option( 'per_page', array( 'default' => 20, 'option' => 'edit_' . $post_type . '_per_page' ) );
+
+$bulk_counts = array(
+ 'updated' => isset( $_REQUEST['updated'] ) ? absint( $_REQUEST['updated'] ) : 0,
+ 'locked' => isset( $_REQUEST['locked'] ) ? absint( $_REQUEST['locked'] ) : 0,
+ 'deleted' => isset( $_REQUEST['deleted'] ) ? absint( $_REQUEST['deleted'] ) : 0,
+ 'trashed' => isset( $_REQUEST['trashed'] ) ? absint( $_REQUEST['trashed'] ) : 0,
+ 'untrashed' => isset( $_REQUEST['untrashed'] ) ? absint( $_REQUEST['untrashed'] ) : 0,
+);
+
+$bulk_messages = array();
+$bulk_messages['post'] = array(
+ 'updated' => _n( '%s post updated.', '%s posts updated.', $bulk_counts['updated'] ),
+ 'locked' => ( 1 == $bulk_counts['locked'] ) ? __( '1 post not updated, somebody is editing it.' ) :
+ _n( '%s post not updated, somebody is editing it.', '%s posts not updated, somebody is editing them.', $bulk_counts['locked'] ),
+ 'deleted' => _n( '%s post permanently deleted.', '%s posts permanently deleted.', $bulk_counts['deleted'] ),
+ 'trashed' => _n( '%s post moved to the Trash.', '%s posts moved to the Trash.', $bulk_counts['trashed'] ),
+ 'untrashed' => _n( '%s post restored from the Trash.', '%s posts restored from the Trash.', $bulk_counts['untrashed'] ),
+);
+$bulk_messages['page'] = array(
+ 'updated' => _n( '%s page updated.', '%s pages updated.', $bulk_counts['updated'] ),
+ 'locked' => ( 1 == $bulk_counts['locked'] ) ? __( '1 page not updated, somebody is editing it.' ) :
+ _n( '%s page not updated, somebody is editing it.', '%s pages not updated, somebody is editing them.', $bulk_counts['locked'] ),
+ 'deleted' => _n( '%s page permanently deleted.', '%s pages permanently deleted.', $bulk_counts['deleted'] ),
+ 'trashed' => _n( '%s page moved to the Trash.', '%s pages moved to the Trash.', $bulk_counts['trashed'] ),
+ 'untrashed' => _n( '%s page restored from the Trash.', '%s pages restored from the Trash.', $bulk_counts['untrashed'] ),
+);