protected function init($tid)
{
$term = $this->get_term($tid);
if (isset($term->id)) {
$term->ID = $term->id;
} else {
if (isset($term->term_id)) {
$term->ID = $term->term_id;
} else {
if (is_string($tid)) {
//echo 'bad call using '.$tid;
//Helper::error_log(debug_backtrace());
}
}
}
if (isset($term->ID)) {
$term->id = $term->ID;
$this->import($term);
if (isset($term->term_id)) {
$custom = $this->get_term_meta($term->term_id);
$this->import($custom);
}
}
}