From: Andrew Dolgov Date: Tue, 19 Aug 2014 10:24:34 +0000 (+0400) Subject: add pluginhost HOOK_HEADLINES_BEFORE (refs #814) X-Git-Tag: 1.14~24 X-Git-Url: https://git.wh0rd.org/?p=tt-rss.git;a=commitdiff_plain;h=7eb87b80d533d0bdd538938b69064352a8587204 add pluginhost HOOK_HEADLINES_BEFORE (refs #814) --- diff --git a/classes/feeds.php b/classes/feeds.php index 317a90af..5ec10961 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -281,6 +281,12 @@ class Feeds extends Handler_Protected { } } */ + if ($offset == 0) { + foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_HEADLINES_BEFORE) as $p) { + $reply['content'] .= $p->hook_headlines_before($feed, $cat_view, $qfh_ret); + } + } + if ($this->dbh->num_rows($result) > 0) { $lnum = $offset; diff --git a/classes/pluginhost.php b/classes/pluginhost.php index 744337e0..1ad7afd6 100644 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -42,6 +42,7 @@ class PluginHost { const HOOK_SEARCH = 25; const HOOK_FORMAT_ENCLOSURES = 26; const HOOK_SUBSCRIBE_FEED = 27; + const HOOK_HEADLINES_BEFORE = 28; const KIND_ALL = 1; const KIND_SYSTEM = 2;