Code Duplication    Length = 7-7 lines in 2 locations

projects/plugins/jetpack/modules/theme-tools/content-options/blog-display.php 2 locations

@@ 77-83 (lines=7) @@
74
 * Display Excerpt instead of Content.
75
 */
76
function jetpack_the_content_to_the_excerpt( $content ) {
77
	if ( ( is_home() || is_archive() ) && ! is_post_type_archive( array( 'jetpack-testimonial', 'jetpack-portfolio', 'product' ) ) ) {
78
		if ( post_password_required() ) {
79
			$content = sprintf( '<p>%s</p>', esc_html__( 'There is no excerpt because this is a protected post.', 'jetpack' ) );
80
		} else {
81
			$content = jetpack_blog_display_custom_excerpt( $content );
82
		}
83
	}
84
	return $content;
85
}
86
@@ 117-123 (lines=7) @@
114
 */
115
function jetpack_the_content_customizer( $content ) {
116
	$class = jetpack_the_content_customizer_class();
117
	if ( ( is_home() || is_archive() ) && ! is_post_type_archive( array( 'jetpack-testimonial', 'jetpack-portfolio', 'product' ) ) ) {
118
		if ( post_password_required() ) {
119
			$excerpt = sprintf( '<p>%s</p>', esc_html__( 'There is no excerpt because this is a protected post.', 'jetpack' ) );
120
		} else {
121
			$excerpt = jetpack_blog_display_custom_excerpt( $content );
122
		}
123
	}
124
	if ( empty( $excerpt ) ) {
125
		return $content;
126
	} else {