| 1 |
<?php |
| 2 |
|
| 3 |
if (!defined('UD_CENTRAL_DIR')) die('Security check'); |
| 4 |
|
| 5 |
/** |
| 6 |
* Currently, UpdraftCentral only supports the following modifier keys CTRL, ALT and SHIFT |
| 7 |
* to be used for shortcut combinations. |
| 8 |
* |
| 9 |
* You can use letters in your shortcut combinations such as "ALT+a", "SHIFT+M" or "CTRL+s" |
| 10 |
* or just plain letters e.g. "U", "C", etc. |
| 11 |
* |
| 12 |
* N.B. |
| 13 |
* 1. Make sure that your shortcut keys does not conflict with |
| 14 |
* common OS or Browser shortcut keys. Your can search the internet |
| 15 |
* for these common keys. |
| 16 |
* 2. The "action" accepts DOM id or classname of the button that triggers the |
| 17 |
* action or a custom function that gets executed when the shortcut key is pressed. |
| 18 |
* 3. You can register you own shortcuts or overwrite existing ones by calling |
| 19 |
* "UpdraftCentral_Keyboard_Shortcuts.register_shortcut" and passing the same |
| 20 |
* shortcut name or identifier (e.g. "add_site", "backup_site", etc.) and add your custom action: |
| 21 |
* |
| 22 |
* UpdraftCentral_Keyboard_Shortcuts.register_shortcut({ |
| 23 |
* name: 'popup_dialog', |
| 24 |
* key: 'SHIFT+P', |
| 25 |
* description: 'Shows a custom dialog box.', |
| 26 |
* action: 'button id or class name or jQuery selector that triggers the element that loads the content or a callback function when registering from javascript', |
| 27 |
* menu: 'the menu or section where the trigger button resides', |
| 28 |
* site_required: true //defaults to true if not defined or specified |
| 29 |
* }) |
| 30 |
*/ |
| 31 |
return array( |
| 32 |
'keyboard_shortcuts' => apply_filters('updraftcentral_keyboard_shortcuts', array()) |
| 33 |
); |
| 34 |
|