Code Duplication    Length = 10-10 lines in 3 locations

modules/likes.php 3 locations

@@ 768-777 (lines=10) @@
765
		if ( ! is_numeric( $post_id ) || ! $this->is_likes_visible() )
766
			return $content;
767
768
		if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
769
			$blog_id = get_current_blog_id();
770
			$bloginfo = get_blog_details( (int) $blog_id );
771
			$domain = $bloginfo->domain;
772
		} else {
773
			$blog_id = Jetpack_Options::get_option( 'id' );
774
			$url = home_url();
775
			$url_parts = parse_url( $url );
776
			$domain = $url_parts['host'];
777
		}
778
		// make sure to include the scripts before the iframe otherwise weird things happen
779
		add_action( 'wp_footer', array( $this, 'likes_master' ), 21 );
780
@@ 819-828 (lines=10) @@
816
		if ( is_ssl() )
817
			$protocol = 'https';
818
819
		if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
820
			$blog_id = get_current_blog_id();
821
			$bloginfo = get_blog_details( (int) $blog_id );
822
			$domain = $bloginfo->domain;
823
		} else {
824
			$blog_id = Jetpack_Options::get_option( 'id' );
825
			$url = home_url();
826
			$url_parts = parse_url( $url );
827
			$domain = $url_parts['host'];
828
		}
829
		// make sure to include the scripts before the iframe otherwise weird things happen
830
		add_action( 'wp_footer', array( $this, 'likes_master' ), 21 );
831
@@ 860-869 (lines=10) @@
857
		if ( is_ssl() )
858
			$protocol = 'https';
859
860
		if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
861
			$blog_id = get_current_blog_id();
862
			$bloginfo = get_blog_details( (int) $blog_id );
863
			$domain = $bloginfo->domain;
864
		} else {
865
			$blog_id = Jetpack_Options::get_option( 'id' );
866
			$url = home_url();
867
			$url_parts = parse_url( $url );
868
			$domain = $url_parts['host'];
869
		}
870
		// make sure to include the scripts before the iframe otherwise weird things happen
871
		add_action( 'wp_footer', array( $this, 'likes_master' ), 21 );
872