Ticket #18235: 18235.patch
| File 18235.patch, 2.9 KB (added by azaozz, 22 months ago) |
|---|
-
wp-admin/edit-form-advanced.php
23 23 * @var int 24 24 */ 25 25 $post_ID = isset($post_ID) ? (int) $post_ID : 0; 26 27 // redundant code 26 28 $temp_ID = isset($temp_ID) ? (int) $temp_ID : 0; 29 // end redundant code 30 27 31 $user_ID = isset($user_ID) ? (int) $user_ID : 0; 28 32 $action = isset($action) ? $action : ''; 29 33 -
wp-admin/includes/post.php
234 234 235 235 wp_update_post( $post_data ); 236 236 237 // redundant code 237 238 // Reunite any orphaned attachments with their parent 238 239 if ( !$draft_ids = get_user_option( 'autosave_draft_ids' ) ) 239 240 $draft_ids = array(); … … 242 243 243 244 // Now that we have an ID we can fix any attachment anchor hrefs 244 245 _fix_attachment_links( $post_ID ); 246 // end redundant code 245 247 246 248 wp_set_post_lock( $post_ID, $GLOBALS['current_user']->ID ); 247 249 … … 551 553 // Clear out any data in internal vars. 552 554 unset( $_POST['filter'] ); 553 555 556 557 // redundant code 554 558 // Check for autosave collisions 555 559 // Does this need to be updated? ~ Mark 556 560 $temp_id = false; … … 569 573 return edit_post(); 570 574 } 571 575 } 576 // end redundant code 572 577 578 573 579 // Edit don't write if we have a post id. 574 580 if ( isset( $_POST['ID'] ) ) { 575 581 $_POST['post_ID'] = $_POST['ID']; … … 611 617 612 618 add_post_meta( $post_ID, '_edit_last', $GLOBALS['current_user']->ID ); 613 619 620 621 // redundant code 614 622 // Reunite any orphaned attachments with their parent 615 623 // Does this need to be udpated? ~ Mark 616 624 if ( !$draft_ids = get_user_option( 'autosave_draft_ids' ) ) … … 628 636 629 637 // Now that we have an ID we can fix any attachment anchor hrefs 630 638 _fix_attachment_links( $post_ID ); 639 // end redundant code 631 640 641 632 642 wp_set_post_lock( $post_ID, $GLOBALS['current_user']->ID ); 633 643 634 644 return $post_ID; … … 809 819 // Private 810 820 // 811 821 822 823 // redundant code: we have had $post_ID always set for quite some time now. Time to remove these back-compat? 812 824 /** 813 825 * Replace hrefs of attachment anchors with up-to-date permalinks. 814 826 * … … 891 903 delete_post_meta($child_id, '_wp_attachment_temp_parent'); 892 904 } 893 905 } 906 // end redundant code 894 907 908 909 895 910 /** 896 911 * Get all the possible statuses for a post_type 897 912 * -
wp-includes/post.php
3727 3727 3728 3728 clean_post_cache($post_ID); 3729 3729 3730 3731 // redundant code 3730 3732 if ( isset($post_parent) && $post_parent < 0 ) 3731 3733 add_post_meta($post_ID, '_wp_attachment_temp_parent', $post_parent, true); 3734 // end redundant code 3732 3735 3736 3733 3737 if ( ! empty( $context ) ) 3734 3738 add_post_meta( $post_ID, '_wp_attachment_context', $context, true ); 3735 3739
