function active_tags_init in Active Tags 5
@file Active Tags widget for free tagging taxonomies
File
- ./
active_tags.module, line 9 - Active Tags widget for free tagging taxonomies
Code
function active_tags_init() {
if (arg(2) == 'edit' || arg(1) == 'add') {
drupal_add_css(drupal_get_path('module', 'active_tags') . '/active_tags.css', 'module');
$settings = array();
foreach (taxonomy_get_vocabularies() as $id => $values) {
if (variable_get('active_tags_' . $id, 0) == 1) {
$settings[] = "#edit-taxonomy-tags-{$id}";
}
}
drupal_add_js(array(
'active_tags' => $settings,
), 'setting');
drupal_add_js(drupal_get_path('module', 'active_tags') . '/active_tags.js', 'module');
}
}