From: Andrew Dolgov Date: Thu, 21 Mar 2013 14:19:23 +0000 (+0400) Subject: add HOOK_RENDER_ARTICLE_API (closes #608) X-Git-Tag: 1.7.5~43 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=b6604c96135303a546ff8dcfefdcd804ed4554a6;p=tt-rss.git add HOOK_RENDER_ARTICLE_API (closes #608) --- diff --git a/classes/api.php b/classes/api.php index 5e7ec657..b9168cf9 100644 --- a/classes/api.php +++ b/classes/api.php @@ -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); } diff --git a/classes/pluginhost.php b/classes/pluginhost.php index 710435ae..7dabd42a 100644 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -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;