August 2017
Beginner
412 pages
10h 30m
English
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.
Read now
Unlock full access