We have added our management page functions, but now we have to tell WordPress to use them. To do so, we just need to add the following three new hooks:
add_action('admin_menu', 'modify_menu_for_supportedtypes'); register_activation_hook(__FILE__, "set_supportedtypes_options"); register_deactivation_hook(__FILE__, "unset_supportedtypes_options");
The first hook tells WordPress to add our link to the menu when it creates the menu with admin_menu(). The next two hooks tell WordPress to call the activation and deactivation functions when the plugin is activated or deactivated.
This version of the plugin is available in the code bundle for this chapter, inside a subdirectory called final. It is the final version of our plugin.