You are here

function hook_mailchimp_lists_merge_tokens in Mailchimp 7.2

Return an array of additional merge tokens.

Return value

array

1 function implements hook_mailchimp_lists_merge_tokens()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

mailchimp_lists_mailchimp_lists_merge_tokens in modules/mailchimp_lists/mailchimp_lists.module
Implements hook_mailchimp_lists_merge_tokens().
1 invocation of hook_mailchimp_lists_merge_tokens()
mailchimp_lists_get_merge_tokens in modules/mailchimp_lists/mailchimp_lists.module
Return an array of available user tokens.

File

./mailchimp.api.php, line 36
Mailchimp hook definitions.

Code

function hook_mailchimp_lists_merge_tokens() {
  $out = array(
    '' => t('-- Select --'),
  );

  // invoke hook to get all merge tokens
  $tokens = module_invoke_all('mailchimp_lists_merge_tokens');
  foreach ($tokens as $key => $token) {
    $out[$key] = t('!field', array(
      '!field' => $token['name'],
    ));
  }
  return $out;
}