diff options
author | Andrew Dolgov <[email protected]> | 2015-08-12 08:29:23 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2015-08-12 08:29:23 +0300 |
commit | be2cfc1fff8792715e059249939a1a798779d777 (patch) | |
tree | e92b56f38f30af15c6dff677ca22fb8fe0190920 /classes/pluginhost.php | |
parent | 90da4ada664443704dca6119c12bb7ecccb48aa9 (diff) | |
parent | b87744534a5250e9f839997f8eceb5b86b8c0e5c (diff) |
Merge branch 'master' of git.fakecake.org:tt-rss
Diffstat (limited to 'classes/pluginhost.php')
-rw-r--r-- | classes/pluginhost.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/classes/pluginhost.php b/classes/pluginhost.php index c4ec1871d..75620a191 100644 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -8,6 +8,7 @@ class PluginHost { private $storage = array(); private $feeds = array(); private $api_methods = array(); + private $plugin_actions = array(); private $owner_uid; private $debug; private $last_registered; @@ -47,6 +48,7 @@ class PluginHost { const HOOK_SUBSCRIBE_FEED = 27; const HOOK_HEADLINES_BEFORE = 28; const HOOK_RENDER_ENCLOSURE = 29; + const HOOK_ARTICLE_FILTER_ACTION = 30; const KIND_ALL = 1; const KIND_SYSTEM = 2; @@ -98,7 +100,7 @@ class PluginHost { } function get_plugin($name) { - return $this->plugins[$name]; + return $this->plugins[strtolower($name)]; } function run_hooks($type, $method, $args) { @@ -415,5 +417,19 @@ class PluginHost { function get_api_method($name) { return $this->api_methods[$name]; } + + function add_filter_action($sender, $action_name, $action_desc) { + $sender_class = get_class($sender); + + if (!isset($this->plugin_actions[$sender_class])) + $this->plugin_actions[$sender_class] = array(); + + array_push($this->plugin_actions[$sender_class], + array("action" => $action_name, "description" => $action_desc, "sender" => $sender)); + } + + function get_filter_actions() { + return $this->plugin_actions; + } } ?> |