From: Daniel Andersson Date: Tue, 2 Apr 2013 07:05:17 +0000 (+0200) Subject: Add hook to add explanations of hotkey actions via plugins. X-Git-Tag: 1.7.6~11^2^2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=4785420034aefcc9900c4646ce528676313f1a02;p=tt-rss.git Add hook to add explanations of hotkey actions via plugins. --- diff --git a/classes/pluginhost.php b/classes/pluginhost.php index 5b8a77fd..a7502703 100644 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -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; diff --git a/include/functions.php b/include/functions.php index c04e6a81..aea7618a 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1934,6 +1934,11 @@ "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; }