function theme_simplenews_status in Simplenews 5
Same name and namespace in other branches
- 7.2 includes/simplenews.admin.inc \theme_simplenews_status()
- 7 includes/simplenews.admin.inc \theme_simplenews_status()
2 theme calls to theme_simplenews_status()
File
- ./
simplenews.module, line 1761
Code
function theme_simplenews_status($status, $source) {
switch ($source) {
case 'published':
$imgs = array(
0 => 'sn-saved',
1 => 'sn-sent',
);
$title = array(
0 => t('Not published'),
1 => t('Published'),
);
break;
case 'activated':
$imgs = array(
0 => 'sn-saved',
1 => 'sn-sent',
);
$title = array(
0 => t('Inactive: no newsletters will be sent'),
1 => t('Active: user will receive newsletters'),
);
break;
case 'sent':
$imgs = array(
0 => 'sn-saved',
1 => 'sn-cron',
2 => 'sn-sent',
);
$title = array(
0 => t('Not sent'),
1 => t('Currently sending by cron'),
2 => t('Sent'),
);
break;
}
$path = base_path() . drupal_get_path('module', 'simplenews') . '/';
$output = '<img src="' . $path . $imgs[$status] . '.png" width="15" height="15" alt="' . $status . '" border="0" title="' . $title[$status] . '" />';
return $output;
}