|
@@ 95-103 (lines=9) @@
|
| 92 |
|
* Display Content instead of Excerpt. |
| 93 |
|
*/ |
| 94 |
|
function jetpack_the_excerpt_to_the_content( $content ) { |
| 95 |
|
if ( is_home() || is_archive() ) { |
| 96 |
|
ob_start(); |
| 97 |
|
the_content( sprintf( |
| 98 |
|
/* translators: %s: Name of current post. */ |
| 99 |
|
wp_kses( __( 'Continue reading %s <span class="meta-nav">→</span>', 'jetpack' ), array( 'span' => array( 'class' => array() ) ) ), |
| 100 |
|
the_title( '<span class="screen-reader-text">"', '"</span>', false ) |
| 101 |
|
) ); |
| 102 |
|
$content = ob_get_clean(); |
| 103 |
|
} |
| 104 |
|
return $content; |
| 105 |
|
} |
| 106 |
|
|
|
@@ 134-142 (lines=9) @@
|
| 131 |
|
* Display both Content and Excerpt instead of Excerpt in the Customizer so live preview can switch between them. |
| 132 |
|
*/ |
| 133 |
|
function jetpack_the_excerpt_customizer( $excerpt ) { |
| 134 |
|
if ( is_home() || is_archive() ) { |
| 135 |
|
ob_start(); |
| 136 |
|
the_content( sprintf( |
| 137 |
|
/* translators: %s: Name of current post. */ |
| 138 |
|
wp_kses( __( 'Continue reading %s <span class="meta-nav">→</span>', 'jetpack' ), array( 'span' => array( 'class' => array() ) ) ), |
| 139 |
|
the_title( '<span class="screen-reader-text">"', '"</span>', false ) |
| 140 |
|
) ); |
| 141 |
|
$content = ob_get_clean(); |
| 142 |
|
} |
| 143 |
|
if ( empty( $content ) ) { |
| 144 |
|
return $excerpt; |
| 145 |
|
} else { |