diff --git a/metatag.module b/metatag.module index 1b0e243..7504818 100644 --- a/metatag.module +++ b/metatag.module @@ -447,6 +447,18 @@ function metatag_field_attach_delete_revision($entity_type, $entity) { } /** + * Implements hook_taxonomy_term_view_alter(). + */ +function metatag_taxonomy_term_view_alter(&$build, &$type) { + // This is only needed if hook_entity_view has not been added to core. + // @see http://drupal.org/node/1067120 + if (isset($build['#term']) && !function_exists('taxonomy_term_view_multiple')) { + $entity = taxonomy_term_load($build['#term']->tid); + metatag_entity_view($entity, $type, 'full', NULL); + } +} + +/** * Implements hook_entity_view(). */ function metatag_entity_view($entity, $entity_type, $view_mode, $langcode) {