Are there any plugin hooks (or existing plugins) that can override the "contextual help" links?
For example, in the help links in the Dashboard, I would like to have the Support Forums link to my integrated bbpress install instead of the WordPress Support Forums. I've found how to do it by modifying the core, however, I think a plugin to do this would be a lot easier to maintain for future core updates.
...Small bump...
As its been a couple of days and I've still not heard anything regarding this..
What version are you running?
What version are you running?
lunabyte
Member
Posted 15 years ago #
Here's the hook:
add_filter('contextual_help', 'your_function', 11, 2);
The filter passes two variables, $text and $screen.
"your_function" would accept those, and based on the screen filter the content appropriately and return the modified $text.
Thank you, this is very helpful.
Hi,
First, thanks to everyone in this community for being so helpful. I am looking to do the same thing and just need a little more direction:
1. What would the exact code look like in this case?
2. Would this code be put in the mu-plugins folder?
Thanks,
Terence
Thanks lunabyte, almost exactly what I was looking for.
function my_contextual_help($text, $screen)
{
// Easy way to get the screen name we need to use
//return "<b>$screen</b>$text";
if($screen == 'my_screen')
{
$text .= 'Things I want to add to the Contextual Help Menu';
}
return $text;
}
$my_help_priority = 11;
$my_help_argcount = 2;
add_filter('contextual_help', 'my_contextual_help', $my_help_priority, $my_help_argcount);