function _biblio_keyword_links in Bibliography Module 6.2
Same name and namespace in other branches
- 5 biblio.module \_biblio_keyword_links()
- 6 biblio.pages.inc \_biblio_keyword_links()
- 7 includes/biblio_theme.inc \_biblio_keyword_links()
- 7.2 includes/biblio.theme.inc \_biblio_keyword_links()
Creates an HTML string with links to an array of biblio keywords.
Parameters
array $keywords:
string $base: (optional)
Return value
string An HTML formatted string with links to biblio keyswords.
2 calls to _biblio_keyword_links()
- theme_biblio_long in includes/
biblio_theme.inc - DEPRECIATED! this was the original output format which is not to flexable it will be removed TODO: remove this function
- theme_biblio_tabular in includes/
biblio_theme.inc
File
- includes/
biblio.pages.inc, line 1244 - Functions in the biblio module related to filtering and page generation.
Code
function _biblio_keyword_links($keywords, $base = 'biblio') {
$options = array();
$options['query'] = '';
if (isset($_GET['sort'])) {
$options['query'] = "sort=" . $_GET['sort'];
}
if (isset($_GET['order'])) {
$options['query'] .= empty($options['query']) ? "" : "?";
$options['query'] .= "order=" . $_GET['order'];
}
$html = "";
if (!is_array($keywords)) {
module_load_include('inc', 'biblio', 'includes/biblio.keywords');
$keywords = biblio_explode_keywords($keywords);
}
$sep = check_plain(variable_get('biblio_keyword_sep', ','));
foreach ($keywords as $kid => $keyword) {
$html .= empty($html) ? "" : "{$sep} ";
$html .= l(trim($keyword), "{$base}/keyword/{$kid}", $options);
}
return $html;
}