Improve documentation for media_handle_upload().
props ericlewis. fixes #30962. git-svn-id: https://develop.svn.wordpress.org/trunk@31109 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c8f0a49dee
commit
b641ca55f5
@ -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 )) {
|
||||
|
Loading…
Reference in New Issue
Block a user