Skip to content

Instantly share code, notes, and snippets.

@pedrorvidal
Created March 2, 2022 19:58
Show Gist options
  • Save pedrorvidal/af1681653d3e4111dd1046e8c3b4f344 to your computer and use it in GitHub Desktop.
Save pedrorvidal/af1681653d3e4111dd1046e8c3b4f344 to your computer and use it in GitHub Desktop.
// wordpress function to debug menu (and use remove_menu_page)
add_action( 'admin_init', 'the_dramatist_debug_admin_menu' );
function the_dramatist_debug_admin_menu() {
echo '<pre>' . print_r( $GLOBALS[ 'menu' ], TRUE) . '</pre>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment