function taxonomy_theme_suggestions_taxonomy_term
Same name in other branches
- 9 core/modules/taxonomy/taxonomy.module \taxonomy_theme_suggestions_taxonomy_term()
- 10 core/modules/taxonomy/taxonomy.module \taxonomy_theme_suggestions_taxonomy_term()
- 11.x core/modules/taxonomy/taxonomy.module \taxonomy_theme_suggestions_taxonomy_term()
Implements hook_theme_suggestions_HOOK().
File
-
core/
modules/ taxonomy/ taxonomy.module, line 230
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.