Code Duplication    Length = 3-7 lines in 2 locations

modules/publicize/enhanced-open-graph.php 1 location

@@ 2-8 (lines=7) @@
1
<?php
2
if ( ! class_exists( 'Jetpack_Media_Summary' ) ) {
3
	if ( defined('IS_WPCOM') && IS_WPCOM ) {
4
		include WP_CONTENT_DIR . '/lib/class.wpcom-media-summary.php';
5
	} else {
6
		jetpack_require_lib( 'class.media-summary' );
7
	}
8
}
9
10
/**
11
 * Better OG Image Tags for Image Post Formats

class.jetpack-twitter-cards.php 1 location

@@ 137-139 (lines=3) @@
134
135
		// Only proceed with media analysis if a featured image has not superseded it already.
136
		if ( empty( $og_tags['twitter:image'] ) && empty( $og_tags['twitter:image:src'] ) ) {
137
			if ( ! class_exists( 'Jetpack_Media_Summary' ) && defined( 'IS_WPCOM' ) && IS_WPCOM ) {
138
				include WP_CONTENT_DIR . '/lib/class.wpcom-media-summary.php';
139
			}
140
141
			if ( ! class_exists( 'Jetpack_Media_Summary' ) ) {
142
				jetpack_require_lib( 'class.media-summary' );