2020-05-02 / 5384阅 / 悠然
Index of the $_FILES array that the file was sent. Required.
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.
Overwrite some of the attachment. Optional.
Default value: array()
Override the wp_handle_upload() behavior. Optional.
Default value: array('test_form' => false)
(int|WP_Error) ID of the attachment or a WP_Error object on failure.