Code Duplication    Length = 4-4 lines in 2 locations

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(

functions.opengraph.php 1 location

@@ 330-333 (lines=4) @@
327
			if ( $post_images && ! is_wp_error( $post_images ) ) {
328
				foreach ( (array) $post_images as $post_image ) {
329
					$image['src'] = $post_image['src'];
330
					if ( isset( $post_image['src_width'], $post_image['src_height'] ) ) {
331
						$image['width']  = $post_image['src_width'];
332
						$image['height'] = $post_image['src_height'];
333
					}
334
					if ( ! empty( $post_image['alt_text'] ) ) {
335
						$image['alt_text'] = $post_image['alt_text'];
336
					}