function bs_shortcodes_button in Bootstrap 3 shortcodes 7
bs_shortcodes_button
@author Filip Stefansson, Nicolas Jonas @since 1.0 //DW mod added xclass var
File
- ./
bs_shortcodes.module, line 121
Code
function bs_shortcodes_button($attrs, $content = '') {
extract(shortcode_attrs(array(
"type" => '',
"style" => '',
"size" => '',
"block" => '',
"dropdown" => '',
"link" => '',
"target" => '',
"disabled" => '',
"active" => '',
"xclass" => '',
"title" => '',
"data" => '',
), $attrs));
$class = 'btn';
$class .= $type ? ' btn-' . $type : ' btn-default';
$class .= $size ? ' btn-' . $size : '';
$class .= $block != '' ? ' btn-block' : '';
$class .= $dropdown != '' ? ' dropdown-toggle' : '';
$class .= $disabled != '' ? ' disabled' : '';
$class .= $active != '' ? ' active' : '';
$class .= $xclass ? ' ' . $xclass : '';
// Styles:
// Transparent
// 3d
// 3d-plus
// swag see also http://tympanus.net/Development/CreativeButtons/
$data_props = _bs_shortcodes_parse_data_attributes($data);
return sprintf('<a href="%s" class="%s"%s%s%s>%s</a>', check_url($link), check_plain($class), $target ? sprintf(' target="%s"', check_plain($target)) : '', $title ? sprintf(' title="%s"', check_plain($title)) : '', $data_props ? ' ' . $data_props : '', $content);
}