function TS_VCSC_Content_Flip_Function($atts)
{
    global $VISUAL_COMPOSER_EXTENSIONS;
    ob_start();
    if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_LoadFrontEndForcable == "false") {
        wp_enqueue_style('ts-extend-simptip');
        wp_enqueue_style('ts-extend-animations');
        wp_enqueue_style('ts-visual-composer-extend-front');
        wp_enqueue_script('ts-visual-composer-extend-front');
    }
    extract(shortcode_atts(array('flip_style' => 'style1', 'flip_effect_style1' => 'vertical', 'flip_effect_style2' => 'flip-up', 'flip_effect_speed' => 'medium', 'flip_size_auto' => 'true', 'flip_size' => 200, 'flip_border_type' => '', 'flip_border_thick' => 1, 'flip_border_radius' => '', 'flip_border_color_front' => '#dddddd', 'flip_border_color_back' => '#dddddd', 'front_icon_replace' => 'false', 'front_icon' => '', 'front_image' => '', 'front_image_full' => 'false', 'front_icon_size' => 70, 'front_icon_color' => '#000000', 'front_icon_background' => '', 'front_padding' => 'false', 'front_icon_padding' => 0, 'front_icon_frame_type' => '', 'front_icon_frame_thick' => 1, 'front_icon_frame_radius' => '', 'front_icon_frame_color' => '', 'front_title' => '', 'front_html' => 'false', 'front_content' => '', 'front_content_html' => '', 'front_color' => '#000000', 'front_color_title' => '#000000', 'front_background' => '#ffffff', 'back_icon' => '', 'back_image' => '', 'back_title' => '', 'back_html' => 'false', 'back_content' => '', 'back_content_html' => '', 'back_color' => '#000000', 'back_color_title' => '#000000', 'back_background' => '#ffffff', 'read_more_link' => 'false', 'read_more_url' => '', 'read_more_txt' => 'Read More', 'read_more_target' => '_parent', 'read_more_color' => '#000000', 'read_more_background' => '#dddddd', 'animation_icon' => '', 'animation_view' => '', 'margin_bottom' => '20', 'margin_top' => '0', 'el_id' => '', 'el_class' => '', 'css' => ''), $atts));
    if (!empty($el_id)) {
        $flip_box_id = $el_id;
    } else {
        $flip_box_id = 'ts-vcsc-flip-box-' . mt_rand(999999, 9999999);
    }
    if (!empty($front_image)) {
        $front_image_path = wp_get_attachment_image_src($front_image, 'large');
    }
    if ($flip_border_type != '') {
        $flip_border_style_front = 'border: ' . $flip_border_thick . 'px ' . $flip_border_type . ' ' . $flip_border_color_front . ';';
        $flip_border_style_back = 'border: ' . $flip_border_thick . 'px ' . $flip_border_type . ' ' . $flip_border_color_back . ';';
    } else {
        $flip_border_style_front = '';
        $flip_border_style_back = '';
    }
    if ($front_icon_frame_type != '') {
        $front_icon_frame_style = 'border: ' . $front_icon_frame_thick . 'px ' . $front_icon_frame_type . ' ' . $front_icon_frame_color . ';';
        $front_icon_frame_class = '';
    } else {
        $front_icon_frame_style = '';
        $front_icon_frame_class = '';
    }
    if ($front_padding == "true") {
        $front_icon_size_adjust = $front_icon_size - 2 * $front_icon_padding - 2 * $front_icon_frame_thick;
    } else {
        $front_icon_size_adjust = $front_icon_size - 2 * $front_icon_frame_thick;
    }
    $front_icon_style = 'background-color:' . $front_icon_background . '; width: ' . $front_icon_size . 'px; height: ' . $front_icon_size . 'px; font-size: ' . $front_icon_size_adjust . 'px; line-height: ' . $front_icon_size . 'px;';
    if ($front_image_full == "true") {
        $front_image_style = 'width: 100%; height: auto; margin: 0px;';
        $front_panel_adjust = 'padding: 0px;';
    } else {
        $front_image_style = 'padding: ' . $front_icon_padding . 'px; background-color:' . $front_icon_background . '; width: ' . $front_icon_size . 'px; height: auto; ';
        $front_panel_adjust = '';
    }
    if ($flip_effect_speed == "veryslow") {
        $effectspeed = 2000;
    } else {
        if ($flip_effect_speed == "slow") {
            $effectspeed = 1500;
        } else {
            if ($flip_effect_speed == "medium") {
                $effectspeed = 1000;
            } else {
                if ($flip_effect_speed == "fast") {
                    $effectspeed = 750;
                } else {
                    if ($flip_effect_speed == "veryfast") {
                        $effectspeed = 500;
                    }
                }
            }
        }
    }
    if ($animation_view != '') {
        $animation_css = TS_VCSC_GetCSSAnimation($animation_view);
    } else {
        $animation_css = '';
    }
    if (function_exists('vc_shortcode_custom_css_class')) {
        $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS-VCSC-Content-Flip', $atts);
    } else {
        $css_class = '';
    }
    $output = '';
    if ($flip_style == "style1") {
        $output .= '<div id="' . $flip_box_id . '" class="flip-container-frame ' . $el_class . ' ' . $animation_css . ' ' . ($flip_size_auto == "true" ? "auto" : "fixed") . ' ' . $css_class . '" style="' . ($flip_size_auto == "false" ? "height: " . $flip_size . "px; " : "") . ' width: 100%; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">';
        $output .= '<div class="flip-container-main ' . $flip_effect_style1 . ' ' . $flip_effect_speed . '" data-speed="' . $effectspeed . '">';
        $output .= '<div class="flip-container-flipper">';
        $output .= '<div class="flip-container-flipper-front ' . $flip_effect_speed . '" style="' . ($flip_size_auto == "true" ? "" : "height: 100%;") . 'width: 100%; background-color: ' . $front_background . '; ' . $flip_border_style_front . '">';
        $output .= '<div class="ts-flip-content" style="color: ' . $front_color . '; ' . $front_panel_adjust . '">';
        if ($front_image_full == "true") {
            $output .= '<img src="' . $front_image_path[0] . '" style="' . $front_image_style . '" class="' . $animation_icon . '">';
        } else {
            if ($front_icon_replace == "false") {
                $output .= '<i style="color:' . $front_icon_color . ';' . $front_icon_style . ' ' . $front_icon_frame_style . ' text-align: center; display: inline-block !important; margin: 10px auto;" class="ts-font-icon ' . $front_icon . ' ' . $front_icon_frame_class . ' ' . $animation_icon . ' ' . $front_icon_frame_radius . '" data-animation="' . $animation_icon . '"></i>';
            } else {
                $output .= '<img src="' . $front_image_path[0] . '" style="' . $front_image_style . ' ' . $front_icon_frame_style . '" class="ts-font-icon ' . $front_icon_frame_class . ' ' . $front_icon_frame_radius . ' ' . $animation_icon . '" data-animation="' . $animation_icon . '">';
            }
            $output .= '<h3 style="color: ' . $front_color_title . '">' . $front_title . '</h3>';
            if ($back_html == "true") {
                $output .= '<p class="ts-flip-text">' . do_shortcode(rawurldecode(base64_decode(strip_tags($front_content_html)))) . '</p>';
            } else {
                $output .= '<p class="ts-flip-text">' . strip_tags($front_content) . '</p>';
            }
        }
        $output .= '</div>';
        $output .= '</div>';
        $output .= '<div class="flip-container-flipper-back ' . $flip_effect_speed . '" style="' . ($flip_size_auto == "true" ? "" : "height: 100%;") . 'width: 100%; background-color: ' . $back_background . '; ' . $flip_border_style_back . '">';
        $output .= '<div class="ts-flip-content" style="color: ' . $back_color . ';">';
        $output .= '<h3 style="color: ' . $back_color_title . '">' . $back_title . '</h3>';
        if ($back_html == "true") {
            $output .= '<p class="ts-flip-text">' . do_shortcode(rawurldecode(base64_decode(strip_tags($back_content_html)))) . '</p>';
        } else {
            $output .= '<p class="ts-flip-text">' . strip_tags($back_content) . '</p>';
        }
        if (!empty($read_more_url) && $read_more_link == "true") {
            $output .= '<p class="ts-flip-link"><a href="' . $read_more_url . '" target="' . $read_more_target . '" style="color: ' . $read_more_color . '; background: ' . $read_more_background . '">' . $read_more_txt . '</a></p>';
        }
        $output .= '</div>';
        $output .= '</div>';
        $output .= '</div>';
        $output .= '</div>';
        $output .= '</div>';
    } else {
        if ($flip_style == "style2") {
            $output .= '<div class="clearfix">';
            $output .= '<div id="' . $flip_box_id . '" class="ts-flip-cube ' . $flip_effect_style2 . ' ' . $el_class . ' ' . $animation_css . ' ' . ($flip_size_auto == "true" ? "auto" : "fixed") . '  ' . $css_class . '" style="' . ($flip_size_auto == "false" ? "height: " . $flip_size . "px; " : "") . 'width: 100%; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">';
            $output .= '<div class="ts-object" style="height: 100%; width: 100%;">';
            $output .= '<div class="ts-front" style="height: 100%; width: 100%; background-color: ' . $front_background . '; ' . $flip_border_style_front . '">';
            $output .= '<div class="ts-flip-content" style="color: ' . $front_color . '; ' . $front_panel_adjust . '">';
            if ($front_image_full == "true") {
                $output .= '<img src="' . $front_image_path[0] . '" style="' . $front_image_style . '" class="' . $animation_icon . '">';
            } else {
                if ($front_icon_replace == "false") {
                    $output .= '<i style="color:' . $front_icon_color . ';' . $front_icon_style . ' ' . $front_icon_frame_style . ' text-align: center; display: inline-block !important; margin: 10px auto;" class="ts-font-icon ' . $front_icon . ' ' . $front_icon_frame_class . ' ' . $animation_icon . ' ' . $front_icon_frame_radius . '" data-animation="' . $animation_icon . '"></i>';
                } else {
                    $output .= '<img src="' . $front_image_path[0] . '" style="' . $front_image_style . ' ' . $front_icon_frame_style . '" class="ts-font-icon ' . $front_icon_frame_class . ' ' . $front_icon_frame_radius . ' ' . $animation_icon . '" data-animation="' . $animation_icon . '">';
                }
                $output .= '<h3 style="color: ' . $front_color_title . '">' . $front_title . '</h3>';
                if ($back_html == "true") {
                    $output .= '<p class="ts-flip-text">' . do_shortcode(rawurldecode(base64_decode(strip_tags($front_content_html)))) . '</p>';
                } else {
                    $output .= '<p class="ts-flip-text">' . strip_tags($front_content) . '</p>';
                }
            }
            $output .= '</div>';
            $output .= '</div>';
            $output .= '<div class="ts-back" style="height: 100%; width: 100%; background-color: ' . $back_background . '; ' . $flip_border_style_back . '">';
            $output .= '<div class="ts-flip-content" style="color: ' . $back_color . ';">';
            $output .= '<h3 style="color: ' . $back_color_title . '">' . $back_title . '</h3>';
            if ($back_html == "true") {
                $output .= '<p class="ts-flip-text">' . do_shortcode(rawurldecode(base64_decode(strip_tags($back_content_html)))) . '</p>';
            } else {
                $output .= '<p class="ts-flip-text">' . strip_tags($back_content) . '</p>';
            }
            if (!empty($read_more_url) && $read_more_link == "true") {
                $output .= '<p class="ts-flip-link"><a href="' . $read_more_url . '" target="' . $read_more_target . '" style="color: ' . $read_more_color . '; background: ' . $read_more_background . '">' . $read_more_txt . '</a></p>';
            }
            $output .= '</div>';
            $output .= '</div>';
            $output .= '</div>';
            $output .= '</div>';
            $output .= '</div>';
        }
    }
    echo $output;
    $myvariable = ob_get_clean();
    return $myvariable;
}
function TS_VCSC_Icon_Title_Function($atts)
{
    global $VISUAL_COMPOSER_EXTENSIONS;
    ob_start();
    if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_LoadFrontEndForcable == "false") {
        wp_enqueue_style('ts-extend-simptip');
        wp_enqueue_style('ts-extend-animations');
        wp_enqueue_style('ts-visual-composer-extend-front');
        wp_enqueue_script('ts-visual-composer-extend-front');
    }
    extract(shortcode_atts(array('title' => '', 'style' => 'true', 'color' => '#3d3d3d', "size" => '30', 'font_weight' => 'normal', 'align' => 'left', 'font_theme' => 'true', 'font_family' => '', 'font_type' => '', 'title_wrap' => 'div', 'title_background_type' => 'color', 'title_background_color' => '', 'title_background_pattern' => '', 'title_border_controls' => 'false', 'title_border_type' => '', 'title_border_bottom' => 'false', 'title_border_color' => '#cccccc', 'title_border_thick' => 1, 'title_border_radius' => '', 'title_border_setting' => '', 'icon' => '', 'icon_location' => 'left', 'icon_margin' => 10, 'icon_size_slide' => 30, 'icon_color' => '#000000', 'icon_background' => '', 'icon_frame_type' => '', 'icon_frame_thick' => 1, 'icon_frame_radius' => '', 'icon_frame_color' => '#cccccc', 'icon_replace' => 'false', 'icon_image' => '', 'icon_padding' => 0, 'icon_spacing' => 0, 'title_spacing' => 0, 'animations' => 'false', 'animation_icon' => '', 'animation_title' => '', 'animation_shadow' => '', 'animation_view' => '', 'margin_bottom' => '20', 'margin_top' => '0', 'el_id' => '', 'el_class' => '', 'css' => ''), $atts));
    $divider_css = $title_background_style = $title_frame_style = $icon_style = $icon_frame_class = $icon_frame_style = $animation_css = '';
    if (!empty($el_id)) {
        $icon_title_id = $el_id;
    } else {
        $icon_title_id = 'ts-vcsc-icon-title-parent-' . mt_rand(999999, 9999999);
    }
    if (!empty($icon_image)) {
        $icon_image_path = wp_get_attachment_image_src($icon_image, 'large');
    }
    $output = '';
    $style = $style == 'true' ? 'pattern' : 'simple';
    if ($font_theme == "false") {
        $output .= TS_VCSC_GetFontFamily($icon_title_id, $font_family, $font_type);
    }
    if ($animations == "false") {
        $animation_icon = '';
        $animation_title = '';
        $animation_shadow = '';
        $animation_view = '';
    }
    if ($animation_view != '') {
        $animation_css = TS_VCSC_GetCSSAnimation($animation_view);
    }
    $icon_style = 'padding: ' . $icon_padding . 'px; background-color:' . $icon_background . '; width: ' . $icon_size_slide . 'px; height: ' . $icon_size_slide . 'px; font-size: ' . $icon_size_slide . 'px; line-height: ' . $icon_size_slide . 'px;';
    $icon_image_style = 'padding: ' . $icon_padding . 'px; background-color:' . $icon_background . '; width: ' . $icon_size_slide . 'px; height: ' . $icon_size_slide . 'px; ';
    if ($icon_frame_type != '') {
        $icon_frame_class = 'frame-enabled';
        $icon_frame_style = 'border: ' . $icon_frame_thick . 'px ' . $icon_frame_type . ' ' . $icon_frame_color . ';';
    }
    if ($title_background_type == "pattern") {
        $title_background_style = 'background: url(' . $title_background_pattern . ') repeat;';
        $title_background_class = 'ts-icon-title-background';
    } else {
        if ($title_background_type == "color" && $title_background_color != '') {
            $title_background_style = 'background-color: ' . $title_background_color . ';';
            $title_background_class = 'ts-icon-title-background';
        } else {
            $title_background_style = '';
            $title_background_class = '';
        }
    }
    if ($title_border_controls == 'false') {
        if ($title_border_type != '') {
            if ($title_border_bottom == "true") {
                $title_frame_style = '' . $title_background_style . ' border-bottom: ' . $title_border_thick . 'px ' . $title_border_type . ' ' . $title_border_color . '';
            } else {
                $title_frame_style = '' . $title_background_style . ' border: ' . $title_border_thick . 'px ' . $title_border_type . ' ' . $title_border_color . '';
            }
        } else {
            $title_frame_style = $title_background_style;
        }
    } else {
        $title_frame_style = $title_background_style . str_replace('|', '', $title_border_setting);
    }
    $title_adjustment = '';
    if ($animation_shadow != '' && ($title_background_type == "pattern" || $title_background_type == "color" && $title_background_color != '')) {
        if (!empty($animation_title)) {
            $shadow_class = 'ts-css-shadow ' . $animation_shadow . '';
        } else {
            $shadow_class = 'ts-css-shadow ts-css-shadow-single ' . $animation_shadow . '';
        }
    } else {
        $shadow_class = '';
    }
    if ($icon_location == "top" || $icon_location == "bottom") {
        $padding_adjustment = 'padding: 10px;';
        $border_adjustment = $title_frame_style;
        $line_adjustment = '';
    } else {
        $padding_adjustment = 'padding: 0px;';
        $border_adjustment = '';
        if ($icon_size_slide + $icon_padding * 2 > $size) {
            $line_adjustment = 'line-height: ' . ($icon_size_slide + $icon_padding * 2) . 'px;';
            $line_height = $icon_size_slide + $icon_padding * 2;
        } else {
            $line_adjustment = 'line-height: ' . $size . 'px;';
            $line_height = $size;
        }
    }
    if ($icon_location == 'left') {
        $icon_alignment = 'float: left;';
        $icon_position = 'position: absolute; left: ' . $icon_spacing . 'px; top: 50%; margin-top: -' . ($icon_size_slide + $icon_padding * 2) / 2 . 'px;';
        if ($align == 'left') {
            $title_margin = 'margin-left: ' . ($icon_size_slide + $icon_padding * 2 + $icon_margin + $title_spacing) . 'px;';
        } else {
            if ($align == 'right') {
                $title_margin = 'margin-left: ' . ($icon_size_slide + $icon_padding * 2 + $icon_margin) . 'px; margin-right: ' . $title_spacing . 'px;';
            } else {
                $title_margin = 'margin-left: ' . ($icon_size_slide + $icon_padding * 2 + $icon_margin) . 'px;';
            }
        }
        $title_align = $align;
    } else {
        if ($icon_location == 'right') {
            $icon_alignment = 'float: right;';
            $icon_position = 'position: absolute; right: ' . $icon_spacing . 'px; top: 50%; margin-top: -' . ($icon_size_slide + $icon_padding * 2) / 2 . 'px;';
            if ($align == 'left') {
                $title_margin = 'margin-right: ' . ($icon_size_slide + $icon_padding * 2 + $icon_margin) . 'px; margin-left: ' . $title_spacing . 'px;';
            } else {
                if ($align == 'right') {
                    $title_margin = 'margin-right: ' . ($icon_size_slide + $icon_padding * 2 + $icon_margin + $title_spacing) . 'px;';
                } else {
                    $title_margin = 'margin-right: ' . ($icon_size_slide + $icon_padding * 2 + $icon_margin) . 'px;';
                }
            }
            $title_align = $align;
        } else {
            $icon_alignment = '';
            $icon_position = '';
            $title_margin = '';
            $title_align = 'center';
        }
    }
    if (function_exists('vc_shortcode_custom_css_class')) {
        $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'ts-vcsc-icon-title-parent ' . vc_shortcode_custom_css_class($css, ' '), 'TS-VCSC-Icon-Title', $atts);
    } else {
        $css_class = 'ts-vcsc-icon-title-parent';
    }
    $output .= '<div id="' . $icon_title_id . '" class="' . $css_class . ' ' . $animation_css . ' ' . $el_class . ' ' . $title_background_class . ' clearFixMe ' . $title_border_radius . '" style="height: 100%; margin-top:' . $margin_top . 'px; margin-bottom:' . $margin_bottom . 'px;">';
    $output .= !empty($animation_title) ? '<div class="ts-hover ' . $animation_title . '" style="height: 100%;">' : '';
    if ($icon_location == "top" || $icon_location == "bottom") {
        $output .= '<div class="' . $shadow_class . '" style="height: 100%;">';
    }
    $output .= '<div style="height: 100%; ' . $border_adjustment . '; ' . $padding_adjustment . ' font-size: ' . $size . 'px; text-align: ' . $title_align . '; color: ' . $color . '; font-weight:' . $font_weight . '; ' . $divider_css . '" class="ts-vcsc-icon-title ts-shortcode ' . $title_border_radius . ' ts-icon-title ' . ($animation_title != "" ? $shadow_class : "") . ' ' . $style . '-style">';
    if ($icon_replace == 'false') {
        if (!empty($icon) && $icon_location == "top") {
            $output .= '<div style="width: 100%; display: block;">';
            $output .= '<i style="color:' . $icon_color . ';' . $icon_style . ' ' . $icon_frame_style . ' text-align: center; display: inline-block !important; margin-bottom: ' . $icon_margin . 'px;" class="ts-font-icon ts-title-icon-' . $icon_location . ' ' . $icon . ' ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '"></i>';
            $output .= '</div>';
        }
    } else {
        if (!empty($icon_image) && $icon_location == "top") {
            $output .= '<div style="width: 100%; display: block;">';
            $output .= '<img class="ts-font-icon ts-title-icon-' . $icon_location . ' ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '" src="' . $icon_image_path[0] . '" style="' . $icon_frame_style . ' ' . $icon_image_style . ' display: inline-block !important; margin-bottom: ' . $icon_margin . 'px;">';
            $output .= '</div>';
        }
    }
    if ($icon_location == "left") {
        if ($icon_replace == 'false') {
            $output .= '<div class="" style="width: 100%; ' . $line_adjustment . ' vertical-align: middle;">';
            $output .= '<div class="' . $shadow_class . '" style="">';
            $output .= '<div class="' . $style . '-style ' . $title_border_radius . '" style="' . $title_frame_style . '">';
            if (!empty($icon) && $icon_location == "left") {
                $output .= '<i style="' . $icon_position . ' color:' . $icon_color . ';' . $icon_style . ' ' . $icon_frame_style . ' display: inline-block !important; ' . $icon_alignment . '" class="ts-font-icon ts-title-icon-' . $icon_location . ' ' . $icon . ' ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '"></i>';
            }
            $output .= '<div class="ts-icon-title-text" style="' . $title_margin . ' text-align: ' . $align . '; ' . $line_adjustment . ' font-size: ' . $size . 'px; ' . $title_adjustment . '">' . $title . '</div>';
            $output .= '</div>';
            $output .= '</div>';
            $output .= '</div>';
        } else {
            $output .= '<div class="" style="width: 100%; ' . $line_adjustment . ' vertical-align: middle;">';
            $output .= '<div class="' . $shadow_class . '" style="">';
            $output .= '<div class="' . $style . '-style ' . $title_border_radius . '" style="' . $title_frame_style . '">';
            if (!empty($icon_image) && $icon_location == "left") {
                $output .= '<img style="' . $icon_position . ' ' . $icon_frame_style . ' ' . $icon_image_style . ' display: inline-block !important; ' . $icon_alignment . '" class="ts-font-icon ts-title-icon-' . $icon_location . ' ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '" src="' . $icon_image_path[0] . '">';
            }
            $output .= '<div class="ts-icon-title-text" style="' . $title_margin . ' text-align: ' . $align . '; ' . $line_adjustment . ' font-size: ' . $size . 'px; ' . $title_adjustment . '">' . $title . '</div>';
            $output .= '</div>';
            $output .= '</div>';
            $output .= '</div>';
        }
    } else {
        if ($icon_location == "right") {
            if ($icon_replace == 'false') {
                $output .= '<div class="" style="width: 100%; ' . $line_adjustment . ' vertical-align: middle;">';
                $output .= '<div class="' . $shadow_class . '" style="">';
                $output .= '<div class="' . $style . '-style ' . $title_border_radius . '" style="' . $title_frame_style . '">';
                if (!empty($icon) && $icon_location == "right") {
                    $output .= '<i style="' . $icon_position . ' color:' . $icon_color . ';' . $icon_style . ' ' . $icon_frame_style . ' display: inline-block !important; ' . $icon_alignment . '" class="ts-font-icon ts-title-icon-' . $icon_location . ' ' . $icon . ' ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '"></i>';
                }
                $output .= '<div class="ts-icon-title-text" style="' . $title_margin . ' text-align: ' . $align . '; ' . $line_adjustment . ' font-size: ' . $size . 'px; ' . $title_adjustment . '">' . $title . '</div>';
                $output .= '</div>';
                $output .= '</div>';
                $output .= '</div>';
            } else {
                $output .= '<div class="" style="width: 100%; ' . $line_adjustment . ' vertical-align: middle;">';
                $output .= '<div class="' . $shadow_class . '" style="">';
                $output .= '<div class="' . $style . '-style ' . $title_border_radius . '" style="' . $title_frame_style . '">';
                if (!empty($icon_image) && $icon_location == "right") {
                    $output .= '<img style="' . $icon_position . ' ' . $icon_frame_style . ' ' . $icon_image_style . ' display: inline-block !important; ' . $icon_alignment . '" class="ts-font-icon ts-title-icon-' . $icon_location . ' ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '" src="' . $icon_image_path[0] . '">';
                }
                $output .= '<div class="ts-icon-title-text" style="' . $title_margin . ' text-align: ' . $align . '; ' . $line_adjustment . ' font-size: ' . $size . 'px; ' . $title_adjustment . '">' . $title . '</div>';
                $output .= '</div>';
                $output .= '</div>';
                $output .= '</div>';
            }
        } else {
            $output .= '<div class="ts-icon-title-text" style="width: auto !important; text-align: center;">' . $title . '</div>';
        }
    }
    if ($icon_replace == 'false') {
        if (!empty($icon) && $icon_location == "bottom") {
            $output .= '<div style="width: 100%; display: block;">';
            $output .= '<i style="color:' . $icon_color . ';' . $icon_style . ' ' . $icon_frame_style . ' display: inline-block !important; margin-top: ' . $icon_margin . 'px;" class="ts-font-icon ts-title-icon-' . $icon_location . ' ' . $icon . ' ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '"></i>';
            $output .= '</div>';
        }
    } else {
        if (!empty($icon_image) && $icon_location == "bottom") {
            $output .= '<div style="width: 100%; display: block;">';
            $output .= '<img class="ts-font-icon ts-title-icon-' . $icon_location . ' ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '" src="' . $icon_image_path[0] . '" style="' . $icon_frame_style . ' ' . $icon_image_style . ' display: inline-block !important; margin-top: ' . $icon_margin . 'px;">';
            $output .= '</div>';
        }
    }
    $output .= '</div>';
    if ($icon_location == "top" || $icon_location == "bottom") {
        $output .= '</div>';
    }
    $output .= !empty($animation_title) ? '</div></div>' : '</div>';
    $output .= '<div class="clearboth"></div>';
    echo $output;
    $myvariable = ob_get_clean();
    return $myvariable;
}
Пример #3
0
function TS_VCSC_Font_Icons_Function($atts)
{
    global $VISUAL_COMPOSER_EXTENSIONS;
    ob_start();
    if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_LoadFrontEndWaypoints == "true") {
        if (wp_script_is('waypoints', $list = 'registered')) {
            wp_enqueue_script('waypoints');
        } else {
            wp_enqueue_script('ts-extend-waypoints');
        }
    }
    if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_LoadFrontEndForcable == "false") {
        wp_enqueue_style('ts-extend-simptip');
        wp_enqueue_style('ts-extend-animations');
        wp_enqueue_style('ts-visual-composer-extend-front');
        wp_enqueue_script('ts-visual-composer-extend-front');
    }
    extract(shortcode_atts(array('icon_replace' => 'false', 'icon' => '', 'icon_image' => '', 'icon_color' => '#000000', 'icon_background' => '', 'icon_size_slide' => 16, 'icon_frame_type' => '', 'icon_frame_thick' => 1, 'icon_frame_radius' => '', 'icon_frame_color' => '#000000', 'padding' => 'false', 'icon_padding' => 0, 'icon_align' => '', 'link' => '', 'link_target' => '_parent', 'tooltip_css' => 'false', 'tooltip_content' => '', 'tooltip_position' => 'ts-simptip-position-top', 'tooltip_style' => '', 'animation_icon' => '', 'animation_view' => '', 'animation_delay' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts));
    $icon_color = !empty($icon_color) ? 'color:' . $icon_color . ';' : '';
    $output = $icon_frame_class = $icon_frame_style = $animation_css = '';
    if (!empty($el_id)) {
        $icon_font_id = $el_id;
    } else {
        $icon_font_id = 'ts-vcsc-font-icon-' . mt_rand(999999, 9999999);
    }
    if (!empty($icon_image)) {
        $icon_image_path = wp_get_attachment_image_src($icon_image, 'large');
    }
    if ($padding == "true") {
        $icon_frame_padding = 'padding: ' . $icon_padding . 'px; ';
    } else {
        $icon_frame_padding = '';
    }
    $icon_style = '' . $icon_frame_padding . 'background-color:' . $icon_background . '; width:' . $icon_size_slide . 'px; height:' . $icon_size_slide . 'px; font-size:' . $icon_size_slide . 'px; line-height:' . $icon_size_slide . 'px;';
    $icon_image_style = '' . $icon_frame_padding . 'background-color:' . $icon_background . '; width: ' . $icon_size_slide . 'px; height: ' . $icon_size_slide . 'px; ';
    if ($icon_frame_type != '') {
        $icon_frame_class = 'frame-enabled';
        $icon_frame_style = 'border: ' . $icon_frame_thick . 'px ' . $icon_frame_type . ' ' . $icon_frame_color . ';';
    }
    if ($animation_view != '') {
        $animation_css = 'ts-vcsc-font-icon-viewport ' . TS_VCSC_GetCSSAnimation($animation_view);
    }
    // Tooltip
    if ($tooltip_css == "true") {
        if (strlen($tooltip_content) != 0) {
            $icon_tooltipclasses = " ts-simptip-multiline " . $tooltip_style . " " . $tooltip_position;
            $icon_tooltipcontent = ' data-tstooltip="' . $tooltip_content . '"';
        } else {
            $icon_tooltipclasses = "";
            $icon_tooltipcontent = "";
        }
    } else {
        $icon_tooltipclasses = "";
        if (strlen($tooltip_content) != 0) {
            $icon_tooltipcontent = ' title="' . $tooltip_content . '"';
        } else {
            $icon_tooltipcontent = "";
        }
    }
    $output = '';
    if (function_exists('vc_shortcode_custom_css_class')) {
        $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'ts-vcsc-font-icon ts-font-icons ts-shortcode ts-icon-align-' . $icon_align . ' ' . $animation_css . ' ' . $el_class . ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS-VCSC-Font-Icons', $atts);
    } else {
        $css_class = 'ts-vcsc-font-icon ts-font-icons ts-shortcode ts-icon-align-' . $icon_align . ' ' . $animation_css . ' ' . $el_class;
    }
    $output .= '<div id="' . $icon_font_id . '" style="" class="' . $css_class . '" data-viewport="' . $animation_css . ' wpb_start_animation" data-delay="' . $animation_delay . '">';
    if ($link) {
        $output .= '<a class="ts-font-icons-link" href="' . $link . '" target="' . $link_target . '">';
    }
    $output .= '<span class="' . $icon_tooltipclasses . '" ' . $icon_tooltipcontent . '>';
    if ($icon_replace == "false") {
        $output .= '<i class="ts-font-icon ' . $icon . ' ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '" style="' . $icon_style . $icon_frame_style . $icon_color . '"></i>';
    } else {
        $output .= '<img class="ts-font-icon ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . ' ' . $icon_frame_radius . '" src="' . $icon_image_path[0] . '" style="' . $icon_frame_style . ' ' . $icon_image_style . ' display: inline-block !important; margin-bottom: ' . $icon_margin . 'px;">';
    }
    $output .= '</span>';
    if ($link) {
        $output .= '</a>';
    }
    $output .= '</div>';
    echo $output;
    $myvariable = ob_get_clean();
    return $myvariable;
}
function TS_VCSC_Font_Iconbox_Tiny_Function($atts, $content = null)
{
    global $VISUAL_COMPOSER_EXTENSIONS;
    ob_start();
    wp_enqueue_style('ts-extend-animations');
    wp_enqueue_style('ts-visual-composer-extend-front');
    wp_enqueue_script('ts-visual-composer-extend-front');
    extract(shortcode_atts(array('style' => 'icon_left', 'height' => 'auto', 'min_height' => 200, 'max_height' => 200, 'fix_height' => 200, 'title' => '', 'title_size' => '25', 'title_weight' => 'inherit', 'title_color' => '#000000', 'title_align' => 'center', 'title_margin' => 0, 'title_wrap' => 'div', 'line_height' => 14, 'font_size' => 14, 'padding_top' => 10, 'padding_bottom' => 10, 'padding_left' => 10, 'padding_right' => 10, 'padding_custom' => 'false', 'padding_outside' => 60, 'icon' => '', 'icon_location' => 'left', 'icon_placement' => 'center', 'icon_size_slide' => 36, 'icon_margin' => 10, 'icon_color' => '#000000', 'icon_background' => '', 'icon_frame_type' => '', 'icon_frame_thick' => 1, 'icon_frame_radius' => '', 'icon_frame_color' => '#000000', 'icon_replace' => 'false', 'icon_image' => '', 'icon_padding' => 5, 'box_background_type' => 'color', 'box_background_color' => '#ffffff', 'box_background_pattern' => '', 'box_background_image' => '', 'box_background_size' => 'cover', 'box_background_repeat' => 'no-repeat', 'box_border_controls' => 'false', 'box_border_type' => '', 'box_border_color' => '#000000', 'box_border_thick' => 1, 'box_border_radius' => '', 'box_border_setting' => '', 'font_title_family' => 'Default', 'font_title_type' => '', 'font_content_family' => 'Default', 'font_content_type' => '', 'font_button_family' => 'Default', 'font_button_type' => '', 'separator_type' => '', 'separator_thick' => 1, 'separator_color' => '#000000', 'read_more_link' => 'false', 'read_more_txt' => '', 'read_more_url' => '', 'read_more_target' => '_parent', 'read_more_type' => 'basic', 'read_more_style' => 1, 'read_more_flat_default' => 'ts-dual-buttons-color-default', 'read_more_flat_hover' => 'ts-dual-buttons-preview-default ts-dual-buttons-hover-default', 'read_more_width' => 50, 'read_more_align' => 'center', 'tooltip_content' => '', 'tooltip_position' => 'ts-simptip-position-top', 'tooltip_style' => '', 'tooltipster_offsetx' => 0, 'tooltipster_offsety' => 0, 'animations' => 'false', 'animation_effect' => 'ts-hover-css-', 'animation_class' => '', 'animation_box' => '', 'animation_shadow' => '', 'animation_view' => '', 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts));
    $output = $icon_style = $icon_frame_style = $icon_frame_class = $icon_frame_adjust = $box_frame_adjust = $box_frame_style = $separator_style = $animation_css = "";
    $icon_frame_top = $icon_frame_left = $box_margin_left = $box_padding_left = "0px";
    $icon_padding_vertical = $icon_padding;
    $icon_padding_horizontal = $icon_padding;
    if (!empty($el_id)) {
        $icon_box_id = $el_id;
    } else {
        $icon_box_id = 'ts-vcsc-box-icon-' . mt_rand(999999, 9999999);
    }
    if (!empty($icon_image)) {
        $icon_image_path = wp_get_attachment_image_src($icon_image, 'large');
    }
    $icon_style = 'padding: ' . $icon_padding_vertical . 'px ' . $icon_padding_horizontal . 'px; background-color:' . $icon_background . '; width: ' . $icon_size_slide . 'px; height: ' . $icon_size_slide . 'px; font-size: ' . $icon_size_slide . 'px; line-height: ' . $icon_size_slide . 'px;';
    $icon_image_style = 'padding: ' . $icon_padding_vertical . 'px ' . $icon_padding_horizontal . 'px; background-color:' . $icon_background . '; width: ' . $icon_size_slide . 'px; height: ' . $icon_size_slide . 'px; font-size: ' . $icon_size_slide . 'px; line-height: ' . $icon_size_slide . 'px;';
    // Tooltip
    if ($tooltip_position == "ts-simptip-position-top" || $tooltip_position == "top") {
        $tooltip_position = "top";
    }
    if ($tooltip_position == "ts-simptip-position-left" || $tooltip_position == "left") {
        $tooltip_position = "left";
    }
    if ($tooltip_position == "ts-simptip-position-right" || $tooltip_position == "right") {
        $tooltip_position = "right";
    }
    if ($tooltip_position == "ts-simptip-position-bottom" || $tooltip_position == "bottom") {
        $tooltip_position = "bottom";
    }
    $tooltipclasses = 'ts-has-tooltipster-tooltip';
    if ($tooltip_style == "" || $tooltip_style == "ts-simptip-style-black" || $tooltip_style == "tooltipster-black") {
        $tooltip_style = "tooltipster-black";
    }
    if ($tooltip_style == "ts-simptip-style-gray" || $tooltip_style == "tooltipster-gray") {
        $tooltip_style = "tooltipster-gray";
    }
    if ($tooltip_style == "ts-simptip-style-green" || $tooltip_style == "tooltipster-green") {
        $tooltip_style = "tooltipster-green";
    }
    if ($tooltip_style == "ts-simptip-style-blue" || $tooltip_style == "tooltipster-blue") {
        $tooltip_style = "tooltipster-blue";
    }
    if ($tooltip_style == "ts-simptip-style-red" || $tooltip_style == "tooltipster-red") {
        $tooltip_style = "tooltipster-red";
    }
    if ($tooltip_style == "ts-simptip-style-orange" || $tooltip_style == "tooltipster-orange") {
        $tooltip_style = "tooltipster-orange";
    }
    if ($tooltip_style == "ts-simptip-style-yellow" || $tooltip_style == "tooltipster-yellow") {
        $tooltip_style = "tooltipster-yellow";
    }
    if ($tooltip_style == "ts-simptip-style-purple" || $tooltip_style == "tooltipster-purple") {
        $tooltip_style = "tooltipster-purple";
    }
    if ($tooltip_style == "ts-simptip-style-pink" || $tooltip_style == "tooltipster-pink") {
        $tooltip_style = "tooltipster-pink";
    }
    if ($tooltip_style == "ts-simptip-style-white" || $tooltip_style == "tooltipster-white") {
        $tooltip_style = "tooltipster-white";
    }
    if (strip_tags($tooltip_content) != '') {
        wp_enqueue_style('ts-extend-tooltipster');
        wp_enqueue_script('ts-extend-tooltipster');
        $Tooltip_Content = 'data-tooltipster-html="true" data-tooltipster-title="" data-tooltipster-text="' . strip_tags($tooltip_content) . '" data-tooltipster-image="" data-tooltipster-position="' . $tooltip_position . '" data-tooltipster-touch="false" data-tooltipster-arrow="true" data-tooltipster-theme="' . $tooltip_style . '" data-tooltipster-animation="swing" data-tooltipster-trigger="hover" data-tooltipster-offsetx="' . $tooltipster_offsetx . '" data-tooltipster-offsety="' . $tooltipster_offsety . '"';
        $Tooltip_Class = 'ts-has-tooltipster-tooltip';
    } else {
        $Tooltip_Content = '';
        $Tooltip_Class = '';
    }
    if ($icon_frame_type != '') {
        $icon_frame_class = 'frame-enabled';
        $icon_frame_style = 'border: ' . $icon_frame_thick . 'px ' . $icon_frame_type . ' ' . $icon_frame_color . ';';
    }
    if ($style == "boxed_left") {
        $style = "boxed";
        $icon_location = "left";
    } else {
        if ($style == "boxed_top") {
            $style = "boxed";
            $icon_location = "top";
        }
    }
    if ($style == "boxed") {
        if ($icon_location == "top") {
            $icon_frame_top = '-' . ($icon_size_slide / 2 + $icon_padding_horizontal + $icon_frame_thick + 5) . 'px';
            $icon_frame_left = '-' . ($icon_size_slide / 2 + $icon_padding_vertical + $icon_frame_thick) . 'px';
            $icon_frame_adjust = 'top:' . $icon_frame_top . '; margin-left:' . $icon_frame_left . ';';
            $box_frame_adjust = '';
            $shadow_frame_adjust = '';
            if ($padding_custom == "true") {
                $box_padding_top = 'padding-top: ' . $padding_outside . 'px;';
            } else {
                $box_padding_top = '';
            }
            if ($separator_type != '') {
                $separator_style = 'border-top: ' . $separator_thick . 'px ' . $separator_type . ' ' . $separator_color . '; padding-top: ' . abs($icon_size_slide / 2 + $icon_padding_horizontal + $icon_frame_thick + 5) . 'px;';
            }
        } else {
            if ($icon_location == "left") {
                $icon_frame_left = '-' . ($icon_size_slide / 2 + $icon_padding_horizontal + $icon_frame_thick + 5) . 'px';
                $icon_frame_top = -$icon_size_slide / 2 - $icon_padding_vertical - $title_margin - $icon_frame_thick . 'px';
                if ($icon_placement == 'center') {
                    $icon_frame_adjust = 'left:' . $icon_frame_left . '; margin-top:' . $icon_frame_top . ';';
                } else {
                    if ($icon_placement == 'top') {
                        $icon_frame_adjust = 'left:' . $icon_frame_left . '; top: 0px; bottom: auto;';
                    } else {
                        if ($icon_placement == 'bottom') {
                            $icon_frame_adjust = 'left:' . $icon_frame_left . '; top: auto; bottom: 0px;';
                        }
                    }
                }
                $box_margin_left = $icon_size_slide / 2 . 'px';
                $box_padding_top = '';
                if ($padding_custom == "true") {
                    $box_padding_left = $padding_outside . 'px';
                } else {
                    $box_padding_left = $icon_size_slide / 2 + 30 . 'px';
                }
                if ($box_border_type == '') {
                    $box_frame_adjust = 'margin-left: 0px; padding: 0 0 0 ' . $box_padding_left . ';';
                } else {
                    $box_frame_adjust = 'margin-left: 0px; padding-left: ' . $box_padding_left . ';';
                }
                $shadow_frame_adjust = 'margin-left: ' . $box_margin_left . '; ';
                if ($separator_type != '') {
                    $separator_style = 'border-left: ' . $separator_thick . 'px ' . $separator_type . ' ' . $separator_color . '; padding-left: ' . abs($icon_size_slide / 2 + $icon_padding_horizontal + $icon_frame_thick + 5) . 'px;';
                }
            }
        }
    }
    if ($box_background_type == "pattern") {
        $box_background_style = 'background: url(' . $box_background_pattern . ') repeat;';
    } else {
        if ($box_background_type == "color") {
            $box_background_style = 'background-color: ' . $box_background_color . ';';
        } else {
            if ($box_background_type == "image") {
                $background_image = wp_get_attachment_image_src($box_background_image, 'full');
                $background_image = $background_image[0];
                $box_background_style = 'background: transparent url(' . $background_image . ') ' . $box_background_repeat . ' center center; -webkit-background-size: ' . $box_background_size . '; -moz-background-size: ' . $box_background_size . '; -o-background-size: ' . $box_background_size . '; background-size: ' . $box_background_size . ';';
            }
        }
    }
    if ($box_border_controls == "false") {
        if ($box_border_type != '') {
            $box_frame_style = 'border: ' . $box_border_thick . 'px ' . $box_border_type . ' ' . $box_border_color . ';';
        } else {
            $box_frame_style = '';
        }
    } else {
        $box_frame_style = str_replace('|', '', $box_border_setting);
    }
    if ($style == "boxed") {
        $box_inner_padding = '';
    } else {
        $box_inner_padding = 'padding: ' . $padding_top . 'px ' . $padding_right . 'px ' . $padding_bottom . 'px ' . $padding_left . 'px;';
    }
    if (!empty($animation_class)) {
        $animation_icon = $animation_effect . $animation_class;
    } else {
        $animation_icon = '';
    }
    if ($animation_view != '') {
        $animation_css = TS_VCSC_GetCSSAnimation($animation_view);
    }
    // Height Settings
    if ($height == 'minheight') {
        if ($min_height > 0) {
            $height_setting = 'min-height: ' . $min_height . 'px;';
            $height_class = 'ts-icon-box-minheight';
        } else {
            $height_setting = '';
            $height_class = '';
        }
    } else {
        if ($height == 'maxheight') {
            if ($max_height > 0) {
                $height_setting = 'max-height: ' . $max_height . 'px;';
                $height_class = 'ts-icon-box-maxheight';
            } else {
                $height_setting = '';
                $height_class = '';
            }
        } else {
            if ($height == 'fixheight') {
                if ($fix_height > 0) {
                    $height_setting = 'height: ' . $fix_height . 'px;';
                    $height_class = 'ts-icon-box-fixheight';
                } else {
                    $height_setting = '';
                    $height_class = '';
                }
            } else {
                $height_setting = '';
                $height_class = '';
            }
        }
    }
    // Custom Font Settings
    if (strpos($font_title_family, 'Default') === false) {
        if ($style == "icon_left") {
            $google_font_title = TS_VCSC_GetFontFamily($icon_box_id . " .ts-box-icon-title-text", $font_title_family, $font_title_type, false, true, false);
        } else {
            $google_font_title = TS_VCSC_GetFontFamily($icon_box_id . " .ts-box-icon-title", $font_title_family, $font_title_type, false, true, false);
        }
    } else {
        $google_font_title = '';
    }
    if (strpos($font_content_family, 'Default') === false) {
        $google_font_content = TS_VCSC_GetFontFamily($icon_box_id . " .ts-icon-box-content", $font_content_family, $font_content_type, false, true, false);
    } else {
        $google_font_content = '';
    }
    if (strpos($font_button_family, 'Default') === false) {
        $google_font_button = TS_VCSC_GetFontFamily($icon_box_id . " .ts-icon-box-readmore", $font_button_family, $font_button_type, false, true, false);
    } else {
        $google_font_button = '';
    }
    if ($read_more_type == "basic") {
        $read_more_button_style = "style" . $read_more_style;
    } else {
        if ($read_more_type == "flat") {
            wp_enqueue_style('ts-extend-buttonsdual');
            $read_more_button_style = $read_more_flat_default . ' ' . $read_more_flat_hover;
        }
    }
    if (function_exists('vc_shortcode_custom_css_class')) {
        $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'ts-vcsc-box-icon ' . $el_class . $animation_css . ' ' . $box_border_radius . ' ' . $style . '-style ts-box-icon ' . vc_shortcode_custom_css_class($css, ' '), 'TS-VCSC-Icon-Box-Tiny', $atts);
    } else {
        $css_class = 'ts-vcsc-box-icon ' . $el_class . $animation_css . ' ' . $box_border_radius . ' ' . $style . '-style ts-box-icon';
    }
    if ($read_more_url != '' && $read_more_link == "box") {
        $output .= '<a class="ts-box-icon-link" style="color:' . $title_color . ';" href="' . $read_more_url . '" target="' . $read_more_target . '">';
    }
    $output .= '<div id="' . $icon_box_id . '" class="' . $css_class . ' ' . $Tooltip_Class . '" ' . $Tooltip_Content . ' style="margin-bottom:' . $margin_bottom . 'px; margin-top:' . $margin_top . 'px;">';
    $output .= !empty($animation_box) ? '<div class="ts-hover ' . $animation_box . '">' : '';
    if ($style == "icon_left") {
        $output .= '<div class="ts-css-shadow ' . $animation_shadow . ' ' . $box_border_radius . '" style="' . $box_background_style . '">';
        $output .= '<div class="ts-icon-box-inner box-detail-wrapper ' . $box_border_radius . ' ' . $height_class . '" style="' . $box_frame_style . ' ' . $box_inner_padding . ' ' . $height_setting . '">';
        $output .= '<div class="ts-box-icon-title-holder" style="display: table; margin: 0 auto; float: ' . ($title_align == 'center' ? 'none' : $title_align) . ';">';
        if ($icon_replace == 'false') {
            if (!empty($icon)) {
                $output .= '<i class="ts-box-icon-title-icon ' . $icon . ' ts-main-ico ts-font-icon ' . $icon_frame_radius . ' ' . $icon_frame_class . ' ' . $animation_icon . '" style="margin-left: 0; margin-right: ' . $icon_margin . 'px; color:' . $icon_color . ';' . $icon_style . ' ' . $icon_frame_style . '"></i>';
            }
        } else {
            if (!empty($icon_image)) {
                $output .= '<div style="width: auto !important; display: table-cell;">';
                $output .= '<img class="ts-box-icon-title-image ts-main-ico ts-font-icon ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '" src="' . $icon_image_path[0] . '" style="margin-left: 0; margin-right: ' . $icon_margin . 'px; ' . $icon_frame_style . ' ' . $icon_image_style . ' display: inline-block !important; margin-right: ' . $icon_margin . 'px;">';
                $output .= '</div>';
            }
        }
        if ($read_more_url != '' && ($read_more_link == "buttontitle" || $read_more_link == "title")) {
            $output .= '<a class="ts-box-icon-link" style="text-decoration: none;" href="' . $read_more_url . '" target="' . $read_more_target . '">';
        }
        $output .= '<' . $title_wrap . ' class="ts-box-icon-title-text" style="display: table-cell; vertical-align: middle; width: auto !important; color:' . $title_color . '; font-size:' . $title_size . 'px; font-weight:' . $title_weight . '; text-align: ' . $title_align . '; ' . $google_font_title . '">' . $title . '</' . $title_wrap . '>';
        if ($read_more_url != '' && ($read_more_link == "buttontitle" || $read_more_link == "title")) {
            $output .= '</a>';
        }
        $output .= '</div>';
        if (function_exists('wpb_js_remove_wpautop')) {
            $output .= '<div class="ts-icon-box-content" style="clear: both; font-size: ' . $font_size . 'px; line-height: ' . $line_height . 'px; ' . $google_font_content . '">' . wpb_js_remove_wpautop(do_shortcode($content), true) . '</div>';
        } else {
            $output .= '<div class="ts-icon-box-content" style="clear: both; font-size: ' . $font_size . 'px; line-height: ' . $line_height . 'px; ' . $google_font_content . '">' . do_shortcode($content) . '</div>';
        }
        if ($read_more_url != '' && $read_more_txt != '' && ($read_more_link == "button" || $read_more_link == "buttontitle")) {
            $output .= '<a class="ts-icon-box-readmore ' . $read_more_button_style . '" style="display: block; width: ' . ($read_more_width == 100 ? 'auto' : $read_more_width . '%') . '; float:  ' . ($read_more_align == 'center' ? 'none' : $read_more_align) . '; ' . $google_font_button . '" href="' . $read_more_url . '" target="' . $read_more_target . '">' . $read_more_txt . '</a><div class="clearboth"></div>';
        }
        $output .= '</div>';
        $output .= '<div class="clearboth"></div></div>';
    }
    if ($style == "icon_top") {
        $output .= '<div class="ts-css-shadow ' . $animation_shadow . ' ' . $box_border_radius . '" style="' . $box_background_style . '">';
        $output .= '<div class="ts-icon-box-inner top-side ' . $animation_css . ' ' . $box_border_radius . ' ' . $height_class . '" style="' . $box_frame_style . ' ' . $box_inner_padding . ' ' . $height_setting . '">';
        if ($title_align == 'center') {
            $icon_float = 'margin: 0 auto ' . $icon_margin . 'px auto; float: none;';
        } else {
            if ($title_align == 'left') {
                $icon_float = 'margin: 0 auto ' . $icon_margin . 'px auto; float: left;';
            }
        }
        if ($title_align == 'right') {
            $icon_float = 'margin: 0 auto ' . $icon_margin . 'px auto; float: right;';
        }
        if ($icon_replace == 'false') {
            if (!empty($icon)) {
                $output .= '<i style="' . $icon_float . '; color:' . $icon_color . ';' . $icon_style . ' ' . $icon_frame_style . '" class="ts-box-icon-title-icon ' . $icon . ' ts-main-ico ts-font-icon ' . $icon_frame_class . ' ' . $animation_icon . $icon_frame_radius . '"></i>';
            }
        } else {
            if (!empty($icon_image)) {
                $output .= '<img class="ts-box-icon-title-image ts-main-ico ts-font-icon ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '" src="' . $icon_image_path[0] . '" style="' . $icon_float . ' ' . $icon_frame_style . ' ' . $icon_image_style . ' display: inline-block !important;">';
            }
        }
        $output .= '<div class="box-detail-wrapper" style="clear: both;">';
        if ($read_more_url != '' && ($read_more_link == "buttontitle" || $read_more_link == "title")) {
            $output .= '<a class="ts-box-icon-link" style="text-decoration: none;" href="' . $read_more_url . '" target="' . $read_more_target . '">';
        }
        $output .= '<' . $title_wrap . ' class="ts-box-icon-title" style="width: auto !important; color:' . $title_color . '; font-size:' . $title_size . 'px; font-weight:' . $title_weight . '; text-align:' . $title_align . '; ' . $google_font_title . '">' . $title . '</' . $title_wrap . '>';
        if ($read_more_url != '' && ($read_more_link == "buttontitle" || $read_more_link == "title")) {
            $output .= '</a>';
        }
        if (function_exists('wpb_js_remove_wpautop')) {
            $output .= '<div class="ts-icon-box-content" style="margin-top: 10px; font-size: ' . $font_size . 'px; line-height: ' . $line_height . 'px; ' . $google_font_content . '">' . wpb_js_remove_wpautop(do_shortcode($content), true) . '</div>';
        } else {
            $output .= '<div class="ts-icon-box-content" style="margin-top: 10px; font-size: ' . $font_size . 'px; line-height: ' . $line_height . 'px; ' . $google_font_content . '">' . do_shortcode($content) . '</div>';
        }
        if ($read_more_url != '' && $read_more_txt != '' && ($read_more_link == "button" || $read_more_link == "buttontitle")) {
            $output .= '<a class="ts-icon-box-readmore ' . $read_more_button_style . '" style="display: block; width: ' . ($read_more_width == 100 ? 'auto' : $read_more_width . '%') . '; float:  ' . ($read_more_align == 'center' ? 'none' : $read_more_align) . '; ' . $google_font_button . '" href="' . $read_more_url . '" target="' . $read_more_target . '">' . $read_more_txt . '</a><div class="clearboth"></div>';
        }
        $output .= '</div>';
        $output .= '</div><div class="clearboth"></div></div>';
    }
    if ($style == "boxed") {
        $output .= '<div class="ts-css-shadow ' . $animation_shadow . ' ' . $box_border_radius . '" style="background-color: ' . $box_background_color . '; ' . $shadow_frame_adjust . '">';
        $output .= '<div class="ts-icon-box-boxed  ' . $icon_location . $animation_css . ' ' . $box_border_radius . '" style="' . $box_frame_style . ' ' . $box_inner_padding . ' ' . $box_padding_top . ' ' . $box_frame_adjust . ' ' . $box_background_style . '">';
        if ($separator_type != '') {
            $output .= '<div class="ts-icon-box-separator" style="' . $separator_style . ' ' . $height_setting . '">';
        }
        if ($icon_replace == 'false') {
            if (!empty($icon)) {
                $output .= '<i style="' . $icon_style . ' ' . $icon_frame_style . ' ' . $icon_frame_adjust . ' color: ' . $icon_color . ';" class="ts-box-icon-title-icon ' . $icon . ' ts-main-ico ts-font-icon ' . $icon_frame_radius . ' ' . $icon_frame_class . ' ' . $animation_icon . '"></i>';
            }
        } else {
            if (!empty($icon_image)) {
                $output .= '<img class="ts-box-icon-title-image ts-main-ico ts-font-icon ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '" src="' . $icon_image_path[0] . '" style="' . $icon_frame_style . ' ' . $icon_image_style . ' ' . $icon_frame_adjust . ' display: inline-block !important; margin-right: ' . $icon_margin . 'px;">';
            }
        }
        $output .= '<div class="ts-icon-box-inner ' . $height_class . '" style="' . $height_setting . '">';
        if ($read_more_url != '' && ($read_more_link == "buttontitle" || $read_more_link == "title")) {
            $output .= '<a class="ts-box-icon-link" style="text-decoration: none;" href="' . $read_more_url . '" target="' . $read_more_target . '">';
        }
        $output .= '<' . $title_wrap . ' class="ts-box-icon-title" style="color:' . $title_color . '; font-size:' . $title_size . 'px; font-weight:' . $title_weight . '; margin-top:' . $title_margin . 'px; text-align:' . $title_align . '; ' . $google_font_title . '">' . $title . '</' . $title_wrap . '>';
        if ($read_more_url != '' && ($read_more_link == "buttontitle" || $read_more_link == "title")) {
            $output .= '</a>';
        }
        if (function_exists('wpb_js_remove_wpautop')) {
            $output .= '<div class="ts-icon-box-content" style="margin-top: 10px; font-size: ' . $font_size . 'px; line-height: ' . $line_height . 'px; ' . $google_font_content . '">' . wpb_js_remove_wpautop(do_shortcode($content), true) . '</div>';
        } else {
            $output .= '<div class="ts-icon-box-content" style="margin-top: 10px; font-size: ' . $font_size . 'px; line-height: ' . $line_height . 'px; ' . $google_font_content . '">' . do_shortcode($content) . '</div>';
        }
        if ($read_more_url != '' && $read_more_txt != '' && ($read_more_link == "button" || $read_more_link == "buttontitle")) {
            if ($separator_type != '' && $box_border_type == '') {
                $button_margin_adjust = 'margin-bottom: 0px;';
            } else {
                $button_margin_adjust = 'margin-bottom: 0px;';
            }
            $output .= '<a class="ts-icon-box-readmore ' . $read_more_button_style . '" style="' . $button_margin_adjust . ' display: block; width: ' . ($read_more_width == 100 ? 'auto' : $read_more_width . '%') . '; float:  ' . ($read_more_align == 'center' ? 'none' : $read_more_align) . '; ' . $google_font_button . '" href="' . $read_more_url . '" target="' . $read_more_target . '">' . $read_more_txt . '</a><div class="clearboth"></div>';
        }
        $output .= '</div>';
        if ($separator_type != '') {
            $output .= '</div>';
        }
        $output .= '</div>';
        $output .= '<div class="clearboth"></div></div>';
    }
    $output .= !empty($animation_box) ? '</div>' : '';
    $output .= '</div>';
    if ($read_more_url != '' && $read_more_link == "box") {
        $output .= '</a>';
    }
    echo $output;
    $myvariable = ob_get_clean();
    return $myvariable;
}
Пример #5
0
function TS_VCSC_Font_Iconbox_Function($atts, $content = null)
{
    global $VISUAL_COMPOSER_EXTENSIONS;
    ob_start();
    if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_LoadFrontEndForcable == "false") {
        wp_enqueue_style('ts-extend-simptip');
        wp_enqueue_style('ts-extend-animations');
        wp_enqueue_style('ts-visual-composer-extend-front');
        wp_enqueue_script('ts-visual-composer-extend-front');
    }
    extract(shortcode_atts(array('style' => 'icon_left', 'title' => '', 'title_size' => '25', 'title_weight' => 'inherit', 'title_color' => '#000000', 'title_align' => 'center', 'title_margin' => 0, 'icon' => '', 'icon_location' => 'left', 'icon_size_slide' => 16, 'icon_margin' => 10, 'icon_color' => '#000000', 'icon_background' => '', 'icon_frame_type' => '', 'icon_frame_thick' => 1, 'icon_frame_radius' => '', 'icon_frame_color' => '#000000', 'icon_replace' => 'false', 'icon_image' => '', 'icon_padding' => 5, 'content_html' => 'false', 'content_text' => '', 'content_text_html' => '', 'content_color' => '#000000', 'content_align' => 'center', 'box_background_type' => 'color', 'box_background_color' => '#ffffff', 'box_background_pattern' => '', 'box_border' => 'true', 'box_border_type' => '', 'box_border_color' => '#000000', 'box_border_thick' => 1, 'box_border_radius' => '', 'read_more_link' => 'false', 'read_more_txt' => '', 'read_more_url' => '', 'read_more_target' => '_parent', 'read_more_style' => 1, 'animations' => 'false', 'animation_effect' => 'ts-hover-css-', 'animation_class' => '', 'animation_box' => '', 'animation_shadow' => '', 'animation_view' => '', 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts));
    $output = $icon_style = $icon_frame_style = $icon_frame_class = $icon_frame_adjust = $box_frame_adjust = $box_frame_style = $animation_css = "";
    $icon_frame_top = $icon_frame_left = $box_margin_left = $box_padding_left = "0px";
    $icon_padding_vertical = $icon_padding;
    $icon_padding_horizontal = $icon_padding;
    if (!empty($el_id)) {
        $icon_box_id = $el_id;
    } else {
        $icon_box_id = 'ts-vcsc-box-icon-' . mt_rand(999999, 9999999);
    }
    if (!empty($icon_image)) {
        $icon_image_path = wp_get_attachment_image_src($icon_image, 'large');
    }
    $icon_style = 'padding: ' . $icon_padding_vertical . 'px ' . $icon_padding_horizontal . 'px; background-color:' . $icon_background . '; width: ' . $icon_size_slide . 'px; height: ' . $icon_size_slide . 'px; font-size: ' . $icon_size_slide . 'px; line-height: ' . $icon_size_slide . 'px;';
    $icon_image_style = 'padding: ' . $icon_padding_vertical . 'px ' . $icon_padding_horizontal . 'px; background-color:' . $icon_background . '; width: ' . $icon_size_slide . 'px; height: ' . $icon_size_slide . 'px; font-size: ' . $icon_size_slide . 'px; line-height: ' . $icon_size_slide . 'px;';
    if ($icon_frame_type != '') {
        $icon_frame_class = 'frame-enabled';
        $icon_frame_style = 'border: ' . $icon_frame_thick . 'px ' . $icon_frame_type . ' ' . $icon_frame_color . ';';
    }
    if ($style == "boxed_left") {
        $style = "boxed";
        $icon_location = "left";
    } else {
        if ($style == "boxed_top") {
            $style = "boxed";
            $icon_location = "top";
        }
    }
    if ($style == "boxed") {
        if ($icon_location == "top") {
            $icon_frame_top = '-' . ($icon_size_slide / 2 + $icon_padding_horizontal + $icon_frame_thick + 5) . 'px';
            $icon_frame_left = '-' . ($icon_size_slide / 2 + $icon_padding_vertical + $icon_frame_thick) . 'px';
            $icon_frame_adjust = 'top:' . $icon_frame_top . '; margin-left:' . $icon_frame_left . ';';
            $box_frame_adjust = '';
            $shadow_frame_adjust = '';
        } else {
            if ($icon_location == "left") {
                $icon_frame_left = '-' . ($icon_size_slide / 2 + $icon_padding_horizontal + $icon_frame_thick + 5) . 'px';
                $icon_frame_top = -$icon_size_slide / 2 - $icon_padding_vertical - $title_margin - $icon_frame_thick . 'px';
                $icon_frame_adjust = 'left:' . $icon_frame_left . '; margin-top:' . $icon_frame_top . ';';
                $box_margin_left = $icon_size_slide / 2 . 'px';
                $box_padding_left = $icon_size_slide / 2 + 30 . 'px';
                $box_frame_adjust = 'margin-left: 0px; padding-left: ' . $box_padding_left . ';';
                $shadow_frame_adjust = 'margin-left: ' . $box_margin_left . '; ';
            }
        }
    }
    if ($box_background_type == "pattern") {
        $box_background_style = 'background: url(' . $box_background_pattern . ') repeat;';
    } else {
        if ($box_background_type == "color") {
            $box_background_style = 'background-color: ' . $box_background_color . ';';
        }
    }
    if ($box_border_type != '') {
        if ($style == "boxed") {
            $box_frame_style = 'border: ' . $box_border_thick . 'px ' . $box_border_type . ' ' . $box_border_color . ';';
        } else {
            $box_frame_style = 'padding: 10px; border: ' . $box_border_thick . 'px ' . $box_border_type . ' ' . $box_border_color . ';';
        }
    }
    if (!empty($animation_class)) {
        $animation_icon = $animation_effect . $animation_class;
    } else {
        $animation_icon = '';
    }
    if ($animation_view != '') {
        $animation_css = TS_VCSC_GetCSSAnimation($animation_view);
    }
    $read_more_button_style = $read_more_style;
    if (function_exists('vc_shortcode_custom_css_class')) {
        $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'ts-vcsc-box-icon ' . $el_class . $animation_css . ' ' . $box_border_radius . ' ' . $style . '-style ts-box-icon ' . vc_shortcode_custom_css_class($css, ' '), 'TS-VCSC-Icon-Box', $atts);
    } else {
        $css_class = 'ts-vcsc-box-icon ' . $el_class . $animation_css . ' ' . $box_border_radius . ' ' . $style . '-style ts-box-icon';
    }
    if (!empty($read_more_url) && $read_more_link == "box") {
        $output .= '<a class="ts-box-icon-link" style="color:' . $title_color . ';" href="' . $read_more_url . '" target="' . $read_more_target . '">';
    }
    $output .= '<div id="' . $icon_box_id . '" class="' . $css_class . '" style="margin-bottom:' . $margin_bottom . 'px; margin-top:' . $margin_top . 'px;">';
    $output .= !empty($animation_box) ? '<div class="ts-hover ' . $animation_box . '">' : '';
    if ($style == "icon_left") {
        $output .= '<div class="ts-css-shadow ' . $animation_shadow . '" style="' . $box_background_style . '">';
        $output .= '<div class="box-detail-wrapper ' . $box_border_radius . '" style="' . $box_frame_style . '">';
        $output .= '<div class="ts-icon-box-title" style="width: 100%;">';
        $output .= '<table border="0" style="border: none !important; border-color: transparent !important;">';
        $output .= '<tr>';
        $output .= '<td>';
        if ($icon_replace == 'false') {
            if (!empty($icon)) {
                $output .= '<span style="width: auto !important;">';
                $output .= '<i class="' . $icon . ' ts-main-ico ts-font-icon ' . $icon_frame_radius . ' ' . $icon_frame_class . ' ' . $animation_icon . '" style="margin-right: ' . $icon_margin . 'px; color:' . $icon_color . ';' . $icon_style . ' ' . $icon_frame_style . '"></i>';
                $output .= '</span>';
            }
        } else {
            if (!empty($icon_image)) {
                $output .= '<span style="width: auto !important;">';
                $output .= '<img class="ts-main-ico ts-font-icon ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '" src="' . $icon_image_path[0] . '" style="margin-right: ' . $icon_margin . 'px; ' . $icon_frame_style . ' ' . $icon_image_style . ' display: inline-block !important; margin-right: ' . $icon_margin . 'px;">';
                $output .= '</span>';
            }
        }
        $output .= '</td>';
        $output .= '<td>';
        $output .= '<span class="ts-box-icon-title" style="width: auto !important; color:' . $title_color . '; font-size:' . $title_size . 'px; font-weight:' . $title_weight . '; text-align:' . $title_align . ';">' . $title . '</span>';
        $output .= '</td>';
        $output .= '</tr>';
        $output .= '</table>';
        $output .= '</div>';
        if ($content_html == "true") {
            $output .= '<div class="ts-icon-box-content" style="color: ' . $content_color . '; text-align: ' . $content_align . ';">' . rawurldecode(base64_decode(strip_tags($content_text_html))) . '</div>';
        } else {
            $output .= '<div class="ts-icon-box-content" style="color: ' . $content_color . '; text-align: ' . $content_align . ';">' . strip_tags($content_text) . '</div>';
        }
        if ($read_more_txt && $read_more_link == "button") {
            $output .= '<div class="clearboth"></div><a class="ts-icon-box-readmore style' . $read_more_button_style . '" href="' . $read_more_url . '" target="' . $read_more_target . '">' . $read_more_txt . '</a>';
        }
        $output .= '</div>';
        $output .= '<div class="clearboth"></div></div>';
    } else {
        if ($style == "icon_top") {
            $output .= '<div class="ts-css-shadow ' . $animation_shadow . ' ' . $box_border_radius . '" style="' . $box_background_style . '">';
            $output .= '<div class="top-side ' . $animation_css . ' ' . $box_border_radius . '" style="' . $box_frame_style . '">';
            if ($icon_replace == 'false') {
                if (!empty($icon)) {
                    $output .= '<i style="margin-bottom: ' . $icon_margin . 'px; color:' . $icon_color . ';' . $icon_style . ' ' . $icon_frame_style . ' display: inline-block !important" class="' . $icon . ' ts-main-ico ts-font-icon ' . $icon_frame_class . ' ' . $animation_icon . $icon_frame_radius . '"></i>';
                }
            } else {
                if (!empty($icon_image)) {
                    $output .= '<img class="ts-main-ico ts-font-icon ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '" src="' . $icon_image_path[0] . '" style="margin-bottom: ' . $icon_margin . 'px; ' . $icon_frame_style . ' ' . $icon_image_style . ' display: inline-block !important; margin-right: ' . $icon_margin . 'px;">';
                }
            }
            $output .= '<div class="box-detail-wrapper">';
            $output .= '<span class="ts-box-icon-title" style="width: auto !important; color:' . $title_color . '; font-size:' . $title_size . 'px; font-weight:' . $title_weight . '; text-align:' . $title_align . ';">' . $title . '</span>';
            if ($content_html == "true") {
                $output .= '<div class="ts-icon-box-content" style="color: ' . $content_color . '; text-align: ' . $content_align . ';">' . rawurldecode(base64_decode(strip_tags($content_text_html))) . '</div>';
            } else {
                $output .= '<div class="ts-icon-box-content" style="color: ' . $content_color . '; text-align: ' . $content_align . ';">' . strip_tags($content_text) . '</div>';
            }
            if ($read_more_txt && $read_more_link == "button") {
                $output .= '<div class="clearboth"></div><a class="ts-icon-box-readmore style' . $read_more_button_style . '" href="' . $read_more_url . '" target="' . $read_more_target . '">' . $read_more_txt . '</a>';
            }
            $output .= '</div>';
            $output .= '</div><div class="clearboth"></div></div>';
        } else {
            if ($style == "boxed") {
                $output .= '<div class="ts-css-shadow ' . $animation_shadow . ' ' . $box_border_radius . '" style="background-color: ' . $box_background_color . '; ' . $shadow_frame_adjust . '">';
                $output .= '<div class="ts-icon-box-boxed  ' . $icon_location . $animation_css . ' ' . $box_border_radius . '" style="' . $box_frame_style . ' ' . $box_frame_adjust . ' ' . $box_background_style . '">';
                if ($icon_replace == 'false') {
                    if (!empty($icon)) {
                        $output .= '<i style="' . $icon_style . ' ' . $icon_frame_style . ' ' . $icon_frame_adjust . ' color: ' . $icon_color . ';" class="' . $icon . ' ts-main-ico ts-font-icon ' . $icon_frame_radius . ' ' . $icon_frame_class . ' ' . $animation_icon . '"></i>';
                    }
                } else {
                    if (!empty($icon_image)) {
                        $output .= '<img class="ts-main-ico ts-font-icon ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '" src="' . $icon_image_path[0] . '" style="' . $icon_frame_style . ' ' . $icon_image_style . ' ' . $icon_frame_adjust . ' display: inline-block !important; margin-right: ' . $icon_margin . 'px;">';
                    }
                }
                $output .= '<div class="ts-box-icon-title" style="color:' . $title_color . '; font-size:' . $title_size . 'px; font-weight:' . $title_weight . '; margin-top:' . $title_margin . 'px; text-align:' . $title_align . ';">' . $title . '</div>';
                if ($content_html == "true") {
                    $output .= '<div class="ts-icon-box-content" style="color: ' . $content_color . '; text-align: ' . $content_align . ';">' . rawurldecode(base64_decode(strip_tags($content_text_html))) . '</div>';
                } else {
                    $output .= '<div class="ts-icon-box-content" style="color: ' . $content_color . '; text-align: ' . $content_align . ';">' . strip_tags($content_text) . '</div>';
                }
                if ($read_more_txt && $read_more_link == "button") {
                    $output .= '<div class="clearboth"></div><a class="ts-icon-box-readmore style' . $read_more_button_style . '" href="' . $read_more_url . '" target="' . $read_more_target . '">' . $read_more_txt . '</a>';
                }
                $output .= '</div>';
                $output .= '<div class="clearboth"></div></div>';
            }
        }
    }
    $output .= !empty($animation_box) ? '</div>' : '';
    $output .= '</div>';
    if (!empty($read_more_url) && $read_more_link == "box") {
        $output .= '</a>';
    }
    echo $output;
    $myvariable = ob_get_clean();
    return $myvariable;
}
 function TS_VCSC_Team_Mates_Standalone($atts, $content = null)
 {
     global $VISUAL_COMPOSER_EXTENSIONS;
     ob_start();
     wp_enqueue_script('ts-extend-hammer');
     wp_enqueue_script('ts-extend-nacho');
     wp_enqueue_style('ts-extend-nacho');
     wp_enqueue_style('ts-font-teammates');
     if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_LoadFrontEndForcable == "false") {
         wp_enqueue_style('ts-extend-simptip');
         wp_enqueue_style('ts-extend-animations');
         wp_enqueue_style('ts-visual-composer-extend-front');
         wp_enqueue_script('ts-visual-composer-extend-front');
     }
     extract(shortcode_atts(array('team_member' => '', 'custompost_name' => '', 'style' => 'style1', 'show_image' => 'true', 'image_style' => 'imagestyle1', 'show_grayscale' => 'true', 'grayscale_hover' => 'true', 'show_effects' => 'true', 'show_lightbox' => 'true', 'link_image' => 'false', 'show_title' => 'true', 'show_content' => 'true', 'show_dedicated' => 'false', 'show_download' => 'true', 'show_contact' => 'true', 'show_opening' => 'true', 'show_social' => 'true', 'show_skills' => 'true', 'bar_tooltip' => 'true', 'icon_style' => 'simple', 'icon_color' => '#000000', 'icon_background' => '#f5f5f5', 'icon_frame_color' => '#f5f5f5', 'icon_frame_thick' => 1, 'icon_margin' => 5, 'icon_align' => 'left', 'icon_hover' => '', 'tooltip_style' => '', 'tooltip_position' => 'ts-simptip-position-top', 'animation_view' => '', 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts));
     $output = '';
     // Check for Teammate and End Shortcode if Empty
     if (empty($team_member)) {
         $output .= '<div style="text-align: justify; font-weight: bold; font-size: 14px; color: red;">Please select a teammate in the element settings!</div>';
         echo $output;
         $myvariable = ob_get_clean();
         return $myvariable;
     }
     if (!empty($el_id)) {
         $team_block_id = $el_id;
     } else {
         $team_block_id = 'ts-vcsc-meet-team-' . mt_rand(999999, 9999999);
     }
     if ($animation_view != '') {
         $animation_css = TS_VCSC_GetCSSAnimation($animation_view);
     } else {
         $animation_css = '';
     }
     $team_tooltipclasses = "ts-simptip-multiline " . $tooltip_style . " " . $tooltip_position;
     if (empty($icon_background) || $icon_style == 'simple') {
         $icon_frame_style = '';
     } else {
         $icon_frame_style = 'background: ' . $icon_background . ';';
     }
     if ($icon_frame_thick > 0) {
         $icon_top_adjust = 'top: ' . (10 - $icon_frame_thick) . 'px;';
     } else {
         $icon_top_adjust = '';
     }
     if ($icon_style == 'simple') {
         $icon_frame_border = '';
     } else {
         $icon_frame_border = ' border: ' . $icon_frame_thick . 'px solid ' . $icon_frame_color . ';';
     }
     $icon_horizontal_adjust = '';
     $team_social = '';
     // Retrieve Team Post Main Content
     $team_array = array();
     $category_fields = array();
     $args = array('no_found_rows' => 1, 'ignore_sticky_posts' => 1, 'posts_per_page' => -1, 'post_type' => 'ts_team', 'post_status' => 'publish', 'orderby' => 'title', 'order' => 'ASC');
     $team_query = new WP_Query($args);
     if ($team_query->have_posts()) {
         foreach ($team_query->posts as $p) {
             if ($p->ID == $team_member) {
                 $team_data = array('author' => $p->post_author, 'name' => $p->post_name, 'title' => $p->post_title, 'id' => $p->ID, 'content' => $p->post_content);
                 $team_array[] = $team_data;
             }
         }
     }
     wp_reset_postdata();
     // Build Team Post Main Content
     foreach ($team_array as $index => $array) {
         $Team_Author = $team_array[$index]['author'];
         $Team_Name = $team_array[$index]['name'];
         $Team_Title = $team_array[$index]['title'];
         $Team_ID = $team_array[$index]['id'];
         $Team_Content = $team_array[$index]['content'];
         $Team_Image = wp_get_attachment_image_src(get_post_thumbnail_id($Team_ID), 'full');
         if ($Team_Image == false) {
             $Team_Image = TS_VCSC_GetResourceURL('images/defaults/default_person.jpg');
         } else {
             $Team_Image = $Team_Image[0];
         }
     }
     // Retrieve Team Post Meta Content
     $custom_fields = get_post_custom($Team_ID);
     $custom_fields_array = array();
     foreach ($custom_fields as $field_key => $field_values) {
         if (!isset($field_values[0])) {
             continue;
         }
         if (in_array($field_key, array("_edit_lock", "_edit_last"))) {
             continue;
         }
         if (strpos($field_key, 'ts_vcsc_team_') !== false) {
             $field_key_split = explode("_", $field_key);
             $field_key_length = count($field_key_split) - 1;
             $custom_data = array('group' => $field_key_split[$field_key_length - 1], 'name' => 'Team_' . ucfirst($field_key_split[$field_key_length]), 'value' => $field_values[0]);
             $custom_fields_array[] = $custom_data;
         }
     }
     foreach ($custom_fields_array as $index => $array) {
         ${$custom_fields_array[$index]['name']} = $custom_fields_array[$index]['value'];
     }
     if (isset($Team_Position)) {
         $Team_Position = $Team_Position;
     } else {
         $Team_Position = '';
     }
     if (isset($Team_Buttonlabel)) {
         $Team_Buttonlabel = $Team_Buttonlabel;
     } else {
         $Team_Buttonlabel = '';
     }
     // Build Dedicated Page Link
     $team_dedicated = '';
     if ($show_dedicated == "true") {
         if (isset($Team_Dedicatedpage) && ($Team_Dedicatedpage != -1 || $Team_Dedicatedpage == "external" && isset($Team_Dedicatedlink))) {
             if ($Team_Dedicatedpage == "external") {
                 $Team_Dedicatedpage = $Team_Dedicatedlink;
             } else {
                 $Team_Dedicatedpage = get_page_link($Team_Dedicatedpage);
             }
             if (isset($Team_Dedicatedtarget)) {
                 $team_dedicated_target = '_blank';
             } else {
                 $team_dedicated_target = '_parent';
             }
             $team_dedicated .= '<div class="ts-teammate-dedicated">';
             if (isset($Team_Dedicatedtooltip)) {
                 if (isset($Team_Dedicatedicon) && $Team_Dedicatedicon == "none" || !isset($Team_Dedicatedicon)) {
                     $team_dedicated .= '<a class="ts-teammate-page-link ts-button ' . $Team_Dedicatedtype . ' ' . $team_tooltipclasses . '" data-tstooltip="' . $Team_Dedicatedtooltip . '" href="' . TS_VCSC_makeValidURL($Team_Dedicatedpage) . '" target="' . $team_dedicated_target . '">' . $Team_Dedicatedlabel . '</a>';
                 } else {
                     $team_dedicated .= '<a class="ts-teammate-page-link ts-button ' . $Team_Dedicatedtype . ' ' . $team_tooltipclasses . '" data-tstooltip="' . $Team_Dedicatedtooltip . '" href="' . TS_VCSC_makeValidURL($Team_Dedicatedpage) . '" target="' . $team_dedicated_target . '"><i class="ts-teamicon-' . $Team_Dedicatedicon . ' ts-font-icon ts-teammate-icon" style="' . (isset($Team_Dedicatedcolor) ? "color: " . $Team_Dedicatedcolor . ":" : "") . '"></i> ' . $Team_Dedicatedlabel . '</a>';
                 }
             } else {
                 if (isset($Team_Dedicatedicon) && $Team_Dedicatedicon == "none" || !isset($Team_Dedicatedicon)) {
                     $team_dedicated .= '<a class="ts-teammate-page-link ts-button ' . $Team_Dedicatedtype . '" href="' . TS_VCSC_makeValidURL($Team_Dedicatedpage) . '" target="' . $team_dedicated_target . '">' . $Team_Dedicatedlabel . '</a>';
                 } else {
                     $team_dedicated .= '<a class="ts-teammate-page-link ts-button ' . $Team_Dedicatedtype . '" href="' . TS_VCSC_makeValidURL($Team_Dedicatedpage) . '" target="' . $team_dedicated_target . '"><i class="ts-teamicon-' . $Team_Dedicatedicon . ' ts-font-icon ts-teammate-icon" style="' . (isset($Team_Dedicatedcolor) ? "color: " . $Team_Dedicatedcolor . ";" : "") . '"></i> ' . $Team_Dedicatedlabel . '</a>';
                 }
             }
             $team_dedicated .= '</div>';
             if (get_option('ts_vcsc_extend_settings_loadForcable', 0) == 0) {
                 wp_enqueue_style('ts-extend-buttons', TS_VCSC_GetResourceURL('css/jquery.buttons.css'), null, false, 'all');
             }
         }
     } else {
         if ($show_lightbox == "false" && $link_image == "true") {
             if (isset($Team_Dedicatedpage) && $Team_Dedicatedpage != -1) {
                 $Team_Dedicatedpage = get_page_link($Team_Dedicatedpage);
                 if (isset($Team_Dedicatedtarget)) {
                     $team_dedicated_target = '_blank';
                 } else {
                     $team_dedicated_target = '_parent';
                 }
             }
         }
     }
     // Build Team Contact Information
     $team_contact = '';
     $team_contact_count = 0;
     if ($show_contact == "true") {
         $team_contact .= '<div class="ts-team-contact">';
         if (isset($Team_Email)) {
             $team_contact_count++;
             if (isset($Team_Emaillabel)) {
                 $team_contact .= '<div class="ts-contact-parent"><i class="ts-teamicon-email3 ts-font-icon ts-teammate-icon" style="color: ' . $icon_color . ';"></i><a target="_blank" class="" href="mailto:' . $Team_Email . '">' . $Team_Emaillabel . '</a></div>';
             } else {
                 $team_contact .= '<div class="ts-contact-parent"><i class="ts-teamicon-email3 ts-font-icon ts-teammate-icon" style="color: ' . $icon_color . ';"></i><a target="_blank" class="" href="mailto:' . $Team_Email . '">' . $Team_Email . '</a></div>';
             }
         }
         if (isset($Team_Phone)) {
             $team_contact_count++;
             $team_contact .= '<div class="ts-contact-parent"><i class="ts-teamicon-phone2 ts-font-icon ts-teammate-icon" style="color: ' . $icon_color . ';"></i>' . $Team_Phone . '</div>';
         }
         if (isset($Team_Cell)) {
             $team_contact_count++;
             $team_contact .= '<div class="ts-contact-parent"><i class="ts-teamicon-mobile ts-font-icon ts-teammate-icon" style="color: ' . $icon_color . ';"></i>' . $Team_Cell . '</div>';
         }
         if (isset($Team_Portfolio)) {
             $team_contact_count++;
             if (isset($Team_Portfoliolabel)) {
                 $team_contact .= '<div class="ts-contact-parent"><i class="ts-teamicon-portfolio ts-font-icon ts-teammate-icon" style="color: ' . $icon_color . ';"></i><a style="" target="_blank" class="" href="' . TS_VCSC_makeValidURL($Team_Portfolio) . '">' . $Team_Portfoliolabel . '</a></div>';
             } else {
                 $team_contact .= '<div class="ts-contact-parent"><i class="ts-teamicon-portfolio ts-font-icon ts-teammate-icon" style="color: ' . $icon_color . ';"></i><a style="" target="_blank" class="" href="' . TS_VCSC_makeValidURL($Team_Portfolio) . '">' . TS_VCSC_makeValidURL($Team_Portfolio) . '</a></div>';
             }
         }
         if (isset($Team_Other)) {
             $team_contact_count++;
             if (isset($Team_Otherlabel)) {
                 $team_contact .= '<div class="ts-contact-parent"><i class="ts-teamicon-link ts-font-icon ts-teammate-icon" style="color: ' . $icon_color . ';"></i><a style="" target="_blank" class="" href="' . TS_VCSC_makeValidURL($Team_Other) . '">' . $Team_Otherlabel . '</a></div>';
             } else {
                 $team_contact .= '<div class="ts-contact-parent"><i class="ts-teamicon-link ts-font-icon ts-teammate-icon" style="color: ' . $icon_color . ';"></i><a style="" target="_blank" class="" href="' . TS_VCSC_makeValidURL($Team_Other) . '">' . TS_VCSC_makeValidURL($Team_Other) . '</a></div>';
             }
         }
         if (isset($Team_Skype)) {
             $team_contact_count++;
             $team_contact .= '<div class="ts-contact-parent"><i class="ts-teamicon-skype ts-font-icon ts-teammate-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i>' . $Team_Skype . '</div>';
         }
         $team_contact .= '</div>';
     }
     // Build Opening / Contact Hours
     $team_opening = '';
     $team_opening_count = 0;
     if ($show_opening == "true") {
         $team_opening .= '<div class="ts-team-opening-parent">';
         if (isset($Team_Header)) {
             if ($Team_Symbol == "none") {
                 $team_opening .= '<div class="ts-team-opening-header">' . $Team_Header . '</div>';
             } else {
                 $team_opening .= '<div class="ts-team-opening-header"><i class="ts-teamicon-' . $Team_Symbol . ' ts-font-icon ts-teammate-icon" style="' . (isset($Team_Symbolcolor) ? "color: " . $Team_Symbolcolor . ";" : "") . '"></i>' . $Team_Header . '</div>';
             }
         }
         if (isset($Team_Opening) && $Team_Opening != 'block') {
             $team_opening_count++;
             $team_opening .= '<div class="ts-team-opening-block">' . $Team_Opening . '</div>';
         }
         $team_opening .= '</div>';
     }
     // Build Team Social Links
     $team_social = '';
     $team_social_count = 0;
     if ($show_social == "true") {
         $team_social .= '<ul class="ts-teammate-icons ' . $icon_style . ' clearFixMe">';
         if (isset($Team_Facebook)) {
             $team_social_count++;
             $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Facebook"><a style="" target="_blank" class="ts-teammate-link facebook ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Facebook) . '"><i class="ts-teamicon-facebook1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
         }
         if (isset($Team_Google)) {
             $team_social_count++;
             $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Google+"><a style="" target="_blank" class="ts-teammate-link gplus ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Google) . '"><i class="ts-teamicon-googleplus1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
         }
         if (isset($Team_Twitter)) {
             $team_social_count++;
             $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Twitter"><a style="" target="_blank" class="ts-teammate-link twitter ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Twitter) . '"><i class="ts-teamicon-twitter1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
         }
         if (isset($Team_Linkedin)) {
             $team_social_count++;
             $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="LinkedIn"><a style="" target="_blank" class="ts-teammate-link linkedin ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Linkedin) . '"><i class="ts-teamicon-linkedin ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
         }
         if (isset($Team_Xing)) {
             $team_social_count++;
             $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Xing"><a style="" target="_blank" class="ts-teammate-link xing ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Xing) . '"><i class="ts-teamicon-xing3 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
         }
         if (isset($Team_Envato)) {
             $team_social_count++;
             $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Envato"><a style="" target="_blank" class="ts-teammate-link envato ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Envato) . '"><i class="ts-teamicon-envato ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
         }
         if (isset($Team_Rss)) {
             $team_social_count++;
             $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="RSS"><a style="" target="_blank" class="ts-teammate-link rss ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Rss) . '"><i class="ts-teamicon-rss1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
         }
         if (isset($Team_Forrst)) {
             $team_social_count++;
             $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Forrst"><a style="" target="_blank" class="ts-teammate-link forrst ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Forrst) . '"><i class="ts-teamicon-forrst1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
         }
         if (isset($Team_Flickr)) {
             $team_social_count++;
             $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Flickr"><a style="" target="_blank" class="ts-teammate-link flickr ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Flickr) . '"><i class="ts-teamicon-flickr3 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
         }
         if (isset($Team_Instagram)) {
             $team_social_count++;
             $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Instagram"><a style="" target="_blank" class="ts-teammate-link instagram ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Instagram) . '"><i class="ts-teamicon-instagram ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
         }
         if (isset($Team_Picasa)) {
             $team_social_count++;
             $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Picasa"><a style="" target="_blank" class="ts-teammate-link picasa ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Picasa) . '"><i class="ts-teamicon-picasa1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
         }
         if (isset($Team_Pinterest)) {
             $team_social_count++;
             $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Pinterest"><a style="" target="_blank" class="ts-teammate-link pinterest ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Pinterest) . '"><i class="ts-teamicon-pinterest1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
         }
         if (isset($Team_Vimeo)) {
             $team_social_count++;
             $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Vimeo"><a style="" target="_blank" class="ts-teammate-link vimeo ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Vimeo) . '"><i class="ts-teamicon-vimeo1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
         }
         if (isset($Team_Youtube)) {
             $team_social_count++;
             $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="YouTube"><a style="" target="_blank" class="ts-teammate-link youtube ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Youtube) . '"><i class="ts-teamicon-youtube1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
         }
         $team_social .= '</ul>';
     }
     // Build Team Skills
     $team_skills = '';
     $team_skills_count = 0;
     if (isset($Team_Skillset) && $show_skills == "true") {
         $skill_entries = get_post_meta($Team_ID, 'ts_vcsc_team_skills_skillset', true);
         $skill_background = '';
         $team_skills .= '<div class="ts-teammate-member-skills">';
         foreach ((array) $skill_entries as $key => $entry) {
             $skill_name = $skill_value = $skill_color = '';
             if (isset($entry['skillname'])) {
                 $skill_name = esc_html($entry['skillname']);
             }
             if (isset($entry['skillvalue'])) {
                 $skill_value = esc_html($entry['skillvalue']);
             }
             if (isset($entry['skillcolor'])) {
                 $skill_color = esc_html($entry['skillcolor']);
             }
             if (strlen($skill_name) != 0 && strlen($skill_value) != 0) {
                 $team_skills_count++;
                 if (strlen($skill_color) != 0 && $skill_color != '#') {
                     $skill_background = 'background-color: ' . $skill_color . ';';
                 }
                 $team_skills .= '<div class="ts-skillbars-style1-wrapper clearfix">';
                 $team_skills .= '<div class="ts-skillbars-style1-name">' . $skill_name . '';
                 if ($bar_tooltip == "false") {
                     $team_skills .= '<span>(' . $skill_value . '%)</span>';
                 }
                 $team_skills .= '</div>';
                 $team_skills .= '<div class="ts-skillbars-style1-skillbar" style="height: 5px; margin-bottom: 10px;"><div class="ts-skillbars-style1-value" data-color="' . $skill_color . '" data-level="' . $skill_value . '%" style="width: ' . $skill_value . '%; ' . $skill_background . '">';
                 if ($bar_tooltip == "true") {
                     $team_skills .= '<span class="ts-skillbars-style1-tooltip" style="padding: 2px 4px; font-size: 10px;">' . $skill_value . '%</span>';
                 }
                 $team_skills .= '</div></div>';
                 $team_skills .= '</div>';
             }
         }
         $team_skills .= '</div>';
     } else {
         if (!isset($Team_Skillset) && $show_skills == "true") {
             $skill_background = '';
             $team_skills .= '<div class="ts-teammate-member-skills">';
             if (isset($Team_Skillname1) && isset($Team_Skillvalue1)) {
                 $team_skills_count++;
                 if (isset($Team_Skillcolor1)) {
                     $skill_background = 'background-color: ' . $Team_Skillcolor1 . ';';
                 }
                 $team_skills .= '<div class="ts-skillbars-style1-name">' . $Team_Skillname1 . '<span>(' . $Team_Skillvalue1 . '%)</span></div><div class="ts-skillbars-style1-skillbar" style="height: 5px;"><div class="ts-skillbars-style1-value" data-color="' . $Team_Skillcolor1 . '" data-level="' . $Team_Skillvalue1 . '%" style="width: ' . $Team_Skillvalue1 . '%; ' . $skill_background . '"></div></div>';
             }
             if (isset($Team_Skillname2) && isset($Team_Skillvalue2)) {
                 $team_skills_count++;
                 if (isset($Team_Skillcolor2)) {
                     $skill_background = 'background-color: ' . $Team_Skillcolor2 . ';';
                 }
                 $team_skills .= '<div class="ts-skillbars-style1-name">' . $Team_Skillname2 . '<span>(' . $Team_Skillvalue2 . '%)</span></div><div class="ts-skillbars-style1-skillbar" style="height: 5px;"><div class="ts-skillbars-style1-value" data-color="' . $Team_Skillcolor2 . '" data-level="' . $Team_Skillvalue2 . '%" style="width: ' . $Team_Skillvalue2 . '%; ' . $skill_background . '"></div></div>';
             }
             if (isset($Team_Skillname3) && isset($Team_Skillvalue3)) {
                 $team_skills_count++;
                 if (isset($Team_Skillcolor3)) {
                     $skill_background = 'background-color: ' . $Team_Skillcolor3 . ';';
                 }
                 $team_skills .= '<div class="ts-skillbars-style1-name">' . $Team_Skillname3 . '<span>(' . $Team_Skillvalue3 . '%)</span></div><div class="ts-skillbars-style1-skillbar" style="height: 5px;"><div class="ts-skillbars-style1-value" data-color="' . $Team_Skillcolor3 . '" data-level="' . $Team_Skillvalue3 . '%" style="width: ' . $Team_Skillvalue3 . '%; ' . $skill_background . '"></div></div>';
             }
             if (isset($Team_Skillname4) && isset($Team_Skillvalue4)) {
                 $team_skills_count++;
                 if (isset($Team_Skillcolor4)) {
                     $skill_background = 'background-color: ' . $Team_Skillcolor4 . ';';
                 }
                 $team_skills .= '<div class="ts-skillbars-style1-name">' . $Team_Skillname4 . '<span>(' . $Team_Skillvalue4 . '%)</span></div><div class="ts-skillbars-style1-skillbar" style="height: 5px;"><div class="ts-skillbars-style1-value" data-color="' . $Team_Skillcolor4 . '" data-level="' . $Team_Skillvalue4 . '%" style="width: ' . $Team_Skillvalue4 . '%; ' . $skill_background . '"></div></div>';
             }
             if (isset($Team_Skillname5) && isset($Team_Skillvalue5)) {
                 $team_skills_count++;
                 if (isset($Team_Skillcolor5)) {
                     $skill_background = 'background-color: ' . $Team_Skillcolor5 . ';';
                 }
                 $team_skills .= '<div class="ts-skillbars-style1-name">' . $Team_Skillname5 . '<span>(' . $Team_Skillvalue5 . '%)</span></div><div class="ts-skillbars-style1-skillbar" style="height: 5px;"><div class="ts-skillbars-style1-value" data-color="' . $Team_Skillcolor5 . '" data-level="' . $Team_Skillvalue5 . '%" style="width: ' . $Team_Skillvalue5 . '%; ' . $skill_background . '"></div></div>';
             }
             if (isset($Team_Skillname6) && isset($Team_Skillvalue6)) {
                 $team_skills_count++;
                 if (isset($Team_Skillcolor6)) {
                     $skill_background = 'background-color: ' . $Team_Skillcolor6 . ';';
                 }
                 $team_skills .= '<div class="ts-skillbars-style1-name">' . $Team_Skillname6 . '<span>(' . $Team_Skillvalue6 . '%)</span></div><div class="ts-skillbars-style1-skillbar" style="height: 5px;"><div class="ts-skillbars-style1-value" data-color="' . $Team_Skillcolor6 . '" data-level="' . $Team_Skillvalue6 . '%" style="width: ' . $Team_Skillvalue6 . '%; ' . $skill_background . '"></div></div>';
             }
             $team_skills .= '</div>';
         }
     }
     // Build Download Button
     $team_download = '';
     if ($show_download == "true") {
         if (isset($Team_Buttonfile) || isset($Team_Attachment)) {
             if (isset($Team_Buttonfile)) {
                 $Team_File = $Team_Buttonfile;
             } else {
                 $Team_Attachment = get_post_meta($Team_ID, 'ts_vcsc_team_basic_attachment', true);
                 $Team_Attachment = wp_get_attachment_url($Team_Attachment['id']);
                 $Team_File = $Team_Attachment;
             }
             $Team_FileFormat = pathinfo($Team_File, PATHINFO_EXTENSION);
             if (isset($Team_Buttontype)) {
                 $Team_Buttontype = $Team_Buttontype;
             } else {
                 $Team_Buttontype = 'ts-button-3d';
             }
             if (!empty($Team_File)) {
                 $team_download .= '<div class="ts-teammate-download">';
                 if (isset($Team_Buttontooltip)) {
                     if (isset($Team_Buttonicon) && $Team_Buttonicon == "none" || !isset($Team_Buttonicon)) {
                         $team_download .= '<a class="ts-teammate-file-link ts-button ' . $Team_Buttontype . ' ' . $team_tooltipclasses . '" data-format="' . $Team_FileFormat . '" data-tstooltip="' . $Team_Buttontooltip . '" href="' . $Team_File . '" target="_blank">' . $Team_Buttonlabel . '</a>';
                     } else {
                         $team_download .= '<a class="ts-teammate-file-link ts-button ' . $Team_Buttontype . ' ' . $team_tooltipclasses . '" data-format="' . $Team_FileFormat . '" data-tstooltip="' . $Team_Buttontooltip . '" href="' . $Team_File . '" target="_blank"><i class="ts-teamicon-' . $Team_Buttonicon . ' ts-font-icon ts-teammate-icon" style="' . (isset($Team_Buttoncolor) ? "color: " . $Team_Buttoncolor . ":" : "") . '"></i> ' . $Team_Buttonlabel . '</a>';
                     }
                 } else {
                     if (isset($Team_Buttonicon) && $Team_Buttonicon == "none" || !isset($Team_Buttonicon)) {
                         $team_download .= '<a class="ts-teammate-file-link ts-button ' . $Team_Buttontype . '" data-format="' . $Team_FileFormat . '" href="' . $Team_File . '" target="_blank">' . $Team_Buttonlabel . '</a>';
                     } else {
                         $team_download .= '<a class="ts-teammate-file-link ts-button ' . $Team_Buttontype . '" data-format="' . $Team_FileFormat . '" href="' . $Team_File . '" target="_blank"><i class="ts-teamicon-' . $Team_Buttonicon . ' ts-font-icon ts-teammate-icon" style="' . (isset($Team_Buttoncolor) ? "color: " . $Team_Buttoncolor . ";" : "") . '"></i> ' . $Team_Buttonlabel . '</a>';
                     }
                 }
                 $team_download .= '</div>';
                 if (get_option('ts_vcsc_extend_settings_loadForcable', 0) == 0) {
                     wp_enqueue_style('ts-extend-buttons', TS_VCSC_GetResourceURL('css/jquery.buttons.css'), null, false, 'all');
                 }
             }
         }
     }
     if (function_exists('vc_shortcode_custom_css_class')) {
         $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'ts-teammate ' . $animation_css . ' ' . $el_class . ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS_VCSC_Team_Mates_Standalone', $atts);
     } else {
         $css_class = 'ts-teammate ' . $animation_css . ' ' . $el_class;
     }
     // Grayscale Class
     if ($show_grayscale == "true" && $grayscale_hover == "true") {
         $grayscale_class = 'ts-grayscale-hover';
     } else {
         if ($show_grayscale == "true" && $grayscale_hover == "false") {
             $grayscale_class = 'ts-grayscale-default';
         } else {
             $grayscale_class = 'ts-grayscale-none';
         }
     }
     // Create Output
     if ($style == "style1") {
         $output .= '<div id="' . $team_block_id . '" class="ts-team1 ' . $css_class . ' ' . $grayscale_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">';
         if ($show_image == "true" && !empty($Team_Image)) {
             $output .= '<div class="team-avatar">';
             if ($show_lightbox == "false" && $link_image == "true" && isset($Team_Dedicatedpage) && $Team_Dedicatedpage != -1) {
                 $output .= '<a class="ts-team-image-link" href="' . $Team_Dedicatedpage . '" target="' . $team_dedicated_target . '">';
             }
             $output .= '<img src="' . $Team_Image . '" rel="' . ($show_lightbox == "true" ? "nachoteam" : "") . '" title="' . $Team_Title . ' / ' . $Team_Position . '" alt="" class="' . $image_style . ' ' . ($show_lightbox == "true" ? "nch-lightbox" : "") . ' ' . ($show_grayscale == "true" ? "grayscale" : "") . ' ' . ($show_effects == "true" ? "hovereffect" : "") . '">';
             if ($show_lightbox == "false" && $link_image == "true" && isset($Team_Dedicatedpage) && $Team_Dedicatedpage != -1) {
                 $output .= '</a>';
             }
             $output .= '</div>';
         }
         $output .= '<div class="team-user">';
         if ($show_title == "true" && !empty($Team_Title)) {
             $output .= '<h4 class="team-title">' . $Team_Title . '</h4>';
         }
         if ($show_title == "true" && !empty($Team_Position)) {
             $output .= '<div class="team-job">' . $Team_Position . '</div>';
         }
         $output .= $team_dedicated;
         $output .= $team_download;
         $output .= '</div>';
         if ($show_content == "true" && !empty($Team_Content)) {
             $output .= '<div class="team-information">';
             if (function_exists('wpb_js_remove_wpautop')) {
                 $output .= '' . wpb_js_remove_wpautop(do_shortcode($Team_Content), true) . '';
             } else {
                 $output .= '' . do_shortcode($Team_Content) . '';
             }
             $output .= '</div>';
         }
         if ($team_contact_count > 0) {
             $output .= $team_contact;
         }
         if ($team_social_count > 0) {
             $output .= $team_social;
         }
         if ($team_opening_count > 0) {
             $output .= $team_opening;
         }
         if ($team_skills_count > 0) {
             $output .= $team_skills;
         }
         $output .= '</div>';
     }
     if ($style == "style2") {
         $output .= '<div id="' . $team_block_id . '" class="ts-team2 ' . $css_class . ' ' . $grayscale_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">';
         $output .= '<div style="width: 25%; float: left;">';
         if ($show_image == "true" && !empty($Team_Image)) {
             $output .= '<div class="ts-team2-header">';
             if ($show_lightbox == "false" && $link_image == "true" && isset($Team_Dedicatedpage) && $Team_Dedicatedpage != -1) {
                 $output .= '<a class="ts-team-image-link" href="' . $Team_Dedicatedpage . '" target="' . $team_dedicated_target . '">';
             }
             $output .= '<img src="' . $Team_Image . '" rel="' . ($show_lightbox == "true" ? "nachoteam" : "") . '" title="' . $Team_Title . ' / ' . $Team_Position . '" alt="" class="' . $image_style . ' ' . ($show_lightbox == "true" ? "nch-lightbox" : "") . ' ' . ($show_grayscale == "true" ? "grayscale" : "") . ' ' . ($show_effects == "true" ? "hovereffect" : "") . '">';
             if ($show_lightbox == "false" && $link_image == "true" && isset($Team_Dedicatedpage) && $Team_Dedicatedpage != -1) {
                 $output .= '</a>';
             }
             $output .= '</div>';
         }
         if ($team_social_count > 0) {
             $output .= '<div class="ts-team2-footer" style="' . ($show_image == "false" ? "margin-top: 0px;" : "") . '">';
             $output .= $team_social;
             $output .= '</div>';
         }
         $output .= '</div>';
         if ($show_image == "true" || $team_social_count > 0) {
             $output .= '<div class="ts-team2-content" style="">';
         } else {
             $output .= '<div class="ts-team2-content" style="width: 100%; margin-left: 0px;">';
         }
         $output .= '<div class="ts-team2-line"></div>';
         if ($show_title == "true" && !empty($Team_Title)) {
             $output .= '<h3>' . $Team_Title . '</h3>';
         }
         if ($show_title == "true" && !empty($Team_Position)) {
             $output .= '<p class="ts-team2-lead">' . $Team_Position . '</p>';
         }
         if ($show_content == "true" && !empty($Team_Content)) {
             if (function_exists('wpb_js_remove_wpautop')) {
                 $output .= '' . wpb_js_remove_wpautop(do_shortcode($Team_Content), true) . '';
             } else {
                 $output .= '' . do_shortcode($Team_Content) . '';
             }
         }
         $output .= '</div>';
         $output .= $team_dedicated;
         $output .= $team_download;
         if ($team_contact_count > 0) {
             $output .= $team_contact;
         }
         if ($team_opening_count > 0) {
             $output .= $team_opening;
         }
         if ($team_skills_count > 0) {
             $output .= $team_skills;
         }
         $output .= '</div>';
     }
     if ($style == "style3") {
         $output .= '<div id="' . $team_block_id . '" class="ts-team3 ' . $css_class . ' ' . $grayscale_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">';
         if ($show_image == "true" && !empty($Team_Image)) {
             if ($show_lightbox == "false" && $link_image == "true" && isset($Team_Dedicatedpage) && $Team_Dedicatedpage != -1) {
                 $output .= '<a class="ts-team-image-link" href="' . $Team_Dedicatedpage . '" target="' . $team_dedicated_target . '">';
             }
             $output .= '<img class="ts-team3-person-image ' . $image_style . ' ' . ($show_lightbox == "true" ? "nch-lightbox" : "") . ' ' . ($show_grayscale == "true" ? "grayscale" : "") . ' ' . ($show_effects == "true" ? "hovereffect" : "") . '" rel="' . ($show_lightbox == "true" ? "nachoteam" : "") . '" src="' . $Team_Image . '" title="' . $Team_Title . ' / ' . $Team_Position . '" alt="">';
             if ($show_lightbox == "false" && $link_image == "true" && isset($Team_Dedicatedpage) && $Team_Dedicatedpage != -1) {
                 $output .= '</a>';
             }
         }
         if ($show_title == "true" && !empty($Team_Title)) {
             $output .= '<div class="ts-team3-person-name">' . $Team_Title . '</div>';
         }
         if ($show_title == "true" && !empty($Team_Position)) {
             $output .= '<div class="ts-team3-person-position">' . $Team_Position . '</div>';
         }
         if ($show_content == "true" && !empty($Team_Content)) {
             if (function_exists('wpb_js_remove_wpautop')) {
                 $output .= '<div class="ts-team3-person-description">' . wpb_js_remove_wpautop(do_shortcode($Team_Content), true) . '</div>';
             } else {
                 $output .= '<div class="ts-team3-person-description">' . do_shortcode($Team_Content) . '</div>';
             }
         }
         $output .= $team_dedicated;
         $output .= $team_download;
         if ($team_contact_count > 0) {
             $output .= $team_contact;
         }
         if ($team_social_count > 0) {
             $output .= $team_social;
         }
         if ($team_opening_count > 0) {
             $output .= $team_opening;
         }
         if ($team_skills_count > 0) {
             $output .= $team_skills;
         }
         $output .= '<div class="ts-team3-person-space"></div>';
         $output .= '</div>';
     }
     echo $output;
     $myvariable = ob_get_clean();
     return $myvariable;
 }
