Code Duplication    Length = 10-10 lines in 3 locations

modules/likes.php 3 locations

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