Esempio n. 1
0
/**
 * get excerpt
 *
 * @param string/int integer for custom lenngth for tiny,short/regular/long for defined excerpt
 * @since framework 1.0
 */
function ts_get_the_excerpt_theme($length = 55)
{
    return ts_Excerpt::get_by_length($length);
}
Esempio n. 2
0
 /**
  * Sets the length for the excerpt 
  *
  * @param string $new_length 
  * @return void
  */
 public static function get_by_length($new_length = 55)
 {
     ts_Excerpt::$length = $new_length;
     add_filter('excerpt_length', 'ts_Excerpt::new_length');
     return ts_Excerpt::get();
 }