diff --git a/html/wp-admin/includes/media.php b/html/wp-admin/includes/media.php
index ede25b3..3dcf91a 100644
|
a
|
b
|
function wp_media_upload_handler() { |
| 856 | 856 | * @param string $file The URL of the image to download. |
| 857 | 857 | * @param int $post_id The post ID the media is to be associated with. |
| 858 | 858 | * @param string $desc Optional. Description of the image. |
| 859 | | * @param string $return Optional. Accepts 'html' (image tag html) or 'src' (URL). Default 'html'. |
| | 859 | * @param string $return Optional. Accepts 'html' (image tag html) or 'src' (URL), or 'id' (attachment ID). Default 'html'. |
| 860 | 860 | * @return string|WP_Error Populated HTML img tag on success, WP_Error object otherwise. |
| 861 | 861 | */ |
| 862 | 862 | function media_sideload_image( $file, $post_id, $desc = null, $return = 'html' ) { |
| … |
… |
function media_sideload_image( $file, $post_id, $desc = null, $return = 'html' ) |
| 886 | 886 | if ( is_wp_error( $id ) ) { |
| 887 | 887 | @unlink( $file_array['tmp_name'] ); |
| 888 | 888 | return $id; |
| | 889 | // If attachment id was requested, return it early. |
| | 890 | } elseif ( $return === 'id' ) { |
| | 891 | return $id; |
| 889 | 892 | } |
| 890 | 893 | |
| 891 | 894 | $src = wp_get_attachment_url( $id ); |