function TS_VCSC_Textillate_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-textillate'); wp_enqueue_style('ts-visual-composer-extend-front'); wp_enqueue_script('ts-extend-textillate'); wp_enqueue_script('ts-visual-composer-extend-front'); } extract(shortcode_atts(array('textillate' => '', 'font_size' => 36, 'font_color' => '#000000', 'font_weight' => 'inherit', 'font_align' => 'left', 'font_family' => '', 'font_type' => '', 'link' => '', 'animation_delay' => 100, 'animation_in' => '', 'animation_out' => '', 'animation_loop' => 'false', 'animation_pause' => 4000, 'text_order_in' => '', 'text_order_out' => '', 'margin_bottom' => '0', 'margin_top' => '0', 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); if (!empty($el_id)) { $textillate_id = $el_id; } else { $textillate_id = 'ts-vcsc-textillate-' . mt_rand(999999, 9999999); } 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-Textillate', $atts); } else { $css_class = ''; } $output = ''; if (strpos($font_family, 'Default') == false) { $google_font = TS_VCSC_GetFontFamily($textillate_id, $font_family, $font_type, false, true, false); } else { $google_font = ''; } $style_setting = $google_font . 'color: ' . $font_color . ' !important; font-size: ' . $font_size . 'px; line-height: ' . $font_size . 'px; font-weight: ' . $font_weight . '; text-align: ' . $font_align . '; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;'; $animation_in_string = 'data-delay="' . $animation_delay . '" data-in-effect="ts-composer-css-' . $animation_in . '" data-in-sync="' . ($text_order_in == "sync" ? "true" : "false") . '" data-in-shuffle="' . ($text_order_in == "shuffle" ? "true" : "false") . '" data-in-reverse="' . ($text_order_in == "reverse" ? "true" : "false") . '"'; if ($animation_loop == "true") { $animation_out_string = 'data-pause="' . $animation_pause . '" data-out-effect="ts-composer-css-' . $animation_out . '" data-out-sync="' . ($text_order_out == "sync" ? "true" : "false") . '" data-out-shuffle="' . ($text_order_out == "shuffle" ? "true" : "false") . '" data-out-reverse="' . ($text_order_out == "reverse" ? "true" : "false") . '"'; } else { $animation_out_string = ''; } $output .= '<div id="' . $textillate_id . '" class="ts-textillate ' . $el_class . ' ' . $css_class . '" data-loop="' . $animation_loop . '" ' . $animation_in_string . ' ' . $animation_out_string . ' style="' . $style_setting . '">' . $textillate . '</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; }
function TS_VCSC_Title_Ticker_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'); } } wp_enqueue_style('ts-font-ecommerce'); wp_enqueue_script('ts-extend-vticker'); if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_LoadFrontEndForcable == "false") { wp_enqueue_style('ts-visual-composer-extend-front'); wp_enqueue_script('ts-visual-composer-extend-front'); } extract(shortcode_atts(array('title_lines' => 'false', 'fixed_addition' => 'false', 'fixed_string' => '', 'fixed_color' => '#000000', 'title_strings' => '', 'viewport' => 'true', 'controls' => 'false', 'position' => 'left', 'direction' => 'up', 'reverse' => 'false', 'delay' => 0, 'speed' => 1000, 'break' => 3000, 'showall' => 'false', 'showitems' => 1, 'hover' => 'true', 'font_size' => 24, 'font_color' => '#000000', 'font_weight' => 'inherit', 'font_align' => 'left', 'font_theme' => 'true', 'font_family' => '', 'font_type' => '', 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); $output = $notice = $visible = ''; // Check for Front End Editor if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VCFrontEditMode == "true") { $editor_frontend = "true"; } else { $editor_frontend = "false"; } if (!empty($el_id)) { $titleticker_id = $el_id; } else { $titleticker_id = 'ts-vcsc-title-ticker-' . mt_rand(999999, 9999999); } if ($font_theme == "false") { $output .= TS_VCSC_GetFontFamily($titleticker_id, $font_family, $font_type); } $title_strings = explode(",", $title_strings); if ($controls == "true" && ($position == "top" || $position == "left")) { if ($font_size + 4 < 39) { $lineheight = 39; } else { $lineheight = $font_size + 4; } } else { $lineheight = $font_size + 4; } $style_setting = 'font-size: ' . $font_size . 'px; line-height: ' . $lineheight . 'px; letter-spacing: 0px; font-weight: ' . $font_weight . '; text-align: ' . $font_align . ';'; 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_Title_Ticker', $atts); } else { $css_class = ''; } $output .= '<div id="' . $titleticker_id . '" class="ts-title-ticker-container ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; width: 100%; ' . $style_setting . '" data-frontend="' . $editor_frontend . '" data-viewport="' . $viewport . '" data-alignment="' . $font_align . '" data-pretext="' . ($fixed_addition == "true" && $fixed_string != '' ? 'true' : 'false') . '" data-controls="' . $controls . '" data-position="' . $position . '" data-reverse="' . $reverse . '" data-direction="' . $direction . '" data-showall="' . $showall . '" data-items="' . $showitems . '" data-hover="' . $hover . '" data-delay="' . $delay . '" data-speed="' . $speed . '" data-break="' . $break . '">'; $output .= '<div class="ts-title-ticker-holder">'; if ($controls == "true" && ($position == "top" || $position == "left")) { $output .= '<div class="ts-title-ticker-controls ts-title-ticker-controls-' . $position . '" style="display: none;">'; $output .= '<div class="ts-title-ticker-prev"><span class="ts-ecommerce-arrowleft5"></span></div>'; $output .= '<div class="ts-title-ticker-next"><span class="ts-ecommerce-arrowright5"></span></div>'; $output .= '<div class="ts-title-ticker-pause" data-active="false"><span class="ts-ecommerce-pause"></span></div>'; $output .= '<div class="ts-title-ticker-play" data-active="true"><span class="ts-ecommerce-play"></span></div>'; $output .= '</div>'; } if ($fixed_addition == "true" && $fixed_string != '') { $output .= '<span class="ts-title-ticker-pretext" style="' . $style_setting . ' color: ' . $fixed_color . ';">' . $fixed_string . '</span><span class="ts-title-ticker-filler" style="color: ' . $fixed_color . ';">...</span>'; } $output .= '<div class="ts-title-ticker-animated" style="' . $style_setting . ' color: ' . $font_color . ';">'; $output .= '<ul class="ts-title-ticker-list" style="">'; foreach ($title_strings as $item) { $output .= '<li style="text-align: ' . $font_align . ';"><span class="ts-title-ticker-item" style="text-align: ' . $font_align . ';">' . $item . '</span></li>'; } $output .= '</ul>'; $output .= '</div>'; if ($controls == "true" && ($position == "bottom" || $position == "right")) { $output .= '<div class="ts-title-ticker-controls ts-title-ticker-controls-' . $position . '" style="display: none;">'; $output .= '<div class="ts-title-ticker-prev"><span class="ts-ecommerce-arrowleft5"></span></div>'; $output .= '<div class="ts-title-ticker-next"><span class="ts-ecommerce-arrowright5"></span></div>'; $output .= '<div class="ts-title-ticker-pause" data-active="false"><span class="ts-ecommerce-pause"></span></div>'; $output .= '<div class="ts-title-ticker-play" data-active="true"><span class="ts-ecommerce-play"></span></div>'; $output .= '</div>'; } $output .= '</div>'; $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; }
function TS_VCSC_Content_Flip_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('flip_style' => 'style1', 'flip_effect_style1' => 'horizontal', 'flip_effect_style2' => 'ts-flip-right', 'flip_effect_speed' => 'medium', 'flip_trigger' => 'hover', 'flip_size_auto' => 'true', 'flip_size_type' => 'fixed', 'flip_size' => 200, 'flip_size_min' => 200, 'flip_size_max' => 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', 'font_fronttitle_family' => 'Default', 'font_fronttitle_type' => '', 'font_frontcontent_family' => 'Default', 'font_frontcontent_type' => '', 'font_backtitle_family' => 'Default', 'font_backtitle_type' => '', 'font_backcontent_family' => 'Default', 'font_backcontent_type' => '', 'font_button_family' => 'Default', 'font_button_type' => '', '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 ($flip_trigger == "hover") { if ($flip_style == "style1") { $flipper_type = 'flip-container-frame-hover'; } else { if ($flip_style == "style2") { $flipper_type = 'ts-flip-cube-hover'; } } } else { if ($flip_trigger == "click") { if ($flip_style == "style1") { $flipper_type = 'flip-container-frame-click'; } else { if ($flip_style == "style2") { $flipper_type = 'ts-flip-cube-click'; } } } } 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 = ''; } // Height Settings if ($flip_size_auto == "false") { if ($flip_size_type == 'fixed') { $content_height = 'height: ' . $flip_size . 'px;'; } else { if ($flip_size_type == 'minimum') { $content_height = 'min-height: ' . $flip_size . 'px;'; } else { if ($flip_size_type == 'maximum') { $content_height = 'max-height: ' . $flip_size . 'px;'; } } } } else { $content_height = ''; } // Custom Font Settings if (strpos($font_fronttitle_family, 'Default') === false) { $google_font_fronttitle = TS_VCSC_GetFontFamily($flip_box_id . " h3.ts-flip-front-title", $font_fronttitle_family, $font_fronttitle_type, false, true, false); } else { $google_font_fronttitle = ''; } if (strpos($font_frontcontent_family, 'Default') === false) { $google_font_frontcontent = TS_VCSC_GetFontFamily($flip_box_id . " .ts-flip-front-content", $font_frontcontent_family, $font_frontcontent_type, false, true, false); } else { $google_font_frontcontent = ''; } if (strpos($font_backtitle_family, 'Default') === false) { $google_font_backtitle = TS_VCSC_GetFontFamily($flip_box_id . " h3.ts-flip-back-title", $font_backtitle_family, $font_backtitle_type, false, true, false); } else { $google_font_backtitle = ''; } if (strpos($font_backcontent_family, 'Default') === false) { $google_font_backcontent = TS_VCSC_GetFontFamily($flip_box_id . " .ts-flip-back-content", $font_backcontent_family, $font_backcontent_type, false, true, false); } else { $google_font_backcontent = ''; } if (strpos($font_button_family, 'Default') === false) { $google_font_button = TS_VCSC_GetFontFamily($flip_box_id . " .ts-flip-link", $font_button_family, $font_button_type, false, true, false); } else { $google_font_button = ''; } 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 ' . $flipper_type . ' ' . $el_class . ' ' . $animation_css . ' ' . ($flip_size_auto == "true" ? "auto" : "fixed") . ' ' . $css_class . '" data-trigger="' . $flip_trigger . '" data-autoheight="' . $flip_size_auto . '" style="' . $content_height . ' 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-content 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 class="ts-flip-front-title" style="color: ' . $front_color_title . '; ' . $google_font_fronttitle . '">' . $front_title . '</h3>'; if ($back_html == "true") { $output .= '<p class="ts-flip-front-content ts-flip-text" style="' . $google_font_frontcontent . '">' . do_shortcode(rawurldecode(base64_decode(strip_tags($front_content_html)))) . '</p>'; } else { $output .= '<p class="ts-flip-front-content ts-flip-text" style="' . $google_font_frontcontent . '">' . strip_tags($front_content) . '</p>'; } } $output .= '</div>'; $output .= '</div>'; $output .= '<div class="flip-container-flipper-content 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 class="ts-flip-back-title" style="color: ' . $back_color_title . '; ' . $google_font_backtitle . '">' . $back_title . '</h3>'; if ($back_html == "true") { $output .= '<p class="ts-flip-back-content ts-flip-text" style="' . $google_font_backcontent . '">' . do_shortcode(rawurldecode(base64_decode(strip_tags($back_content_html)))) . '</p>'; } else { $output .= '<p class="ts-flip-back-content ts-flip-text" style="' . $google_font_backcontent . '">' . 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 . '" class="ts-flip-link-anchor" style="color: ' . $read_more_color . '; background: ' . $read_more_background . '; ' . $google_font_button . '">' . $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 . ' ' . $flipper_type . ' ' . $el_class . ' ' . $animation_css . ' ' . ($flip_size_auto == "true" ? "auto" : "fixed") . ' ' . $css_class . '" data-trigger="' . $flip_trigger . '" data-autoheight="' . $flip_size_auto . '" style="' . $content_height . '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 class="ts-flip-front-title" style="color: ' . $front_color_title . '; ' . $front_panel_adjust . '; ' . $google_font_fronttitle . '">' . $front_title . '</h3>'; if ($back_html == "true") { $output .= '<p class="ts-flip-front-content ts-flip-text" style="' . $google_font_frontcontent . '">' . do_shortcode(rawurldecode(base64_decode(strip_tags($front_content_html)))) . '</p>'; } else { $output .= '<p class="ts-flip-front-content ts-flip-text" style="' . $google_font_frontcontent . '">' . 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 class="ts-flip-back-title" style="color: ' . $back_color_title . '; ' . $google_font_backtitle . '">' . $back_title . '</h3>'; if ($back_html == "true") { $output .= '<p class="ts-flip-back-content ts-flip-text" style="' . $google_font_backcontent . '">' . do_shortcode(rawurldecode(base64_decode(strip_tags($back_content_html)))) . '</p>'; } else { $output .= '<p class="ts-flip-back-content ts-flip-text" style="' . $google_font_backcontent . '">' . 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 . '" class="ts-flip-link-anchor" style="color: ' . $read_more_color . '; background: ' . $read_more_background . '; ' . $google_font_button . '">' . $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_Teaser_Block_Single($atts) { global $VISUAL_COMPOSER_EXTENSIONS; ob_start(); wp_enqueue_style('ts-extend-simptip'); wp_enqueue_style('ts-extend-animations'); wp_enqueue_style('ts-extend-buttons'); wp_enqueue_style('ts-visual-composer-extend-front'); wp_enqueue_script('ts-visual-composer-extend-front'); extract(shortcode_atts(array('teaser_graphic' => 'true', 'image' => '', 'image_responsive' => 'true', 'image_width' => 300, 'image_height' => 200, 'attribute_alt' => 'false', 'attribute_alt_value' => '', 'overlay' => '#0094FF', 'color_background' => '#ffffff', 'color_separator' => '#049cdb', 'color_title' => '#a2a2a2', 'color_subtitle' => '#aaaaaa', 'title' => '', 'info_position' => 'bottom', 'icon_position' => '', 'icon' => '', 'icon_size' => 18, 'icon_color' => '#aaaaaa', 'subtitle' => '', 'link' => '', 'button_type' => '', 'button_square' => 'ts-button-3d', 'button_rounded' => 'ts-button-3d ts-button-rounded', 'button_pill' => 'ts-button-3d ts-button-pill', 'button_circle' => 'ts-button-3d ts-button-circle', 'button_flat' => 'ts-dual-buttons-sun-flower', 'button_hover' => 'ts-dual-buttons-preview-default ts-dual-buttons-hover-default', 'button_wrapper' => 'false', 'button_text' => 'Read More', 'button_font' => 14, 'font_title_family' => 'Default', 'font_title_type' => '', 'font_title_size' => 18, 'font_content_family' => 'Default', 'font_content_type' => '', 'font_content_size' => 14, 'font_button_family' => 'Default', 'font_button_type' => '', 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); $image_teaser_id = 'ts-vcsc-image-teaser-' . mt_rand(999999, 9999999); // Teaser Link $link = $link == '||' ? '' : $link; $link = vc_build_link($link); $a_href = $link['url']; $a_title = $link['title']; $a_target = $link['target']; // Check for Front End Editor if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VCFrontEditMode == "true") { $frontend_edit = 'true'; } else { $frontend_edit = 'false'; } // Teaser Image if ($teaser_graphic == 'false') { $info_position = "top"; $alt_attribute = ""; } else { if ($image_responsive == "true") { $teaser_image = wp_get_attachment_image_src($image, 'full'); } else { $teaser_image = wp_get_attachment_image_src($image, array($image_width, $image_height)); } if ($teaser_image == false) { $teaser_image = TS_VCSC_GetResourceURL('images/defaults/no_image.jpg'); } else { $teaser_image = $teaser_image[0]; } $image_extension = pathinfo($teaser_image, PATHINFO_EXTENSION); if ($attribute_alt == "true") { $alt_attribute = $attribute_alt_value; } else { $alt_attribute = basename($teaser_image, "." . $image_extension); } } // Teaser Button Type if ($button_type == "square") { $button_style = 'ts-button ' . $button_square; $button_font = ''; $button_padding = ''; } else { if ($button_type == "rounded") { $button_style = 'ts-button ' . $button_rounded; $button_font = ''; $button_padding = ''; } else { if ($button_type == "pill") { $button_style = 'ts-button ' . $button_pill; $button_font = ''; $button_padding = ''; } else { if ($button_type == "circle") { $button_style = 'ts-button ' . $button_circle; $button_font = 'font-size: ' . $button_font . 'px;'; $button_padding = ''; } else { if ($button_type == "flat") { $button_flat = str_replace("ts-color-button", "ts-dual-buttons", $button_flat); $button_style = $button_flat . ' ' . $button_hover; $button_font = 'font-size: ' . $button_font . 'px;'; $button_padding = 'padding: 10px 5px;'; } else { $button_style = ''; $button_font = ''; $button_padding = ''; } } } } } // Teaser Icon Settings if (!empty($icon) && $icon != "transparent" && $icon_position != "") { $icon_style = 'color: ' . $icon_color . '; width:' . $icon_size . 'px; height:' . $icon_size . 'px; font-size:' . $icon_size . 'px; line-height:' . $icon_size . 'px;'; } else { $icon_style = ''; } // Custom Font Settings if (strpos($font_title_family, 'Default') === false) { $google_font_title = TS_VCSC_GetFontFamily($image_teaser_id . " .ts-teaser-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($image_teaser_id . " .ts-teaser-text", $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($image_teaser_id . " .ts-readmore", $font_button_family, $font_button_type, false, true, false); } else { $google_font_button = ''; } $output = ''; if (function_exists('vc_shortcode_custom_css_class')) { $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'ts-teaser ' . $el_class . ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS_VCSC_Teaser_Block_Single', $atts); } else { $css_class = 'ts-teaser ' . $el_class; } $output .= '<div id="' . $image_teaser_id . '" class="' . $css_class . '" style="width: 100%; margin: 0px auto; padding: 0px;">'; $output .= '<div class="ts-teaser-item" style="background: ' . $color_background . ';">'; $output .= '<div class="ts-teaser-padding">'; if ($info_position == "top") { $output .= '<div class="ts-teaser-head">'; $output .= '<h2 class="ts-teaser-title" style="' . ($teaser_graphic == 'false' ? 'padding-top: 20px;' : '') . ' border-top: none; margin-top: 0; font-size: ' . $font_title_size . 'px; background: ' . $color_background . '; ' . $google_font_title . '">'; if (!empty($icon) && $icon != "transparent" && $icon_position == "top") { $output .= '<span style="display: block; width: 100%; text-align: center; margin-top: 0px; margin-bottom: 10px;"><i style="' . $icon_style . '" class="' . $icon . '"></i></span>'; } else { if (!empty($icon) && $icon != "transparent" && $icon_position == "left") { $output .= '<i style="margin-right: 5px; ' . $icon_style . '" class="' . $icon . '"></i>'; } } $output .= '<a href="' . $a_href . '" target="' . $a_target . '" style=" color: ' . $color_title . ';">' . $title . '</a>'; if (!empty($icon) && $icon != "transparent" && $icon_position == "right") { $output .= '<i style="margin-left: 5px; ' . $icon_style . '" class="' . $icon . '"></i>'; } else { if (!empty($icon) && $icon != "transparent" && $icon_position == "bottom") { $output .= '<span style="display: block; width: 100%; text-align: center; margin-top: 10px; margin-bottom: 0px;"><i style="' . $icon_style . '" class="' . $icon . '"></i></span>'; } } $output .= '</h2>'; $output .= '</div>'; $output .= '<div class="ts-teaser-seperator" style="background: ' . $color_separator . ';"></div>'; $output .= '<div class="ts-teaser-text" style="font-size: ' . $font_content_size . 'px; color: ' . $color_subtitle . '; ' . $google_font_content . '">'; $output .= $subtitle; $output .= '</div>'; } if ($teaser_graphic == 'true') { if ($info_position == "top") { $output .= '<div class="ts-teaser-image-container" style="border-top: 1px solid #dddddd;">'; } else { $output .= '<div class="ts-teaser-image-container">'; } $output .= '<a href="' . $a_href . '" target="' . $a_target . '">'; if ($info_position == "bottom") { $output .= '<img src="' . $teaser_image . '" alt="' . $alt_attribute . '" class="ts-teaser-image" style="">'; } else { $output .= '<img src="' . $teaser_image . '" alt="' . $alt_attribute . '" class="ts-teaser-image" style="margin-bottom: -7px;">'; } $output .= '<span class="ts-teaser-hovercontent" style="background-color: ' . $overlay . '"></span>'; $output .= '<span class="ts-teaser-hoverimage"></span>'; $output .= '</a>'; $output .= '</div>'; } if ($info_position == "bottom") { $output .= '<div class="ts-teaser-head">'; $output .= '<h2 class="ts-teaser-title" style="font-size: ' . $font_title_size . 'px; background: ' . $color_background . '; ' . $google_font_title . '">'; if (!empty($icon) && $icon != "transparent" && $icon_position == "top") { $output .= '<span style="display: block; width: 100%; text-align: center; margin-top: 0px; margin-bottom: 10px;"><i style="' . $icon_style . '" class="' . $icon . '"></i></span>'; } else { if (!empty($icon) && $icon != "transparent" && $icon_position == "left") { $output .= '<i style="margin-right: 5px; ' . $icon_style . '" class="' . $icon . '"></i>'; } } $output .= '<a href="' . $a_href . '" target="' . $a_target . '" style=" color: ' . $color_title . ';">' . $title . '</a>'; if (!empty($icon) && $icon != "transparent" && $icon_position == "right") { $output .= '<i style="margin-left: 5px; ' . $icon_style . '" class="' . $icon . '"></i>'; } else { if (!empty($icon) && $icon != "transparent" && $icon_position == "bottom") { $output .= '<span style="display: block; width: 100%; text-align: center; margin-top: 10px; margin-bottom: 0px;"><i style="' . $icon_style . '" class="' . $icon . '"></i></span>'; } } $output .= '</h2>'; $output .= '</div>'; $output .= '<div class="ts-teaser-seperator" style="background: ' . $color_separator . ';"></div>'; $output .= '<div class="ts-teaser-text" style="font-size: ' . $font_content_size . 'px; color: ' . $color_subtitle . '; ' . $google_font_content . '">'; $output .= $subtitle; $output .= '</div>'; } if ($button_type != "") { if ($button_wrapper == "true") { $output .= '<div class="ts-readmore-wrap"><span class="ts-button-wrap" style="width: 75%;">'; } $output .= '<a href="' . $a_href . '" target="' . trim($a_target) . '" class="ts-readmore ' . $button_style . '" style="' . $button_font . ' ' . $button_padding . ' ' . $google_font_button . '"><span>' . $button_text . '</span></a>'; if ($button_wrapper == "true") { $output .= '</span></div>'; } } $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; echo $output; $myvariable = ob_get_clean(); return $myvariable; }
function TS_VCSC_SlitSlider_Item($atts, $content = null) { global $VISUAL_COMPOSER_EXTENSIONS; ob_start(); if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VCFrontEditMode == "true") { $frontend_edit = 'true'; } else { $frontend_edit = 'false'; } extract(shortcode_atts(array('background' => 'image', 'image' => '', 'color' => '#cccccc', 'gradient' => '', 'icon' => '', 'title' => '', 'cite' => '', 'orientation' => 'horizontal', 'rotation1' => -25, 'rotation2' => -25, 'scale1' => 200, 'scale2' => 200, 'kenburns_effect' => '', 'icon_color' => '#4e4e4d', 'icon_border' => 'rgba(150, 150, 150, 0.4)', 'icon_shadow' => '#f7f7f7', 'title_color' => '#ffffff', 'title_size' => 75, 'title_align' => 'center', 'content_color' => '#ffffff', 'content_quote' => 'false', 'content_cite' => 'rgba(61, 61, 61, 0.65)', 'cite_color' => '#4e4e4d', 'font_title_family' => 'Default', 'font_title_type' => '', 'font_content_family' => 'Default', 'font_content_type' => '', 'font_cite_family' => 'Default', 'font_cite_type' => '', 'link_slide' => '', 'link_wrapper' => 'button', 'link_text' => 'Learn More', 'link_style' => 'empty', 'link_color' => 'white', 'link_align' => 'left', 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); $slitslider_random = mt_rand(999999, 9999999); $slitslider_id = 'ts-slit-slide-' . $slitslider_random; // Images $slitslider_image = wp_get_attachment_image_src($image, 'full'); $thumbnail_image = wp_get_attachment_image_src($image, 'medium'); $output = $animation = ''; // Font Settings if (strpos($font_title_family, 'Default') === false) { $google_font_title = TS_VCSC_GetFontFamily($slitslider_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($slitslider_id . " .ts-slit-slide-inner-text", $font_content_family, $font_content_type, false, true, false); } else { $google_font_content = ''; } if (strpos($font_cite_family, 'Default') === false) { $google_font_cite = TS_VCSC_GetFontFamily($slitslider_id . " .ts-icon-box-readmore", $font_cite_family, $font_cite_type, false, true, false); } else { $google_font_cite = ''; } // Link Settings if ($link_slide != '') { $link = $link_slide == '||' ? '' : $link_slide; $link = vc_build_link($link); $a_href = $link['url']; $a_title = $link['title']; $a_target = $link['target']; } else { $a_href = ""; $a_title = ""; $a_target = ""; } // Ken Burns Effect if ($kenburns_effect == 'random') { $kenburns_effects = array('kenburns', 'kenburnsLeft', 'kenburnsRight', 'kenburnsUp', 'kenburnsUpLeft', 'kenburnsUpRight', 'kenburnsDown', 'kenburnsDownLeft', 'kenburnsDownRight'); $kenburns_class = 'ts-css-animation-' . $kenburns_effects[array_rand($kenburns_effects, 1)]; } else { if ($kenburns_effect != '') { $kenburns_class = 'ts-css-animation-' . $kenburns_effect; } else { $kenburns_class = ""; } } // CSS Class Style Overrides if (function_exists('vc_shortcode_custom_css_class')) { $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'ts-slit-slide ' . $el_class . ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS_VCSC_SlitSlider_Item', $atts); } else { $css_class = 'ts-slit-slide ' . $el_class; } $output .= '<div id="' . $slitslider_id . '" class="' . $css_class . '" style="display: ' . ($frontend_edit == 'false' ? 'none' : 'block') . ';" data-image="' . $slitslider_image[0] . '" data-kenburns="' . ($background == 'color' ? "false" : ($kenburns_effect != '' ? 'true' : 'false')) . '" data-effect="' . $kenburns_class . '" data-orientation="' . $orientation . '" data-slice1-rotation="' . $rotation1 . '" data-slice2-rotation="' . $rotation2 . '" data-slice1-scale="' . $scale1 / 100 . '" data-slice2-scale="' . $scale2 / 100 . '">'; $output .= '<div class="ts-slit-slide-inner">'; if ($background == 'image') { $output .= '<div class="ts-slit-slide-image ' . $kenburns_class . '" style="background-image: url(' . $slitslider_image[0] . '); background-color: transparent;"></div>'; } else { if ($background == 'color') { $output .= '<div class="ts-slit-slide-image" style="background-image: none; background-color: ' . $color . ';"></div>'; } else { if ($background == 'gradient') { $output .= '<div class="ts-slit-slide-image ' . $kenburns_class . '" style="background-image: none; background: ' . $gradient . ';"></div>'; } } } $output .= '<div class="ts-slit-slide-inner-center">'; if ($icon != '' && $icon != 'transparent' && $icon != 'none') { $icon_style = '-webkit-box-shadow: inset 0 0 0 5px ' . $icon_shadow . '; -moz-box-shadow: inset 0 0 0 5px ' . $icon_shadow . '; box-shadow: inset 0 0 0 5px ' . $icon_shadow . ';'; $output .= '<div class="ts-slit-slide-deco" style="color: ' . $icon_color . '; border: 2px dashed ' . $icon_border . ';"><i class="' . $icon . '" style="' . $icon_style . '"></i></div>'; } if ($title != '') { if ($a_href != '' && ($link_wrapper == 'title' || $link_wrapper == 'both')) { $output .= '<a href="' . $a_href . '" target="' . $a_target . '" title="' . $a_title . '">'; } $output .= '<h2 class="ts-slit-slide-title" style="color: ' . $title_color . '; text-align: ' . $title_align . '; font-size: ' . $title_size . 'px; ' . $google_font_title . ' ' . ($icon != '' && $icon != 'transparent' && $icon != 'none' ? 'padding-top: 190px;' : '') . '">' . $title . '</h2>'; if ($a_href != '' && ($link_wrapper == 'title' || $link_wrapper == 'both')) { $output .= '</a>'; } } $output .= '<blockquote class="ts-slit-slide-inner-message" style="color: ' . $content_color . ';">'; if ($content_quote == 'true') { $output .= '<div class="ts-slit-slide-inner-frame">'; $output .= '<div class="ts-slit-slide-inner-quote" style="color: ' . $content_cite . ';"></div>'; } $output .= '<div class="ts-slit-slide-inner-text" style="' . ($content_quote == 'true' ? "padding-left: 60px;" : "") . '' . $google_font_content . '">'; if (function_exists('wpb_js_remove_wpautop')) { $output .= wpb_js_remove_wpautop(do_shortcode($content), true); } else { $output .= do_shortcode($content); } $output .= '</div>'; if ($content_quote == 'true') { $output .= '</div>'; } if ($cite != '') { $output .= '<cite style="color: ' . $cite_color . '; ' . $google_font_cite . '">' . $cite . '</cite>'; } if ($a_href != '' && ($link_wrapper == 'button' || $link_wrapper == 'both')) { $output .= '<a class="ts-slit-slide-button-' . $link_style . ' ' . $link_color . '" href="' . $a_href . '" target="' . $a_target . '" title="' . $a_title . '" style="text-align: ' . $link_align . ';"><span>' . $link_text . '</span></a>'; } $output .= '</blockquote>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; echo $output; $myvariable = ob_get_clean(); return $myvariable; }
function TS_VCSC_Info_Notice_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('icon_replace' => 'false', 'panel_layout' => 'info', 'panel_type' => 'normal', 'panel_icon' => '', 'panel_image' => '', 'panel_size' => 50, 'panel_spacer' => 15, 'panel_title' => '', 'font_title_family' => 'Default', 'font_title_type' => '', 'font_content_family' => 'Default', 'font_content_type' => '', 'color_icon' => '#cccccc', 'color_title' => '#666666', 'color_border' => '#cccccc', 'color_background' => '#ffffff', 'animations' => 'false', 'animation_effect' => 'ts-hover-css-', 'animation_class' => '', 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); if (!empty($el_id)) { $info_panel_id = $el_id; } else { $info_panel_id = 'ts-info-notice-panel-' . mt_rand(999999, 9999999); } $output = $notice = $visible = ''; 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_Info_Notice', $atts); } else { $css_class = ''; } if ($panel_type == "custom") { if ($panel_layout == "info") { $custom_color_icon = 'color: ' . $color_icon . ';'; $custom_color_title = 'color: ' . $color_title . ';'; $custom_color_border = 'border-color: ' . $color_border . ';'; $custom_color_background = 'background-color: ' . $color_background . ';'; } else { $custom_color_icon = 'color: ' . $color_icon . ';'; $custom_color_title = 'color: ' . $color_title . ';'; $custom_color_border = 'border-color: ' . $color_border . ';'; $custom_color_background = 'background-color: ' . $color_background . ';'; } } else { $custom_color_icon = ''; $custom_color_title = ''; $custom_color_border = ''; $custom_color_background = ''; } if (!empty($animation_class)) { $animation_icon = $animation_effect . $animation_class; } else { $animation_icon = ''; } // Custom Font Settings if (strpos($font_title_family, 'Default') === false) { $google_font_title = TS_VCSC_GetFontFamily($info_panel_id . " .ts-" . $panel_layout . "-panel-info-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($info_panel_id . " .ts-" . $panel_layout . "-panel-info-main", $font_content_family, $font_content_type, false, true, false); } else { $google_font_content = ''; } $output .= '<div id="' . $info_panel_id . '" class="ts-info-notice-panel-main ' . $el_class . ' ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<div class="ts-' . $panel_layout . '-panel-wrapper ts-' . $panel_layout . '-panel-' . $panel_type . '" style="' . $custom_color_background . ' ' . $custom_color_border . '">'; $output .= '<div class="ts-' . $panel_layout . '-panel-field">'; if ($icon_replace == "false") { if ($panel_icon != "" && $panel_icon != "transparent") { $output .= '<div class="ts-' . $panel_layout . '-panel-info-icon" style="width: ' . $panel_size . 'px;"><i class="' . $panel_icon . ' ' . $animation_icon . '" style="font-size: ' . $panel_size . 'px; line-height: ' . $panel_size . 'px; ' . $custom_color_icon . '"></i></div>'; $output .= '<div class="ts-' . $panel_layout . '-panel-info-spacer" style="width: ' . $panel_spacer . 'px;"></div>'; } } else { if ($panel_image != "") { $panel_image = wp_get_attachment_image_src($panel_image, 'medium'); $output .= '<div class="ts-' . $panel_layout . '-panel-info-icon" style="width: ' . $panel_size . 'px;"><img class="' . $animation_icon . '" src="' . $panel_image[0] . '" style="width: ' . $panel_size . 'px; height: ' . $panel_size . 'px;"></div>'; $output .= '<div class="ts-' . $panel_layout . '-panel-info-spacer" style="width: ' . $panel_spacer . 'px;"></div>'; } } $output .= '<div class="ts-' . $panel_layout . '-panel-info-desc">'; if ($panel_title != '') { $output .= '<div class="ts-' . $panel_layout . '-panel-info-title" style="' . $custom_color_title . ' ' . $google_font_title . '">' . $panel_title . '</div>'; } if (function_exists('wpb_js_remove_wpautop')) { $output .= '<div class="ts-' . $panel_layout . '-panel-info-main" style="' . $google_font_content . '">' . wpb_js_remove_wpautop(do_shortcode($content), true) . '</div>'; } else { $output .= '<div class="ts-' . $panel_layout . '-panel-info-main" style="' . $google_font_content . '">' . do_shortcode($content) . '</div>'; } $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; echo $output; $myvariable = ob_get_clean(); return $myvariable; }
function TS_VCSC_Title_Typed_Function($atts) { global $VISUAL_COMPOSER_EXTENSIONS; ob_start(); // Check for Front End Editor if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VCFrontEditMode == "true") { $editor_frontend = "true"; } else { $editor_frontend = "false"; } 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 ($editor_frontend == "false") { wp_enqueue_script('ts-extend-typed'); } if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_LoadFrontEndForcable == "false") { wp_enqueue_style('ts-visual-composer-extend-front'); wp_enqueue_script('ts-visual-composer-extend-front'); } extract(shortcode_atts(array('title_lines' => 'false', 'fixed_addition' => 'false', 'fixed_string' => '', 'fixed_color' => '#000000', 'title_strings' => '', 'whitespace' => 'pre', 'padding' => 15, 'showall' => 'false', 'font_size' => 36, 'font_color' => '#000000', 'font_weight' => 'inherit', 'font_align' => 'center', 'font_family' => '', 'font_type' => '', 'viewport' => 'true', 'startdelay' => 0, 'typespeed' => 10, 'backdelay' => 500, 'backspeed' => 10, 'loop' => 'false', 'loopcount' => 0, 'showcursor' => 'true', 'cursorcolor' => '#cccccc', 'removecursor' => 'false', 'mobile' => 'false', 'wrapper' => 'h1', 'title_mobile' => '', 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); $output = $notice = $visible = ''; if (!empty($el_id)) { $typewriter_id = $el_id; } else { $typewriter_id = 'ts-vcsc-title-typed-' . mt_rand(999999, 9999999); } if (strpos($font_family, 'Default') === false) { $google_font = TS_VCSC_GetFontFamily($typewriter_id, $font_family, $font_type, false, true, false); } else { $google_font = ''; } if ($title_lines == "true") { $title_class = 'ts-title-typed-style1'; } else { $title_class = ''; } if ($title_mobile != '') { $title_mobile = $title_mobile; } else { if ($fixed_addition == "true") { $title_mobile = $fixed_string . $title_strings; } else { $title_mobile = $title_strings; } } if ($editor_frontend == "true") { $whitespace = 'normal'; } $style_setting = $google_font . 'font-size: ' . $font_size . 'px; line-height: ' . $font_size . 'px; letter-spacing: 0px; font-weight: ' . $font_weight . '; text-align: ' . $font_align . '; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . '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_Title_Typed', $atts); } else { $css_class = ''; } $output .= '<div id="' . $typewriter_id . '" class="ts-title-typed-container ' . $css_class . ' ' . $title_class . '" style="width: 100%; ' . $style_setting . '" data-frontend="' . $editor_frontend . '" data-mobile="' . $mobile . '" data-wrapper="' . $wrapper . '" data-title="' . $title_mobile . '" data-viewport="' . $viewport . '" data-strings="' . $title_strings . '" data-pretext="' . $fixed_string . '" data-showall="' . $showall . '" data-showcursor="' . $showcursor . '" data-cursorcolor="' . $cursorcolor . '" data-removecursor="' . $removecursor . '" data-loop="' . $loop . '" data-loopcount="' . ($loopcount == 0 ? "false" : $loopcount) . '" data-startdelay="' . $startdelay . '" data-backdelay="' . $backdelay . '" data-typespeed="' . $typespeed . '" data-backspeed="' . $backspeed . '">'; $output .= '<div class="ts-title-typed-holder" style="padding: 0 ' . $padding . 'px;">'; if ($fixed_addition == "true") { $output .= '<span class="ts-title-typed-pretext" style="color: ' . $fixed_color . '; white-space: ' . $whitespace . ';">' . $fixed_string . '</span>'; } $output .= '<span class="ts-title-typed-string" style="color: ' . $font_color . '; white-space: ' . $whitespace . ';"></span>'; $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(); 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; }