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

@@ 245-248 (lines=4) @@
242
				)
243
			);
244
245
			if ( false !== $dimensions[ $image['src'] ] ) {
246
				$image['src_width']  = $dimensions['width'];
247
				$image['src_height'] = $dimensions['height'];
248
			}
249
		}
250
251
		$metadata['image'] = array(