List Admin Submenu Pages

I have been searching for a way to list the submenu pages of a top level admin menu added through a plugin. I couldn’t find a way to do so. However, I stumbled across a similar function in themes.php. I stripped it down a little bit to make it apply to less scenarios than those that themes.php apparently has to handle.

This is it:

Leave a Reply

Leave a Reply

Your email address will not be published. Required fields are marked *