- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.1/wp-admin/includes/post.php
r18370 r18023 136 136 $post_data = &$_POST; 137 137 138 // Clear out any data in internal vars.139 unset( $post_data['filter'] );140 141 138 $post_ID = (int) $post_data['post_ID']; 142 139 $post = get_post( $post_ID ); … … 345 342 } 346 343 347 $post = get_post( $post_ID ); 348 $tax_names = get_object_taxonomies( $post ); 344 $tax_names = get_object_taxonomies( get_post($post_ID) ); 349 345 foreach ( $tax_names as $tax_name ) { 350 346 $taxonomy_obj = get_taxonomy($tax_name); … … 367 363 unset( $post_data['tax_input']['category'] ); 368 364 } 369 370 $post_data['post_mime_type'] = $post->post_mime_type;371 $post_data['guid'] = $post->guid;372 365 373 366 $post_data['ID'] = $post_ID; … … 542 535 $_POST['post_mime_type'] = ''; 543 536 544 // Clear out any data in internal vars.545 unset( $_POST['filter'] );546 547 537 // Check for autosave collisions 548 538 // Does this need to be updated? ~ Mark … … 562 552 return edit_post(); 563 553 } 564 }565 566 // Edit don't write if we have a post id.567 if ( isset( $_POST['ID'] ) ) {568 $_POST['post_ID'] = $_POST['ID'];569 unset ( $_POST['ID'] );570 }571 if ( isset( $_POST['post_ID'] ) ) {572 return edit_post();573 554 } 574 555 … … 1017 998 $q['post_type'] = 'attachment'; 1018 999 $post_type = get_post_type_object( 'attachment' ); 1019 $states = 'inherit';1000 $states = array( 'inherit' ); 1020 1001 if ( current_user_can( $post_type->cap->read_private_posts ) ) 1021 $states .= ',private';1002 $states[] = 'private'; 1022 1003 1023 1004 $q['post_status'] = isset( $q['status'] ) && 'trash' == $q['status'] ? 'trash' : $states;
Note: See TracChangeset
for help on using the changeset viewer.