From c9809f18f38c6c22db668586b57a6debb0970479 Mon Sep 17 00:00:00 2001 From: westi Date: Wed, 15 Dec 2010 19:04:31 +0000 Subject: [PATCH] Re-instate this code so AJAX still works git-svn-id: http://svn.automattic.com/wordpress/trunk@16966 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-posts-list-table.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php index 4faf36e3eb..eebaa8522d 100644 --- a/wp-admin/includes/class-wp-posts-list-table.php +++ b/wp-admin/includes/class-wp-posts-list-table.php @@ -47,6 +47,14 @@ class WP_Posts_List_Table extends WP_List_Table { function WP_Posts_List_Table() { global $post_type_object, $post_type, $wpdb; + if ( !isset( $_REQUEST['post_type'] ) ) + $post_type = 'post'; + elseif ( in_array( $_REQUEST['post_type'], get_post_types( array( 'show_ui' => true ) ) ) ) + $post_type = $_REQUEST['post_type']; + else + wp_die( __( 'Invalid post type' ) ); + $_REQUEST['post_type'] = $post_type; + $post_type_object = get_post_type_object( $post_type ); if ( !current_user_can( $post_type_object->cap->edit_others_posts ) ) {