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

rewrite a few more hooks

This commit is contained in:
Andrew Dolgov
2021-02-08 16:52:47 +03:00
parent 3b52cea811
commit 363b3629a4
2 changed files with 36 additions and 32 deletions

View File

@@ -738,14 +738,14 @@ class Af_RedditImgur extends Plugin {
if ($content_type && strpos($content_type, "text/html") !== false) {
foreach ($this->host->get_hooks(PluginHost::HOOK_GET_FULL_TEXT) as $p) {
$extracted_content = $p->hook_get_full_text($url);
if ($extracted_content) {
$article["content"] = $extracted_content;
break;
}
}
$this->host->run_hooks_callback(PluginHost::HOOK_GET_FULL_TEXT,
function ($result) use (&$article) {
if ($result) {
$article["content"] = $result;
return true;
}
},
$url);
}
}
}