diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php
index fc8ce0f..b9e2a32 100755
a
|
b
|
function wp_media_upload_handler() { |
834 | 834 | * @param string $file The URL of the image to download. |
835 | 835 | * @param int $post_id The post ID the media is to be associated with. |
836 | 836 | * @param string $desc Optional. Description of the image. |
837 | | * @param string $return Optional. Accepts 'html' (image tag html) or 'src' (URL). Default 'html'. |
| 837 | * @param string $return Optional. Accepts 'html' (image tag html) 'id' (image ID) or 'src' (URL). Default 'html'. |
838 | 838 | * @return string|WP_Error Populated HTML img tag on success, WP_Error object otherwise. |
839 | 839 | */ |
840 | 840 | function media_sideload_image( $file, $post_id, $desc = null, $return = 'html' ) { |
… |
… |
function media_sideload_image( $file, $post_id, $desc = null, $return = 'html' ) |
862 | 862 | return $id; |
863 | 863 | } |
864 | 864 | |
| 865 | if( $return === 'id' ){ |
| 866 | return $id; |
| 867 | } |
| 868 | |
865 | 869 | $src = wp_get_attachment_url( $id ); |
866 | 870 | } |
867 | 871 | |