示例#1
0
文件: widget.php 项目: hewu/blogwp
 function get_excerpt($instance, $r)
 {
     $text = trim($r->post_excerpt);
     if ($text == "") {
         $text = strip_shortcodes($r->post_content);
         $text = str_replace(']]>', ']]>', $text);
         $text = strip_tags($text);
         $text = str_replace('"', '\'', $text);
     }
     $text = gdFunctionsGDSW::trim_to_words($text, $instance["display_excerpt_length"]);
     return $text;
 }