Implements hook_taxonomy_term_delete().
function forum_taxonomy_term_delete(Term $term) {
// For containers, remove the tid from the forum_containers variable.
$config = config('forum.settings');
$containers = $config
->get('containers');
$key = array_search($term
->id(), $containers);
if ($key !== FALSE) {
unset($containers[$key]);
}
$config
->set('containers', $containers)
->save();
}