Created
May 4, 2012 07:36
-
-
Save anthonyringoet/2592909 to your computer and use it in GitHub Desktop.
drupal addthis translatable title attributes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_addthis_markup_alter. | |
* | |
* @param array $markup | |
* $markup contain an array with the structure of the addthis markup. | |
*/ | |
function gluecode_addthis_markup_alter(&$markup) { | |
// alter markup to add title's that are translatable by Drupal | |
if (!empty($markup['twitter'])) { | |
$markup['twitter']['#attributes']['title'] = t("Stuur naar Twitter"); | |
} | |
if (!empty($markup['facebook'])) { | |
$markup['facebook']['#attributes']['title'] = t("Stuur naar Facebook"); | |
} | |
if (!empty($markup['google_plusone_share'])) { | |
$markup['google_plusone_share']['#attributes']['title'] = t("Stuur naar Google Plus"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment