You are here

function hreflang_module_implements_alter in Hreflang 8

Implements hook_module_implements_alter().

File

./hreflang.module, line 14
Adds hreflang link elements to the header of each page.

Code

function hreflang_module_implements_alter(&$implementations, $hook) {

  // @fixme https://www.drupal.org/project/drupal/issues/1255092
  // Content Translation module normally adds identical hreflang tags, so
  // executing its hook_page_attachments() implementation would be harmless, but
  // if an entity page is configured as the front page, it attaches extraneous
  // hreflang tags using the entity URL.
  if ($hook === 'page_attachments' && isset($implementations['content_translation'])) {
    unset($implementations['content_translation']);
  }
}