Changeset 10435
- Timestamp:
- 01/24/2009 02:44:15 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.7/wp-admin/includes/media.php
r10150 r10435 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 372 377 if ( !empty($_POST['attachments']) ) foreach ( $_POST['attachments'] as $attachment_id => $attachment ) { 373 378 $post = $_post = get_post($attachment_id, ARRAY_A); … … 380 385 if ( isset($attachment['menu_order']) ) 381 386 $post['menu_order'] = $attachment['menu_order']; 382 if ( isset($attachment['post_parent']) ) 383 $post['post_parent'] = $attachment['post_parent']; 387 if ( isset($send_id) && $attachment_id == $send_id ) { 388 if ( isset($attachment['post_parent']) ) 389 $post['post_parent'] = $attachment['post_parent']; 390 } 384 391 385 392 $post = apply_filters('attachment_fields_to_save', $post, $attachment); … … 409 416 } 410 417 411 if ( isset($_POST['send']) ) { 412 $keys = array_keys($_POST['send']); 413 $send_id = (int) array_shift($keys); 418 if ( isset($send_id) ) { 414 419 $attachment = stripslashes_deep( $_POST['attachments'][$send_id] ); 415 420 $html = $attachment['post_title'];
Note: See TracChangeset
for help on using the changeset viewer.