]> git.wh0rd.org Git - tt-rss.git/commitdiff
add HOOK_RENDER_ARTICLE_API (closes #608)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 21 Mar 2013 14:19:23 +0000 (18:19 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 21 Mar 2013 14:19:23 +0000 (18:19 +0400)
classes/api.php
classes/pluginhost.php

index 5e7ec6573ba711388d9059ac132e9e4ed4ba3676..b9168cf930bb484602b12369401bb496acce9a8b 100644 (file)
@@ -655,6 +655,11 @@ class API extends Handler {
 
                                $headline_row["always_display_attachments"] = sql_bool_to_bool($line["always_display_enclosures"]);
 
+                               global $pluginhost;
+                               foreach ($pluginhost->get_hooks($pluginhost::HOOK_RENDER_ARTICLE_API) as $p) {
+                                       $headline_row = $p->hook_render_article_api($headline_row);
+                               }
+
                                array_push($headlines, $headline_row);
                        }
 
index 710435ae4b58a7815fd6b2f48a0044172ba08e7d..7dabd42a81d9c21bfd9f9f37e1dfd964761f121e 100644 (file)
@@ -22,6 +22,7 @@ class PluginHost {
        const HOOK_RENDER_ARTICLE_CDM = 11;
        const HOOK_FEED_FETCHED = 12;
        const HOOK_SANITIZE = 13;
+       const HOOK_RENDER_ARTICLE_API = 14;
 
        const KIND_ALL = 1;
        const KIND_SYSTEM = 2;