jetpack_the_excerpt_customizer

Display both Content and Excerpt instead of Excerpt in the Customizer so live preview can switch between them.

Description

jetpack_the_excerpt_customizer( $excerpt ); 

Parameters (1)

0. $excerpt
The excerpt.

Usage

  1. if ( !function_exists( 'jetpack_the_excerpt_customizer' ) ) { 
  2. require_once '/modules/theme-tools/content-options/blog-display.php'; 
  3.  
  4. // The excerpt. 
  5. $excerpt = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = jetpack_the_excerpt_customizer($excerpt); 
  9.  

Defined (1)

The function is defined in the following location(s).

/modules/theme-tools/content-options/blog-display.php  
  1. function jetpack_the_excerpt_customizer( $excerpt ) { 
  2. if ( is_home() || is_archive() ) { 
  3. ob_start(); 
  4. the_content( sprintf( 
  5. /** translators: %s: Name of current post. */ 
  6. wp_kses( __( 'Continue reading %s <span class="meta-nav">→</span>', 'jetpack' ), array( 'span' => array( 'class' => array() ) ) ),  
  7. the_title( '<span class="screen-reader-text">"', '"</span>', false ) 
  8. ) ); 
  9. $content = ob_get_clean(); 
  10. if ( empty( $content ) ) { 
  11. return $excerpt; 
  12. } else { 
  13. return sprintf( '<div class="jetpack-blog-display jetpack-the-content">%s</div><div class="jetpack-blog-display jetpack-the-excerpt">%s</div>', $content, $excerpt );