Temporary image parsing fix from mdawaffe until a more robust attachment API is ready. fixes #3287
git-svn-id: http://svn.automattic.com/wordpress/trunk@4427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1001b4c5b8
commit
0b0c6b3f52
|
@ -13,9 +13,9 @@ function wp_upload_display( $dims = false, $href = '' ) {
|
|||
|
||||
$class = 'text';
|
||||
$innerHTML = get_attachment_innerHTML( $id, false, $dims );
|
||||
if ( $image_src = strstr($innerHTML, 'src="') ) {
|
||||
$image_src = explode('"', $image_src);
|
||||
$image_src = $image_src[1];
|
||||
if ( $image_src = strstr($innerHTML, 'src=') ) {
|
||||
preg_match("/src=(\"|')(.+?)\\1/", $image_src, $matches);
|
||||
$image_src = $matches[2];
|
||||
$image_rel = wp_make_link_relative($image_src);
|
||||
$class = 'image';
|
||||
$innerHTML = ' ' . str_replace($image_src, $image_rel, $innerHTML);
|
||||
|
|
Loading…
Reference in New Issue