Code Duplication    Length = 12-12 lines in 2 locations

functions.opengraph.php 2 locations

@@ 349-360 (lines=12) @@
346
	}
347
348
	// Second fall back, Site Logo.
349
	if ( empty( $image ) && ( function_exists( 'jetpack_has_site_logo' ) && jetpack_has_site_logo() ) ) {
350
		$image_id = jetpack_get_site_logo( 'id' );
351
		$logo     = wp_get_attachment_image_src( $image_id, 'full' );
352
		if (
353
			isset( $logo[0], $logo[1], $logo[2] )
354
			&& ( _jetpack_og_get_image_validate_size( $logo[1], $logo[2], $width, $height ) )
355
		) {
356
			$image['src']    = $logo[0];
357
			$image['width']  = $logo[1];
358
			$image['height'] = $logo[2];
359
		}
360
	}
361
362
	// Third fall back, Core Site Icon, if valid in size.
363
	if ( empty( $image ) && has_site_icon() ) {
@@ 363-374 (lines=12) @@
360
	}
361
362
	// Third fall back, Core Site Icon, if valid in size.
363
	if ( empty( $image ) && has_site_icon() ) {
364
		$image_id = get_option( 'site_icon' );
365
		$icon     = wp_get_attachment_image_src( $image_id, 'full' );
366
		if (
367
			isset( $icon[0], $icon[1], $icon[2] )
368
			&& ( _jetpack_og_get_image_validate_size( $icon[1], $icon[2], $width, $height ) )
369
		) {
370
			$image['src']    = $icon[0];
371
			$image['width']  = $icon[1];
372
			$image['height'] = $icon[2];
373
		}
374
	}
375
376
	// Final fall back, blank image.
377
	if ( empty( $image ) ) {