Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 688-701 (lines=14) @@
685
	 *
686
	 * @return html
687
	 */
688
	static function get_testimonial_thumbnail_link( $post_id ) {
689
		if ( has_post_thumbnail( $post_id ) ) {
690
			/**
691
			 * Change the thumbnail size for the Testimonial CPT.
692
			 *
693
			 * @module custom-content-types
694
			 *
695
			 * @since 3.4.0
696
			 *
697
			 * @param string|array $var Either a registered size keyword or size array.
698
			 */
699
			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>';
700
		}
701
	}
702
}
703
704
function jetpack_testimonial_custom_control_classes() {

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

@@ 764-777 (lines=14) @@
761
	 *
762
	 * @return html
763
	 */
764
	static function get_portfolio_thumbnail_link( $post_id ) {
765
		if ( has_post_thumbnail( $post_id ) ) {
766
			/**
767
			 * Change the Portfolio thumbnail size.
768
			 *
769
			 * @module custom-content-types
770
			 *
771
			 * @since 3.4.0
772
			 *
773
			 * @param string|array $var Either a registered size keyword or size array.
774
			 */
775
			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>';
776
		}
777
	}
778
}
779
780
add_action( 'init', array( 'Jetpack_Portfolio', 'init' ) );