Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 710-723 (lines=14) @@
707
	 *
708
	 * @return html
709
	 */
710
	static function get_testimonial_thumbnail_link( $post_id ) {
711
		if ( has_post_thumbnail( $post_id ) ) {
712
			/**
713
			 * Change the thumbnail size for the Testimonial CPT.
714
			 *
715
			 * @module custom-content-types
716
			 *
717
			 * @since 3.4.0
718
			 *
719
			 * @param string|array $var Either a registered size keyword or size array.
720
			 */
721
			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>';
722
		}
723
	}
724
}
725
726
function jetpack_testimonial_custom_control_classes() {

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

@@ 910-923 (lines=14) @@
907
	 *
908
	 * @return html
909
	 */
910
	static function get_portfolio_thumbnail_link( $post_id ) {
911
		if ( has_post_thumbnail( $post_id ) ) {
912
			/**
913
			 * Change the Portfolio thumbnail size.
914
			 *
915
			 * @module custom-content-types
916
			 *
917
			 * @since 3.4.0
918
			 *
919
			 * @param string|array $var Either a registered size keyword or size array.
920
			 */
921
			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>';
922
		}
923
	}
924
}
925
926
add_action( 'init', array( 'Jetpack_Portfolio', 'init' ) );