Changeset 10663
- Timestamp:
- 02/27/2009 06:37:02 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-app.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-app.php
r10651 r10663 26 26 /** Feed Handling API */ 27 27 require_once(ABSPATH . WPINC . '/feed.php'); 28 29 /** Admin Image API for metadata updating */ 30 require_once(ABSPATH . '/wp-admin/includes/image.php'); 28 31 29 32 $_SERVER['PATH_INFO'] = preg_replace( '/.*\/wp-app\.php/', '', $_SERVER['REQUEST_URI'] ); … … 815 818 } 816 819 820 $upload_dir = wp_upload_dir( ); 817 821 $location = get_post_meta($entry['ID'], '_wp_attached_file', true); 818 822 $filetype = wp_check_filetype($location); 823 824 $location = "{$upload_dir['basedir']}/{$location}"; 819 825 820 826 if(!isset($location) || 'attachment' != $entry['post_type'] || empty($filetype['ext'])) … … 843 849 $this->internal_error(__('Sorry, your entry could not be posted. Something wrong happened.')); 844 850 } 851 852 wp_update_attachment_metadata( $postID, wp_generate_attachment_metadata( $postID, $location ) ); 845 853 846 854 log_app('function',"put_file($postID)");
Note: See TracChangeset
for help on using the changeset viewer.