summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-02-12 16:01:28 +0300
committerAndrew Dolgov <[email protected]>2017-02-12 16:01:28 +0300
commit58210301e0e462ddfe9bd625865059d57a0c7cd7 (patch)
treecf16254efec2a2c13bec84c72a0f1320759a7a79 /plugins
parent3891782cf5fc20dc70e17c8665866aef6392233e (diff)
add HOOK_ENCLOSURE_ENTRY for af_zz_imgproxy
Diffstat (limited to 'plugins')
-rw-r--r--plugins/af_zz_imgproxy/init.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/af_zz_imgproxy/init.php b/plugins/af_zz_imgproxy/init.php
index 6d7954c3c..923f81734 100644
--- a/plugins/af_zz_imgproxy/init.php
+++ b/plugins/af_zz_imgproxy/init.php
@@ -18,10 +18,19 @@ class Af_Zz_ImgProxy 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);
+ $host->add_hook($host::HOOK_ENCLOSURE_ENTRY, $this);
$host->add_hook($host::HOOK_PREFS_TAB, $this);
}
+ function hook_enclosure_entry($enc) {
+ $proxy_all = $this->host->get($this, "proxy_all");
+
+ $enc["url"] = $this->rewrite_url_if_needed($enc["url"], $proxy_all);
+
+ return $enc;
+ }
+
function hook_render_article($article) {
return $this->hook_render_article_cdm($article);
}