• 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?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter wilcosky

    (@wilcosky)

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

    Thread Starter wilcosky

    (@wilcosky)

    You can also add this to the admin css:

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

    didn’t work for me… ??

    caemusic

    (@caemusic)

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

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

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

    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: https://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.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Change Help Menu Content’ is closed to new replies.