function theme_context_links in Context 6.2
Same name and namespace in other branches
- 5 context_prefix/context_prefix.module \theme_context_links()
- 6 context.core.inc \theme_context_links()
Generates a themed set of links for node types associated with the current active contexts.
1 theme call to theme_context_links()
- context_preprocess_page in ./
context.core.inc - Implementation of preprocess_page().
File
- ./
context.core.inc, line 637
Code
function theme_context_links($links) {
$output = '';
foreach ($links as $link) {
$options = $link;
$options['attributes']['class'] = isset($link['attributes']['class']) ? $link['attributes']['class'] : 'button';
if (!empty($link['custom'])) {
$output .= l($link['title'], $link['href'], $options);
}
else {
$output .= l('+ ' . t('Add !type', array(
'!type' => $link['title'],
)), $link['href'], $options);
}
}
return $output;
}