function forum_taxonomy_term_delete

Implements hook_taxonomy_term_delete().

File

drupal/core/modules/forum/forum.module, line 481
Provides discussion forums.

Code

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();
}