You are here

function theme_advanced_forum_l in Advanced Forum 6.2

Same name and namespace in other branches
  1. 7.2 includes/theme.inc \theme_advanced_forum_l()

Theme function to display a link, optionally buttonized.

4 theme calls to theme_advanced_forum_l()
advanced_forum_first_new_post_link in ./advanced_forum.module
Returns a link directly to the first new post in a topic.
advanced_forum_last_post_link in ./advanced_forum.module
Get a link to the last post in a topic.
theme_advanced_forum_node_type_create_list in includes/theme.inc
Theme function to show list of types that can be posted in forum.
theme_advanced_forum_reply_link in includes/theme.inc
Theme function to format the reply link at the top/bottom of topic.

File

includes/theme.inc, line 14
Holds theme functions and template preprocesses. Other style related functions are in style.inc

Code

function theme_advanced_forum_l($text, $path, $options = array(), $button_class = NULL) {
  if (!is_null($button_class)) {

    // Buttonized link: add our button class and the span.
    $current_classes = empty($options['attributes']['class']) ? '' : $options['attributes']['class'];
    $options['attributes']['class'] = "{$current_classes} af-button-{$button_class}";
    $options['html'] = TRUE;
    $l = l('<span>' . $text . '</span>', $path, $options);
    return $l;
  }
  else {

    // Standard link: just send it through l().
    return l($text, $path, $options);
  }
}