diff options
author | Andrew Dolgov <[email protected]> | 2012-12-23 14:52:18 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2012-12-23 14:52:18 +0400 |
commit | 19c7350770788edf3ae0bb1fd6d95876667adbf6 (patch) | |
tree | e539d53acd796375d7feba1efd66d3850fd14db1 /include/rssfuncs.php | |
parent | 83e6e313be6de7d6e3f155a13c821ab82da12575 (diff) |
experimental new plugin system
Diffstat (limited to 'include/rssfuncs.php')
-rw-r--r-- | include/rssfuncs.php | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/include/rssfuncs.php b/include/rssfuncs.php index f844aaeb9..4a5bd7680 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -399,23 +399,6 @@ _debug("update_rss_feed: " . count($filters) . " filters loaded."); } - $filter_plugins = array(); - - if (defined('_ARTICLE_FILTER_PLUGINS')) { - foreach (explode(",", _ARTICLE_FILTER_PLUGINS) as $p) { - $pclass = "filter_" . trim($p); - - if (class_exists($pclass)) { - $plugin = new $pclass($link); - array_push($filter_plugins, $plugin); - } - } - } - - if ($debug_enabled) { - _debug("update_rss_feed: " . count($filter_plugins) . " filter plugins loaded."); - } - if ($use_simplepie) { $iterator = $rss->get_items(); } else { @@ -782,7 +765,9 @@ } // TODO: less memory-hungry implementation - if (count($filter_plugins) > 0) { + global $pluginhost; + + foreach ($pluginhost->get_hooks($pluginhost::HOOK_ARTICLE_FILTER) as $p) { if ($debug_enabled) { _debug("update_rss_feed: applying plugin filters..."); } @@ -795,7 +780,7 @@ "author" => $entry_author); foreach ($filter_plugins as $plugin) { - $article = $plugin->filter_article($article); + $article = $plugin->hook_article_filter($article); } $entry_title = $article["title"]; |