Code Duplication    Length = 10-10 lines in 3 locations

modules/likes.php 3 locations

@@ 807-816 (lines=10) @@
804
		if ( ! $this->is_likes_visible() )
805
			return $content;
806
807
		if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
808
			$blog_id = get_current_blog_id();
809
			$bloginfo = get_blog_details( (int) $blog_id );
810
			$domain = $bloginfo->domain;
811
		} else {
812
			$blog_id = Jetpack_Options::get_option( 'id' );
813
			$url = home_url();
814
			$url_parts = parse_url( $url );
815
			$domain = $url_parts['host'];
816
		}
817
		// make sure to include the scripts before the iframe otherwise weird things happen
818
		add_action( 'wp_footer', array( $this, 'likes_master' ), 21 );
819
@@ 852-861 (lines=10) @@
849
		if ( is_ssl() )
850
			$protocol = 'https';
851
852
		if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
853
			$blog_id = get_current_blog_id();
854
			$bloginfo = get_blog_details( (int) $blog_id );
855
			$domain = $bloginfo->domain;
856
		} else {
857
			$blog_id = Jetpack_Options::get_option( 'id' );
858
			$url = home_url();
859
			$url_parts = parse_url( $url );
860
			$domain = $url_parts['host'];
861
		}
862
		// make sure to include the scripts before the iframe otherwise weird things happen
863
		add_action( 'wp_footer', array( $this, 'likes_master' ), 21 );
864
@@ 891-900 (lines=10) @@
888
		if ( is_ssl() )
889
			$protocol = 'https';
890
891
		if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
892
			$blog_id = get_current_blog_id();
893
			$bloginfo = get_blog_details( (int) $blog_id );
894
			$domain = $bloginfo->domain;
895
		} else {
896
			$blog_id = Jetpack_Options::get_option( 'id' );
897
			$url = home_url();
898
			$url_parts = parse_url( $url );
899
			$domain = $url_parts['host'];
900
		}
901
		// make sure to include the scripts before the iframe otherwise weird things happen
902
		add_action( 'wp_footer', array( $this, 'likes_master' ), 21 );
903