]> git.wh0rd.org - tt-rss.git/commitdiff
Add hook to add explanations of hotkey actions via plugins.
authorDaniel Andersson <sskraep@gmail.com>
Tue, 2 Apr 2013 07:05:17 +0000 (09:05 +0200)
committerDaniel Andersson <sskraep@gmail.com>
Tue, 2 Apr 2013 07:05:17 +0000 (09:05 +0200)
classes/pluginhost.php
include/functions.php

index 5b8a77fd64e9d8e90991a863ff4e115715dc9bb3..a75027033ae57227e791f063c7297de917070c6d 100644 (file)
@@ -27,6 +27,7 @@ class PluginHost {
        const HOOK_TOOLBAR_BUTTON = 15;
        const HOOK_ACTION_ITEM = 16;
        const HOOK_HEADLINE_TOOLBAR_BUTTON = 17;
+       const HOOK_HOTKEY_INFO = 18;
 
        const KIND_ALL = 1;
        const KIND_SYSTEM = 2;
index c04e6a81a246ab3ec4e26f273aef65b335b3448a..aea7618a836c5f59cd5a75609c90fddcd75965cd 100644 (file)
                                "help_dialog" => __("Show help dialog"))
                        );
 
+               global $pluginhost;
+               foreach ($pluginhost->get_hooks($pluginhost::HOOK_HOTKEY_INFO) as $plugin) {
+                       $hotkeys = $plugin->hook_hotkey_info($hotkeys);
+               }
+
                return $hotkeys;
        }