Make WordPress Core

Ticket #30962: 30962.diff

File 30962.diff, 1.4 KB (added by ericlewis, 9 years ago)
  • wp-admin/includes/media.php

    diff --git wp-admin/includes/media.php wp-admin/includes/media.php
    index 599bff8..737a3fc 100644
    win.send_to_editor('<?php echo addslashes($html); ?>'); 
    247247}
    248248
    249249/**
    250  * This handles the file upload POST itself, creating the attachment post.
     250 * Save a file submitted from a POST request and create an attachment post for it.
    251251 *
    252252 * @since 2.5.0
    253253 *
    254  * @param string $file_id Index into the {@link $_FILES} array of the upload
    255  * @param int $post_id The post ID the media is associated with
    256  * @param array $post_data allows you to overwrite some of the attachment
    257  * @param array $overrides allows you to override the {@link wp_handle_upload()} behavior
     254 * @param string $file_id   Index of the {@link $_FILES} array that the file was sent. Required.
     255 * @param int    $post_id   The post ID of a post to attach the media item to. Required, but can
     256 *                          be set to 0, creating a media item that has no relationship to a post.
     257 * @param array  $post_data Overwrite some of the attachment. Optional.
     258 * @param array  $overrides Override the {@link wp_handle_upload()} behavior. Optional.
    258259 * @return int|WP_Error ID of the attachment or a WP_Error object on failure.
    259260 */
    260261function media_handle_upload($file_id, $post_id, $post_data = array(), $overrides = array( 'test_form' => false )) {