Mobile-Menu iFuturz Infoweb Inc. Contact Portfolio

11

Sep

Display your custom help tabs in any wordpress admin page

Display your custom help tabs in any wordpress admin page

Posted On : September 11, 2013

| No Comment

do you want to display your plugin guide or video on wordpress admin help section ?

Here is code for how to add your custom help tabs in help section of wordpress admin

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
class myCustomhelp {
public function __construct() {
add_filter('contextual_help', array($this, 'my_custom_help_tab'), 10, 2);
}
<span id="more-2093"></span>
function my_custom_help_tab($contextual_help, $screen_id) {
switch ($screen_id) {
case 'edit-page' :
get_current_screen()->add_help_tab(array(
'id' => 'my-help-tab',
'title' => __('My custom help tab'),
'content' => __('Put any text here bla bla bla ....')
));
break;
}
return $contextual_help;
}
}
new myCustomhelp();
?>

we are adding “contextual_help” filter with having two arguments one is $contextual_help that passes all help tabs and another is $screen_id that contain current admin screen id

Above code is add custom help tab in listing page of wordpress admin. Below is output of above code.

  • Tags:

Comment