]> git.wh0rd.org Git - tt-rss.git/commitdiff
add pluginhost HOOK_HEADLINES_BEFORE (refs #814)
authorAndrew Dolgov <noreply@fakecake.org>
Tue, 19 Aug 2014 10:24:34 +0000 (14:24 +0400)
committerAndrew Dolgov <noreply@fakecake.org>
Tue, 19 Aug 2014 10:24:34 +0000 (14:24 +0400)
classes/feeds.php
classes/pluginhost.php

index 317a90afcf61b0cc83476265cfea12ac5fff16e9..5ec10961438ffe7a5e89ef8454cdef059fd28ec2 100644 (file)
@@ -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;
index 744337e0f67b5a82d21ae842e30ccd4a31f03b51..1ad7afd60f1081201e13381a705a48b020ed05e2 100644 (file)
@@ -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;