• Sorry if this has been answered previously- I really had no idea how to search for it.
    Every time I add a new function to the admin menu- if I wrote the code more than one tab becomes highlighted.
    For example: I created a gallery with an upload function which is called from the admin menu- I added the line:
    array(__('Gallery'), get_settings('fileupload_minlevel'), 'preupload.php'),
    To my menu.php
    The code works properly however when I click ‘Gallery’ the ‘Upload’ tab is also highlighted. When I installed the filemanager hack it didn’t happen though- even though I used the same code for the menu item. This same problem happened for a navigation hack I made- where two tabs in the admin menu are highlighted when I click one.
    Any ideas?

Viewing 1 replies (of 1 total)
  • Further down the menu.php file, find this line:
    if ( substr($self, -10) == substr($item[2], -10) )
    and change it to:
    if ( substr($self, -20) == substr($item[2], -20) )
    depending on the length of your file names.
    E.g. if you’re creating files with names like “navigation-admin.php” and “navigation-options.php”, 10 characters won’t be enough to distinguish the two.
    Hope this helps.

Viewing 1 replies (of 1 total)
  • The topic ‘Admin Menu highlighting’ is closed to new replies.