Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 77-87 (lines=11) @@
74
 * Display Excerpt instead of Content.
75
 */
76
function jetpack_the_content_to_the_excerpt( $content ) {
77
	if ( is_home() || is_archive() ) {
78
		$blog = get_post( get_option( 'page_for_posts' ) );
79
		if ( get_the_content() === $blog->post_content ) {
80
			return $content;
81
		}
82
		if ( post_password_required() ) {
83
			$content = sprintf( '<p>%s</p>', esc_html__( 'There is no excerpt because this is a protected post.', 'jetpack' ) );
84
		} else {
85
			$content = jetpack_blog_display_custom_excerpt( $content );
86
		}
87
	}
88
	return $content;
89
}
90
@@ 112-122 (lines=11) @@
109
 */
110
function jetpack_the_content_customizer( $content ) {
111
	$class = jetpack_the_content_customizer_class();
112
	if ( is_home() || is_archive() ) {
113
		$blog = get_post( get_option( 'page_for_posts' ) );
114
		if ( get_the_content() === $blog->post_content ) {
115
			return $content;
116
		}
117
		if ( post_password_required() ) {
118
			$excerpt = sprintf( '<p>%s</p>', esc_html__( 'There is no excerpt because this is a protected post.', 'jetpack' ) );
119
		} else {
120
			$excerpt = jetpack_blog_display_custom_excerpt( $content );
121
		}
122
	}
123
	if ( empty( $excerpt ) ) {
124
		return $content;
125
	} else {