jetpack_the_content_customizer

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

Description

jetpack_the_content_customizer( $content ); 

Parameters (1)

0. $content
The content.

Usage

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

Defined (1)

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

/modules/theme-tools/content-options/blog-display.php  
  1. function jetpack_the_content_customizer( $content ) { 
  2. $class = jetpack_the_content_customizer_class(); 
  3. if ( is_home() || is_archive() ) { 
  4. if ( post_password_required() ) { 
  5. $excerpt = sprintf( '<p>%s</p>', esc_html__( 'There is no excerpt because this is a protected post.', 'jetpack' ) ); 
  6. } else { 
  7. $excerpt = jetpack_blog_display_custom_excerpt( $content ); 
  8. if ( empty( $excerpt ) ) { 
  9. return $content; 
  10. } else { 
  11. return sprintf( '<div class="jetpack-blog-display %s jetpack-the-content">%s</div><div class="jetpack-blog-display %s jetpack-the-excerpt">%s</div>', $class, $content, $class, $excerpt );