You are here

function bs_shortcodes_shortcode_tooltiptop in Bootstrap Theme Shortcodes 7

1 string reference to 'bs_shortcodes_shortcode_tooltiptop'
bs_shortcodes_shortcode_info in ./bs_shortcodes.module

File

inc/elements/tooltips.php, line 3

Code

function bs_shortcodes_shortcode_tooltiptop($attrs, $text) {
  $attrs = shortcode_attrs(array(
    'title' => '',
    'tooltiptop' => '',
  ), $attrs);
  $tooltiptop = url($attrs['tooltiptop']);
  if ($text) {
    $style = empty($style) ? '' : ' style="' . $style . '"';
    $id = empty($id) ? '' : ' id="' . $id . '"';
    if ($attrs['title'] == '<none>') {
      $title = '';
    }
    else {
      $title = empty($attrs['title']) ? check_plain($text) : check_plain($attrs['title']);
      $title = ' title="' . $title . '"';
    }
    return '<a href="#" rel="tooltip" class="hint" data-placement="top"' . $id . $style . $title . '>' . $text . '</a>';
  }
  return $tooltiptop;
}