Improve documentation for media_handle_upload().

props ericlewis.
fixes #30962.
Built from https://develop.svn.wordpress.org/trunk@31109


git-svn-id: http://core.svn.wordpress.org/trunk@31090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2015-01-09 05:05:23 +00:00
parent e24b443f50
commit d5d0b367ab
2 changed files with 7 additions and 6 deletions

View File

@ -247,14 +247,15 @@ win.send_to_editor('<?php echo addslashes($html); ?>');
}
/**
* This handles the file upload POST itself, creating the attachment post.
* Save a file submitted from a POST request and create an attachment post for it.
*
* @since 2.5.0
*
* @param string $file_id Index into the {@link $_FILES} array of the upload
* @param int $post_id The post ID the media is associated with
* @param array $post_data allows you to overwrite some of the attachment
* @param array $overrides allows you to override the {@link wp_handle_upload()} behavior
* @param string $file_id Index of the {@link $_FILES} array that the file was sent. Required.
* @param int $post_id The post ID of a post to attach the media item to. Required, but can
* be set to 0, creating a media item that has no relationship to a post.
* @param array $post_data Overwrite some of the attachment. Optional.
* @param array $overrides Override the {@link wp_handle_upload()} behavior. Optional.
* @return int|WP_Error ID of the attachment or a WP_Error object on failure.
*/
function media_handle_upload($file_id, $post_id, $post_data = array(), $overrides = array( 'test_form' => false )) {

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.2-alpha-31108';
$wp_version = '4.2-alpha-31109';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.