How to Hide WP User Avatar Admin Menus

function plt_hide_wp_user_avatar_menus() {
	//Hide the "Avatars" menu.
	remove_menu_page('wp-user-avatar');
	//Hide the "Avatars → Settings" menu.
	remove_submenu_page('wp-user-avatar', 'wp-user-avatar');
	//Hide the "Avatars → Library" menu.
	remove_submenu_page('wp-user-avatar', 'wp-user-avatar-library');
}

add_action('admin_menu', 'plt_hide_wp_user_avatar_menus', 11);

Where do I put this code?