Ticket #18785: 18785.9.diff
File 18785.9.diff, 933 bytes (added by , 13 years ago) |
---|
-
wp-admin/admin-ajax.php
1518 1518 $post = get_post($post_id); 1519 1519 if ( $post ) { 1520 1520 $post_type_object = get_post_type_object($post->post_type); 1521 if ( $post_type_object ) {1521 if ( $post_type_object ) 1522 1522 $post_type = $post->post_type; 1523 $current_screen->post_type = $post->post_type;1524 $current_screen->id = $current_screen->post_type;1525 }1526 1523 } 1527 1524 } elseif ( isset($_POST['post_type']) ) { 1528 1525 $post_type_object = get_post_type_object($_POST['post_type']); 1529 if ( $post_type_object ) {1526 if ( $post_type_object ) 1530 1527 $post_type = $post_type_object->name; 1531 $current_screen->post_type = $post_type;1532 $current_screen->id = $current_screen->post_type;1533 }1534 1528 } 1535 1529 1536 1530 check_ajax_referer('update-' . $post_type . '_' . $post_id, '_wpnonce');