1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 08:15:55 +00:00

move some old-style handlers to new callback ones

This commit is contained in:
Andrew Dolgov
2021-02-08 16:14:48 +03:00
parent 1d5c8ee500
commit 3b52cea811
8 changed files with 114 additions and 81 deletions

View File

@@ -140,9 +140,13 @@ class Pref_Filters extends Handler_Protected {
$line["content_preview"] = truncate_string(strip_tags($line["content"]), 200, '…');
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) {
$line = $p->hook_query_headlines($line, 100);
}
$excerpt_length = 100;
PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_QUERY_HEADLINES,
function ($result) use (&$line) {
$line = $result;
},
$line, $excerpt_length);
$content_preview = $line["content_preview"];