Starting in version 2.7, WordPress has a pull-down “Help” menu in the upper-right corner of the screen, often joined by another menu for configuring display options for the page in question.
By default the “Help” menu doesn’t do much. It gives some useful pointers on the Dashboard and Write screen, but other than that it pretty much just shows links to the Codex and WordPress.org support forums.
What if you wanted to make the “contextual menu” actually…contextual? If you’re a plugin or theme developer, you can add your own helpful information to the menu. It’s as simple as hooking into the contextual_help filter:
function my_contextual_help($text) { $screen = $_GET['page']; if ($screen == 'my_plugin') { $text = "<h5>Need help with this plugin?</h5>"; $text .= "<p>Check out the documentation and support forums for help with this plugin.</p>"; $text .= "<a href=\"http://example.org/docs\">Documentation</a><br /><a href=\"http://example.org/support\">Support forums</a>"; } return $text; } add_action('contextual_help', 'my_contextual_help');
The basic idea is to take the default contents of the menu, $text, and replace it with your own content. The $screen variable is used to make sure that the menu is only changed on the plugin’s pages, rather than universally through the Admin.