Code Duplication    Length = 10-10 lines in 3 locations

modules/likes.php 3 locations

@@ 821-830 (lines=10) @@
818
		if ( ! $this->is_likes_visible() )
819
			return $content;
820
821
		if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
822
			$blog_id = get_current_blog_id();
823
			$bloginfo = get_blog_details( (int) $blog_id );
824
			$domain = $bloginfo->domain;
825
		} else {
826
			$blog_id = Jetpack_Options::get_option( 'id' );
827
			$url = home_url();
828
			$url_parts = parse_url( $url );
829
			$domain = $url_parts['host'];
830
		}
831
		// make sure to include the scripts before the iframe otherwise weird things happen
832
		add_action( 'wp_footer', array( $this, 'likes_master' ), 21 );
833
@@ 866-875 (lines=10) @@
863
		if ( is_ssl() )
864
			$protocol = 'https';
865
866
		if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
867
			$blog_id = get_current_blog_id();
868
			$bloginfo = get_blog_details( (int) $blog_id );
869
			$domain = $bloginfo->domain;
870
		} else {
871
			$blog_id = Jetpack_Options::get_option( 'id' );
872
			$url = home_url();
873
			$url_parts = parse_url( $url );
874
			$domain = $url_parts['host'];
875
		}
876
		// make sure to include the scripts before the iframe otherwise weird things happen
877
		add_action( 'wp_footer', array( $this, 'likes_master' ), 21 );
878
@@ 905-914 (lines=10) @@
902
		if ( is_ssl() )
903
			$protocol = 'https';
904
905
		if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
906
			$blog_id = get_current_blog_id();
907
			$bloginfo = get_blog_details( (int) $blog_id );
908
			$domain = $bloginfo->domain;
909
		} else {
910
			$blog_id = Jetpack_Options::get_option( 'id' );
911
			$url = home_url();
912
			$url_parts = parse_url( $url );
913
			$domain = $url_parts['host'];
914
		}
915
		// make sure to include the scripts before the iframe otherwise weird things happen
916
		add_action( 'wp_footer', array( $this, 'likes_master' ), 21 );
917