Reply to comment

Remove File Browser Tab

I needed to remove the file browser tab on my user profile form.  This tab is added by the IMCE module.

I found the following post with instructions on how to remove here here, http://drupal.org/node/438296  BUT it didn't include all the code that was required.  So here is the entire function that is in my custom theme that will remove this tab.


/**
 * Returns the rendered local tasks. The default implementation renders
 * them as tabs. Overridden to split the secondary tasks.
 *
 * @ingroup themeable
*/
function phptemplate_menu_local_tasks() {
  $tabs =  menu_primary_local_tasks();
  $tabs = preg_replace('/<li.*File browser<\/a><\/li>/', '', $tabs);
    return $tabs;
}

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options