add_hook($host::HOOK_FETCH_FEED, $this); $host->add_hook($host::HOOK_FEED_BASIC_INFO, $this); $host->add_hook($host::HOOK_SUBSCRIBE_FEED, $this); $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); $host->add_hook($host::HOOK_PREFS_TAB, $this); require_once __DIR__ . "/filter_base.php"; $filters = array_merge(glob(__DIR__ . "/filters.local/*.php"), glob(__DIR__ . "/filters/*.php")); $names = []; foreach ($filters as $file) { $filter_name = preg_replace("/\..*$/", "", basename($file)); if (array_search($filter_name, $names) === false) { if (!class_exists($filter_name)) { require_once $file; } array_push($names, $filter_name); $filter = new $filter_name($host); if (is_subclass_of($filter, "Af_ComicFilter")) { array_push($this->filters, $filter); array_push($names, $filter_name); } } } } function hook_prefs_tab($args) { if ($args != "prefFeeds") return; $comics = []; foreach ($this->filters as $f) { foreach ($f->supported() as $comic) { array_push($comics, $comic); } } asort($comics); ?>
http://www.gocomics.com/garfield
).") ?>
= format_notice('Drop any updated filters into filters.local
in plugin directory.') ?>