minileven_excerpt

Sets the post excerpt length based on number of characters, without breaking words at the end.

Description

minileven_excerpt( (number) $count ); 

Parameters (1)

0. $count (number)
The count.

Usage

  1. if ( !function_exists( 'minileven_excerpt' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/minileven/theme/pub/minileven/inc/tweaks.php'; 
  3.  
  4. // The count. 
  5. $count = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = minileven_excerpt($count); 
  9.  

Defined (1)

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

/modules/minileven/theme/pub/minileven/inc/tweaks.php  
  1. function minileven_excerpt( $count ) { 
  2. $excerpt = get_the_content(); 
  3. $excerpt = strip_tags( $excerpt ); 
  4. $excerpt = strip_shortcodes( $excerpt ); 
  5. $excerpt = substr( $excerpt, 0, $count ); 
  6. $excerpt = substr( $excerpt, 0, strripos( $excerpt, " " ) ); 
  7. $excerpt = $excerpt . minileven_continue_reading_link(); 
  8. return $excerpt;