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

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