You are here

function simplenews_category_load in Simplenews 7

Get a simplenews newsletter category object.

Parameters

$tid: Simplenews category ID.

Return value

Newsletter category object. FALSE if category does not exist

Related topics

16 calls to simplenews_category_load()
SimpleNewsAdministrationTestCase::testCategorySettings in tests/simplenews.test
Test various combinations of newsletter category settings.
SimpleNewsAdministrationTestCase::testSubscriptionManagement in tests/simplenews.test
Test newsletter subscription management.
SimpleNewsI18nTestCase::testContentTranslation in tests/simplenews.test
SimplenewsSourceNode::__construct in includes/simplenews.source.inc
Implements SimplenewsSourceInterface::_construct();
simplenews_admin_category_form in includes/simplenews.admin.inc
Menu callback: newsletter admin form for newsletter add/edit.

... See full list

File

./simplenews.module, line 1804
Simplenews node handling, sent email, newsletter block and general hooks

Code

function simplenews_category_load($tid, $reset = FALSE) {
  if (!is_numeric($tid)) {
    return FALSE;
  }
  $categories = simplenews_categories_load_multiple(array(
    $tid,
  ), $reset);
  return $categories ? $categories[$tid] : FALSE;
}