In the WordPress admin, how can I programmatically find out which page (themes.php
, widgets.php
, etc.) I’m on?

1 Answer
You can determine that with wordpress’ get_current_screen()
function. It will not return just a page name though, it will give you an object containing a bunch of different data on what screen you’re on.