1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 17:35:56 +00:00

add HOOK_ENCLOSURE_ENTRY for af_zz_imgproxy

This commit is contained in:
Andrew Dolgov
2017-02-12 16:01:28 +03:00
parent 3891782cf5
commit 58210301e0
3 changed files with 14 additions and 0 deletions

View File

@@ -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);
}