function TS_VCSC_Quick_Skills_Function($atts)
{
    global $VISUAL_COMPOSER_EXTENSIONS;
    ob_start();
    wp_enqueue_style('ts-visual-composer-extend-front');
    wp_enqueue_script('ts-visual-composer-extend-front');
    extract(shortcode_atts(array('skill_values' => '', 'skill_layout' => 'bars', 'bar_style' => 'style1', 'bar_tooltip' => 'false', 'bar_height' => 2, 'bar_height_2' => 35, 'bar_height_3' => 40, 'bar_label_width' => 110, 'bar_stripes' => 'false', 'bar_animation' => 'false', 'bar_delay' => 250, 'tooltip_style' => '', 'circle_custom' => 'false', 'circle_color' => '#ffffff', 'text_default' => '', 'text_color' => '#000000', 'text_size' => 16, 'max_stroke' => 40, 'space_stroke' => 2, 'random_start' => 'true', 'animation_view' => '', 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts));
    // Process Group Values
    if (isset($skill_values) && strlen($skill_values) > 0) {
        $skill_entries = json_decode(urldecode($skill_values), true);
        if (!is_array($skill_entries)) {
            $temp = explode(',', $skill_values);
            $paramValues = array();
            foreach ($temp as $value) {
                $data = explode('|', $value);
                $colorIndex = 2;
                $newLine = array();
                $newLine['skillvalue'] = isset($data[0]) ? $data[0] : 0;
                $newLine['skillname'] = isset($data[1]) ? $data[1] : '';
                if (isset($data[1]) && preg_match('/^\\d{1,3}\\%$/', $data[1])) {
                    $colorIndex += 1;
                    $newLine['skillvalue'] = (double) str_replace('%', '', $data[1]);
                    $newLine['skillname'] = isset($data[2]) ? $data[2] : '';
                }
                if (isset($data[$colorIndex])) {
                    $newLine['skillcolor'] = $data[$colorIndex];
                }
                $paramValues[] = $newLine;
            }
            $skill_values = urlencode(json_encode($paramValues));
        }
    }
    $output = '';
    $bar_classes = '';
    // Check for Skillset and End Shortcode if Empty
    if (empty($skill_entries)) {
        $output .= '<div style="text-align: justify; font-weight: bold; font-size: 14px; color: red;">Please define at least one skillset in the element settings!</div>';
        echo $output;
        $myvariable = ob_get_clean();
        return $myvariable;
    }
    if ($bar_stripes == "true") {
        $bar_classes .= ' striped';
        if ($bar_animation == "true") {
            $bar_classes .= ' animated';
        }
    }
    if (!empty($el_id)) {
        $skill_block_id = $el_id;
    } else {
        $skill_block_id = 'ts-vcsc-skillset-' . mt_rand(999999, 9999999);
    }
    if ($animation_view != '') {
        $animation_css = TS_VCSC_GetCSSAnimation($animation_view);
    } else {
        $animation_css = '';
    }
    if (function_exists('vc_shortcode_custom_css_class')) {
        if ($skill_layout == "bars") {
            $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'ts-post-skills ' . $animation_css . ' ' . $el_class . ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS_VCSC_Quick_Skills', $atts);
        } else {
            if ($skill_layout == "raphael") {
                $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'ts-skillset-raphael-container ' . $animation_css . ' ' . $el_class . ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS_VCSC_Quick_Skills', $atts);
            }
        }
    } else {
        if ($skill_layout == "bars") {
            $css_class = 'ts-post-skills ' . $animation_css . ' ' . $el_class;
        } else {
            if ($skill_layout == "raphael") {
                $css_class = 'ts-skillset-raphael-container ' . $animation_css . ' ' . $el_class;
            }
        }
    }
    // Build Skillset
    $team_skills = '';
    $team_skills_count = 0;
    if ($skill_layout == "bars") {
        if ($bar_style == "style1") {
            $skill_background = '';
            $team_skills .= '<div id="' . $skill_block_id . '" class="' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">';
            foreach ((array) $skill_entries as $key => $entry) {
                $skill_name = $skill_value = $skill_color = '';
                if (isset($entry['skillname'])) {
                    $skill_name = esc_html($entry['skillname']);
                }
                if (isset($entry['skillvalue'])) {
                    $skill_value = esc_html($entry['skillvalue']);
                }
                if (isset($entry['skillcolor'])) {
                    $skill_color = esc_html($entry['skillcolor']);
                }
                if (strlen($skill_name) != 0 && strlen($skill_value) != 0) {
                    $team_skills_count++;
                    if (strlen($skill_color) != 0 && $skill_color != '#') {
                        $skill_background = 'background-color: ' . $skill_color . ';';
                    } else {
                        $skill_background = 'background-color: #00afd1;';
                    }
                    if ($bar_tooltip == "true") {
                        $line_height = 'line-height: 25px;';
                    } else {
                        $line_height = '';
                    }
                    $team_skills .= '<div class="ts-skillbars-style1-wrapper clearfix">';
                    $team_skills .= '<div class="ts-skillbars-style1-name" style="' . $line_height . '">' . $skill_name . '';
                    if ($bar_tooltip == "false") {
                        $team_skills .= '<span>(' . $skill_value . '%)</span>';
                    }
                    $team_skills .= '</div>';
                    $team_skills .= '<div class="ts-skillbars-style1-skillbar" style="height: ' . $bar_height . 'px;">';
                    $team_skills .= '<div class="ts-skillbars-style1-value' . $bar_classes . '" data-color="' . $skill_color . '" data-level="' . $skill_value . '%" style="width: ' . $skill_value . '%; ' . $skill_background . '">';
                    if ($bar_tooltip == "true") {
                        $team_skills .= '<span class="ts-skillbars-style1-tooltip">' . $skill_value . '%</span>';
                    }
                    $team_skills .= '</div>';
                    $team_skills .= '</div>';
                    $team_skills .= '</div>';
                }
            }
            $team_skills .= '</div>';
        }
        if ($bar_style == "style2") {
            $skill_background = '';
            $team_skills .= '<div id="' . $skill_block_id . '" class="' . $css_class . ' progress-bars">';
            foreach ((array) $skill_entries as $key => $entry) {
                $skill_name = $skill_value = $skill_color = '';
                if (isset($entry['skillname'])) {
                    $skill_name = esc_html($entry['skillname']);
                }
                if (isset($entry['skillvalue'])) {
                    $skill_value = esc_html($entry['skillvalue']);
                }
                if (isset($entry['skillcolor'])) {
                    $skill_color = esc_html($entry['skillcolor']);
                }
                if (strlen($skill_name) != 0 && strlen($skill_value) != 0) {
                    $team_skills_count++;
                    if (strlen($skill_color) != 0 && $skill_color != '#') {
                        $skill_background = 'background-color: ' . $skill_color . ';';
                    } else {
                        $skill_background = 'background-color: #00afd1;';
                    }
                    if ($team_skills_count == 1 && $bar_tooltip == "true") {
                        $margin_adjust = 'margin-top: 30px;';
                    } else {
                        if ($bar_tooltip == "true") {
                            $margin_adjust = 'margin-top: 20px;';
                        } else {
                            $margin_adjust = '';
                        }
                    }
                    $team_skills .= '<div class="ts-skillbars-style2-wrapper clearfix" style="height: ' . $bar_height_2 . 'px; ' . $margin_adjust . '">';
                    $team_skills .= '<div class="ts-skillbars-style2-title" style="height: ' . $bar_height_2 . 'px; width: ' . $bar_label_width . 'px;' . $skill_background . '"><span style="line-height: ' . $bar_height_2 . 'px; height: ' . $bar_height_2 . 'px;">' . $skill_name . '</span></div>';
                    $team_skills .= '<div class="ts-skillbars-style2-area" style="">';
                    $team_skills .= '<div class="ts-skillbars-style2-skillbar' . $bar_classes . '" style="width: ' . $skill_value . '%; height: ' . $bar_height_2 . 'px; ' . $skill_background . '" data-level="' . $skill_value . '">';
                    if ($bar_tooltip == "true") {
                        $team_skills .= '<span class="ts-skillbars-style2-tooltip">' . $skill_value . '%</span>';
                    }
                    $team_skills .= '</div>';
                    $team_skills .= '</div>';
                    if ($bar_tooltip == "false") {
                        $team_skills .= '<div class="ts-skillbars-style2-percent" style="line-height: ' . $bar_height_2 . 'px; height: ' . $bar_height_2 . 'px;">' . $skill_value . '%</div>';
                    }
                    $team_skills .= '</div>';
                }
            }
            $team_skills .= '</div>';
        }
        if ($bar_style == "style3") {
            $skill_background = '';
            $team_skills .= '<div id="' . $skill_block_id . '" class="' . $css_class . ' progress-bars">';
            foreach ((array) $skill_entries as $key => $entry) {
                $skill_name = $skill_value = $skill_color = '';
                if (isset($entry['skillname'])) {
                    $skill_name = esc_html($entry['skillname']);
                }
                if (isset($entry['skillvalue'])) {
                    $skill_value = esc_html($entry['skillvalue']);
                }
                if (isset($entry['skillcolor'])) {
                    $skill_color = esc_html($entry['skillcolor']);
                }
                if (strlen($skill_name) != 0 && strlen($skill_value) != 0) {
                    $team_skills_count++;
                    if (strlen($skill_color) != 0 && $skill_color != '#') {
                        $skill_background = 'background-color: ' . $skill_color . ';';
                    } else {
                        $skill_background = 'background-color: #00afd1;';
                    }
                    if ($team_skills_count == 1 && $bar_tooltip == "true") {
                        $margin_adjust = 'margin-top: 30px;';
                    } else {
                        if ($bar_tooltip == "true") {
                            $margin_adjust = 'margin-top: 20px;';
                        } else {
                            $margin_adjust = '';
                        }
                    }
                    $team_skills .= '<div class="ts-skillbars-style3-wrapper clearfix" style="height: ' . $bar_height_3 . 'px;">';
                    $team_skills .= '<div class="ts-skillbars-style3-skillbar" style="height: ' . $bar_height_3 . 'px;">';
                    $team_skills .= '<div class="ts-skillbars-style3-countbar' . $bar_classes . '" data-level="' . $skill_value . '" style="height: ' . $bar_height_3 . 'px; width: ' . $skill_value . '%; ' . $skill_background . '">';
                    $team_skills .= '<div class="ts-skillbars-style3-title" style="line-height: ' . ($bar_height_3 - 10) . 'px;">' . $skill_name . '</div>';
                    if ($bar_tooltip == "true") {
                        $team_skills .= '<span class="ts-skillbars-style3-tooltip">' . $skill_value . '%</span>';
                    } else {
                        $team_skills .= '<div class="ts-skillbars-style3-value style="line-height: ' . ($bar_height_3 - 10) . 'px;""><span>' . $skill_value . '%</span></div>';
                    }
                    $team_skills .= '<div class="ts-skillbars-style3-indicator"></div>';
                    $team_skills .= '</div>';
                    $team_skills .= '</div>';
                    $team_skills .= '</div>';
                }
            }
            $team_skills .= '</div>';
        }
    } else {
        if ($skill_layout == "raphael") {
            wp_enqueue_script('ts-extend-raphael');
            $skill_background = '';
            $team_skills .= '<div id="' . $skill_block_id . '" class="' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">';
            foreach ((array) $skill_entries as $key => $entry) {
                $skill_name = $skill_value = $skill_color = '';
                if (isset($entry['skillname'])) {
                    $skill_name = esc_html($entry['skillname']);
                }
                if (isset($entry['skillvalue'])) {
                    $skill_value = esc_html($entry['skillvalue']);
                }
                if (isset($entry['skillcolor'])) {
                    $skill_color = esc_html($entry['skillcolor']);
                }
                if (strlen($skill_name) != 0 && strlen($skill_value) != 0) {
                    $team_skills_count++;
                    $team_skills .= '<div class="ts-skillset-raphael-arch">
							<input type="hidden" class="name" value="' . $skill_name . '" />
							<input type="hidden" class="percent" value="' . $skill_value . '" />
							<input type="hidden" class="color" value="' . $skill_color . '" />
						</div>';
                }
            }
            $team_skills .= '<div id="" class="ts-skillset-raphael-chart" data-raphael="' . $skill_block_id . '" data-randomstart="' . $random_start . '" data-spacestroke="' . $space_stroke . '" data-maxstroke="' . $max_stroke . '" data-circlecustom="' . $circle_custom . '" data-circlecolor="' . $circle_color . '" data-textsize="' . $text_size . '" data-textcolor="' . $text_color . '" data-textdefault="' . $text_default . '"></div>';
            $team_skills .= '</div>';
        }
    }
    // Create Output
    $output = $team_skills;
    echo $output;
    $myvariable = ob_get_clean();
    return $myvariable;
}
function TS_VCSC_Meet_Team_Function($atts, $content = null)
{
    global $VISUAL_COMPOSER_EXTENSIONS;
    ob_start();
    wp_enqueue_style('ts-extend-simptip');
    wp_enqueue_style('ts-extend-animations');
    wp_enqueue_style('ts-font-teammates');
    wp_enqueue_style('ts-visual-composer-extend-front');
    wp_enqueue_script('ts-visual-composer-extend-front');
    extract(shortcode_atts(array('style' => 'style1', 'image' => '', 'name' => '', 'title' => '', 'description' => '', 'icon_style' => 'simple', 'icon_background' => '#f5f5f5', 'icon_frame_color' => '#f5f5f5', 'icon_frame_thick' => 1, 'icon_margin' => 5, 'icon_align' => 'left', 'icon_hover' => '', 'phone' => '', 'cell' => '', 'portfolio' => '', 'link' => '', 'email' => '', 'facebook' => '', 'gplus' => '', 'twitter' => '', 'linkedin' => '', 'xing' => '', 'skype' => '', 'flickr' => '', 'picasa' => '', 'instagram' => '', 'vimeo' => '', 'youtube' => '', 'tooltip_style' => '', 'tooltip_position' => 'ts-simptip-position-top', 'animation_view' => '', 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts));
    if (!empty($el_id)) {
        $team_id = $el_id;
    } else {
        $team_id = 'ts-vcsc-meet-team-' . mt_rand(999999, 9999999);
    }
    $team_image = wp_get_attachment_image_src($image, 'large');
    if ($animation_view != '') {
        $animation_css = TS_VCSC_GetCSSAnimation($animation_view);
    } else {
        $animation_css = '';
    }
    $output = '';
    $team_tooltipclasses = "ts-simptip-multiline " . $tooltip_style . " " . $tooltip_position;
    if (empty($icon_background) || $icon_style == 'simple') {
        $icon_frame_style = '';
    } else {
        $icon_frame_style = 'background: ' . $icon_background . ';';
    }
    if ($icon_frame_thick > 0) {
        $icon_top_adjust = 'top: ' . (10 - $icon_frame_thick) . 'px;';
    } else {
        $icon_top_adjust = '';
    }
    if ($icon_style == 'simple') {
        $icon_frame_border = '';
    } else {
        $icon_frame_border = ' border: ' . $icon_frame_thick . 'px solid ' . $icon_frame_color . ';';
    }
    $icon_horizontal_adjust = '';
    $team_social = '';
    $team_social .= '<ul class="ts-teammate-icons ' . $icon_style . '">';
    if (strlen($email) != 0) {
        //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="email ' . $team_tooltipclasses . '" href="mailto:' . $email . '" data-tstooltip="' . $email . '"><i class="email" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
        $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Email"><a style="" target="_blank" class="ts-teammate-link email ' . $icon_hover . '" href="mailto:' . $email . '"><i class="ts-teamicon-email2 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
    }
    if (strlen($phone) != 0) {
        //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="phone ' . $team_tooltipclasses . '" href="#" data-tstooltip="' . $phone . '"><i class="phone" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
        $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="' . $phone . '"><a style="" target="_blank" class="ts-teammate-link phone ' . $icon_hover . '" href="#"><i class="ts-teamicon-phone2 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
    }
    if (strlen($cell) != 0) {
        //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="cell ' . $team_tooltipclasses . '" href="#" data-tstooltip="' . $cell . '"><i class="cell" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
        $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="' . $cell . '"><a style="" target="_blank" class="ts-teammate-link mobile ' . $icon_hover . '" href="#"><i class="ts-teamicon-mobile ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
    }
    if (strlen($skype) != 0) {
        //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="skype ' . $team_tooltipclasses . '" href="#" data-tstooltip="' . $skype . '"><i class="skype" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
        $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="' . $skype . '"><a style="" target="_blank" class="ts-teammate-link skype ' . $icon_hover . '" href="#"><i class="ts-teamicon-skype ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
    }
    if (strlen($portfolio) != 0) {
        //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="portfolio ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($portfolio) . '" data-tstooltip="' . $portfolio . '"><i class="portfolio" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
        $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Portfolio"><a style="" target="_blank" class="ts-teammate-link portfolio ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($portfolio) . '"><i class="ts-teamicon-portfolio ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
    }
    if (strlen($link) != 0) {
        //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="link ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($link) . '" data-tstooltip="' . $link . '"><i class="link" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
        $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Other"><a style="" target="_blank" class="ts-teammate-link portfolio ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($link) . '"><i class="ts-teamicon-link ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
    }
    if (strlen($facebook) != 0) {
        //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="facebook ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($facebook) . '" data-tstooltip="' . $facebook . '"><i class="facebook" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
        $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Facebook"><a style="" target="_blank" class="ts-teammate-link facebook ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($facebook) . '"><i class="ts-teamicon-facebook1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
    }
    if (strlen($gplus) != 0) {
        //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="gplus ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($gplus) . '" data-tstooltip="' . $gplus . '"><i class="gplus" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
        $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Google+"><a style="" target="_blank" class="ts-teammate-link gplus ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($gplus) . '"><i class="ts-teamicon-googleplus1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
    }
    if (strlen($twitter) != 0) {
        //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="twitter ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($twitter) . '" data-tstooltip="' . $twitter . '"><i class="twitter" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
        $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Twitter"><a style="" target="_blank" class="ts-teammate-link twitter ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($twitter) . '"><i class="ts-teamicon-twitter1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
    }
    if (strlen($linkedin) != 0) {
        //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="linkedin ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($linkedin) . '" data-tstooltip="' . $linkedin . '"><i class="linkedin" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
        $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="LinkedIn"><a style="" target="_blank" class="ts-teammate-link linkedin ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($linkedin) . '"><i class="ts-teamicon-linkedin ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
    }
    if (strlen($xing) != 0) {
        //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="xing ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($xing) . '" data-tstooltip="' . $xing . '"><i class="xing" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
        $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Xing"><a style="" target="_blank" class="ts-teammate-link xing ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($xing) . '"><i class="ts-teamicon-xing3 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
    }
    if (strlen($flickr) != 0) {
        //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="flickr ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($flickr) . '" data-tstooltip="' . $flickr . '"><i class="flickr" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
        $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Flickr"><a style="" target="_blank" class="ts-teammate-link flickr ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($flickr) . '"><i class="ts-teamicon-flickr3 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
    }
    if (strlen($instagram) != 0) {
        //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="instagram ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($instagram) . '" data-tstooltip="' . $instagram . '"><i class="instagram" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
        $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Instagram"><a style="" target="_blank" class="ts-teammate-link instagram ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($instagram) . '"><i class="ts-teamicon-instagram ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
    }
    if (strlen($picasa) != 0) {
        //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="picasa ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($picasa) . '" data-tstooltip="' . $picasa . '"><i class="picasa" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
        $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Picasa"><a style="" target="_blank" class="ts-teammate-link picasa ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($picasa) . '"><i class="ts-teamicon-picasa1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
    }
    if (strlen($vimeo) != 0) {
        //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="vimeo ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($vimeo) . '" data-tstooltip="' . $vimeo . '"><i class="vimeo" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
        $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Vimeo"><a style="" target="_blank" class="ts-teammate-link vimeo ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($vimeo) . '"><i class="ts-teamicon-vimeo1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
    }
    if (strlen($youtube) != 0) {
        //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="youtube ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($youtube) . '" data-tstooltip="' . $youtube . '"><i class="youtube" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
        $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="YouTube"><a style="" target="_blank" class="ts-teammate-link youtube ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($youtube) . '"><i class="ts-teamicon-youtube1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>';
    }
    $team_social .= '</ul>';
    if (function_exists('vc_shortcode_custom_css_class')) {
        $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS-VCSC-Meet-Team', $atts);
    } else {
        $css_class = '';
    }
    if ($style == "style1") {
        $output .= '<div id="' . $team_id . '" class="ts-team1 ts-team-member ' . $animation_css . ' ' . $el_class . ' ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">';
        $output .= '<div class="team-avatar">';
        $output .= '<img src="' . $team_image[0] . '" alt="">';
        $output .= '</div>';
        $output .= '<div class="team-user">';
        $output .= '<h4 class="team-title">' . $name . '</h4>';
        $output .= '<div class="team-job">' . $title . '</div>';
        $output .= '</div>';
        $output .= '<div class="team-information">';
        $output .= '' . $description . '';
        $output .= '<br></div>';
        $output .= $team_social;
        $output .= '</div>';
    } else {
        if ($style == "style2") {
            $output .= '<article id="' . $team_id . '" class="ts-team2 ts-team-member ' . $animation_css . ' ' . $el_class . ' ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">';
            $output .= '<div class="ts-team2-header">';
            $output .= '<img src="' . $team_image[0] . '" class="img-circle">';
            $output .= '</div>';
            $output .= '<div class="ts-team2-content">';
            $output .= '<div class="ts-team2-line"></div>';
            $output .= '<h3>' . $name . '</h3>';
            $output .= '<p class="ts-team2-lead">' . $title . '</p>';
            $output .= '<p>' . $description . '</p>';
            $output .= '</div>';
            $output .= '<div class="ts-team2-footer">';
            $output .= $team_social;
            $output .= '</div>';
            $output .= '</article>';
        } else {
            if ($style == "style3") {
                $output .= '<div id="' . $team_id . '" class="ts-team3 ts-team-member ' . $animation_css . ' ' . $el_class . ' ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">';
                $output .= '<img class="ts-team3-person-image" src="' . $team_image[0] . '" alt="' . $name . '">';
                $output .= '<p class="ts-team3-person-name">' . $name . '</p>';
                $output .= '<p class="ts-team3-person-position">' . $title . '</p>';
                $output .= '<p class="ts-team3-person-description">' . $description . '</p>';
                //$output .= '<div class="ts-team3-person-line"></div>';
                $output .= $team_social;
                $output .= '<div class="ts-team3-person-space"></div>';
                $output .= '</div>';
            }
        }
    }
    echo $output;
    $myvariable = ob_get_clean();
    return $myvariable;
}
function TS_VCSC_Timeline_Function($atts)
{
    global $VISUAL_COMPOSER_EXTENSIONS;
    ob_start();
    wp_enqueue_style('ts-extend-simptip');
    wp_enqueue_style('ts-extend-animations');
    wp_enqueue_style('ts-visual-composer-extend-front');
    wp_enqueue_script('ts-visual-composer-extend-front');
    extract(shortcode_atts(array('timeline_style' => 'style1', 'timeline_pattern' => 'light', 'timeline_ulwrap' => '', 'timeline_bottom' => 'false', 'timeline_dots' => 'true', 'timeline_position' => 'direction-l', 'timeline_color' => '#ffffff', 'timeline_background' => '#000000', 'icon_replace' => 'false', 'icon' => '', 'image' => '', 'icon_size' => 80, 'icon_color' => '#000000', 'icon_background' => '', 'icon_frame_type' => '', 'icon_frame_thick' => 1, 'icon_frame_color' => '#000000', 'icon_frame_radius' => '', 'padding' => 'false', 'icon_padding' => 0, 'show_date' => 'true', 'date' => '', 'sub_date' => '', 'title' => '', 'text_code' => 'false', 'text' => '', 'text_html' => '', 'animation_icon' => '', 'animation_view' => '', 'margin_bottom' => '0', 'margin_top' => '0', 'el_id' => '', 'el_class' => '', 'css' => ''), $atts));
    if (!empty($el_id)) {
        $timeline_id = $el_id;
    } else {
        $timeline_id = 'ts-vcsc-timeline-' . mt_rand(999999, 9999999);
    }
    if (!empty($image)) {
        $image_path = wp_get_attachment_image_src($image, 'large');
    }
    if ($icon_frame_type != '') {
        $icon_border_style = 'border: ' . $icon_frame_thick . 'px ' . $icon_frame_type . ' ' . $icon_frame_color . ';';
    } else {
        $icon_border_style = '';
    }
    if ($icon_frame_type != '') {
        $icon_frame_style = 'border: ' . $icon_frame_thick . 'px ' . $icon_frame_type . ' ' . $icon_frame_color . ';';
    } else {
        $icon_frame_style = '';
    }
    $icon_size_adjust = $icon_size - 2 * $icon_frame_thick - 2 * $icon_padding;
    if ($timeline_style == 'style1' || $timeline_style == 'style3') {
        $icon_style = 'height: ' . $icon_size_adjust . 'px; width: ' . $icon_size_adjust . 'px; font-size: 50px; line-height: ' . $icon_size_adjust . 'px; padding: ' . $icon_padding . 'px; color: ' . $icon_color . '; background-color:' . $icon_background . ';';
    } else {
        $icon_style = 'color: ' . $icon_color . '; background-color:' . $icon_background . ';';
    }
    if ($timeline_style == 'style1' || $timeline_style == 'style3') {
        $image_style = 'height: ' . $icon_size . 'px; width: ' . $icon_size . 'px; font-size: 50px; line-height: ' . $icon_size . 'px; padding: ' . $icon_padding . 'px; background-color:' . $icon_background . ';';
    } else {
        $image_style = 'padding: ' . $icon_padding . 'px; background-color:' . $icon_background . ';';
    }
    if ($animation_view != '') {
        $animation_css = TS_VCSC_GetCSSAnimation($animation_view);
    } else {
        $animation_css = '';
    }
    if (function_exists('vc_shortcode_custom_css_class')) {
        $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS-VCSC-Timeline', $atts);
    } else {
        $css_class = '';
    }
    $output = '';
    if ($timeline_style == 'style1') {
        $output .= '<div id="' . $timeline_id . '" class="ts-timeline-1 clearfix ' . $el_class . ' ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">';
        $output .= '<div class="ts-timeline-1-date" style="background: ' . $timeline_background . '; color: ' . $timeline_color . ';">';
        $output .= '<div class="day">' . $date . '</div>';
        $output .= '</div>';
        if ($timeline_bottom == "true" && $timeline_dots == "true") {
            $output .= '<div class="ts-timeline-1-line" style="background: ' . $timeline_background . ';"></div>';
        } else {
            if ($timeline_bottom == "false") {
                $output .= '<div class="ts-timeline-1-line" style="background: ' . $timeline_background . ';"></div>';
            }
        }
        $output .= '<div class="ts-timeline-1-hor-line" style="background: ' . $timeline_background . ';"></div>';
        if ($timeline_bottom == "true" && $timeline_dots == "true") {
            $output .= '<div class="ts-timeline-1-start-point" style="border-color: ' . $timeline_background . ';"></div>';
        }
        $output .= '<div class="ts-timeline-1-container">';
        if ($icon_replace == "false" && !empty($icon)) {
            $output .= '<div class="ts-timeline-1-icon">';
            $output .= '<i class="ts-font-icon ' . $icon . ' ' . $animation_css . ' ' . $icon_frame_radius . '" style="' . $icon_style . ' ' . $icon_border_style . '"></i>';
            $output .= '</div>';
        } else {
            if (!empty($image_path[0])) {
                $output .= '<div class="ts-timeline-1-img">';
                $output .= '<img class="' . $animation_css . ' ' . $icon_frame_radius . '" src="' . $image_path[0] . '" alt="" style="' . $image_style . ' ' . $icon_border_style . '">';
                $output .= '</div>';
            }
        }
        $output .= '<div class="ts-timeline-1-content' . (strlen($image_path[0]) > 0 ? " ts-timeline-1-hasimg" : "") . '">';
        $output .= '<h4>' . $title . '</h4>';
        if ($text_code == "true") {
            $output .= '<p>' . rawurldecode(base64_decode(strip_tags($text_html))) . '</p>';
        } else {
            $output .= '<p>' . $text . '</p>';
        }
        $output .= '</div>';
        $output .= '</div>';
        $output .= '</div>';
    }
    if ($timeline_style == 'style2') {
        if ($timeline_ulwrap == "top") {
            $output .= '<div class="clearfix ' . $el_class . ' ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">';
            $output .= '<ul class="ts-timeline-2 ' . $timeline_pattern . ' ' . ($show_date == "true" ? "showdate" : "nodate") . '">';
        }
        if ($timeline_ulwrap == "" || $timeline_ulwrap == "bottom") {
            $output .= '<li id="' . $timeline_id . '" class="' . $el_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">';
        } else {
            $output .= '<li id="' . $timeline_id . '" class="' . $el_class . '" style="">';
        }
        if ($show_date == "true") {
            $output .= '<time class="ts-timeline-2-time"><span>' . $date . '</span> <span>' . $sub_date . '</span></time>';
        }
        if ($icon_replace == "false" && !empty($icon)) {
            $output .= '<i class="ts-font-icon ' . $icon . ' ts-timeline-2-icon ' . $animation_css . '" style="' . $icon_style . '"></i>';
        } else {
            if (!empty($image_path[0])) {
                $output .= '<img class="ts-timeline-2-image ' . $animation_css . ' ' . $icon_frame_radius . '" src="' . $image_path[0] . '" alt="" style="' . $image_style . ' ' . $icon_border_style . '">';
            }
        }
        $output .= '<div class="ts-timeline-2-label">';
        $output .= '<h2>' . $title . '</h2>';
        if ($text_code == "true") {
            $output .= '<p>' . rawurldecode(base64_decode(strip_tags($text_html))) . '</p>';
        } else {
            $output .= '<p>' . $text . '</p>';
        }
        $output .= '</div>';
        $output .= '</li>';
        if ($timeline_ulwrap == "bottom") {
            $output .= '</ul">';
            $output .= '</div>';
        }
    }
    if ($timeline_style == 'style3') {
        if ($timeline_ulwrap == "top") {
            $output .= '<div class="clearFixMe ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; width: 100%;">';
            $output .= '<ul class="ts-timeline-3">';
        }
        if ($timeline_ulwrap == "" || $timeline_ulwrap == "bottom") {
            $output .= '<li id="' . $timeline_id . '" class="' . $el_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">';
        } else {
            $output .= '<li id="' . $timeline_id . '" class="' . $el_class . '" style="">';
        }
        $output .= '<div class="' . $timeline_position . '">';
        $output .= '<div class="flag-wrapper">';
        $output .= '<span class="flag">' . $title . '</span>';
        $output .= '</div>';
        $output .= '<div class="time-wrapper"><span class="time">' . $date . '</span></div>';
        $output .= '<div class="desc-wrapper">';
        if ($icon_replace == "false" && !empty($icon)) {
            $output .= '<i class="ts-font-icon ' . $icon . ' ts-timeline-3-icon ' . $animation_css . ' ' . $icon_frame_radius . '" style="' . $icon_style . ' ' . $icon_border_style . '"></i>';
        } else {
            if (!empty($image_path[0])) {
                $output .= '<img class="ts-timeline-3-image ' . $animation_css . ' ' . $icon_frame_radius . '" src="' . $image_path[0] . '" alt="" style="' . $image_style . ' ' . $icon_border_style . '">';
            }
        }
        if ($text_code == "true") {
            $output .= '<div class="desc">' . rawurldecode(base64_decode(strip_tags($text_html))) . '</div>';
        } else {
            $output .= '<div class="desc">' . $text . '</div>';
        }
        $output .= '</div>';
        $output .= '</div>';
        $output .= '</li>';
        if ($timeline_ulwrap == "bottom") {
            $output .= '</ul">';
            $output .= '</div>';
        }
    }
    echo $output;
    $myvariable = ob_get_clean();
    return $myvariable;
}
function TS_VCSC_Icon_List_Function($atts, $content = '')
{
    global $VISUAL_COMPOSER_EXTENSIONS;
    ob_start();
    wp_enqueue_style('ts-extend-simptip');
    wp_enqueue_style('ts-extend-animations');
    wp_enqueue_style('ts-visual-composer-extend-front');
    extract(shortcode_atts(array('icon' => '', 'color' => '#7dbd21', 'font_color' => '#000000', 'text_align' => 'left', 'position' => 'left', 'margin_right' => 10, 'font_size' => 12, 'icon_size' => 12, 'link' => '', 'link_target' => '_parent', 'tooltip_css' => 'false', 'tooltip_content' => '', 'tooltip_position' => 'ts-simptip-position-top', 'tooltip_style' => '', 'animation_effect' => 'hover', 'animation_class' => '', 'animation_view' => '', 'animation_delay' => 0, 'margin_top' => 0, 'margin_bottom' => 10, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts));
    // Main Styles
    $add_style = array();
    $add_style[] = 'margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; text-align:' . $text_align . ';';
    if ($font_size) {
        $add_style[] = 'font-size:' . $font_size . 'px;';
        $add_style[] = 'line-height:' . $font_size . 'px;';
    }
    if ($font_color) {
        $add_style[] = 'color: ' . $font_color . ';';
    }
    $add_style = implode('', $add_style);
    if ($add_style) {
        $add_style = wp_kses($add_style, array());
        $add_style = ' style="' . esc_attr($add_style) . '"';
    }
    // CSS Animations
    if ($animation_view !== '') {
        $css_animation_classes = TS_VCSC_GetCSSAnimation($animation_view, "true");
    } else {
        $css_animation_classes = '';
    }
    if (!empty($animation_class)) {
        if ($animation_effect == "infinite") {
            $animation_icon = 'ts-infinite-css-' . $animation_class;
            $animation_hover = '';
        } else {
            $animation_icon = '';
            $animation_hover = 'ts-infinite-css-' . $animation_class;
        }
    } else {
        $animation_icon = '';
        $animation_hover = '';
    }
    // Tooltip
    if ($tooltip_css == "true") {
        if (strlen($tooltip_content) != 0) {
            $icon_tooltipclasses = " ts-simptip-multiline " . $tooltip_style . " " . $tooltip_position;
            $icon_tooltipcontent = ' data-tstooltip="' . $tooltip_content . '"';
        } else {
            $icon_tooltipclasses = "";
            $icon_tooltipcontent = "";
        }
    } else {
        $icon_tooltipclasses = "";
        if (strlen($tooltip_content) != 0) {
            $icon_tooltipcontent = ' title="' . $tooltip_content . '"';
        } else {
            $icon_tooltipcontent = "";
        }
    }
    if ($position == "left") {
        $span_padding = 'padding-left: ' . intval($margin_right) . 'px;';
    } else {
        $span_padding = 'padding-right: ' . intval($margin_right) . 'px;';
    }
    $icon_style = 'color: ' . $color . '; width: ' . $icon_size . 'px; height: ' . $icon_size . 'px; font-size: ' . $icon_size . 'px; line-height: ' . $icon_size . 'px;';
    if (function_exists('vc_shortcode_custom_css_class')) {
        $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS-VCSC-Icon-List', $atts);
    } else {
        $css_class = '';
    }
    $output = '<div class="ts-list-item ' . ($animation_view != '' ? 'ts-list-item-viewport' : '') . ' ' . $el_class . ' ' . $css_class . '" ' . $add_style . ' data-viewport="' . $css_animation_classes . '" data-delay="' . $animation_delay . '" data-animation="' . $animation_hover . '" data-opacity="1">';
    if ($link) {
        $output .= '<a href="' . esc_url($link) . '" target="' . $link_target . '">';
    }
    if ($position == "left") {
        $output .= '<i class="ts-font-icon ' . $icon . ' ' . $animation_icon . '" style="' . $icon_style . '"></i>';
    }
    $output .= '<span class="' . $icon_tooltipclasses . '" ' . $icon_tooltipcontent . ' style="color: ' . $font_color . '; ' . $span_padding . '">' . do_shortcode($content) . '</span>';
    if ($position == "right") {
        $output .= '<i class="ts-font-icon ' . $icon . ' ' . $animation_icon . '" style="' . $icon_style . '"></i>';
    }
    if ($link) {
        $output .= '</a>';
    }
    $output .= '</div>';
    echo $output;
    $myvariable = ob_get_clean();
    return $myvariable;
}
        function TS_VCSC_Skill_Sets_Raphael($atts, $content = null)
        {
            global $VISUAL_COMPOSER_EXTENSIONS;
            ob_start();
            wp_enqueue_script('ts-extend-raphael');
            wp_enqueue_style('ts-visual-composer-extend-front');
            wp_enqueue_script('ts-visual-composer-extend-front');
            extract(shortcode_atts(array('skillset_id' => '', 'custompost_name' => '', 'circle_custom' => 'false', 'circle_color' => '#ffffff', 'text_default' => '', 'text_color' => '#000000', 'text_size' => 16, 'max_stroke' => 40, 'space_stroke' => 2, 'random_start' => 'true', 'animation_view' => '', 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts));
            // Check for Skillset and End Shortcode if Empty
            if (empty($skillset_id)) {
                $output .= '<div style="text-align: justify; font-weight: bold; font-size: 14px; color: red;">Please select a skillset in the element settings!</div>';
                echo $output;
                $myvariable = ob_get_clean();
                return $myvariable;
            }
            $output = '';
            $bar_classes = '';
            if (!empty($el_id)) {
                $skill_block_id = $el_id;
            } else {
                $skill_block_id = 'ts-vcsc-skillset-raphael-' . mt_rand(999999, 9999999);
            }
            if ($animation_view != '') {
                $animation_css = TS_VCSC_GetCSSAnimation($animation_view);
            } else {
                $animation_css = '';
            }
            // Retrieve Skillset Post Main Content
            $skill_array = array();
            $args = array('no_found_rows' => 1, 'ignore_sticky_posts' => 1, 'posts_per_page' => -1, 'post_type' => 'ts_skillsets', 'post_status' => 'publish', 'orderby' => 'title', 'order' => 'ASC');
            $skill_query = new WP_Query($args);
            if ($skill_query->have_posts()) {
                foreach ($skill_query->posts as $p) {
                    if ($p->ID == $skillset_id) {
                        $skill_data = array('author' => $p->post_author, 'name' => $p->post_name, 'title' => $p->post_title, 'id' => $p->ID, 'content' => $p->post_content);
                        $skill_array[] = $skill_data;
                    }
                }
            }
            wp_reset_postdata();
            // Build Skillset Post Main Content
            foreach ($skill_array as $index => $array) {
                $Skill_Title = $skill_array[$index]['title'];
                $Skill_ID = $skill_array[$index]['id'];
            }
            // Retrieve Team Post Meta Content
            $custom_fields = get_post_custom($Skill_ID);
            $custom_fields_array = array();
            foreach ($custom_fields as $field_key => $field_values) {
                if (!isset($field_values[0])) {
                    continue;
                }
                if (in_array($field_key, array("_edit_lock", "_edit_last"))) {
                    continue;
                }
                if (strpos($field_key, 'ts_vcsc_skillset_') !== false) {
                    $field_key_split = explode("_", $field_key);
                    $field_key_length = count($field_key_split) - 1;
                    $custom_data = array('group' => $field_key_split[$field_key_length - 1], 'name' => 'Skill_' . ucfirst($field_key_split[$field_key_length]), 'value' => $field_values[0]);
                    $custom_fields_array[] = $custom_data;
                }
            }
            foreach ($custom_fields_array as $index => $array) {
                ${$custom_fields_array[$index]['name']} = $custom_fields_array[$index]['value'];
            }
            if (function_exists('vc_shortcode_custom_css_class')) {
                $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'ts-skillset-raphael-container ' . $animation_css . ' ' . $el_class . ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS_VCSC_Skill_Sets_Raphael', $atts);
            } else {
                $css_class = 'ts-skillset-raphael-container ' . $animation_css . ' ' . $el_class;
            }
            // Build Skillset
            $team_skills = '';
            $team_skills_count = 0;
            if (isset($Skill_Group)) {
                $skill_entries = get_post_meta($Skill_ID, 'ts_vcsc_skillset_basic_group', true);
                $skill_background = '';
                $team_skills .= '<div id="' . $skill_block_id . '" class="' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">';
                foreach ((array) $skill_entries as $key => $entry) {
                    $skill_name = $skill_value = $skill_color = '';
                    if (isset($entry['skillname'])) {
                        $skill_name = esc_html($entry['skillname']);
                    }
                    if (isset($entry['skillvalue'])) {
                        $skill_value = esc_html($entry['skillvalue']);
                    }
                    if (isset($entry['skillcolor'])) {
                        $skill_color = esc_html($entry['skillcolor']);
                    }
                    if (strlen($skill_name) != 0 && strlen($skill_value) != 0) {
                        $team_skills_count++;
                        $team_skills .= '<div class="ts-skillset-raphael-arch">
								<input type="hidden" class="name" value="' . $skill_name . '" />
								<input type="hidden" class="percent" value="' . $skill_value . '" />
								<input type="hidden" class="color" value="' . $skill_color . '" />
							</div>';
                    }
                }
                $team_skills .= '<div id="" class="ts-skillset-raphael-chart" data-raphael="' . $skill_block_id . '" data-randomstart="' . $random_start . '" data-spacestroke="' . $space_stroke . '" data-maxstroke="' . $max_stroke . '" data-circlecustom="' . $circle_custom . '" data-circlecolor="' . $circle_color . '" data-textsize="' . $text_size . '" data-textcolor="' . $text_color . '" data-textdefault="' . $text_default . '"></div>';
                $team_skills .= '</div>';
            }
            // Create Output
            $output = $team_skills;
            echo $output;
            $myvariable = ob_get_clean();
            return $myvariable;
        }
function TS_VCSC_Icon_Title_Function($atts)
{
    global $VISUAL_COMPOSER_EXTENSIONS;
    ob_start();
    wp_enqueue_style('ts-extend-simptip');
    wp_enqueue_style('ts-extend-animations');
    wp_enqueue_style('ts-visual-composer-extend-front');
    wp_enqueue_script('ts-visual-composer-extend-front');
    extract(shortcode_atts(array('use_encode' => 'false', 'title' => '', 'title_encoded' => '', 'color' => '#3d3d3d', 'transform' => 'none', 'size' => 30, 'font_weight' => 'normal', 'align' => 'left', 'font_family' => '', 'font_type' => '', 'highlight_allow' => 'false', 'highlight_match' => 'words', 'highlight_strings' => '', 'highlight_items' => '', 'highlight_color' => '#2691BD', 'pretext_allow' => 'false', 'pretext_string' => '', 'pretext_color' => '#dd0808', 'pretext_size' => 40, 'pretext_weight' => 'normal', 'style' => 'true', 'title_wrap' => 'div', 'title_background_type' => 'color', 'title_background_color' => '', 'title_background_pattern' => '', 'title_border_controls' => 'false', 'title_border_type' => '', 'title_border_bottom' => 'false', 'title_border_color' => '#cccccc', 'title_border_thick' => 1, 'title_border_radius' => '', 'title_border_setting' => '', 'icon_allow' => 'true', 'icon' => '', 'icon_location' => 'left', 'icon_margin' => 10, 'icon_size_slide' => 30, 'icon_color' => '#000000', 'icon_background' => '', 'icon_frame_type' => '', 'icon_frame_thick' => 1, 'icon_frame_radius' => '', 'icon_frame_color' => '#cccccc', 'icon_replace' => 'false', 'icon_image' => '', 'icon_padding' => 0, 'icon_spacing' => 0, 'title_spacing' => 0, 'animations' => 'false', 'animation_icon' => '', 'animation_title' => '', 'animation_shadow' => '', 'animation_view' => '', 'margin_bottom' => '20', 'margin_top' => '0', 'el_id' => '', 'el_class' => '', 'css' => ''), $atts));
    $divider_css = $title_background_style = $title_frame_style = $icon_style = $icon_frame_class = $icon_frame_style = $animation_css = '';
    if (!empty($el_id)) {
        $icon_title_id = $el_id;
    } else {
        $icon_title_id = 'ts-vcsc-icon-title-parent-' . mt_rand(999999, 9999999);
    }
    // Process Encoded Title
    if ($use_encode == "true") {
        $title_encoded = rawurldecode(base64_decode(strip_tags($title_encoded)));
        $title_decoded = strip_shortcodes($title_encoded);
        $title = do_shortcode($title_encoded);
    } else {
        $title_decoded = $title;
    }
    if ($icon_replace == "true" && !empty($icon_image)) {
        $icon_image_path = wp_get_attachment_image_src($icon_image, 'large');
        $icon_offset = "true";
    } else {
        if ($icon_replace == "true" && empty($icon_image)) {
            $icon_offset = "false";
        } else {
            if ($icon_replace == "false" && !empty($icon)) {
                $icon_offset = "true";
            } else {
                if ($icon_replace == "false" && empty($icon)) {
                    $icon_offset = "false";
                } else {
                    $icon_offset = "true";
                }
            }
        }
    }
    $output = '';
    // Strikethrough Pattern
    if ($style == "false") {
        $style = 'simple';
    } else {
        if ($style == "true") {
            $style = 'pattern-dark';
        } else {
            if ($style == "light") {
                $style = 'pattern-light';
            }
        }
    }
    if (strpos($font_family, 'Default') === false) {
        $google_font = TS_VCSC_GetFontFamily($icon_title_id, $font_family, $font_type, false, true, false);
    } else {
        $google_font = '';
    }
    if ($animations == "false") {
        $animation_icon = '';
        $animation_title = '';
        $animation_shadow = '';
        $animation_view = '';
    }
    if ($animation_view != '') {
        $animation_css = TS_VCSC_GetCSSAnimation($animation_view);
    }
    // Title Pretext
    if ($pretext_allow == "true") {
        $title_pretext = '<span class="ts-icon-title-pretext" style="color: ' . $pretext_color . '; font-weight: ' . $pretext_weight . '; font-size: ' . $pretext_size . 'px; line-height: ' . $pretext_size * 1.1 . 'px;">' . $pretext_string . '</span>';
    } else {
        $title_pretext = '';
    }
    $title_pretext = trim($title_pretext);
    // Title Highlights
    if ($highlight_allow == "true") {
        $title_array = preg_split('/\\s+/', $title);
        $title_count = 0;
        $highlight_strings = rawurldecode(base64_decode(strip_tags($highlight_strings)));
        $highlight_strings = str_replace(' ', '', $highlight_strings);
        $highlight_strings = strtolower($highlight_strings);
        $title_strings = explode(',', $highlight_strings);
        //$title_strings 				= array_map('strtolower', $title_strings);
        $highlight_items = str_replace(' ', '', $highlight_items);
        $title_items = explode(',', $highlight_items);
        $title_string = '';
        foreach ($title_array as $value) {
            $title_count++;
            if ($highlight_match == "words") {
                if (in_array(strtolower($value), $title_strings)) {
                    $title_string = $title_string . ' <span class="ts-icon-title-highlight" style="color: ' . $highlight_color . ';">' . $value . '</span>';
                } else {
                    $title_string = $title_string . ' ' . $value;
                }
            } else {
                if ($highlight_match == "items") {
                    if (in_array($title_count, $title_items)) {
                        $title_string = $title_string . ' <span class="ts-icon-title-highlight" style="color: ' . $highlight_color . ';">' . $value . '</span>';
                    } else {
                        $title_string = $title_string . ' ' . $value;
                    }
                }
            }
        }
    } else {
        $title_string = $title;
    }
    $title_string = trim($title_string);
    // Merge Pretext + Main Title
    if ($pretext_allow == "true") {
        $title_string = $title_pretext . ' ' . $title_string;
    } else {
        $title_string = $title_string;
    }
    // Title Transforms
    if ($transform != "none") {
        $title_capitalize = 'ts-icon-title-' . $transform;
    } else {
        $title_capitalize = '';
    }
    $icon_style = 'padding: ' . $icon_padding . 'px; background-color:' . $icon_background . '; width: ' . $icon_size_slide . 'px; height: ' . $icon_size_slide . 'px; font-size: ' . $icon_size_slide . 'px; line-height: ' . $icon_size_slide . 'px;';
    $icon_image_style = 'padding: ' . $icon_padding . 'px; background-color:' . $icon_background . '; width: ' . $icon_size_slide . 'px; height: ' . $icon_size_slide . 'px; ';
    if ($icon_frame_type != '') {
        $icon_frame_class = 'frame-enabled';
        $icon_frame_style = 'border: ' . $icon_frame_thick . 'px ' . $icon_frame_type . ' ' . $icon_frame_color . ';';
    }
    if ($title_background_type == "pattern") {
        $title_background_style = 'background: url(' . $title_background_pattern . ') repeat;';
        $title_background_class = 'ts-icon-title-background';
    } else {
        if ($title_background_type == "color" && $title_background_color != '') {
            $title_background_style = 'background-color: ' . $title_background_color . ';';
            $title_background_class = 'ts-icon-title-background';
        } else {
            $title_background_style = '';
            $title_background_class = '';
        }
    }
    if ($title_border_controls == 'false') {
        if ($title_border_type != '') {
            if ($title_border_bottom == "true") {
                $title_frame_style = '' . $title_background_style . ' border-bottom: ' . $title_border_thick . 'px ' . $title_border_type . ' ' . $title_border_color . '';
            } else {
                $title_frame_style = '' . $title_background_style . ' border: ' . $title_border_thick . 'px ' . $title_border_type . ' ' . $title_border_color . '';
            }
        } else {
            $title_frame_style = $title_background_style;
        }
    } else {
        $title_frame_style = $title_background_style . str_replace('|', '', $title_border_setting);
    }
    $title_adjustment = '';
    if ($animation_shadow != '' && ($title_background_type == "pattern" || $title_background_type == "color" && $title_background_color != '')) {
        if (!empty($animation_title)) {
            $shadow_class = 'ts-css-shadow ' . $animation_shadow . '';
        } else {
            $shadow_class = 'ts-css-shadow ts-css-shadow-single ' . $animation_shadow . '';
        }
    } else {
        $shadow_class = '';
    }
    if ($icon_location == "top" || $icon_location == "bottom") {
        $padding_adjustment = 'padding: 10px;';
        $border_adjustment = '';
        $line_adjustment = '';
        $line_height = $size * 1.1;
    } else {
        $padding_adjustment = 'padding: 0px;';
        $border_adjustment = '';
        if ($icon_size_slide + $icon_padding * 2 > $size) {
            $line_adjustment = 'line-height: ' . ($icon_size_slide + $icon_padding * 2) * 1.1 . 'px;';
            $line_height = ($icon_size_slide + $icon_padding * 2) * 1.1;
        } else {
            $line_adjustment = 'line-height: ' . $size * 1.1 . 'px;';
            $line_height = $size * 1.1;
        }
    }
    if ($icon_location == 'left') {
        $icon_alignment = 'float: left;';
        $icon_position = 'position: absolute; left: ' . $icon_spacing . 'px; top: 50%; margin-top: -' . ($icon_size_slide + $icon_padding * 2) / 2 . 'px;';
        if ($icon_offset == "true") {
            if ($align == 'left') {
                $title_margin = 'margin-left: ' . ($icon_size_slide + $icon_padding * 2 + $icon_margin + $title_spacing) . 'px;';
            } else {
                if ($align == 'right') {
                    $title_margin = 'margin-left: ' . ($icon_size_slide + $icon_padding * 2 + $icon_margin) . 'px; margin-right: ' . $title_spacing . 'px;';
                } else {
                    $title_margin = 'margin-left: ' . ($icon_size_slide + $icon_padding * 2 + $icon_margin) . 'px;';
                }
            }
        } else {
            $title_margin = '';
        }
        $title_align = $align;
    } else {
        if ($icon_location == 'right') {
            $icon_alignment = 'float: right;';
            $icon_position = 'position: absolute; right: ' . $icon_spacing . 'px; top: 50%; margin-top: -' . ($icon_size_slide + $icon_padding * 2) / 2 . 'px;';
            if ($icon_offset == "true") {
                if ($align == 'left') {
                    $title_margin = 'margin-right: ' . ($icon_size_slide + $icon_padding * 2 + $icon_margin) . 'px; margin-left: ' . $title_spacing . 'px;';
                } else {
                    if ($align == 'right') {
                        $title_margin = 'margin-right: ' . ($icon_size_slide + $icon_padding * 2 + $icon_margin + $title_spacing) . 'px;';
                    } else {
                        $title_margin = 'margin-right: ' . ($icon_size_slide + $icon_padding * 2 + $icon_margin) . 'px;';
                    }
                }
            } else {
                $title_margin = '';
            }
            $title_align = $align;
        } else {
            $icon_alignment = '';
            $icon_position = '';
            $title_margin = '';
            $title_align = 'center';
        }
    }
    if (function_exists('vc_shortcode_custom_css_class')) {
        $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'ts-vcsc-icon-title-parent ' . vc_shortcode_custom_css_class($css, ' '), 'TS-VCSC-Icon-Title', $atts);
    } else {
        $css_class = 'ts-vcsc-icon-title-parent';
    }
    $output .= '<div id="' . $icon_title_id . '" class="' . $css_class . ' ' . $animation_css . ' ' . $el_class . ' ' . $title_background_class . ' clearFixMe ' . $title_border_radius . '" style="height: 100%; margin-top:' . $margin_top . 'px; margin-bottom:' . $margin_bottom . 'px; ' . $google_font . '">';
    $output .= !empty($animation_title) ? '<div class="ts-hover ' . $animation_title . '" style="height: 100%;">' : '';
    if ($icon_location == "top" || $icon_location == "bottom") {
        $output .= '<div class="' . $shadow_class . ' ' . $title_background_class . '" style="height: 100%; ' . $title_background_style . '">';
    }
    $output .= '<div style="height: 100%; ' . $border_adjustment . '; ' . $padding_adjustment . ' font-size: ' . $size . 'px; text-align: ' . $title_align . '; color: ' . $color . '; font-weight:' . $font_weight . '; ' . $divider_css . '" class="ts-vcsc-icon-title ts-shortcode ' . $title_border_radius . ' ts-icon-title ' . ($animation_title != "" ? $shadow_class : "") . ' ' . $style . '-style">';
    if ($icon_replace == 'false') {
        if (!empty($icon) && $icon_location == "top") {
            $output .= '<div style="width: 100%; display: block;">';
            $output .= '<i style="color:' . $icon_color . ';' . $icon_style . ' ' . $icon_frame_style . ' text-align: center; display: inline-block !important; margin-bottom: ' . $icon_margin . 'px;" class="ts-font-icon ts-title-icon-' . $icon_location . ' ' . $icon . ' ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '"></i>';
            $output .= '</div>';
        }
    } else {
        if (!empty($icon_image) && $icon_location == "top") {
            $output .= '<div style="width: 100%; display: block;">';
            $output .= '<img class="ts-font-icon ts-title-icon-' . $icon_location . ' ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '" src="' . $icon_image_path[0] . '" style="' . $icon_frame_style . ' ' . $icon_image_style . ' display: inline-block !important; margin-bottom: ' . $icon_margin . 'px;">';
            $output .= '</div>';
        }
    }
    if ($icon_location == "left") {
        if ($icon_replace == 'false') {
            $output .= '<div class="" style="width: 100%; ' . $line_adjustment . ' vertical-align: middle;">';
            $output .= '<div class="' . $shadow_class . '" style="">';
            $output .= '<div class="' . $style . '-style ' . $title_border_radius . '" style="' . $title_frame_style . '">';
            if (!empty($icon) && $icon_location == "left") {
                $output .= '<i style="' . $icon_position . ' color:' . $icon_color . ';' . $icon_style . ' ' . $icon_frame_style . ' display: inline-block !important; ' . $icon_alignment . '" class="ts-font-icon ts-title-icon-' . $icon_location . ' ' . $icon . ' ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '"></i>';
            }
            $output .= '<div class="ts-icon-title-text ' . $title_capitalize . '" style="' . $title_margin . ' text-align: ' . $align . '; ' . $line_adjustment . ' font-size: ' . $size . 'px; ' . $title_adjustment . '">' . $title_string . '</div>';
            $output .= '</div>';
            $output .= '</div>';
            $output .= '</div>';
        } else {
            $output .= '<div class="" style="width: 100%; ' . $line_adjustment . ' vertical-align: middle;">';
            $output .= '<div class="' . $shadow_class . '" style="">';
            $output .= '<div class="' . $style . '-style ' . $title_border_radius . '" style="' . $title_frame_style . '">';
            if (!empty($icon_image) && $icon_location == "left") {
                $output .= '<img style="' . $icon_position . ' ' . $icon_frame_style . ' ' . $icon_image_style . ' display: inline-block !important; ' . $icon_alignment . '" class="ts-font-icon ts-title-icon-' . $icon_location . ' ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '" src="' . $icon_image_path[0] . '">';
            }
            $output .= '<div class="ts-icon-title-text ' . $title_capitalize . '" style="' . $title_margin . ' text-align: ' . $align . '; ' . $line_adjustment . ' font-size: ' . $size . 'px; ' . $title_adjustment . '">' . $title_string . '</div>';
            $output .= '</div>';
            $output .= '</div>';
            $output .= '</div>';
        }
    } else {
        if ($icon_location == "right") {
            if ($icon_replace == 'false') {
                $output .= '<div class="" style="width: 100%; ' . $line_adjustment . ' vertical-align: middle;">';
                $output .= '<div class="' . $shadow_class . '" style="">';
                $output .= '<div class="' . $style . '-style ' . $title_border_radius . '" style="' . $title_frame_style . '">';
                if (!empty($icon) && $icon_location == "right") {
                    $output .= '<i style="' . $icon_position . ' color:' . $icon_color . ';' . $icon_style . ' ' . $icon_frame_style . ' display: inline-block !important; ' . $icon_alignment . '" class="ts-font-icon ts-title-icon-' . $icon_location . ' ' . $icon . ' ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '"></i>';
                }
                $output .= '<div class="ts-icon-title-text ' . $title_capitalize . '" style="' . $title_margin . ' text-align: ' . $align . '; ' . $line_adjustment . ' font-size: ' . $size . 'px; ' . $title_adjustment . '">' . $title_string . '</div>';
                $output .= '</div>';
                $output .= '</div>';
                $output .= '</div>';
            } else {
                $output .= '<div class="" style="width: 100%; ' . $line_adjustment . ' vertical-align: middle;">';
                $output .= '<div class="' . $shadow_class . '" style="">';
                $output .= '<div class="' . $style . '-style ' . $title_border_radius . '" style="' . $title_frame_style . '">';
                if (!empty($icon_image) && $icon_location == "right") {
                    $output .= '<img style="' . $icon_position . ' ' . $icon_frame_style . ' ' . $icon_image_style . ' display: inline-block !important; ' . $icon_alignment . '" class="ts-font-icon ts-title-icon-' . $icon_location . ' ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '" src="' . $icon_image_path[0] . '">';
                }
                $output .= '<div class="ts-icon-title-text ' . $title_capitalize . '" style="' . $title_margin . ' text-align: ' . $align . '; ' . $line_adjustment . ' font-size: ' . $size . 'px; ' . $title_adjustment . '">' . $title_string . '</div>';
                $output .= '</div>';
                $output .= '</div>';
                $output .= '</div>';
            }
        } else {
            $output .= '<div class="ts-icon-title-text ' . $title_capitalize . '" style="width: auto !important; text-align: center;">' . $title_string . '</div>';
        }
    }
    if ($icon_replace == 'false') {
        if (!empty($icon) && $icon_location == "bottom") {
            $output .= '<div style="width: 100%; display: block;">';
            $output .= '<i style="color:' . $icon_color . ';' . $icon_style . ' ' . $icon_frame_style . ' display: inline-block !important; margin-top: ' . $icon_margin . 'px;" class="ts-font-icon ts-title-icon-' . $icon_location . ' ' . $icon . ' ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '"></i>';
            $output .= '</div>';
        }
    } else {
        if (!empty($icon_image) && $icon_location == "bottom") {
            $output .= '<div style="width: 100%; display: block;">';
            $output .= '<img class="ts-font-icon ts-title-icon-' . $icon_location . ' ' . $icon_frame_class . ' ' . $animation_icon . ' ' . $icon_frame_radius . '" src="' . $icon_image_path[0] . '" style="' . $icon_frame_style . ' ' . $icon_image_style . ' display: inline-block !important; margin-top: ' . $icon_margin . 'px;">';
            $output .= '</div>';
        }
    }
    $output .= '</div>';
    if ($icon_location == "top" || $icon_location == "bottom") {
        $output .= '</div>';
    }
    $output .= !empty($animation_title) ? '</div></div>' : '</div>';
    $output .= '<div class="clearboth"></div>';
    echo $output;
    $myvariable = ob_get_clean();
    return $myvariable;
}