mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 15:31:42 +01:00
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:
parent
e24b443f50
commit
d5d0b367ab
@ -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 )) {
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user