function hreflang_language_switch_links_alter in Hreflang 7
Implements hook_language_switch_links_alter().
File
- ./
hreflang.module, line 52 - Adds hreflang link elements to the header of each page.
Code
function hreflang_language_switch_links_alter(array &$links, $type, $path) {
foreach ($links as $langcode => &$link) {
$link['attributes']['hreflang'] = $langcode;
}
}