Code Duplication    Length = 4-4 lines in 2 locations

functions.opengraph.php 1 location

@@ 343-346 (lines=4) @@
340
			if ( $post_images && ! is_wp_error( $post_images ) ) {
341
				foreach ( (array) $post_images as $post_image ) {
342
					$image['src'] = $post_image['src'];
343
					if ( isset( $post_image['src_width'], $post_image['src_height'] ) ) {
344
						$image['width']  = $post_image['src_width'];
345
						$image['height'] = $post_image['src_height'];
346
					}
347
					if ( ! empty( $post_image['alt_text'] ) ) {
348
						$image['alt_text'] = $post_image['alt_text'];
349
					}

3rd-party/class.jetpack-amp-support.php 1 location

@@ 250-253 (lines=4) @@
247
				)
248
			);
249
250
			if ( false !== $dimensions[ $image['src'] ] ) {
251
				$image['src_width']  = $dimensions['width'];
252
				$image['src_height'] = $dimensions['height'];
253
			}
254
		}
255
256
		$metadata['image'] = array(