function template_preprocess_simplenews_newsletter_footer in Simplenews 7
Same name and namespace in other branches
- 6.2 simplenews.module \template_preprocess_simplenews_newsletter_footer()
- 6 simplenews.module \template_preprocess_simplenews_newsletter_footer()
- 7.2 simplenews.module \template_preprocess_simplenews_newsletter_footer()
Process variables to format the simplenews newsletter footer.
See also
simplenews-newsletter-footer.tpl.php
File
- ./
simplenews.module, line 2517 - Simplenews node handling, sent email, newsletter block and general hooks
Code
function template_preprocess_simplenews_newsletter_footer(&$variables) {
// We don't want to include links and comments in the email.
unset($variables['build']['links']);
unset($variables['build']['comments']);
$theme = function_exists('mailsystem_get_mail_theme') ? mailsystem_get_mail_theme() : path_to_theme();
$variables['simplenews_theme'] = drupal_get_path('theme', $theme);
$variables['unsubscribe_text'] = t('Unsubscribe from this newsletter', array(), array(
'langcode' => $variables['language'],
));
$variables['test_message'] = t('This is a test version of the newsletter.', array(), array(
'langcode' => $variables['language'],
));
$variables['view_mode'] = $variables['build']['#view_mode'];
// Add specific suggestions that can override the default implementation.
$variables['theme_hook_suggestions'] = array(
'simplenews_newsletter_footer__' . $variables['category']->tid,
'simplenews_newsletter_footer__' . $variables['build']['#view_mode'],
'simplenews_newsletter_footer__' . $variables['category']->tid . '__' . $variables['build']['#view_mode'],
);
// Do not display the unsubscribe link by default for hidden categories.
$variables['opt_out_hidden'] = $variables['category']->opt_inout == 'hidden';
}