Code Duplication    Length = 12-12 lines in 2 locations

functions.opengraph.php 2 locations

@@ 363-374 (lines=12) @@
360
	}
361
362
	// Second fall back, Site Logo.
363
	if ( empty( $image ) && ( function_exists( 'jetpack_has_site_logo' ) && jetpack_has_site_logo() ) ) {
364
		$image_id = jetpack_get_site_logo( 'id' );
365
		$logo     = wp_get_attachment_image_src( $image_id, 'full' );
366
		if (
367
			isset( $logo[0], $logo[1], $logo[2] )
368
			&& ( _jetpack_og_get_image_validate_size( $logo[1], $logo[2], $width, $height ) )
369
		) {
370
			$image['src']    = $logo[0];
371
			$image['width']  = $logo[1];
372
			$image['height'] = $logo[2];
373
		}
374
	}
375
376
	// Third fall back, Core Site Icon, if valid in size.
377
	if ( empty( $image ) && has_site_icon() ) {
@@ 377-388 (lines=12) @@
374
	}
375
376
	// Third fall back, Core Site Icon, if valid in size.
377
	if ( empty( $image ) && has_site_icon() ) {
378
		$image_id = get_option( 'site_icon' );
379
		$icon     = wp_get_attachment_image_src( $image_id, 'full' );
380
		if (
381
			isset( $icon[0], $icon[1], $icon[2] )
382
			&& ( _jetpack_og_get_image_validate_size( $icon[1], $icon[2], $width, $height ) )
383
		) {
384
			$image['src']    = $icon[0];
385
			$image['width']  = $icon[1];
386
			$image['height'] = $icon[2];
387
		}
388
	}
389
390
	// Final fall back, blank image.
391
	if ( empty( $image ) ) {