You are here

function taxonomy_menu_trails_update_6101 in Taxonomy Menu Trails 6.x

Same name and namespace in other branches
  1. 6 taxonomy_menu_trails.install \taxonomy_menu_trails_update_6101()
  2. 7.2 taxonomy_menu_trails.install \taxonomy_menu_trails_update_6101()
  3. 7 taxonomy_menu_trails.install \taxonomy_menu_trails_update_6101()

File

./taxonomy_menu_trails.install, line 23
Install and uninstall functions for taxonomy_menu_trails.

Code

function taxonomy_menu_trails_update_6101() {
  $types = array_filter(variable_get('taxonomy_menu_trails_node_types', array()));
  foreach ($types as $key => $type) {
    unset($types[$key]);
    $type_vocs = taxonomy_get_vocabularies($type);
    if (!empty($type_vocs)) {
      foreach ($type_vocs as $vid => $voc) {
        $type_vocs[$vid] = $vid;
      }
      $types[$key] = $type_vocs;
    }
  }
  variable_set('taxonomy_menu_trails_node_types', $types);
  return array();
}