Drupal 7: Disable Advanced Help for a Module
In Drupal, by default there is hook_help()
, which we can use to implement help pages for the module. You can get help page link for a particular module from module listing page. But, once you installed advanced_help module. That help link will be changed to a different path for advanced help of that module. However that is useless if the module does not implement advanced help. In this post, I show how you can disable advanced_help module's behavior for a particular module and restore default help link in module listing page.
There is a hook hook_advanced_help_topic_info_alter()
, which allows us to alter the advanced help topic and settings information collected for every module in the system. We can implement this hook and unset topic corresponding to the module to disable advanced help for that particular module.
Assuming our module is my_module. Coding following way will disable advanced help for my_module itself.
/**
* Implements hook_advanced_help_topic_info_alter().
*/
function my_module_advanced_help_topic_info_alter(&$ini) {
// Disabled advance help for this module. We do not support advanced help.
unset($ini['topics']['my_module']);
}
Now, module listing page will correctly point to default help topic for my_module.