function subscriptions_taxonomy_page_taxa in Subscriptions 2.0.x
Same name and namespace in other branches
- 5.2 subscriptions_taxonomy.module \subscriptions_taxonomy_page_taxa()
- 6 subscriptions_taxonomy.module \subscriptions_taxonomy_page_taxa()
- 7 subscriptions_taxonomy.module \subscriptions_taxonomy_page_taxa()
Returns a list of taxonomy subscriptions.
Parameters
array $form:
int $uid: ID of a user if >0 or of a role if <0.
Return value
array
1 string reference to 'subscriptions_taxonomy_page_taxa'
- _subscriptions_taxonomy_types in subscriptions_taxonomy/
subscriptions_taxonomy.module - Implements _hook_types(), subhook of hook_subscriptions().
File
- subscriptions_taxonomy/
subscriptions_taxonomy.module, line 205 - Subscriptions to taxonomy terms.
Code
function subscriptions_taxonomy_page_taxa(array $form, $uid) {
// 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) {
_subscriptions_module_load_include('subscriptions_taxonomy', 'admin.inc');
return _subscriptions_taxonomy_taxa_form($form, $uid, $vocabularies);
}
else {
return array(
array(
'#markup' => t('There are no available category groups.'),
),
);
}
}