function _simplenews_newsletter_name in Simplenews 7
Helper function to translate a newsletter name if required.
Parameters
object $newsletter: Newsletter category object, typically from simplenews_category_load(). Contains at least the following properties:
- tid: The newsletter category id.
- name: The newsletter name.
string $langcode: (optional) The language code. Defaults to $GLOBALS['language'].
Return value
string The translated newsletter name.
27 calls to _simplenews_newsletter_name()
- SimpleNewsAdministrationTestCase::testSubscriptionManagement in tests/
simplenews.test - Test newsletter subscription management.
- simplenews_admin_categories in includes/
simplenews.admin.inc - Menu callback: list admin form with list of available list categories.
- simplenews_admin_category_delete in includes/
simplenews.admin.inc - Menu callback: Delete newsletter category.
- simplenews_admin_category_form_submit in includes/
simplenews.admin.inc - Form submit callback for a newsletter category form.
- simplenews_block_info in ./
simplenews.module - Implements hook_block_info().
File
- ./
simplenews.module, line 2110 - Simplenews node handling, sent email, newsletter block and general hooks
Code
function _simplenews_newsletter_name($newsletter, $langcode = NULL) {
if (module_exists('i18n_taxonomy')) {
return i18n_taxonomy_term_name($newsletter, $langcode);
}
return $newsletter->name;
}