Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 93-99 (lines=7) @@
90
 * Display Excerpt instead of Content.
91
 */
92
function jetpack_the_content_to_the_excerpt( $content ) {
93
	if ( ( is_home() || is_archive() ) && ! is_post_type_archive( array( 'jetpack-testimonial', 'jetpack-portfolio', 'product' ) ) ) {
94
		if ( post_password_required() ) {
95
			$excerpt = sprintf( '<p>%s</p>', esc_html__( 'There is no excerpt because this is a protected post.', 'jetpack' ) );
96
		} else {
97
			$excerpt = jetpack_blog_display_custom_excerpt();
98
		}
99
	}
100
	if ( empty( $excerpt ) ) {
101
		return $content;
102
	} else {
@@ 137-143 (lines=7) @@
134
 */
135
function jetpack_the_content_customizer( $content ) {
136
	$class = jetpack_the_content_customizer_class();
137
	if ( ( is_home() || is_archive() ) && ! is_post_type_archive( array( 'jetpack-testimonial', 'jetpack-portfolio', 'product' ) ) ) {
138
		if ( post_password_required() ) {
139
			$excerpt = sprintf( '<p>%s</p>', esc_html__( 'There is no excerpt because this is a protected post.', 'jetpack' ) );
140
		} else {
141
			$excerpt = jetpack_blog_display_custom_excerpt();
142
		}
143
	}
144
	if ( empty( $excerpt ) ) {
145
		return $content;
146
	} else {