diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module index b497b83..c82ffe7 100644 --- a/core/modules/rdf/rdf.module +++ b/core/modules/rdf/rdf.module @@ -545,6 +545,10 @@ function rdf_preprocess_taxonomy_term(&$variables) { // (e.g., schema:Thing, skos:Concept, and so on). /* @var \Drupal\taxonomy\TermInterface $term */ $term = $variables['taxonomy_term']; + + // @deprecated in Drupal 8.2.x and will be removed before 9.0.0. + $variables['term'] = $term; + $mapping = rdf_get_mapping('taxonomy_term', $term->bundle()); $bundle_mapping = $mapping->getPreparedBundleMapping(); $variables['attributes']['about'] = $term->url(); diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index 21be46e..6f47312 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -242,6 +242,9 @@ function template_preprocess_taxonomy_term(&$variables) { /** @var \Drupal\taxonomy\TermInterface $term */ $term = $variables['taxonomy_term']; + // @deprecated in Drupal 8.2.x and will be removed before 9.0.0. + $variables['term'] = $term; + $variables['url'] = $term->url(); // We use name here because that is what appears in the UI. $variables['name'] = $variables['elements']['name']; diff --git a/core/modules/taxonomy/templates/taxonomy-term.html.twig b/core/modules/taxonomy/templates/taxonomy-term.html.twig index eb23c3a..d7f844c 100644 --- a/core/modules/taxonomy/templates/taxonomy-term.html.twig +++ b/core/modules/taxonomy/templates/taxonomy-term.html.twig @@ -18,6 +18,8 @@ * - taxonomy_term: The taxonomy term entity, including: * - id: The ID of the taxonomy term. * - bundle: Machine name of the current vocabulary. + * - term: The taxonomy term entity. + * @deprecated in Drupal 8.2.x and will be removed before 9.0.0. * - view_mode: View mode, e.g. 'full', 'teaser', etc. * * @see template_preprocess_taxonomy_term() diff --git a/core/themes/classy/templates/content/taxonomy-term.html.twig b/core/themes/classy/templates/content/taxonomy-term.html.twig index b946c04..fcf5ae5 100644 --- a/core/themes/classy/templates/content/taxonomy-term.html.twig +++ b/core/themes/classy/templates/content/taxonomy-term.html.twig @@ -18,6 +18,8 @@ * - taxonomy_term: The taxonomy term entity, including: * - id: The ID of the taxonomy term. * - bundle: Machine name of the current vocabulary. + * - term: The taxonomy term entity. + * @deprecated in Drupal 8.2.x and will be removed before 9.0.0. * - view_mode: View mode, e.g. 'full', 'teaser', etc. * * @see template_preprocess_taxonomy_term() diff --git a/core/themes/stable/templates/content/taxonomy-term.html.twig b/core/themes/stable/templates/content/taxonomy-term.html.twig index 7ca20f9..61ef758 100644 --- a/core/themes/stable/templates/content/taxonomy-term.html.twig +++ b/core/themes/stable/templates/content/taxonomy-term.html.twig @@ -18,6 +18,8 @@ * - taxonomy_term: The taxonomy term entity, including: * - id: The ID of the taxonomy term. * - bundle: Machine name of the current vocabulary. + * - term: The taxonomy term entity. + * @deprecated in Drupal 8.2.x and will be removed before 9.0.0. * - view_mode: View mode, e.g. 'full', 'teaser', etc. * * @see template_preprocess_taxonomy_term()