You are here

function bs_shortcodes_thumbnail in Bootstrap 3 shortcodes 7

bs_shortcodes_thumbnail

File

./bs_shortcodes.module, line 1763

Code

function bs_shortcodes_thumbnail($attrs, $content = '') {
  extract(shortcode_attrs(array(
    "xclass" => '',
    "has_content" => '',
    "title" => '',
    // adding missing variable ~Jur
    "data" => '',
  ), $attrs));
  $class = "thumbnail";
  $class .= $xclass ? ' ' . $xclass : '';
  $return = '';
  if ($has_content) {
    $content = '<div>' . $content . '</div>';
    $tag = array(
      'div',
    );
  }
  else {
    $tag = array(
      'a',
      'img',
    );
  }
  $content = $content;
  $return .= _bs_shortcodes_scrape_dom_element($tag, $content, $class, $title, $data);
  return $return;
}