Commit 650b3484 authored by dmitrig01's avatar dmitrig01
Browse files

#799966 by dereine: Place help links on admin/modules

parent e2f3dda6
...@@ -313,6 +313,27 @@ function advanced_help_get_topic_hierarchy(&$topics) { ...@@ -313,6 +313,27 @@ function advanced_help_get_topic_hierarchy(&$topics) {
} }
} }
/**
* Implements hook_form_system_modules_alter().
*
* Add advanced help links to the modules page.
*/
function advanced_help_form_system_modules_alter(&$form, &$form_state) {
$advanced_help_modules = drupal_map_assoc(array_keys(advanced_help_get_topics()));
foreach (element_children($form['modules']) as $group) {
foreach (element_children($form['modules'][$group]) as $module) {
if (isset($advanced_help_modules[$module])) {
$form['modules'][$group][$module]['links']['help'] = array(
'#type' => 'link',
'#title' => t('Help'),
'#href' => "admin/advanced_help/$module",
'#options' => array('attributes' => array('class' => array('module-link', 'module-link-help'), 'title' => t('Help'))),
);
}
}
}
}
/** /**
* Form builder callback to build the search form. * Form builder callback to build the search form.
* *
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment