You are here

function subscriptions_taxonomy_page_taxa in Subscriptions 5.2

Same name and namespace in other branches
  1. 6 subscriptions_taxonomy.module \subscriptions_taxonomy_page_taxa()
  2. 7 subscriptions_taxonomy.module \subscriptions_taxonomy_page_taxa()
  3. 2.0.x subscriptions_taxonomy/subscriptions_taxonomy.module \subscriptions_taxonomy_page_taxa()

Returns a list of taxonomy subscriptions.

1 string reference to 'subscriptions_taxonomy_page_taxa'
_subscriptions_taxonomy_types in ./subscriptions_taxonomy.module
Implementation of hook_types(), subhook of hook_subscriptions().

File

./subscriptions_taxonomy.module, line 188
Subscriptions to taxonomy terms.

Code

function subscriptions_taxonomy_page_taxa($account, $form) {

  // traverse the taxonomy tree
  $vocabularies = function_exists('taxonomy_help') ? taxonomy_get_vocabularies() : array();

  // omit undesired vocabularies from listing
  $omits = variable_get('subscriptions_omitted_taxa', array());
  foreach ($omits as $omit) {
    unset($vocabularies[$omit]);
  }
  if ($vocabularies) {
    return drupal_get_form('subscriptions_taxonomy_taxa_form', $vocabularies, $account, $form);
  }
  else {
    return t('There are no available !subs_types.', array(
      '!subs_types' => t('category groups'),
    ));
  }
}