WordPress.org

Make WordPress Core

Changeset 16966


Ignore:
Timestamp:
12/15/10 19:04:31 (5 years ago)
Author:
westi
Message:

Re-instate this code so AJAX still works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-posts-list-table.php

    r16965 r16966  
    4747    function WP_Posts_List_Table() { 
    4848        global $post_type_object, $post_type, $wpdb; 
     49 
     50        if ( !isset( $_REQUEST['post_type'] ) ) 
     51            $post_type = 'post'; 
     52        elseif ( in_array( $_REQUEST['post_type'], get_post_types( array( 'show_ui' => true ) ) ) ) 
     53            $post_type = $_REQUEST['post_type']; 
     54        else 
     55            wp_die( __( 'Invalid post type' ) ); 
     56        $_REQUEST['post_type'] = $post_type; 
    4957 
    5058        $post_type_object = get_post_type_object( $post_type ); 
Note: See TracChangeset for help on using the changeset viewer.