function flag_expand_link_option in Flag 6.2
Same name and namespace in other branches
- 7.2 includes/flag.admin.inc \flag_expand_link_option()
FormAPI after_build function to add descriptions to radio buttons.
1 string reference to 'flag_expand_link_option'
- flag_form in includes/
flag.admin.inc - Add/Edit flag page.
File
- includes/
flag.admin.inc, line 606 - Contains administrative pages for creating, editing, and deleting flags.
Code
function flag_expand_link_option($element) {
drupal_add_js(drupal_get_path('module', 'flag') . '/theme/flag-admin.js', 'module', 'header', FALSE, TRUE, FALSE);
foreach (element_children($element) as $key) {
// Add a description to the link option.
if (isset($element['#option_descriptions'][$key])) {
$element[$key]['#description'] = $element['#option_descriptions'][$key];
}
}
$element['#attributes']['class'] = 'flag-link-options';
return $element;
}