%PDF- %PDF-
| Direktori : /home/gachan/www/wp-content/plugins/jekas_extensions/vc_extended/template/ |
| Current File : /home/gachan/www/wp-content/plugins/jekas_extensions/vc_extended/template/vc_button.php |
<?php
$output = $color = $size = $icon = $target = $href = $el_class = $title =$button_type= '';
extract( shortcode_atts( array(
'color' => '',
'size' => '',
'icon' => '',
'target' => '_self',
'href' => '',
'el_class' => '',
'title' => esc_html__( 'Text on the button', "jk" ),
'button_type'=>'button',
), $atts ) );
$a_class = '';
if ( $el_class != '' ) {
$tmp_class = explode( " ", strtolower( $el_class ) );
$tmp_class = str_replace( ".", "", $tmp_class );
if ( in_array( "prettyphoto", $tmp_class ) ) {
wp_enqueue_script( 'prettyphoto' );
wp_enqueue_style( 'prettyphoto' );
$a_class .= ' prettyphoto';
$el_class = str_ireplace( "prettyphoto", "", $el_class );
}
if ( in_array( "pull-right", $tmp_class ) && $href != '' ) {
$a_class .= ' pull-right';
$el_class = str_ireplace( "pull-right", "", $el_class );
}
if ( in_array( "pull-left", $tmp_class ) && $href != '' ) {
$a_class .= ' pull-left';
$el_class = str_ireplace( "pull-left", "", $el_class );
}
}
$href=(empty($href)) ? '#' : $href;
if ( $target == 'same' || $target == '_self' ) {
$target = '';
}
$target = ( $target != '' && $href[0]!='#') ? ' target="' . $target . '"' : '';
$color = ( $color != '' ) ? ' style="background-color:' . $color .';"' : '';
$el_class = $this->getExtraClass( $el_class );
?>
<a href="<?php print esc_url($href)?>" class="<?php print $button_type?> <?php print $el_class.' '.$size ?>" <?php print $color. ' '.$target?> > <?php if(!empty($icon))?> <i class="<?php print $icon?>" > </i> <?php print $title?> </a>