Changeset 10390
- Timestamp:
- 01/21/2009 03:45:57 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/media.php
r10348 r10390 371 371 check_admin_referer('media-form'); 372 372 373 if ( isset($_POST['send']) ) { 374 $keys = array_keys($_POST['send']); 375 $send_id = (int) array_shift($keys); 376 } 377 373 378 if ( !empty($_POST['attachments']) ) foreach ( $_POST['attachments'] as $attachment_id => $attachment ) { 374 379 $post = $_post = get_post($attachment_id, ARRAY_A); … … 381 386 if ( isset($attachment['menu_order']) ) 382 387 $post['menu_order'] = $attachment['menu_order']; 383 if ( isset($attachment['post_parent']) ) 384 $post['post_parent'] = $attachment['post_parent']; 388 389 if ( isset($send_id) && $attachment_id == $send_id ) { 390 if ( isset($attachment['post_parent']) ) 391 $post['post_parent'] = $attachment['post_parent']; 392 } 385 393 386 394 $post = apply_filters('attachment_fields_to_save', $post, $attachment); … … 410 418 } 411 419 412 if ( isset($_POST['send']) ) { 413 $keys = array_keys($_POST['send']); 414 $send_id = (int) array_shift($keys); 420 if ( isset($send_id) ) { 415 421 $attachment = stripslashes_deep( $_POST['attachments'][$send_id] ); 416 422 $html = $attachment['post_title'];
Note: See TracChangeset
for help on using the changeset viewer.