mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-25 17:51:27 +01:00
Don't prepend http. Props noel. see #6813
git-svn-id: http://svn.automattic.com/wordpress/trunk@8201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
78afb8f235
commit
1fa06da55c
@ -330,8 +330,6 @@ function media_sideload_image($file, $post_id, $desc = null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( !empty($src) ) {
|
if ( !empty($src) ) {
|
||||||
if ( !strpos($src, '://') )
|
|
||||||
$src = "http://$src";
|
|
||||||
$alt = @$desc;
|
$alt = @$desc;
|
||||||
$html = "<img src='$src' alt='$alt' />";
|
$html = "<img src='$src' alt='$alt' />";
|
||||||
return $html;
|
return $html;
|
||||||
|
Loading…
Reference in New Issue
Block a user