WordPress.org

Ready to get started?Download WordPress

Forums

Change Help Menu Content (8 posts)

  1. wilcosky
    Member
    Posted 5 years ago #

    There is a help drop down menu in WordPress 2.7. How can I either remove it or change/add links to that drop down menu, what file is the code in?

  2. wilcosky
    Member
    Posted 5 years ago #

    I figured out how to remove it... I think. I say I think because I haven't tested it in all browsers. This seems to work for FireFox on Mac OS X.

    Remove the following in wp-admin/js/common.js

    // help tab
    $('#contextual-help-link').click(function () {
    if ( ! $('#contextual-help-wrap').hasClass('contextual-help-open') ) {
    $('#screen-options-link-wrap').addClass('invisible');
    }
    $('#contextual-help-wrap').slideToggle('fast', function(){
    if ( $(this).hasClass('contextual-help-open') ) {
    $('#contextual-help-link').css({'backgroundImage':'url("images/screen-options-right.gif")'});
    $('#screen-options-link-wrap').removeClass('invisible');
    $(this).removeClass('contextual-help-open');
    } else {
    $('#contextual-help-link').css({'backgroundImage':'url("images/screen-options-right-up.gif")'});
    $(this).addClass('contextual-help-open');
    }
    });
    return false;
    });

  3. wilcosky
    Member
    Posted 5 years ago #

    You can also add this to the admin css:

    #contextual-help-link-wrap { display:none; }

  4. bthaxor
    Member
    Posted 5 years ago #

    didn't work for me... :(

  5. caemusic
    Member
    Posted 5 years ago #

    You can change wp-admin/includes/template.php to modify/add links :)

  6. Alex_Almeida
    Member
    Posted 4 years ago #

    wilcosky

    This actions on disable the help from dashboard. Howhever the help buttom still there.

    To disable the help menu you must go to 143 line in the same file and dele this lines:

    // screen settings tab
    $('#show-settings-link').click(function () {
    if ( ! $('#screen-options-wrap').hasClass('screen-options-open') ) {
    $('#contextual-help-link-wrap').addClass('invisible');
    }
    $('#screen-options-wrap').slideToggle('fast', function(){
    if ( $(this).hasClass('screen-options-open') ) {
    $('#show-settings-link').css({'backgroundImage':'url("images/screen-options-right.gif")'});
    $('#contextual-help-link-wrap').removeClass('invisible');
    $(this).removeClass('screen-options-open');

    } else {
    $('#show-settings-link').css({'backgroundImage':'url("images/screen-options-right-up.gif")'});
    $(this).addClass('screen-options-open');
    }
    });
    return false;
    });

  7. Alex_Almeida
    Member
    Posted 4 years ago #

    So I made a back up from this lines deleted in a txt for any issues in the future.. :-)

  8. Peter Butler
    Member
    Posted 4 years ago #

    It is (sort of) possible to actually edit the displayed content inside the help screens:

    add_action('admin_head', 'my_function');
    
    function my_function(){
    $help="<p>This is my new content!</p>";
    add_contextual_help('plugins', $help);
    }

    Doing so will replace the content inside the top part of the help dropdown with whatever you put in $help.

    According to the source, to determine which page you want to change the help content for, you change the first parameter - here's what it says about that:

    The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions.

    It's not exactly polished though... It looks like this section of the wordpress core could use a little work.

    If you want to see that function in the source, here's the link: http://xref.yoast.com/trunk/nav.html?wp-admin/includes/template.php.source.html#l3596

    It looks like you may be able to do something by calling the global $_wp_contextual_help and messing with it, but I haven't tried anything with that yet.

Topic Closed

This topic has been closed to new replies.

About this Topic