api: getHeadlines - truncate article excerpt properly
This commit is contained in:
parent
c45ffc0c06
commit
ba8cd9a76f
|
@ -231,7 +231,10 @@
|
||||||
"feed_id" => $line["feed_id"],
|
"feed_id" => $line["feed_id"],
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($show_except) $headline_row["excerpt"] = $line["content_preview"];
|
if ($show_except) {
|
||||||
|
$excerpt = truncate_string(strip_tags($line["content_preview"]), 100);
|
||||||
|
$headline_row["excerpt"] = $excerpt;
|
||||||
|
}
|
||||||
|
|
||||||
array_push($headlines, $headline_row);
|
array_push($headlines, $headline_row);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue