array(
'title' => 'Admin Keys'
,'content' => '
Navigation
(shortcut + command+enter = page)
note: shortcuts are done in sequence, not all at once
a c f 7 Add New Contact Form 7
f r Force Regenerate Thumbnails
Actions
⇧+b+h Secondary button click
⇧+t Open page/post in new tab
← Pagination: previous page
⇧+→ Pagination: last page
⇧+← Pagination: first page
'
)
);
static public function init()
{
$class = __CLASS__ ;
new $class;
}
public function __construct()
{
add_action( "in_admin_header", array( $this, 'add_tabs' ), 20 );
}
public function add_tabs()
{
foreach ( $this->tabs as $id => $data )
{
get_current_screen()->add_help_tab( array(
'id' => $id
,'title' => __( $data['title'], 'admin-keys' )
// Use the content only if you want to add something
// static on every help tab. Example: Another title inside the tab
,'content' => 'Admin Keyboard Shortcuts
'
,'callback' => array( $this, 'prepare' )
) );
}
}
public function prepare( $screen, $tab )
{
printf(
'%s
'
,__(
$tab['callback'][0]->tabs[ $tab['id'] ]['content']
,'dmb_textdomain'
)
);
}
}
// Always add help tabs during "load-{$GLOBALS['pagenow'}".
// There're some edge cases, as for example on reading options screen, your
// Help Tabs get loaded before the built in tabs. This seems to be a core error.
add_action( 'in_admin_header', array('admin_keys_help', 'init') );