function active_tags_popular_node_form_attach in Active Tags 6
Same name and namespace in other branches
- 6.2 active_tags_popular.module \active_tags_popular_node_form_attach()
Enables Active Tags Popular for core taxonomy tag vocabularies.
1 string reference to 'active_tags_popular_node_form_attach'
- active_tags_popular_form_alter in ./
active_tags_popular.module - Implementation of hook_form_alter().
File
- ./
active_tags_popular.module, line 96 - Adds popular terms to Active Tags widget
Code
function active_tags_popular_node_form_attach($form, $form_state) {
$settings = array();
foreach ($form['taxonomy']['tags'] as $id => $values) {
if (variable_get('active_tags_popular_' . $id, 0) == 1) {
$settings[] = "#edit-taxonomy-tags-{$id}-wrapper";
}
}
// Only load files if we found active tags enabled fields.
if (!empty($settings)) {
active_tags_popular_enable_widget($settings);
}
return $form;
}