Code Duplication    Length = 14-14 lines in 2 locations

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() {

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' ) );