Code Duplication    Length = 10-10 lines in 3 locations

modules/likes.php 3 locations

@@ 794-803 (lines=10) @@
791
		if ( ! $this->is_likes_visible() )
792
			return $content;
793
794
		if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
795
			$blog_id = get_current_blog_id();
796
			$bloginfo = get_blog_details( (int) $blog_id );
797
			$domain = $bloginfo->domain;
798
		} else {
799
			$blog_id = Jetpack_Options::get_option( 'id' );
800
			$url = home_url();
801
			$url_parts = parse_url( $url );
802
			$domain = $url_parts['host'];
803
		}
804
		// make sure to include the scripts before the iframe otherwise weird things happen
805
		add_action( 'wp_footer', array( $this, 'likes_master' ), 21 );
806
@@ 839-848 (lines=10) @@
836
		if ( is_ssl() )
837
			$protocol = 'https';
838
839
		if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
840
			$blog_id = get_current_blog_id();
841
			$bloginfo = get_blog_details( (int) $blog_id );
842
			$domain = $bloginfo->domain;
843
		} else {
844
			$blog_id = Jetpack_Options::get_option( 'id' );
845
			$url = home_url();
846
			$url_parts = parse_url( $url );
847
			$domain = $url_parts['host'];
848
		}
849
		// make sure to include the scripts before the iframe otherwise weird things happen
850
		add_action( 'wp_footer', array( $this, 'likes_master' ), 21 );
851
@@ 878-887 (lines=10) @@
875
		if ( is_ssl() )
876
			$protocol = 'https';
877
878
		if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
879
			$blog_id = get_current_blog_id();
880
			$bloginfo = get_blog_details( (int) $blog_id );
881
			$domain = $bloginfo->domain;
882
		} else {
883
			$blog_id = Jetpack_Options::get_option( 'id' );
884
			$url = home_url();
885
			$url_parts = parse_url( $url );
886
			$domain = $url_parts['host'];
887
		}
888
		// make sure to include the scripts before the iframe otherwise weird things happen
889
		add_action( 'wp_footer', array( $this, 'likes_master' ), 21 );
890