Skip to content

Instantly share code, notes, and snippets.

@bpmore
Created August 27, 2015 16:42
Show Gist options
  • Save bpmore/d114bc624718e18aecc6 to your computer and use it in GitHub Desktop.
Save bpmore/d114bc624718e18aecc6 to your computer and use it in GitHub Desktop.
Function to print the $menu and $submenu array in WordPress.
//Found here: https://wordpress.org/support/topic/how-to-rename-the-admin-sub-menu-name-of-a-custom-post-category-or-tag
function wptutsplus_change_post_menu_label() {
global $menu;
global $submenu;
echo "<pre>";
print_r($menu);
print_r($submenu);
echo "</pre>";
}
add_action( 'admin_menu', 'wptutsplus_change_post_menu_label' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment