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

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