<?php
$output = $color = $size = $icon = $target = $href = $el_class = $title = $position = '';
extract(shortcode_atts(array(
    'color' => 'wpb_button',
    'size' => '',
    'target' => '_self',
    'href' => '',
    'el_class' => '',
    'title' => __('Text on the button', "js_composer"),
    'position' => ''
), $atts));
$classes = 'btn';

if ( $target == 'same' || $target == '_self' ) { $target = ''; }
$target = ( $target != '' ) ? ' target="' . esc_attr( $target ) . '"' : '';

$classes .= $color == 'wpb_button' ? ' btn-default' : " $color" ;
$classes .= ( $size != '' && $size != 'wpb_regularsize' ) ? " $size" : '';
$el_class = $this->getExtraClass($el_class);
$classes .= !empty( $el_class ) ? $el_class : '';

if ( $href != '' ) {
    $output .= '<a class="' . esc_attr( $classes ) . '" title="' . esc_attr( $title ) . '" href="' . esc_url( $href ) . '"' . $target . '>' . $title . '</a>';
} else {
    $output .= '<button class="' . esc_attr( $classes ) . '">' . $title . '</button>';

}

echo $output;