evolved_excerpt

The Evolved evolved excerpt function.

Description

evolved_excerpt( (string) $length_callback = '', (string) $more_callback = '' ); 

Parameters (2)

0. $length_callback — Optional. (string) => ''
The length callback.
1. $more_callback — Optional. (string) => ''
The more callback.

Usage

  1. if ( !function_exists( 'evolved_excerpt' ) ) { 
  2. require_once '/functions.php'; 
  3.  
  4. // The length callback. 
  5. $length_callback = ''; 
  6.  
  7. // The more callback. 
  8. $more_callback = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = evolved_excerpt($length_callback, $more_callback); 
  12.  

Defined (1)

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

/functions.php  
  1. function evolved_excerpt($length_callback='', $more_callback='') { 
  2. global $post; 
  3. if(function_exists($length_callback)) { 
  4. add_filter('excerpt_length', $length_callback); 
  5. if(function_exists($more_callback)) { 
  6. add_filter('excerpt_more', $more_callback); 
  7. $output = get_the_excerpt(); 
  8. $output = apply_filters('wptexturize', $output); 
  9. $output = apply_filters('convert_chars', $output); 
  10. $output = '<p>'.$output.'</p>'; 
  11. echo $output;