The function translation_language_switch_links_alter() says it is an implementation of hook_language_switch_link_alter() in its doc header. Note that the function is links_alter, and the doc says link_alter, with no s. The doc is wrong, it should have an s.
Furthermore, the doc for the hook in locale.api.php is for
hook_language_switch_link_alter()
That is also wrong.
Verification that it should be links_alter:
drupal_alter('language_switch_links', $result, $type, $path);
This is from function language_negotiation_get_switch_links() in includes/language.inc
Well. Another alternative would be to standardize on link and remove the s from all of those spots. Anyway, currently I would say it is a doc issue and the s should be added to the doc headers and hook doc that are currently missing the s.
Comment | File | Size | Author |
---|---|---|---|
#1 | 675144.patch | 1.22 KB | jhodgdon |
Comments
Comment #1
jhodgdonHere's a patch that adds s to the hook name, to bring it into compliance with the actual code.
Comment #2
webchickCommitted to HEAD, thanks!