Modify links under ‘help section’?

I am trying to modify the support links under the help section (Contextual help).I want to replace these Documentation on Using Themes and Support Forums with my own .So I removed the links in wp-admin folder from many pages under admin section .But for plugin pages,I can’t able to find the files to remove.

Is there any way to replace or remove the links site wide ?

Related posts

Leave a Reply

2 comments

  1. But for plugin pages,I can’t able to find the files to remove.

    For dealing with plugin/registered pages that you won’t necessarily know the hooks for, something like this will work…

    add_action( 'admin_head', 'set_plugin_help_text');
    function set_plugin_help_text() {
        global $_registered_pages;
        if( !empty( $_registered_pages ) )
            foreach( array_keys( $_registered_pages ) as $hook )
                add_contextual_help( $hook, "Your generic plugin page help text" );
    }
    

    NOTE:
    I purposely didn’t use the contextual help action(as used in RodeoRamsey’s answer) because it doesn’t work for the above approach(so it wasn’t without reason, i notice the other answer got more votes and i presume that *may* be why).

    Of course do note that the custom-background, custom-header and the theme editor pages under the themes menu also count as registered pages, so they’ll naturally be effected by the above code (you can always factor some exclusion code into the above to deal with that though).

    EDIT BELOW:
    Additionally if you want to modify the help text for pages that aren’t registered, ie. those that exist physically in WordPress and are used by WordPress, you can use the following approach.

    add_filter( 'contextual_help_list', 'wp_help_info_replace', 10000000, 2 );
    function wp_help_info_replace( $help, $screen ) {
        if( in_array( $screen->id, array( 'post', 'edit-post' ) ) )
            $help[$screen->id] = 'Simple example help text';
        return $help;
    }
    

    In the above example i’m targetting edit.php and post-new.php, be sure to pay attention to the array values that refer to the screen ID, this value does not match what you’d typically expect to see as the pagehook, i would suggest echo’ing out the screen ID for screens where you’re unsure about what the ID may be.

  2. Put this in your theme’s function.php file:

    //function to edit help screen contents
        function my_plugin_help($contextual_help, $screen_id, $screen) {
    
            global $my_plugin_hook;
            if ($screen_id == $my_plugin_hook) {
    
                $contextual_help = 'This is where I would provide help to the user on how everything in my admin panel works. Formatted HTML works fine in here too.';
            }
            return $contextual_help;
        }
    
    add_action('contextual_help', 'my_plugin_help', 10, 3);
    

    Modify to suit your needs. Don’t delete or change things from the core (wp-admin folder) – it will only get overwritten every time you upgrade.

    Visit http://codex.wordpress.org/Adding_Contextual_Help_to_Administration_Menus for more help.