You are here

function theme_context_links in Context 6

Same name and namespace in other branches
  1. 5 context_prefix/context_prefix.module \theme_context_links()
  2. 6.2 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 460

Code

function theme_context_links($links) {
  $output = '';
  foreach ($links as $link) {
    $options = array_merge($link, array(
      'attributes' => array(
        '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;
}