The MU forums have moved to WordPress.org

Contextual Help (9 posts)

  1. theeggman151
    Member
    Posted 15 years ago #

    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.

  2. theeggman151
    Member
    Posted 15 years ago #

    ...Small bump...
    As its been a couple of days and I've still not heard anything regarding this..

  3. andrea_r
    Moderator
    Posted 15 years ago #

    What version are you running?

  4. andrea_r
    Moderator
    Posted 15 years ago #

    What version are you running?

  5. theeggman151
    Member
    Posted 15 years ago #

    This is on WPMU 2.7.

  6. 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.

  7. theeggman151
    Member
    Posted 15 years ago #

    Thank you, this is very helpful.

  8. tarmentano
    Member
    Posted 15 years ago #

    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

  9. joebert
    Member
    Posted 14 years ago #

    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);

About this Topic

  • Started 15 years ago by theeggman151
  • Latest reply from joebert