From: Steve Sutton Date: Tue, 11 Oct 2016 20:28:34 +0000 (-0400) Subject: Update import for blog images. X-Git-Tag: v1.0.1^2~2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=ec1cd90dca735c5ddeeab5bb57407ece85fbac77;p=WP-Plugins%2Fglm-wp-importer.git Update import for blog images. Setting the sive to medium. --- diff --git a/controllers/BlogImageImport.php b/controllers/BlogImageImport.php index b1d4e6c..67f1f33 100644 --- a/controllers/BlogImageImport.php +++ b/controllers/BlogImageImport.php @@ -273,7 +273,7 @@ if ($imagesKey) { var_dump($imagesKey); - $newImage = wp_get_attachment_image_src($imagesKey, 'full'); + $newImage = wp_get_attachment_image_src($imagesKey, 'medium'); // need to replace the src tags in content with the new image tags $caption = str_replace( 'src="' . $srcMatch[1] . '"', @@ -286,9 +286,9 @@ } } } - //echo '
'.htmlspecialchars($caption).'
'; + echo '
caption: '.htmlspecialchars($caption).'
'; + echo '
content: '.htmlspecialchars($content).'
'; //exit; - echo '
'.htmlspecialchars($content).'
'; echo ''; $updatePost = array( 'ID' => $post->ID,