Code Duplication    Length = 14-14 lines in 2 locations

modules/custom-post-types/portfolios.php 1 location

@@ 765-778 (lines=14) @@
762
	 *
763
	 * @return html
764
	 */
765
	static function get_portfolio_thumbnail_link( $post_id ) {
766
		if ( has_post_thumbnail( $post_id ) ) {
767
			/**
768
			 * Change the Portfolio thumbnail size.
769
			 *
770
			 * @module custom-content-types
771
			 *
772
			 * @since 3.4.0
773
			 *
774
			 * @param string|array $var Either a registered size keyword or size array.
775
			 */
776
			return '<a class="portfolio-featured-image" href="' . esc_url( get_permalink( $post_id ) ) . '">' . get_the_post_thumbnail( $post_id, apply_filters( 'jetpack_portfolio_thumbnail_size', 'large' ) ) . '</a>';
777
		}
778
	}
779
}
780
781
add_action( 'init', array( 'Jetpack_Portfolio', 'init' ) );

modules/custom-post-types/testimonial.php 1 location

@@ 709-722 (lines=14) @@
706
	 *
707
	 * @return html
708
	 */
709
	static function get_testimonial_thumbnail_link( $post_id ) {
710
		if ( has_post_thumbnail( $post_id ) ) {
711
			/**
712
			 * Change the thumbnail size for the Testimonial CPT.
713
			 *
714
			 * @module custom-content-types
715
			 *
716
			 * @since 3.4.0
717
			 *
718
			 * @param string|array $var Either a registered size keyword or size array.
719
			 */
720
			return '<a class="testimonial-featured-image" href="' . esc_url( get_permalink( $post_id ) ) . '">' . get_the_post_thumbnail( $post_id, apply_filters( 'jetpack_testimonial_thumbnail_size', 'thumbnail' ) ) . '</a>';
721
		}
722
	}
723
}
724
725
function jetpack_testimonial_custom_control_classes() {