Code Duplication    Length = 6-6 lines in 2 locations

functions.opengraph.php 2 locations

@@ 301-306 (lines=6) @@
298
			$img_width  = '';
299
			$img_height = '';
300
			$cached_image_id = get_transient( 'jp_' . $image_url );
301
			if ( false !== $cached_image_id ) {
302
				$image_id = $cached_image_id;
303
			} else {
304
				$image_id = attachment_url_to_postid( $image_url );
305
				set_transient( 'jp_' . $image_url, $image_id );
306
			}
307
			$image_size = wp_get_attachment_image_src( $image_id, $width >= 512
308
				? 'full'
309
				: array( $width, $width ) );
@@ 346-351 (lines=6) @@
343
		$img_height = '';
344
		$cached_image_id = get_transient( 'jp_' . $image_url );
345
346
		if ( false !== $cached_image_id ) {
347
			$image_id = $cached_image_id;
348
		} else {
349
			$image_id = attachment_url_to_postid( $image_url );
350
			set_transient( 'jp_' . $image_url, $image_id );
351
		}
352
353
		$image_size = wp_get_attachment_image_src( $image_id, $max_side >= 512
354
			? 'full'