The initial nav menu metaboxes are
$initial_meta_boxes = array( 'add-post-type-page', 'add-post-type-post', 'add-custom-links', 'add-category' );
They register after first time user enter the menus section. So you can register them first after you create a new user.
The function wp_initial_nav_menu_meta_boxes() is setting the user_option
metaboxhidden_nav-menus
with array of the hidden metaboxes.
And if the user_option
already exists its don’t do anything. so create this user_option
function change_menu_hidden_metaboxes($user_id) {
$hidden_metaboxes = array(); // empty array
update_user_option( $user_id, 'metaboxhidden_nav-menus', $hidden_metaboxes ); // update the user metaboxes
}
add_action( 'user_register', 'change_menu_hidden_metaboxes', 10, 1 );
This function will set empty array for the hidden metaboxes. so all the post types and taxonomies will show. you can add to the array post types or taxonomies that you want to hide.