function taxonomy_node_import_types in Node import 6
Implementation of hook_node_import_types().
File
- supported/
taxonomy.inc, line 11 - Support file for the core taxonomy module.
Code
function taxonomy_node_import_types() {
$types = array();
$vocabularies = taxonomy_get_vocabularies();
// Import taxonomy vocabularies.
$types['vocabulary'] = array(
'title' => t('Vocabularies'),
'can_create' => user_access('administer taxonomy'),
'create' => 'node_import_create_taxonomy',
);
// Import taxonomy terms.
foreach ((array) $vocabularies as $vid => $vocabulary) {
$types['term:' . $vid] = array(
'title' => t('Terms of %name vocabulary', array(
'%name' => $vocabulary->name,
)),
'vocabulary' => $vocabulary,
'can_create' => user_access('administer taxonomy'),
'create' => 'node_import_create_taxonomy',
);
}
return $types;
}