<?php

$args = array(
	'custom_css_class' => '',
	'section_typo' => '',
	'css_animation' => '',
	'bg_text' => '',
	'bg_text_custom_css_class' => '',
	'bg_text_style' => '',
	'css' => '',
);

$html = "";
$custom_css_class = "";
$section_typo = "";
$css_animation = "";
$css = "";

extract(shortcode_atts($args, $atts));

$css = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $css, ' ' ) );

//css animation
VcShortcodeAutoloader::getInstance()->includeClass( 'WPBakeryShortCode_VC_Btn' );
$vc_btn = new WPBakeryShortCode_VC_Btn( array( 'base' => 'vc_btn' ) );
$css_animation = $vc_btn->getCSSAnimation( $css_animation );

$html = '<div class="tm-element-holder '.esc_attr($section_typo).' '.esc_attr($custom_css_class).' '.esc_attr($css).' '.esc_attr($css_animation).'">';

$html .= '<div class="tm-element-holder-wrapper">';
$html .= '<div class="tm-element-holder-content">';
$html .= do_shortcode($content);
$html .= '</div>';
$html .= '</div>';


//if bg text available
if( !empty( $bg_text ) && isset( $bg_text ) ) {
	$html .= '<span class="tm-element-holder-bg-text '.esc_attr($bg_text_custom_css_class).'" style="'.esc_attr($bg_text_style).'">';
	$html .= wp_kses_post($bg_text);
	$html .= '</span>';
}


$html .= '</div>';

$output = htmlentities($html);
echo html_entity_decode($output);

