Changeset 14816 for trunk/wp-admin/async-upload.php
- Timestamp:
- 05/23/2010 10:59:52 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/async-upload.php
r14139 r14816 44 44 45 45 $id = media_handle_upload('async-upload', $_REQUEST['post_id']); 46 if (is_wp_error($id)) { 47 echo '<div id="media-upload-error">'.esc_html($id->get_error_message()).'</div>'; 46 if ( is_wp_error($id) ) { 47 echo '<div class="error-div"> 48 <a class="dismiss" href="#" onclick="jQuery(this).parents(\'div.media-item\').slideUp(200, function(){jQuery(this).remove();});">' . __('Dismiss') . '</a> 49 <strong>' . sprintf(__('“%s” has failed to upload due to an error'), esc_html($_FILES['async-upload']['name']) ) . '</strong><br />' . 50 esc_html($id->get_error_message()) . '</div>'; 48 51 exit; 49 52 } … … 52 55 // short form response - attachment ID only 53 56 echo $id; 54 } 55 else { 57 } else { 56 58 // long form response - big chunk o html 57 59 $type = $_REQUEST['type'];
Note: See TracChangeset
for help on using the changeset viewer.