I'm writing a plugin that displays a post/page list in the admin menu, as a submenu for each post type. Here's the code I've got far: http://pastebin.com/DmUGfzxN
The lists are showing and linking fine. However, I have a problem when I go to another menu, for example, Media, and go to edit a post (or image in this case). The current class that WordPress uses for the admin menu points to the wrong place, and opens the menu for Pages, highlighting the last submenu item.
I believe this is a related problem here: Current class on admin menu using add_submenu_page()
He solved it by adding the submenu page to a page slug, instead of a link like
admin.php?=page.... Unfortunately, I want my submenus to be under Post, Page, etc., so I need to use
If anyone has any ideas how to get around this quirk/bug, I'd appreciate it. Thank you.