Post Pic

How to create custom dashboard help messages

If you’re building a site for a client and they have some problems with some parts of the dashboard, a good idea is to provide contextual help to the client.
The following hack will allow you to add a custom help messages for the blog admin.

The code have to be pasted into your functions.php file in order to work. Please edit line 4 with the desired help message.

function my_admin_help($text, $screen) {
	// Check we're only on my Settings page
	if (strcmp($screen, MY_PAGEHOOK) == 0 ) {
		$text = 'Here is some very useful information to help you use this plugin...';
		return $text;
	}
	// Let the default WP Dashboard help stuff through on other Admin pages
	return $text;
}

add_action( 'contextual_help', 'my_admin_help' );

Thanks to Studio Grasshopper for the code!

4 Responses

Jul 15 2012 15:20

Although this works it should be noted that the contextual_help action has been deprecated since WordPress 3.3 and add_help_tab should be used instead.

For my own plugins I have a version check and support both depending on which one they have.

David.

Jul 18 2012 07:14

This code is very useful and helpful. Thanks for sharing .

Jul 23 2012 13:59

So which is better using add_help_tab or contextual_help?

Nov 09 2012 06:37

How do I get this to work on the dashboard help?

Trackbacks:

Leave a Comment

* Name, Email, Comment are Required

WP Theme of the week

Sponsored Likebox