內容簡介
Usher 外掛提供 Gmail 般的鍵盤快捷鍵,供使用者在 WordPress 管理員核心頁面中進行導覽。
此外,它還包括一個強大的 API,讓你可以註冊新的全域和特定畫面的鍵盤快捷鍵。
要註冊新的快捷鍵,請使用 Usher\register_shortcut() 函數。例如:
新增 EDD 儀表板的快捷鍵:
Usher\register_shortcut( 'g d', array(
'label' => __( '前往 EDD 儀表板', 'textdomain' ),
'url' => 'edit.php?post_type=download',
'cap' => 'manage_shop_settings'
) );
新增 Jetpack 儀表板的快捷鍵:
Usher\register_shortcut( 'g j', array(
'label' => __( '前往 Jetpack 儀表板', 'textdomain' ),
'url' => 'admin.php?page=jetpack',
'cap' => 'manage_options',
) );
外掛標籤
開發者團隊
原文外掛簡介
Usher brings Gmail-like keyboard shortcuts for navigating around the various core pages of the WordPress admin.
Additionally, it includes a robust API for registering new global and screen-specific keyboard shortcuts.
To register new shortcuts, use the Usher\register_shortcut() function. For example:
Add a shortcut for the EDD Dashboard
Usher\register_shortcut( 'g d', array(
'label' => __( 'Navigate to the EDD dashboard', 'textdomain' ),
'url' => 'edit.php?post_type=download',
'cap' => 'manage_shop_settings'
) );
Add a shortcut for the Jetpack Dashboard
Usher\register_shortcut( 'g j', array(
'label' => __( 'Navigate to the Jetpack dashboard', 'textdomain' ),
'url' => 'admin.php?page=jetpack',
'cap' => 'manage_options',
) );
