Changeset 7682 for trunk/wp-admin/async-upload.php
- Timestamp:
- 04/14/2008 11:09:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/async-upload.php
r6830 r7682 21 21 wp_die(__('You do not have permission to upload files.')); 22 22 23 // just fetch the detail form for that attachment 24 if ( ($id = intval($_REQUEST['attachment_id'])) && $_REQUEST['fetch'] ) { 25 echo get_media_item($id); 26 exit; 27 } 28 23 29 $id = media_handle_upload('async-upload', $_REQUEST['post_id']); 24 30 if (is_wp_error($id)) { … … 27 33 } 28 34 29 $type = $_REQUEST['type']; 30 echo apply_filters("async_upload_{$type}", $id); 35 if ( $_REQUEST['short'] ) { 36 // short form response - attachment ID only 37 echo $id; 38 } 39 else { 40 // long form response - big chunk o html 41 $type = $_REQUEST['type']; 42 echo apply_filters("async_upload_{$type}", $id); 43 } 31 44 32 45 ?>
Note: See TracChangeset
for help on using the changeset viewer.