You are here

function featured_content_get_vocabulary_terms in Featured Content 7.2

Same name and namespace in other branches
  1. 6.2 featured_content.module \featured_content_get_vocabulary_terms()
  2. 6 featured_content.module \featured_content_get_vocabulary_terms()
  3. 7 featured_content.module \featured_content_get_vocabulary_terms()

Gets the enabled vocabulary terms.

3 calls to featured_content_get_vocabulary_terms()
featured_content_block_configure in ./featured_content.module
Implements hook_block_configure().
featured_content_block_save in ./featured_content.module
Implements hook_block_save().
featured_content_get_filtered_nids in ./featured_content.module
Get filtered node nids. Filter base on content types, users (authors) and taxonomy terms.

File

./featured_content.module, line 1582
Featured Content module for created related & featured content blocks.

Code

function featured_content_get_vocabulary_terms($vocabulary) {
  if (isset($vocabulary->vid)) {
    $terms = array();
    foreach (taxonomy_get_tree($vocabulary->vid) as $term) {
      $terms[$term->tid] = check_plain($term->name);
    }
    $current_key = 'CURRENT-' . $vocabulary->vid;
    $terms = array(
      $current_key => t('Use the @vocab_name terms of the page being shown.', array(
        '@vocab_name' => $vocabulary->name,
      )),
    ) + $terms;
    return $terms;
  }
}