summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-12-20 13:12:50 +0300
committerAndrew Dolgov <[email protected]>2020-12-20 13:12:50 +0300
commit9e625130958db57caf886ccc211399fb5d6ae921 (patch)
treef1717fcafe3d12e658043b762b912e77e6d76321 /plugins
parentb65e07a12b536b17de19e1cdb62e0a78d538a211 (diff)
af_redditimgur: also rewrite in the API handler
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/af_redditimgur/init.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php
index 68893ea07..7a6f4b74d 100755
--- a/plugins/af_redditimgur/init.php
+++ b/plugins/af_redditimgur/init.php
@@ -23,6 +23,7 @@ class Af_RedditImgur extends Plugin {
$host->add_hook($host::HOOK_RENDER_ARTICLE, $this);
$host->add_hook($host::HOOK_RENDER_ARTICLE_CDM, $this);
+ $host->add_hook($host::HOOK_RENDER_ARTICLE_API, $this);
}
function hook_prefs_tab($args) {
@@ -636,4 +637,10 @@ class Af_RedditImgur extends Plugin {
return $article;
}
+ function hook_render_article_api($params) {
+ $article = isset($params["article"]) ? $params["article"] : $params["headline"];
+
+ return $this->hook_render_article_cdm($article);
+ }
+
}