| @@ 91-106 (lines=16) @@ | ||
| 88 | * Display Content instead of Excerpt. |
|
| 89 | */ |
|
| 90 | function jetpack_the_excerpt_to_the_content( $content ) { |
|
| 91 | if ( ( is_home() || is_archive() ) && ! is_post_type_archive( array( 'jetpack-testimonial', 'jetpack-portfolio', 'product' ) ) ) { |
|
| 92 | ob_start(); |
|
| 93 | the_content( sprintf( |
|
| 94 | wp_kses( |
|
| 95 | /* translators: %s: Name of current post. Only visible to screen readers */ |
|
| 96 | __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'jetpack' ), |
|
| 97 | array( |
|
| 98 | 'span' => array( |
|
| 99 | 'class' => array(), |
|
| 100 | ), |
|
| 101 | ) |
|
| 102 | ), |
|
| 103 | get_the_title() |
|
| 104 | ) ); |
|
| 105 | $content = ob_get_clean(); |
|
| 106 | } |
|
| 107 | return $content; |
|
| 108 | } |
|
| 109 | ||
| @@ 133-148 (lines=16) @@ | ||
| 130 | * Display both Content and Excerpt instead of Excerpt in the Customizer so live preview can switch between them. |
|
| 131 | */ |
|
| 132 | function jetpack_the_excerpt_customizer( $excerpt ) { |
|
| 133 | if ( ( is_home() || is_archive() ) && ! is_post_type_archive( array( 'jetpack-testimonial', 'jetpack-portfolio', 'product' ) ) ) { |
|
| 134 | ob_start(); |
|
| 135 | the_content( sprintf( |
|
| 136 | wp_kses( |
|
| 137 | /* translators: %s: Name of current post. Only visible to screen readers */ |
|
| 138 | __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'jetpack' ), |
|
| 139 | array( |
|
| 140 | 'span' => array( |
|
| 141 | 'class' => array(), |
|
| 142 | ), |
|
| 143 | ) |
|
| 144 | ), |
|
| 145 | get_the_title() |
|
| 146 | ) ); |
|
| 147 | $content = ob_get_clean(); |
|
| 148 | } |
|
| 149 | if ( empty( $content ) ) { |
|
| 150 | return $excerpt; |
|
| 151 | } else { |
|