Changeset 11965 for trunk/wp-admin/includes/media.php
- Timestamp:
- 09/24/2009 01:54:07 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/media.php
r11944 r11965 250 250 function media_handle_sideload($file_array, $post_id, $desc = null, $post_data = array()) { 251 251 $overrides = array('test_form'=>false); 252 252 253 253 $file = wp_handle_sideload($file_array, $overrides); 254 254 if ( isset($file['error']) ) … … 523 523 // Download file to temp location 524 524 $tmp = download_url($file); 525 525 526 526 // Set variables for storage 527 527 // fix file filename for query strings … … 535 535 $file_array['tmp_name'] = ''; 536 536 } 537 537 538 538 // do the validation and storage stuff 539 539 $id = media_handle_sideload($file_array, $post_id, @$desc); 540 540 $src = $id; 541 541 542 542 // If error storing permanently, unlink 543 543 if ( is_wp_error($id) ) { … … 546 546 } 547 547 } 548 548 549 549 // Finally check to make sure the file has been saved, then return the html 550 550 if ( !empty($src) ) { … … 1168 1168 if ( gd_edit_image_support($post->post_mime_type) ) { 1169 1169 $nonce = wp_create_nonce("image_editor-$post->ID"); 1170 $image_edit_button = "< tr><td class='A1B1'><input type='button' id='imgedit-open-btn-{$post->ID}' onclick='imageEdit.open($post->ID, \"$nonce\")' class='button' value='" . esc_attr__( 'Edit image' ) . "' /> <img src='images/wpspin_light.gif' class='imgedit-wait-spin' alt='' /></td></tr>";1170 $image_edit_button = "<input type='button' id='imgedit-open-btn-{$post->ID}' onclick='imageEdit.open($post->ID, \"$nonce\")' class='button' value='" . esc_attr__( 'Edit image' ) . "' /> <img src='images/wpspin_light.gif' class='imgedit-wait-spin' alt='' />"; 1171 1171 } 1172 1172 … … 1179 1179 <thead class='media-item-info' id='media-head-$post->ID'> 1180 1180 <tr> 1181 <td class='A1B1' rowspan='5'><img class='thumbnail' src='$thumb_url' alt='' /></td>1181 <td class='A1B1' id='thumbnail-head-$post->ID' rowspan='5'><img class='thumbnail' src='$thumb_url' alt='' /></td> 1182 1182 <td>$filename</td> 1183 1183 </tr> … … 1185 1185 <tr><td>" . mysql2date($post->post_date, get_option('time_format')) . "</td></tr> 1186 1186 <tr><td>" . apply_filters('media_meta', $media_dims, $post) . "</td></tr> 1187 $image_edit_button1187 <tr><td class='A1B1'>$image_edit_button</td></tr> 1188 1188 </thead> 1189 1189 <tbody> 1190 <tr><td style='display:none' colspan='2' id='image-editor-$post->ID'></td></tr>\n"; 1190 <tr><td colspan='2' class='imgedit-response' id='imgedit-response-$post->ID'></td></tr> 1191 <tr><td style='display:none' colspan='2' class='image-editor' id='image-editor-$post->ID'></td></tr>\n"; 1191 1192 1192 1193 $defaults = array(
Note: See TracChangeset
for help on using the changeset viewer.