media_handle_sideload Wordpress function


Description:

This handles a sideloaded file in the same way as an uploaded file is handled by [email protected] media_handle_upload()}


Syntax:


Arguments:

(array) $file_array Array similar to a [email protected] $_FILES} upload array
(int) $post_id The post ID the media is associated with
(string) $desc Description of the sideloaded file
(array) $post_data allows you to overwrite some of the attachment


Return Type:

(int|object) The ID of the attachment or a WP_Error on failure


Define At:

wp-admin/includes/media.php


Wordpress Reference URL:

http://codex.wordpress.org/Function_Reference/media_handle_sideload


0 Flares Facebook 0 Google+ 0 0 Flares ×
Posted in: Wordpress functions
0 Flares Facebook 0 Pin It Share 0 Google+ 0 0 Flares ×