I have created a submenu page for the Media List Table. The link actually points to a custom view I have created called Resources. I am looking for the correct location where the Admin menu determines what page(s) are highlighted as "current", and cannot seem to find where I could access this.

add_media_page( __( 'Resources', ZG_TEXTDOMAIN ), __( 'Resources', ZG_TEXTDOMAIN ), 'read', 'upload.php?resources=1' );

Here is an image of the Resources menu item being clicked, the URL reading as /wp-admin/upload.php?resource=1, but the menu is obviously not being highlighted properly.

enter image description here

Quite an odd request, as it's not it's on page, but the current path does match the menu slug, so I'm not seeing where the issue lies.

  • I can tell you this is called in wp-admin/menu-header.php on lines 132- 141. I can't however tell you how to fix this after playing around with it.
    – Wyck
    Jul 18, 2013 at 5:11
  • Thanks for pointing me in the right path, Wyck! I was looking for where it was created, but couldn't find it, and had to move onto something else quick. Jul 18, 2013 at 12:54
  • Not looking like there is a way to accomplish this. There are no filters, and I cannot change the url to be anything different. I think a lot of the walkers need to be revisited. Jul 18, 2013 at 14:32


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.