@@ 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() ) { |
|
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 | ||
@@ 108-114 (lines=7) @@ | ||
105 | */ |
|
106 | function jetpack_the_content_customizer( $content ) { |
|
107 | $class = jetpack_the_content_customizer_class(); |
|
108 | if ( is_home() || is_archive() ) { |
|
109 | if ( post_password_required() ) { |
|
110 | $excerpt = sprintf( '<p>%s</p>', esc_html__( 'There is no excerpt because this is a protected post.', 'jetpack' ) ); |
|
111 | } else { |
|
112 | $excerpt = jetpack_blog_display_custom_excerpt( $content ); |
|
113 | } |
|
114 | } |
|
115 | if ( empty( $excerpt ) ) { |
|
116 | return $content; |
|
117 | } else { |