'Export distribution', 'access arguments' => array('export distribution'), 'page callback' => 'distrib_export', 'type' => MENU_CALLBACK, ); return $items; } function distrib_export() { return ""; } function distrib_export_vocabs() { $code = ''; $vocabs = taxonomy_get_vocabularies(); foreach ($vocabs as $vocab) { $properties = get_object_vars($vocab); unset($properties['name']); unset($properties['nodes']); unset($properties['vid']); $nodes = var_export($vocab->nodes, true); $properties = var_export($properties, true); $code .= "install_taxonomy_add_vocabulary('$vocab->name', $nodes, $properties);\n"; } return $code; }