You are here

function mailchimp_lists_get_merge_tokens in Mailchimp 7.2

Return an array of available user tokens.

1 call to mailchimp_lists_get_merge_tokens()
mailchimp_lists_list_form in modules/mailchimp_lists/includes/mailchimp_lists.admin.inc
Return a form for adding/editing a mailchimp list.

File

modules/mailchimp_lists/mailchimp_lists.module, line 721
Mailchimp lists module.

Code

function mailchimp_lists_get_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;
}