function glossary_admin_links in Glossary 5.2
Same name and namespace in other branches
- 5 glossary.module \glossary_admin_links()
- 6 glossary.module \glossary_admin_links()
- 7 glossary.module \glossary_admin_links()
1 call to glossary_admin_links()
File
- ./
glossary.module, line 1045 - Glossary terms will be automatically marked with links to their descriptions.
Code
function glossary_admin_links($vocabulary, $destination = NULL) {
$output = '<div class="glossary-admin-links">';
$links = array();
if (user_access('administer taxonomy')) {
$links['glossary_add_term'] = array(
'title' => t('Add term'),
'href' => 'admin/content/taxonomy/' . $vocabulary->vid . '/add/term',
);
$links['glossary_edit'] = array(
'title' => t('Edit @name', array(
'@name' => drupal_strtolower($vocabulary->name),
)),
'href' => 'admin/content/taxonomy/edit/vocabulary/' . $vocabulary->vid,
'query' => $destination,
);
}
if (user_access('administer filters')) {
$links['glossary_admin'] = array(
'title' => t('Glossary settings'),
'href' => 'admin/settings/glossary',
'query' => $destination,
);
}
if (!empty($links)) {
$output .= theme('links', $links);
}
return $output . '</div>';
}