Code Duplication    Length = 4-4 lines in 2 locations

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

@@ 156-159 (lines=4) @@
153
				$image['src'] => false,
154
			) );
155
156
			if ( false !== $dimensions[ $image['src'] ] ) {
157
				$image['src_width']  = $dimensions['width'];
158
				$image['src_height'] = $dimensions['height'];
159
			}
160
		}
161
162
		$metadata['image'] = array(

functions.opengraph.php 1 location

@@ 296-299 (lines=4) @@
293
			if ( $post_images && ! is_wp_error( $post_images ) ) {
294
				foreach ( (array) $post_images as $post_image ) {
295
					$image['src'] = $post_image['src'];
296
					if ( isset( $post_image['src_width'], $post_image['src_height'] ) ) {
297
						$image['width']  = $post_image['src_width'];
298
						$image['height'] = $post_image['src_height'];
299
					}
300
					if ( ! empty( $post_image['alt_text'] ) ) {
301
						$image['alt_text'] = $post_image['alt_text'];
302
					}