You are here

function taxonomy_theme_suggestions_taxonomy_term in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/taxonomy/taxonomy.module \taxonomy_theme_suggestions_taxonomy_term()
  2. 9 core/modules/taxonomy/taxonomy.module \taxonomy_theme_suggestions_taxonomy_term()

Implements hook_theme_suggestions_HOOK().

File

core/modules/taxonomy/taxonomy.module, line 63
Enables the organization of content into categories.

Code

function taxonomy_theme_suggestions_taxonomy_term(array $variables) {
  $suggestions = [];

  /** @var \Drupal\taxonomy\TermInterface $term */
  $term = $variables['elements']['#taxonomy_term'];
  $suggestions[] = 'taxonomy_term__' . $term
    ->bundle();
  $suggestions[] = 'taxonomy_term__' . $term
    ->id();
  return $suggestions;
}