You are here

function theme_taxonomy_list_admin_links in Taxonomy List 5

Same name and namespace in other branches
  1. 5.2 taxonomy_list.module \theme_taxonomy_list_admin_links()
  2. 6.2 taxonomy_list.module \theme_taxonomy_list_admin_links()
  3. 6 taxonomy_list.module \theme_taxonomy_list_admin_links()
  4. 7 taxonomy_list.module \theme_taxonomy_list_admin_links()

Theme the admin links.

1 theme call to theme_taxonomy_list_admin_links()
taxonomy_list_show in ./taxonomy_list.module
Show the category list

File

./taxonomy_list.module, line 371
List the category specified in the URL

Code

function theme_taxonomy_list_admin_links($vids) {
  $destination = drupal_get_destination();
  $output = '<div class="taxonomy-list-admin-links">';
  $links = array();
  if (user_access('administer taxonomy')) {
    foreach ($vids as $vid) {
      $vocabulary = taxonomy_get_vocabulary($vid);
      $links['taxonomy_list_add_' . $vid] = array(
        'title' => t('Add to "!name"', array(
          '!name' => $vocabulary->name,
        )),
        'href' => 'admin/content/taxonomy/' . $vocabulary->vid . '/add/term',
      );
      $links['taxonomy_list_edit_' . $vid] = array(
        'title' => t('Edit "!name"', array(
          '!name' => $vocabulary->name,
        )),
        'href' => 'admin/content/taxonomy/edit/vocabulary/' . $vocabulary->vid,
        'query' => $destination,
      );
    }
  }
  if (user_access('administer taxonomy_list')) {
    $links['taxonomy_list_admin'] = array(
      'title' => t('Taxonomy list settings'),
      'href' => 'admin/settings/taxonomy_list',
      'query' => $destination,
    );
  }
  $output .= theme('links', $links);
  $output .= '</div>';
  return $output;
}