function path_taxonomy_xml_term_postsave in Taxonomy import/export via XML 6.2
Hook into importing term data.
Runs in post because we need to know the new term ID now.
Does not delete old paths.
File
- includes/
taxonomy_xml.path.inc, line 54 - Support for importing or exporting path data along with terms
Code
function path_taxonomy_xml_term_postsave(&$term) {
if (!empty($term->predicates['path'])) {
$termpath = taxonomy_term_path($term);
$paths = $term->predicates['path'];
if (!is_array($paths)) {
$paths = array(
$paths,
);
}
foreach ($paths as $path) {
path_set_alias($termpath, $path);
}
}
}