Changes from branches/2.7/wp-admin/includes/media.php at r10435 to trunk/wp-admin/includes/media.php at r10150
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/media.php
r10435 r10150 370 370 check_admin_referer('media-form'); 371 371 372 if ( isset($_POST['send']) ) {373 $keys = array_keys($_POST['send']);374 $send_id = (int) array_shift($keys);375 }376 377 372 if ( !empty($_POST['attachments']) ) foreach ( $_POST['attachments'] as $attachment_id => $attachment ) { 378 373 $post = $_post = get_post($attachment_id, ARRAY_A); … … 385 380 if ( isset($attachment['menu_order']) ) 386 381 $post['menu_order'] = $attachment['menu_order']; 387 if ( isset($send_id) && $attachment_id == $send_id ) { 388 if ( isset($attachment['post_parent']) ) 389 $post['post_parent'] = $attachment['post_parent']; 390 } 382 if ( isset($attachment['post_parent']) ) 383 $post['post_parent'] = $attachment['post_parent']; 391 384 392 385 $post = apply_filters('attachment_fields_to_save', $post, $attachment); … … 416 409 } 417 410 418 if ( isset($send_id) ) { 411 if ( isset($_POST['send']) ) { 412 $keys = array_keys($_POST['send']); 413 $send_id = (int) array_shift($keys); 419 414 $attachment = stripslashes_deep( $_POST['attachments'][$send_id] ); 420 415 $html = $attachment['post_title'];
Note: See TracChangeset
for help on using the changeset viewer.