function widgets_help in Widgets 7
Implements hook_help().
@todo Finish help documentation.
File
- ./
widgets.module, line 38 - Exposes global functionality for creating widget sets.
Code
function widgets_help($path, $arg) {
switch ($path) {
case 'admin/help#widgets':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Widgets enables you to centrally manage code snippets on your site. It is an API that allows you to organize and configure widget elements provided by other modules. Elements can be assembled into widget sets which can be re-used throughout the site via blocks and other render displays.') . '</p>';
return $output;
case 'admin/structure/widget-sets':
return '<p>' . t('Widget sets are groupings of code snippets (widget elements). You can select, order and customize widget elements into widget sets.') . '</p>';
case 'admin/structure/widget-sets/edit/%/add/%':
$element = widgets_element_definition_load($arg[7]);
return isset($element['help']) ? '<p>' . $element['help'] . '</p>' : NULL;
case 'admin/structure/widget-sets/edit/%/elements/%':
$element = $arg[5] == 'add' ? widgets_element_definition_load($arg[6]) : widgets_element_load($arg[6], $arg[4]);
return isset($element['help']) ? '<p>' . $element['help'] . '</p>' : NULL;
}
}