function mapmarker_settings_field($settings, $value) { global $VISUAL_COMPOSER_EXTENSIONS; $dependency = vc_generate_dependencies_attributes($settings); $param_name = isset($settings['param_name']) ? $settings['param_name'] : ''; $type = isset($settings['type']) ? $settings['type'] : ''; $pattern_select = isset($settings['value']) ? $settings['value'] : ''; $encoding = isset($settings['encoding']) ? $settings['encoding'] : ''; $url = $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginPath; $dir = $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginDir; $output = ''; $counter = 0; $output .= __("Search for Marker:", "ts_visual_composer_extend"); $output .= '<input name="ts-font-marker-search" id="ts-font-marker-search" class="ts-font-marker-search" type="text" placeholder="Search ..." />'; $output .= '<div class="ts-visual-selector ts-font-marker-wrapper">'; $output .= '<input name="' . $param_name . '" id="' . $param_name . '" class="wpb_vc_param_value ' . $param_name . ' ' . $type . '" type="hidden" value="' . $value . '"/>'; $markerpath = $dir . 'images/marker/'; $images = glob($markerpath . "*.png"); foreach ($images as $img) { $markername = basename($img); $counter++; if ($value == '' && $counter == 1) { $output .= '<a class="TS_VCSC_Marker_Link current" href="#" title="' . __("Marker Name:", "ts_visual_composer_extend") . ': ' . $markername . '" rel="' . $markername . '"><img src="' . TS_VCSC_GetResourceURL('images/marker/') . $markername . '" style="height: 37px; width: 32px;"><div class="selector-tick"></div></a>'; } else { if ($value == $markername) { $output .= '<a class="TS_VCSC_Marker_Link current" href="#" title="' . __("Marker Name:", "ts_visual_composer_extend") . ': ' . $markername . '" rel="' . $markername . '"><img src="' . TS_VCSC_GetResourceURL('images/marker/') . $markername . '" style="height: 37px; width: 32px;"><div class="selector-tick"></div></a>'; } else { $output .= '<a class="TS_VCSC_Marker_Link" href="#" title="' . __("Marker Name:", "ts_visual_composer_extend") . ': ' . $markername . '" rel="' . $markername . '"><img src="' . TS_VCSC_GetResourceURL('images/marker/') . $markername . '" style="height: 37px; width: 32px;"></a>'; } } } $output .= '</div>'; return $output; }
function audioselect_settings_field($settings, $value) { global $VISUAL_COMPOSER_EXTENSIONS; $dependency = vc_generate_dependencies_attributes($settings); $param_name = isset($settings['param_name']) ? $settings['param_name'] : ''; $type = isset($settings['type']) ? $settings['type'] : ''; $audio_format = isset($settings['audio_format']) ? $settings['audio_format'] : 'mpeg'; $audio_format = explode(',', $audio_format); $url = $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginPath; $output = ''; $args = array('post_type' => 'attachment', 'post_mime_type' => 'audio', 'post_status' => 'inherit', 'posts_per_page' => -1); if ($value != '') { $metadata = wp_get_attachment_metadata($value); $disabled = ''; $visible = 'display: block;'; $query_audios = new WP_Query($args); if ($query_audios->have_posts()) { foreach ($query_audios->posts as $audio) { if ($audio->ID == $value) { $audio_id = $value; $audio_title = $audio->post_title; $audio_length = isset($metadata['length_formatted']) ? $metadata['length_formatted'] : 'N/A'; break; } } } wp_reset_postdata(); } else { $metadata = array(); $disabled = 'disabled="disabled"'; $visible = 'display: none;'; $audio_id = ''; $audio_title = ''; $audio_url = ''; $audio_length = ''; } $output .= '<div class="ts_vcsc_audio_select_block" data-format="' . implode(',', $audio_format) . '">'; $output .= '<input style="display: none;" name="' . $settings['param_name'] . '" class="wpb_vc_param_value wpb-textinput audio_value ' . $param_name . ' ' . $type . '_field" type="text" value="' . $value . '" ' . $dependency . '/>'; $output .= '<input type="button" class="audio_select button" value="' . __('Select Audio', 'ts_visual_composer_extend') . '" style="width: 150px; text-align: center;">'; $output .= '<input type="button" class="audio_remove button" value="' . __('Remove Audio', 'ts_visual_composer_extend') . '" style="width: 150px; text-align: center; color: red; margin-left: 20px;" ' . $disabled . '>'; $output .= '<div class="audio_metadata_frame" style="width: 100%; margin-top: 20px; ' . $visible . '">'; $output .= '<div style="float: left; width: 92px; margin-right: 10px;">'; if (in_array("mp3", $audio_format) || in_array("mpeg", $audio_format)) { $output .= '<img src="' . TS_VCSC_GetResourceURL('images/mediatypes/mp3_audio.jpg') . '" style="width: 90px; height: auto; border: 1px solid #ededed;">'; } else { if (in_array("ogg", $audio_format) || in_array("ogv", $audio_format)) { $output .= '<img src="' . TS_VCSC_GetResourceURL('images/mediatypes/ogg_audio.jpg') . '" style="width: 90px; height: auto; border: 1px solid #ededed;">'; } } $output .= '</div>'; $output .= '<div style="float: left;">'; $output .= '<div style=""><span style="">' . __('Audio ID', 'ts_visual_composer_extend') . ': </span><span class="audio_metadata audio_id">' . $audio_id . '</span></div>'; $output .= '<div style=""><span style="">' . __('Audio Name', 'ts_visual_composer_extend') . ': </span><span class="audio_metadata audio_name">' . $audio_title . '</span></div>'; $output .= '<div style=""><span style="">' . __('Audio Duration', 'ts_visual_composer_extend') . ': </span><span class="audio_metadata audio_duration">' . ($audio_length != '' ? $audio_length : 'N/A') . '</span></div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; return $output; }
function imagehotspot_settings_field($settings, $value) { global $VISUAL_COMPOSER_EXTENSIONS; $dependency = vc_generate_dependencies_attributes($settings); $param_name = isset($settings['param_name']) ? $settings['param_name'] : ''; $type = isset($settings['type']) ? $settings['type'] : ''; $min = isset($settings['min']) ? $settings['min'] : ''; $max = isset($settings['max']) ? $settings['max'] : ''; $step = isset($settings['step']) ? $settings['step'] : ''; $unit = isset($settings['unit']) ? $settings['unit'] : ''; $decimals = isset($settings['decimals']) ? $settings['decimals'] : 0; $suffix = isset($settings['suffix']) ? $settings['suffix'] : ''; $class = isset($settings['class']) ? $settings['class'] : ''; $url = $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginPath; $coordinates = explode(",", $value); $output = ''; $required_vc = '4.3.0'; if (defined('WPB_VC_VERSION')) { if (version_compare(WPB_VC_VERSION, $required_vc) >= 0) { // Hotspot Image Preview $output .= '<div class="ts-image-hotspot-container-preview" style="margin-top: 30px;">'; $output .= '<img class="ts-image-hotspot-image-preview" data-default="' . TS_VCSC_GetResourceURL('images/other/hotspot_raster.jpg') . '" src="">'; $output .= '<div class="ts-image-hotspot-holder-preview">'; $output .= '<div class="ts-image-hotspot-single-preview" style="left: ' . $coordinates[0] . '%; top: ' . $coordinates[1] . '%;">'; $output .= '<div class="ts-image-hotspot-trigger-preview"><div class="ts-image-hotspot-trigger-pulse"></div><div class="ts-image-hotspot-trigger-dot"></div></div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '<div class="vc_clearfix"></div>'; // Message $output .= '<div class="" style="text-align: justify; margin-top: 30px; font-size: 13px; font-style: italic; color: #999999;">' . __("Use the sliders below or use your mouse to drag the hotspot to its desired spot on the image.", "ts_visual_composer_extend") . '</div>'; } else { // Message $output .= '<div class="" style="text-align: justify; margin-top: 0px; font-size: 13px; font-style: italic; color: #999999;">' . __("Use the sliders below to position the hotspot on its desired spot on the image.", "ts_visual_composer_extend") . '</div>'; } } else { // Message $output .= '<div class="" style="text-align: justify; margin-top: 0px; font-size: 13px; font-style: italic; color: #999999;">' . __("Use the sliders below to position the hotspot on its desired spot on the image.", "ts_visual_composer_extend") . '</div>'; } // Hidden Input $output .= '<input name="' . $param_name . '" id="' . $param_name . '" class="ts-nouislider-hotspot-value wpb_vc_param_value ' . $param_name . ' ' . $type . '" type="hidden" value="' . $value . '"/>'; // X-Position Slider $output .= '<div class="ts-nouislider-hotspot-slider" style="width: 100%; margin-top: 20px;">'; $output .= '<div class="" style="font-weight: bold;">' . __("Horizontal Position (X)", "ts_visual_composer_extend") . '</div>'; $output .= '<input id="ts-input-hotspot-horizontal" style="width: 100px; float: left; margin-left: 0px; margin-right: 10px;" name="" class="ts-nouislider-serial nouislider-input-selector nouislider-input-composer" type="text" value="' . $coordinates[0] . '"/>'; $output .= '<span style="float: left; margin-right: 30px; margin-top: 10px;" class="unit">' . $unit . '</span>'; $output .= '<div id="ts-nouislider-hotspot-horizontal" class="ts-nouislider-input ts-nouislider-hotspot-element" data-position="horizontal" data-value="' . $coordinates[0] . '" data-min="' . $min . '" data-max="' . $max . '" data-decimals="' . $decimals . '" data-step="' . $step . '" style="width: 250px; float: left; margin-top: 10px;"></div>'; $output .= '</div>'; $output .= '<div class="vc_clearfix"></div>'; // Y-Position Slider $output .= '<div class="ts-nouislider-hotspot-slider" style="width: 100%; margin-top: 20px;">'; $output .= '<div class="" style="font-weight: bold;">' . __("Vertical Position (Y)", "ts_visual_composer_extend") . '</div>'; $output .= '<input id="ts-input-hotspot-vertical" style="width: 100px; float: left; margin-left: 0px; margin-right: 10px;" name="" class="ts-nouislider-serial nouislider-input-selector nouislider-input-composer" type="text" value="' . $coordinates[1] . '"/>'; $output .= '<span style="float: left; margin-right: 30px; margin-top: 10px;" class="unit">' . $unit . '</span>'; $output .= '<div id="ts-nouislider-hotspot-vertical" class="ts-nouislider-input ts-nouislider-hotspot-element" data-position="vertical" data-value="' . $coordinates[1] . '" data-min="' . $min . '" data-max="' . $max . '" data-decimals="' . $decimals . '" data-step="' . $step . '" style="width: 250px; float: left; margin-top: 10px;"></div>'; $output .= '</div>'; return $output; }
function TS_VCSC_Title_Flipboard_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_script('ts-extend-flipflap'); wp_enqueue_style('ts-visual-composer-extend-front'); wp_enqueue_script('ts-visual-composer-extend-front'); extract(shortcode_atts(array('language' => 'latin', 'title' => '', 'start' => '', 'equalize' => 'true', 'dotted' => 'true', 'size' => 'large', 'style' => 'dark', 'speed' => 3, 'restart' => 'false', 'mobile' => 'false', 'wrapper' => 'h1', 'viewport' => 'false', 'delay' => 0, 'margin_top' => 20, 'margin_bottom' => 20, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); $output = ''; if ($language == "latin") { $title = preg_replace('/[^ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz 0123456789.,!?#@()+-=\\s]/', '', $title); $start = preg_replace('/[^ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz 0123456789.,!?#@()+-=\\s]/', '', $start); $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789.,!?#@()+-='; } else { if ($language == "greek") { $title = preg_replace('/[^ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΆΈΊΎΏΌαβγδεζηθικλμνξοπρστυφχψωάέίύόώϊϋ 0123456789.,!?#@()+-=\\s]/', '', $title); $start = preg_replace('/[^ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΆΈΊΎΏΌαβγδεζηθικλμνξοπρστυφχψωάέίύόώϊϋ 0123456789.,!?#@()+-=\\s]/', '', $start); $chars = 'ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΆΈΊΎΏΌάέίύόώϊϋ 0123456789.,!?#@()+-='; } else { if ($language == "russian") { $title = preg_replace('/[^АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмнопрстуфхцчшщъыьэюя 0123456789.,!?#@()+-=\\s]/', '', $title); $start = preg_replace('/[^АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмнопрстуфхцчшщъыьэюя 0123456789.,!?#@()+-=\\s]/', '', $start); $chars = 'АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ 0123456789.,!?#@()+-='; } } } $background_image = TS_VCSC_GetResourceURL('images/flipboard/ts_flipflap_' . $language . '_' . $style . '_' . $size . '.png'); // Flipboard Size if ($size == 'large') { $char_height = 100; $char_width = 50; } else { if ($size == 'medium') { $char_height = 70; $char_width = 35; } else { if ($size == 'small') { $char_height = 40; $char_width = 20; } } } 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_Flipboard', $atts); } else { $css_class = ''; } $output .= '<div class="ts-splitflap-container clearFixMe ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VCFrontEditMode == "true") { $output .= '<img class="ts-splitflap-image" src="' . TS_VCSC_GetResourceURL('images/other/ts_flipboard_title_' . $style . '.png') . '">'; $output .= '<div class="ts-splitflap-info">' . __("Title Text", "ts_visual_composer_extend") . ': ' . $title . '</div>'; $output .= '<div class="ts-splitflap-info">' . __("Flipboard Size", "ts_visual_composer_extend") . ': ' . $size . '</div>'; $output .= '<div class="ts-splitflap-info">' . __("Trigger on Viewport", "ts_visual_composer_extend") . ': ' . $viewport . '</div>'; } else { $output .= '<div class="ts-splitflap-wrapper" data-frontend="' . $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VCFrontEditMode . '" data-restart="' . $restart . '" data-mobile="' . $mobile . '" data-wrapper="' . $wrapper . '" data-text="' . strtoupper($title) . '" data-start="' . strtoupper($start) . '" data-equalize="' . $equalize . '" data-dotted="' . $dotted . '" data-chars="' . $chars . '" data-speed="' . $speed . '" data-size="' . $size . '" data-height="' . $char_height . '" data-width="' . $char_width . '" data-image="' . $background_image . '" data-viewport="' . $viewport . '" data-delay="' . $delay . '">'; $output .= '' . $title . ''; $output .= '</div>'; } $output .= '</div>'; echo $output; $myvariable = ob_get_clean(); return $myvariable; }
function TS_VCSC_Quick_Testimonial_Function($atts, $content = null) { global $VISUAL_COMPOSER_EXTENSIONS; ob_start(); wp_enqueue_style('ts-visual-composer-extend-front'); extract(shortcode_atts(array('avatar' => '', 'author' => '', 'position' => '', 'style' => 'style1', 'show_author' => 'true', 'show_avatar' => 'true', 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); $output = ''; if (!empty($el_id)) { $testimonial_block_id = $el_id; } else { $testimonial_block_id = 'ts-vcsc-quick-testimonial-' . mt_rand(999999, 9999999); } if ($avatar != '') { $testimonial_avatar = wp_get_attachment_image_src($avatar, 'full'); $testimonial_avatar = $testimonial_avatar[0]; } else { $testimonial_avatar = TS_VCSC_GetResourceURL('images/defaults/default_person.jpg'); } if (function_exists('vc_shortcode_custom_css_class')) { $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'ts-testimonial-main clearFixMe ' . $style . ' ' . $el_class . ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS_VCSC_Quick_Testimonial', $atts); } else { $css_class = 'ts-testimonial-main clearFixMe ' . $style . ' ' . $el_class; } if ($style == "style1") { $output .= '<div id="' . $testimonial_block_id . '" class="' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<div class="ts-testimonial-content">'; if ($show_avatar == "true" || $show_author == "true") { $output .= '<span class="ts-testimonial-arrow"></span>'; } if (function_exists('wpb_js_remove_wpautop')) { $output .= '' . wpb_js_remove_wpautop(do_shortcode($content), true) . ''; } else { $output .= '' . do_shortcode($content) . ''; } $output .= '</div>'; if ($show_avatar == "true" || $show_author == "true") { $output .= '<div class="ts-testimonial-user">'; if ($show_avatar == "true") { $output .= '<div class="ts-testimonial-user-thumb"><img src="' . $testimonial_avatar . '" alt=""></div>'; } if ($show_author == "true") { $output .= '<div class="ts-testimonial-user-name">' . $author . '</div>'; $output .= '<div class="ts-testimonial-user-meta">' . $position . '</div>'; } $output .= '</div>'; } $output .= '</div>'; } if ($style == "style2") { $output .= '<div id="' . $testimonial_block_id . '" class="' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<div class="blockquote">'; $output .= '<span class="leftq quotes"></span>'; if (function_exists('wpb_js_remove_wpautop')) { $output .= '' . wpb_js_remove_wpautop(do_shortcode($content), true) . ''; } else { $output .= '' . do_shortcode($content) . ''; } $output .= '<span class="rightq quotes"></span>'; $output .= '</div>'; if ($show_avatar == "true" || $show_author == "true") { $output .= '<div class="information">'; if ($show_avatar == "true") { $output .= '<img src="' . $testimonial_avatar . '" style="width: 150px; height: auto; " width="150" height="auto" />'; } if ($show_author == "true") { $output .= '<div class="author" style="' . ($show_avatar == "false" ? "margin-left: 15px;" : "") . '">' . $author . '</div>'; $output .= '<div class="metadata">' . $position . '</div>'; } $output .= '</div>'; } $output .= '</div>'; } if ($style == "style3") { $output .= '<div id="' . $testimonial_block_id . '" class="' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; if ($show_avatar == "true") { $output .= '<div class="photo">'; $output .= '<img src="' . $testimonial_avatar . '" alt=""/>'; $output .= '</div>'; } $output .= '<div class="content" style="' . ($show_avatar == "false" ? "margin-left: 0;" : "") . '">'; $output .= '<span class="laquo"></span>'; if (function_exists('wpb_js_remove_wpautop')) { $output .= '' . wpb_js_remove_wpautop(do_shortcode($content), true) . ''; } else { $output .= '' . do_shortcode($content) . ''; } $output .= '<span class="raquo"></span>'; $output .= '</div>'; if ($show_author == "true") { $output .= '<div class="sign">'; $output .= '<span class="author">' . $author . '</span>'; $output .= '<span class="metadata">' . $position . '</span>'; $output .= '</div>'; } $output .= '</div>'; } if ($style == "style4") { $output .= '<div id="' . $testimonial_block_id . '" class="' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . ($margin_bottom + 32) . 'px;">'; if ($show_avatar == "true" || $show_author == "true") { $output .= '<div class="ts-testimonial-author-info clearfix">'; if ($show_avatar == "true") { $output .= '<div class="ts-testimonial-author-image">'; $output .= '<img src="' . $testimonial_avatar . '" alt="">'; $output .= '<span class="ts-testimonial-author-overlay"></span>'; $output .= '</div>'; } if ($show_author == "true") { $output .= '<span class="ts-testimonial-author-name">' . $author . '</span>'; $output .= '<span class="ts-testimonial-author-position">' . $position . '</span>'; } $output .= '</div>'; } $output .= '<div class="ts-testimonial-statement clearfix">'; if (function_exists('wpb_js_remove_wpautop')) { $output .= '' . wpb_js_remove_wpautop(do_shortcode($content), true) . ''; } else { $output .= '' . do_shortcode($content) . ''; } $output .= '</div>'; $output .= '<div class="ts-testimonial-bottom-arrow"></div>'; $output .= '</div>'; } echo $output; $myvariable = ob_get_clean(); return $myvariable; }
function TS_VCSC_Timeline_CSS_Function_Section($atts) { global $VISUAL_COMPOSER_EXTENSIONS; ob_start(); extract(shortcode_atts(array('section' => '', 'section_icon' => '', 'icon_color' => '#7c7979', 'tooltipster_offsetx' => 0, 'tooltipster_offsety' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); $media_string = ''; $output = ''; $randomizer = mt_rand(999999, 9999999); if (!empty($el_id)) { $timeline_id = $el_id; } else { $timeline_id = 'ts-vcsc-timeline-section-' . $randomizer; } // Retrieve Timeline Post $timeline_array = array(); $category_fields = array(); $args = array('no_found_rows' => 1, 'ignore_sticky_posts' => 1, 'posts_per_page' => -1, 'post_type' => 'ts_timeline', 'post_status' => 'publish', 'orderby' => 'title', 'order' => 'ASC'); $timeline_query = new WP_Query($args); if ($timeline_query->have_posts()) { foreach ($timeline_query->posts as $p) { if ($p->ID == $section) { // Retrieve Post Categories $section_categories = get_the_terms($p->ID, 'ts_timeline_category'); $array_categories = array(); if ($section_categories != false) { foreach ($section_categories as $category) { $array_categories[] = $category->name; } } $section_categories = join(",", $array_categories); // Retrieve Post Tags $sections_tags = get_the_terms($p->ID, 'ts_timeline_tags'); $array_tags = array(); if ($sections_tags != false) { foreach ($sections_tags as $tag) { $array_tags[] = $tag->name; } } $sections_tags = join(",", $array_tags); // Build Data Array $timeline_data = array('author' => $p->post_author, 'name' => $p->post_name, 'title' => $p->post_title, 'id' => $p->ID, 'categories' => $section_categories, 'tags' => $sections_tags); $timeline_array[] = $timeline_data; $array_categories = array(); $array_tags = array(); } } } wp_reset_postdata(); // Section Main Data foreach ($timeline_array as $index => $array) { $Section_Author = $timeline_array[$index]['author']; $Section_Name = $timeline_array[$index]['name']; $Section_Title = $timeline_array[$index]['title']; $Section_ID = $timeline_array[$index]['id']; $Section_Categories = $timeline_array[$index]['categories']; $Section_Tags = $timeline_array[$index]['tags']; } // Retrieve Timeline Post Meta Content $custom_fields = get_post_custom($Section_ID); $custom_fields_array = array(); foreach ($custom_fields as $field_key => $field_values) { if (!isset($field_values[0])) { continue; } if (in_array($field_key, array("_edit_lock", "_edit_last"))) { continue; } if (strpos($field_key, 'ts_vcsc_timeline_') !== false) { if ($field_key == "ts_vcsc_timeline_media_featuredimage_id") { $field_key = "ts_vcsc_timeline_media_featuredimageid"; } $field_key_split = explode("_", $field_key); $field_key_length = count($field_key_split) - 1; $custom_data = array('group' => $field_key_split[$field_key_length - 1], 'name' => 'Timeline_' . ucfirst($field_key_split[$field_key_length]), 'value' => $field_values[0]); $custom_fields_array[] = $custom_data; } } foreach ($custom_fields_array as $index => $array) { ${$custom_fields_array[$index]['name']} = $custom_fields_array[$index]['value']; } if (function_exists('vc_shortcode_custom_css_class')) { $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'ts-timeline-css-section ' . $el_class . ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS_VCSC_Timeline_CSS_Section', $atts); } else { $css_class = 'ts-timeline-css-section ' . $el_class; } if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VCFrontEditMode == "true") { $vc_inline = 'true'; $vc_inline_style = ' display: block;'; } else { $vc_inline = 'false'; $vc_inline_style = ''; } if ($vc_inline == "false") { // Tooltip String if (isset($Timeline_Tooltiptext)) { if (isset($Timeline_Tooltipstyle)) { $tooltip_style = "tooltipster-" . $Timeline_Tooltipstyle; } else { $tooltip_style = "tooltipster-black"; } if (isset($Timeline_Tooltipposition)) { $tooltip_position = $Timeline_Tooltipposition; } else { $tooltip_position = 'top'; } $tooltip_content = 'data-tooltipster-html="true" data-tooltipster-title="" data-tooltipster-text="' . base64_encode($Timeline_Tooltiptext) . '" 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 = ''; } // Border Radius if (isset($Timeline_Radiusborder)) { $border_radius = $Timeline_Radiusborder; } else { $border_radius = ''; } // Timeline Event if ($Timeline_Type == "event") { // Feature Media Alignment if (isset($Timeline_Featuredmediaalign)) { if ($Timeline_Featuredmediaalign == "center") { $image_alignment = "margin: 5px auto; float: none;"; } else { if ($Timeline_Featuredmediaalign == "left") { $image_alignment = "margin: 5px 0; float: left;"; } else { if ($Timeline_Featuredmediaalign == "right") { $image_alignment = "margin: 5px 0; float: right;"; } } } } else { $image_alignment = "margin: 5px auto; float: none;"; } // Feature Media Dimensions $image_dimensions = 'width: 100%; height: auto;'; $parent_dimensions = 'width: ' . $Timeline_Featuredmediawidth . '%; ' . $Timeline_Featuredmediaheight; // Lightbox Background Color if (isset($Timeline_Lightboxbacklight)) { if ($Timeline_Lightboxbacklight == "auto") { $nacho_color = ''; } else { if ($Timeline_Lightboxbacklight == "custom") { $nacho_color = 'data-color="' . $Timeline_Lightboxbacklightcolor . '"'; } else { if ($Timeline_Lightboxbacklight == "hideit") { $nacho_color = 'data-color="#000000"'; } } } } else { $nacho_color = ''; } // Adjustment for Inline Edit Mode of VC if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VCFrontEditMode == "true") { $Timeline_Fullwidth = 'true'; $vcinline_active = 'true'; $vcinline_class = ''; $vcinline_slider = 'owl-carousel2-edit'; } else { $Timeline_Fullwidth = $Timeline_Fullwidth; $vcinline_active = 'false'; $vcinline_class = ''; $vcinline_slider = 'owl-carousel2'; } // Featured Media if (isset($Timeline_Featuredmedia)) { // Featured Media: Image if ($Timeline_Featuredmedia == 'image') { if (isset($Timeline_Featuredimageid)) { $media_image = wp_get_attachment_image_src($Timeline_Featuredimageid, 'large'); if ($media_image != false) { $image_extension = pathinfo($media_image[0], PATHINFO_EXTENSION); if (isset($Timeline_Attributealtvalue)) { $alt_attribute = $Timeline_Attributealtvalue; } else { $alt_attribute = basename($Timeline_Featuredimage, "." . $image_extension); } if (isset($Timeline_Attributetitle)) { $media_title = $Timeline_Attributetitle; } else { if (isset($Timeline_Eventtitletext)) { $media_title = $Timeline_Eventtitletext; } else { $media_title = ''; } } if ($Timeline_Lightboxfeatured == "false") { $media_string .= '<div class="ts-timeline-media" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<img class="" src="' . $media_image[0] . '" alt="' . $alt_attribute . '" style="max-width: ' . $media_image[1] . 'px; padding: 0; margin: 0 auto; display: block; ' . $image_dimensions . '">'; $media_string .= '</div>'; } else { $media_string .= '<div class="ts-timeline-media nchgrid-item nchgrid-tile nch-lightbox-image" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<a href="' . $media_image[0] . '" class="nch-lightbox-media no-ajaxy" data-thumbnail="' . $media_image[0] . '" data-title="' . $media_title . '" rel="' . ($Timeline_Lightboxgroup == "true" ? "timelinegroup" : (isset($Timeline_Lightboxgroupname) ? $Timeline_Lightboxgroupname : "")) . '" data-share="0" data-effect="' . $Timeline_Lightboxeffect . '" data-duration="5000" ' . $nacho_color . '>'; $media_string .= '<img src="' . $media_image[0] . '" alt="' . $alt_attribute . '" title="" style="max-width: ' . $media_image[1] . 'px; padding: 0; margin: 0 auto; display: block; ' . $image_dimensions . '">'; $media_string .= '<div class="nchgrid-caption"></div>'; if ($media_title != '') { $media_string .= '<div class="nchgrid-caption-text">' . $media_title . '</div>'; } $media_string .= '</a>'; $media_string .= '</div>'; } } } } // Featured Media: Image Slider if ($Timeline_Featuredmedia == 'slider') { if (isset($Timeline_Featuredslider)) { if (isset($Timeline_Pagertl)) { $page_rtl = $Timeline_Pagertl; } else { $page_rtl = "false"; } $featured_slider = array(); $featured_images = array(); $featured_maxheight = isset($Timeline_Slidermaxheight) ? $Timeline_Slidermaxheight : 400; $featured_fixheight = isset($Timeline_Sliderfixheight) ? $Timeline_Sliderfixheight : 400; $images = get_post_meta($Section_ID, 'ts_vcsc_timeline_media_featuredslider', true); if ($images) { foreach ($images as $attachment_id => $img_full_url) { $featured_slider[] = $attachment_id; } } $i = -1; $b = 0; $nachoLength = count($featured_slider) - 1; if (isset($Timeline_Slidertitles)) { $titles_array = explode("\n", $Timeline_Slidertitles); $titles_array = array_filter($titles_array, 'trim'); } else { $titles_array = array(); } $media_string .= '<div id="ts-timeline-css-imageslider-' . $randomizer . '" class="ts-timeline-css-imageslider-container ' . $vcinline_slider . '" style="" data-id="' . $randomizer . '" data-parent="' . $timeline_id . '" data-items="' . count($featured_slider) . '" data-maxheight="' . $featured_maxheight . '">'; $media_string .= '<div class="ts-timeline-css-imageslider-slides">'; foreach ($featured_slider as $single_image) { $i++; $modal_image = wp_get_attachment_image_src($single_image, 'full'); if ($modal_image != false) { $modal_thumb = wp_get_attachment_image_src($single_image, 'thumb'); $image_ratio = $modal_image[1] / $modal_image[2]; $image_height = $modal_image[2] > $featured_maxheight ? $featured_maxheight : $modal_image[2]; $image_width = round($image_height * $image_ratio, 0); $image_extension = pathinfo($modal_image[0], PATHINFO_EXTENSION); $featured_images[] = $modal_thumb[0]; if ($Timeline_Lightboxfeatured == "false") { if ($i == 0 && $vcinline_active == "true" || $vcinline_active == "false") { $media_string .= '<div id="ts-timeline-css-imageslider-image-' . $single_image . '-parent" class="ts-timeline-css-imageslider-image-parent nchgrid-item nchgrid-tile nch-lightbox-image ts-timeline-css-imageslider-item ' . ($i == 0 ? "ts-timeline-css-slider-view-active" : "ts-timeline-css-slider-view-hidden") . '" data-width="' . $modal_image[1] . '" data-height="' . $modal_image[2] . '" data-ratio="' . $modal_image[1] / $modal_image[2] . '" data-order="' . $i . '" data-total="' . count($featured_slider) . '">'; $media_string .= '<img src="' . $modal_image[0] . '" style="max-width: ' . $image_width . 'px; max-height: ' . $image_height . 'px; padding: 0; margin: 0 auto; display: block; ' . $image_dimensions . '">'; $media_string .= '<div class="nchgrid-caption"></div>'; if (isset($titles_array[$i]) && $titles_array[$i] != '') { $media_string .= '<div class="nchgrid-caption-text">' . strip_tags($titles_array[$i]) . '</div>'; } $media_string .= '</div>'; } } else { if ($i == $nachoLength && $vcinline_active == "false") { $media_string .= '<div id="ts-timeline-css-imageslider-image-' . $single_image . '-parent" class="ts-timeline-css-imageslider-image-parent nchgrid-item nchgrid-tile nch-lightbox-image ts-timeline-css-imageslider-item ' . ($i == 0 ? "ts-timeline-css-slider-view-active" : "ts-timeline-css-slider-view-hidden") . '" data-width="' . $modal_image[1] . '" data-height="' . $modal_image[2] . '" data-ratio="' . $modal_image[1] / $modal_image[2] . '" data-order="' . $i . '" data-total="' . count($featured_slider) . '">'; $media_string .= '<a id="' . $timeline_id . '-' . $single_image . '" href="' . $modal_image[0] . '" data-thumbnail="' . $modal_image[0] . '" data-title="' . (isset($titles_array[$i]) && $titles_array[$i] != '' ? strip_tags($titles_array[$i]) : '') . '" class="nch-lightbox-media no-ajaxy ts-hover-image ' . $timeline_id . '-slider-image" rel="' . ($Timeline_Lightboxgroup == "true" ? "timelinegroup" : (isset($Timeline_Lightboxgroupname) ? $Timeline_Lightboxgroupname : "")) . '" data-effect="' . $Timeline_Lightboxeffect . '" data-share="0" data-autoplay="0" data-duration="5000" data-thumbsize="100" data-thumbs="bottom" ' . $nacho_color . '>'; $media_string .= '<img src="' . $modal_image[0] . '" style="max-width: ' . $image_width . 'px; max-height: ' . $image_height . 'px; padding: 0; margin: 0 auto; display: block; ' . $image_dimensions . '">'; $media_string .= '<div class="nchgrid-caption"></div>'; if (isset($titles_array[$i]) && $titles_array[$i] != '') { $media_string .= '<div class="nchgrid-caption-text">' . strip_tags($titles_array[$i]) . '</div>'; } $media_string .= '</a>'; $media_string .= '</div>'; } else { if ($i == 0 && $vcinline_active == "true" || $vcinline_active == "false") { $media_string .= '<div id="ts-timeline-css-imageslider-image-' . $single_image . '-parent" class="ts-timeline-css-imageslider-image-parent nchgrid-item nchgrid-tile nch-lightbox-image ts-timeline-css-imageslider-item ' . ($i == 0 ? "ts-timeline-css-slider-view-active" : "ts-timeline-css-slider-view-hidden") . '" data-width="' . $modal_image[1] . '" data-height="' . $modal_image[2] . '" data-ratio="' . $modal_image[1] / $modal_image[2] . '" data-order="' . $i . '" data-total="' . count($featured_slider) . '">'; $media_string .= '<a id="' . $timeline_id . '-' . $single_image . '" href="' . $modal_image[0] . '" data-thumbnail="' . $modal_image[0] . '" data-title="' . (isset($titles_array[$i]) && $titles_array[$i] != '' ? strip_tags($titles_array[$i]) : '') . '" class="nch-lightbox-media no-ajaxy ts-hover-image ' . $timeline_id . '-slider-image" rel="' . ($Timeline_Lightboxgroup == "true" ? "timelinegroup" : (isset($Timeline_Lightboxgroupname) ? $Timeline_Lightboxgroupname : "")) . '" data-effect="' . $Timeline_Lightboxeffect . '" ' . $nacho_color . '>'; $media_string .= '<img src="' . $modal_image[0] . '" style="max-width: ' . $image_width . 'px; max-height: ' . $image_height . 'px; padding: 0; margin: 0 auto; display: block; ' . $image_dimensions . '">'; $media_string .= '<div class="nchgrid-caption"></div>'; if (isset($titles_array[$i]) && $titles_array[$i] != '') { $media_string .= '<div class="nchgrid-caption-text">' . strip_tags($titles_array[$i]) . '</div>'; } $media_string .= '</a>'; $media_string .= '</div>'; } } } } } $media_string .= '</div>'; $media_string .= '<div class="ts-timeline-css-imageslider-navigation">'; $media_string .= '<div class="ts-timeline-css-imageslider-dotholder">'; $i = -1; foreach ($featured_slider as $single_image) { $i++; $media_string .= '<div class="ts-timeline-css-imageslider-dot ' . ($i == 0 ? "ts-timeline-css-imageslider-dotactive" : "") . ' ts-has-tooltipster-tooltip" data-order="' . $i . '" data-image="' . (isset($featured_images[$i]) ? $featured_images[$i] : "") . '" data-tooltipster-html="false" data-tooltipster-title="" data-tooltipster-text="" data-tooltipster-image="' . (isset($featured_images[$i]) ? $featured_images[$i] : "") . '" data-tooltipster-position="top" data-tooltipster-touch="false" data-tooltipster-arrow="true" data-tooltipster-theme="tooltipster-thumb" data-tooltipster-animation="fade" data-tooltipster-trigger="hover" data-tooltipster-offsetx="' . $tooltipster_offsetx . '" data-tooltipster-offsety="' . $tooltipster_offsety . '"></div>'; } $media_string .= '</div>'; $media_string .= '<div class="ts-timeline-css-imageslider-prev"><i class="dashicons dashicons-arrow-left-alt2"></i></div>'; $media_string .= '<div class="ts-timeline-css-imageslider-next"><i class="dashicons dashicons-arrow-right-alt2"></i></div>'; $media_string .= '</div>'; $media_string .= '</div>'; $slider_class = ''; } } else { $slider_class = ''; } // Featured Media: YouTube if (isset($Timeline_Featuredyoutubeurl) && ($Timeline_Featuredmedia == 'youtube_default' || $Timeline_Featuredmedia == 'youtube_custom' || $Timeline_Featuredmedia == 'youtube_embed')) { if (preg_match('~((http|https|ftp|ftps)://|www.)(.+?)~', $Timeline_Featuredyoutubeurl)) { $featured_youtube_url = $Timeline_Featuredyoutubeurl; } else { $featured_youtube_url = 'https://www.youtube.com/watch?v=' . $Timeline_Featuredyoutubeurl; } if (isset($Timeline_Featuredyoutubeplay)) { if ($Timeline_Featuredyoutubeplay == "true") { $video_autoplay = 'true'; } else { $video_autoplay = 'false'; } } else { $video_autoplay = 'false'; } if (isset($Timeline_Featuredyoutuberelated)) { if ($Timeline_Featuredyoutuberelated == "true") { $video_related = '&rel=1'; } else { $video_related = '&rel=0'; } } else { $video_related = '&rel=0'; } if (isset($Timeline_Attributetitle)) { $media_title = $Timeline_Attributetitle; } else { if (isset($Timeline_Eventtitletext)) { $media_title = $Timeline_Eventtitletext; } else { $media_title = ''; } } if ($Timeline_Featuredmedia == 'youtube_default') { $media_image = TS_VCSC_VideoImage_Youtube($featured_youtube_url); $media_string .= '<div class="nch-holder nchgrid-item nchgrid-tile nch-lightbox-youtube" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<a href="' . $featured_youtube_url . '" class="nch-lightbox-media no-ajaxy" data-thumbnail="' . $media_image . '" data-title="' . $media_title . '" data-related="' . $video_related . '" data-videoplay="' . $video_autoplay . '" data-type="youtube" rel="' . ($Timeline_Lightboxgroup == "true" ? "timelinegroup" : (isset($Timeline_Lightboxgroupname) ? $Timeline_Lightboxgroupname : "")) . '" data-share="0" data-effect="' . (isset($Timeline_Lightboxeffect) ? $Timeline_Lightboxeffect : 'random') . '" data-duration="5000" ' . $nacho_color . '>'; $media_string .= '<img src="' . $media_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $media_string .= '<div class="nchgrid-caption"></div>'; if ($media_title != '') { $media_string .= '<div class="nchgrid-caption-text">' . $media_title . '</div>'; } $media_string .= '</a>'; $media_string .= '</div>'; } else { if ($Timeline_Featuredmedia == 'youtube_custom') { if (isset($Timeline_Featuredimageid)) { $media_image = wp_get_attachment_image_src($Timeline_Featuredimageid, 'full'); $media_image = $media_image[0]; $image_extension = pathinfo($media_image, PATHINFO_EXTENSION); if (isset($Timeline_Attributealtvalue)) { $alt_attribute = $Timeline_Attributealtvalue; } else { $alt_attribute = basename($Timeline_Featuredimage, "." . $image_extension); } } else { $media_image = TS_VCSC_GetResourceURL('images/defaults/default_youtube.jpg'); $image_extension = pathinfo($media_image, PATHINFO_EXTENSION); if (isset($Timeline_Attributealtvalue)) { $alt_attribute = $Timeline_Attributealtvalue; } else { $alt_attribute = basename($media_image, "." . $image_extension); } } $media_string .= '<div class="nch-holder nchgrid-item nchgrid-tile nch-lightbox-youtube" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<a href="' . $featured_youtube_url . '" class="nch-lightbox-media no-ajaxy" data-thumbnail="' . $media_image . '" data-title="' . $media_title . '" data-related="' . $video_related . '" data-videoplay="' . $video_autoplay . '" data-type="youtube" rel="' . ($Timeline_Lightboxgroup == "true" ? "timelinegroup" : (isset($Timeline_Lightboxgroupname) ? $Timeline_Lightboxgroupname : "")) . '" data-share="0" data-effect="' . (isset($Timeline_Lightboxeffect) ? $Timeline_Lightboxeffect : 'random') . '" data-duration="5000" ' . $nacho_color . '>'; $media_string .= '<img src="' . $media_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $media_string .= '<div class="nchgrid-caption"></div>'; if ($media_title != '') { $media_string .= '<div class="nchgrid-caption-text">' . $media_title . '</div>'; } $media_string .= '</a>'; $media_string .= '</div>'; } else { if ($Timeline_Featuredmedia == 'youtube_embed') { $video_id = TS_VCSC_VideoID_Youtube($featured_youtube_url); if ($video_autoplay == "true") { $video_autoplay = '?autoplay=1'; } else { $video_autoplay = '?autoplay=0'; } $media_string .= '<div class="ts-video-container" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<iframe width="100%" height="auto" src="//www.youtube.com/embed/' . $video_id . $video_autoplay . $video_related . '&wmode=opaque" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'; $media_string .= '</div>'; } } } } // Featured Media: DailyMotion if (isset($Timeline_Featureddailymotionurl) && ($Timeline_Featuredmedia == 'dailymotion_default' || $Timeline_Featuredmedia == 'dailymotion_custom' || $Timeline_Featuredmedia == 'dailymotion_embed')) { if (preg_match('~((http|https|ftp|ftps)://|www.)(.+?)~', $Timeline_Featureddailymotionurl)) { $featured_dailymotion_url = $Timeline_Featureddailymotionurl; } else { $featured_dailymotion_url = 'http://www.dailymotion.com/video/' . $Timeline_Featureddailymotionurl; } if (isset($Timeline_Featureddailymotionplay)) { if ($Timeline_Featureddailymotionplay == "true") { $video_autoplay = 'true'; } else { $video_autoplay = 'false'; } } else { $video_autoplay = 'false'; } if (isset($Timeline_Attributetitle)) { $media_title = $Timeline_Attributetitle; } else { if (isset($Timeline_Eventtitletext)) { $media_title = $Timeline_Eventtitletext; } else { $media_title = ''; } } if ($Timeline_Featuredmedia == 'dailymotion_default') { $media_image = TS_VCSC_VideoImage_Motion($featured_dailymotion_url); $media_string .= '<div class="nch-holder nchgrid-item nchgrid-tile nch-lightbox-motion" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<a href="' . $featured_dailymotion_url . '" class="nch-lightbox-media no-ajaxy" data-thumbnail="' . $media_image . '" data-title="' . $media_title . '" data-videoplay="' . $video_autoplay . '" data-type="dailymotion" rel="' . ($Timeline_Lightboxgroup == "true" ? "timelinegroup" : (isset($Timeline_Lightboxgroupname) ? $Timeline_Lightboxgroupname : "")) . '" data-share="0" data-effect="' . (isset($Timeline_Lightboxeffect) ? $Timeline_Lightboxeffect : 'random') . '" data-duration="5000" ' . $nacho_color . '>'; $media_string .= '<img src="' . $media_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $media_string .= '<div class="nchgrid-caption"></div>'; if ($media_title != '') { $media_string .= '<div class="nchgrid-caption-text">' . $media_title . '</div>'; } $media_string .= '</a>'; $media_string .= '</div>'; } else { if ($Timeline_Featuredmedia == 'dailymotion_custom') { if (isset($Timeline_Featuredimageid)) { $media_image = wp_get_attachment_image_src($Timeline_Featuredimageid, 'full'); $media_image = $media_image[0]; $image_extension = pathinfo($media_image, PATHINFO_EXTENSION); if (isset($Timeline_Attributealtvalue)) { $alt_attribute = $Timeline_Attributealtvalue; } else { $alt_attribute = basename($Timeline_Featuredimage, "." . $image_extension); } } else { $media_image = TS_VCSC_GetResourceURL('images/defaults/default_motion.jpg'); $image_extension = pathinfo($media_image, PATHINFO_EXTENSION); if (isset($Timeline_Attributealtvalue)) { $alt_attribute = $Timeline_Attributealtvalue; } else { $alt_attribute = basename($media_image, "." . $image_extension); } } $media_string .= '<div class="nch-holder nchgrid-item nchgrid-tile nch-lightbox-motion" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<a href="' . $featured_dailymotion_url . '" class="nch-lightbox-media no-ajaxy" data-thumbnail="' . $media_image . '" data-title="' . $media_title . '" data-videoplay="' . $video_autoplay . '" data-type="dailymotion" rel="' . ($Timeline_Lightboxgroup == "true" ? "timelinegroup" : (isset($Timeline_Lightboxgroupname) ? $Timeline_Lightboxgroupname : "")) . '" data-share="0" data-effect="' . (isset($Timeline_Lightboxeffect) ? $Timeline_Lightboxeffect : 'random') . '" data-duration="5000" ' . $nacho_color . '>'; $media_string .= '<img src="' . $media_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $media_string .= '<div class="nchgrid-caption"></div>'; if ($media_title != '') { $media_string .= '<div class="nchgrid-caption-text">' . $media_title . '</div>'; } $media_string .= '</a>'; $media_string .= '</div>'; } else { if ($Timeline_Featuredmedia == 'dailymotion_embed') { $video_id = TS_VCSC_VideoID_Motion($featured_dailymotion_url); if ($video_autoplay == "true") { $video_autoplay = '?autoplay=1'; } else { $video_autoplay = '?autoplay=0'; } $media_string .= '<div class="ts-video-container" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<iframe width="100%" height="auto" src="http://www.dailymotion.com/embed/video/' . $video_id . $video_autoplay . '&forcedQuality=hq&wmode=opaque" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'; $media_string .= '</div>'; } } } } // Featured Media: Vimeo if (isset($Timeline_Featuredvimeourl) && ($Timeline_Featuredmedia == 'vimeo_default' || $Timeline_Featuredmedia == 'vimeo_custom' || $Timeline_Featuredmedia == 'vimeo_embed')) { if (preg_match('~((http|https|ftp|ftps)://|www.)(.+?)~', $Timeline_Featuredvimeourl)) { $featured_vimeo_url = $Timeline_Featuredvimeourl; } else { $featured_vimeo_url = 'http://www.vimeo.com/video/' . $Timeline_Featuredvimeourl; } if (isset($Timeline_Featuredvimeoplay)) { if ($Timeline_Featuredvimeoplay == "true") { $video_autoplay = 'true'; } else { $video_autoplay = 'false'; } } else { $video_autoplay = 'false'; } if (isset($Timeline_Attributetitle)) { $media_title = $Timeline_Attributetitle; } else { if (isset($Timeline_Eventtitletext)) { $media_title = $Timeline_Eventtitletext; } else { $media_title = ''; } } if ($Timeline_Featuredmedia == 'vimeo_default') { $media_image = TS_VCSC_VideoImage_Vimeo($featured_vimeo_url); $media_string .= '<div class="nch-holder nchgrid-item nchgrid-tile nch-lightbox-vimeo" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<a href="' . $featured_vimeo_url . '" class="nch-lightbox-media no-ajaxy" data-thumbnail="' . $media_image . '" data-title="' . $media_title . '" data-videoplay="' . $video_autoplay . '" data-type="vimeo" rel="' . ($Timeline_Lightboxgroup == "true" ? "timelinegroup" : (isset($Timeline_Lightboxgroupname) ? $Timeline_Lightboxgroupname : "")) . '" data-share="0" data-effect="' . (isset($Timeline_Lightboxeffect) ? $Timeline_Lightboxeffect : 'random') . '" data-duration="5000" ' . $nacho_color . '>'; $media_string .= '<img src="' . $media_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $media_string .= '<div class="nchgrid-caption"></div>'; if ($media_title != '') { $media_string .= '<div class="nchgrid-caption-text">' . $media_title . '</div>'; } $media_string .= '</a>'; $media_string .= '</div>'; } else { if ($Timeline_Featuredmedia == 'vimeo_custom') { if (isset($Timeline_Featuredimageid)) { $media_image = wp_get_attachment_image_src($Timeline_Featuredimageid, 'full'); $media_image = $media_image[0]; $image_extension = pathinfo($media_image, PATHINFO_EXTENSION); if (isset($Timeline_Attributealtvalue)) { $alt_attribute = $Timeline_Attributealtvalue; } else { $alt_attribute = basename($Timeline_Featuredimage, "." . $image_extension); } } else { $media_image = TS_VCSC_GetResourceURL('images/defaults/default_vimeo.jpg'); $image_extension = pathinfo($media_image, PATHINFO_EXTENSION); if (isset($Timeline_Attributealtvalue)) { $alt_attribute = $Timeline_Attributealtvalue; } else { $alt_attribute = basename($media_image, "." . $image_extension); } } $media_string .= '<div class="nch-holder nchgrid-item nchgrid-tile nch-lightbox-vimeo" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<a href="' . $featured_vimeo_url . '" class="nch-lightbox-media no-ajaxy" data-thumbnail="' . $media_image . '" data-title="' . $media_title . '" data-videoplay="' . $video_autoplay . '" data-type="vimeo" rel="' . ($Timeline_Lightboxgroup == "true" ? "timelinegroup" : (isset($Timeline_Lightboxgroupname) ? $Timeline_Lightboxgroupname : "")) . '" data-share="0" data-effect="' . (isset($Timeline_Lightboxeffect) ? $Timeline_Lightboxeffect : 'random') . '" data-duration="5000" ' . $nacho_color . '>'; $media_string .= '<img src="' . $media_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $media_string .= '<div class="nchgrid-caption"></div>'; if ($media_title != '') { $media_string .= '<div class="nchgrid-caption-text">' . $media_title . '</div>'; } $media_string .= '</a>'; $media_string .= '</div>'; } else { if ($Timeline_Featuredmedia == 'vimeo_embed') { $video_id = TS_VCSC_VideoID_vimeo($featured_vimeo_url); if ($video_autoplay == "true") { $video_autoplay = '?autoplay=1'; } else { $video_autoplay = '?autoplay=0'; } $media_string .= '<div class="ts-video-container" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<iframe width="100%" height="auto" src="//player.vimeo.com/video/' . $video_id . $video_autoplay . '&wmode=opaque" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'; $media_string .= '</div>'; } } } } } else { $media_string = ''; $slider_class = ''; } // Link Button if (isset($Timeline_Dedicatedpage) && $Timeline_Dedicatedpage != -1) { // Link Values if ($Timeline_Dedicatedpage == "external") { $a_href = $Timeline_Dedicatedlink; } else { $a_href = get_page_link($Timeline_Dedicatedpage); } if (isset($Timeline_Dedicatedtooltip)) { $a_title = $Timeline_Dedicatedtooltip; } else { $a_title = ""; } if (isset($Timeline_Dedicatedtarget)) { if ($Timeline_Dedicatedtarget == true) { $a_target = "_blank"; } else { $a_target = "_windows"; } } else { $a_target = "_blank"; } // Button Alignment if (isset($Timeline_Dedicatedalign)) { if ($Timeline_Dedicatedalign == "center") { $buttonstyle = "width: " . (isset($Timeline_Dedicatedwidth) ? $Timeline_Dedicatedwidth : 100) . "%; margin: 0 auto; float: none;"; } else { if ($Timeline_Dedicatedalign == "left") { $buttonstyle = "width: " . (isset($Timeline_Dedicatedwidth) ? $Timeline_Dedicatedwidth : 100) . "%; margin: 0 auto; float: left;"; } else { if ($Timeline_Dedicatedalign == "right") { $buttonstyle = "width: " . (isset($Timeline_Dedicatedwidth) ? $Timeline_Dedicatedwidth : 100) . "%; margin: 0 auto; float: right;"; } } } } else { $buttonstyle = 'width: 100%; margin: 0 auto; float: none;'; } $button_string = ''; if (!empty($a_href) && isset($Timeline_Dedicatedlabel)) { $button_string .= '<div class="ts-timeline-css-button-outer clearFixMe">'; $button_string .= '<div class="ts-timeline-css-button-wrapper" style="' . $buttonstyle . '%;">'; if (isset($Timeline_Dedicatedicon)) { if ($Timeline_Dedicatedicon != "none") { $button_string .= '<a class="ts-timeline-css-button-link ' . $Timeline_Dedicateddefault . ' ' . $Timeline_Dedicatedhover . '" href="' . $a_href . '" target="' . $a_target . '" title="' . $a_title . '"><i class="ts-timeline-css-button-icon dashicons dashicons-' . $Timeline_Dedicatedicon . '" style="' . (isset($Timeline_Dedicatedcolor) ? "color: " . $Timeline_Dedicatedcolor : "") . '"></i>' . $Timeline_Dedicatedlabel . '</a>'; } else { $button_string .= '<a class="ts-timeline-css-button-link ' . $Timeline_Dedicateddefault . ' ' . $Timeline_Dedicatedhover . '" href="' . $a_href . '" target="' . $a_target . '" title="' . $a_title . '">' . $Timeline_Dedicatedlabel . '</a>'; } } else { $button_string .= '<a class="ts-timeline-css-button-link ' . $Timeline_Dedicateddefault . ' ' . $Timeline_Dedicatedhover . '" href="' . $a_href . '" target="' . $a_target . '" title="' . $a_title . '">' . $Timeline_Dedicatedlabel . '</a>'; } $button_string .= '</div>'; $button_string .= '</div>'; } else { $button_string = ''; } } else { $button_string = ''; } // Event Icon if ((empty($section_icon) || $section_icon == "transparent") && !isset($Timeline_Eventcontent) && !isset($Timeline_Featuredimage)) { $title_margin = 'margin: 0;'; } else { $title_margin = ''; } // Column Adjustment for Full Width Event if ($Timeline_Fullwidth == "true" && !isset($Timeline_Eventtitletext) && (empty($section_icon) || $section_icon == "transparent") && !isset($Timeline_Eventcontent) && !isset($Timeline_Buttontext)) { $columnA_adjust = 'width: 100%; margin: 0;'; $columnB_adjust = 'display: none; width: 0;'; } else { if ($Timeline_Fullwidth == "true" && $Timeline_Featuredmedia == "none") { $columnA_adjust = 'display: none; width: 0; margin: 0;'; $columnB_adjust = 'width: 100%; margin: 0;'; } else { $columnA_adjust = ''; $columnB_adjust = ''; } } // Final Output $output .= '<div id="' . $timeline_id . '" class="' . $css_class . ' ' . $slider_class . ' ' . ($Timeline_Fullwidth == "true" ? "ts-timeline-css-fullwidth" : "ts-timeline-css-event") . ' ts-timeline-css-visible ts-timeline-css-animated ' . (isset($Timeline_Eventdatetext) ? "ts-timeline-css-date-true" : "ts-timeline-css-date-false") . '" style="' . ($Timeline_Fullwidth == "true" ? "width: 98%;" : "") . ' ' . $vc_inline_style . '" data-categories="' . $Section_Categories . '" data-tags="' . $Section_Tags . '" data-filtered-categories="false" data-filtered-tags="false">'; $output .= '<div class="ts-timeline-css-text-wrap ' . (isset($Timeline_Eventdatetext) ? "ts-timeline-css-text-wrap-date" : "ts-timeline-css-text-wrap-nodate") . ' ' . $border_radius . ' ' . $tooltip_class . '" ' . $tooltip_content . ' style="' . (isset($Timeline_Eventdatetext) ? "padding-top: 35px" : "") . '">'; if (isset($Timeline_Eventdatetext)) { if (isset($Timeline_Eventdateicon)) { if ($Timeline_Eventdateicon == "none") { $output .= '<div class="ts-timeline-css-date"><span class="ts-timeline-css-date-connect"><span class="ts-timeline-css-date-text">' . $Timeline_Eventdatetext . '</span></span></div>'; } else { $output .= '<div class="ts-timeline-css-date"><span class="ts-timeline-css-date-connect"><span class="ts-timeline-css-date-text"><i class="ts-timeline-css-date-icon dashicons dashicons-' . $Timeline_Eventdateicon . '"></i>' . $Timeline_Eventdatetext . '</span></span></div>'; } } else { $output .= '<div class="ts-timeline-css-date"><span class="ts-timeline-css-date-connect"><span class="ts-timeline-css-date-text">' . $Timeline_Eventdatetext . '</span></span></div>'; } } if ($Timeline_Fullwidth == "true") { $output .= '<div class="ts-timeline-css-fullwidth-colA" style="' . $columnA_adjust . '">'; $output .= $media_string; $output .= '</div>'; $output .= '<div class="ts-timeline-css-fullwidth-colB" style="' . $columnB_adjust . '">'; if (isset($Timeline_Eventtitletext)) { $output .= '<h3 class="ts-timeline-css-title" style="color: ' . (isset($Timeline_Eventtitlecolor) ? $Timeline_Eventtitlecolor : $title_color) . '; text-align: ' . (isset($Timeline_Eventtitlealign) ? $Timeline_Eventtitlealign : $title_align) . '; ' . (!isset($Timeline_Eventcontent) && empty($section_icon) ? "border: none; margin-bottom: 0; padding-bottom: 0;" : "") . ' ' . $title_margin . '">' . $Timeline_Eventtitletext . '</h3>'; } if (!empty($section_icon) && $section_icon != "transparent" || isset($Timeline_Eventcontent) || isset($Timeline_Linkurl)) { $output .= '<div style="width: 100%; display: block; float: left; position: relative; padding-bottom: ' . (!empty($a_href) && !empty($button_string) ? 0 : 15) . 'px; ' . (!isset($Timeline_Eventcontent) && !empty($section_icon) ? "height: 60px;" : "") . '">'; if (isset($Timeline_Eventcontent)) { $output .= '<div class="ts-timeline-css-text-wrap-inner" style="' . (empty($section_icon) ? "width: 100%; height: 100%; left: 0;" : " left: 0;") . '">'; if (function_exists('wpb_js_remove_wpautop')) { $output .= '<div class="ts-timeline-css-text" style="">' . wpb_js_remove_wpautop(do_shortcode($Timeline_Eventcontent), true) . '</div>'; } else { $output .= '<div class="ts-timeline-css-text" style="">' . do_shortcode($Timeline_Eventcontent) . '</div>'; } $output .= '</div>'; } if (!empty($section_icon) && $section_icon != "transparent") { $output .= '<div class="ts-timeline-css-icon ts-timeline-css-icon-full" style="' . (!isset($Timeline_Eventcontent) ? "display: inline-block; width: 100%; left: 0; margin: 0 0 0 2%;" : "left: 80%;") . '"><i class="' . $section_icon . '" style="color: ' . $icon_color . ';"></i></div>'; } if (!empty($a_href) && !empty($button_string)) { $output .= '<div class="ts-timeline-css-button-container">'; $output .= $button_string; $output .= '</div>'; } $output .= '</div>'; } $output .= '</div>'; if ($Section_Tags != '') { $output .= '<div class="ts-timeline-css-output-tags"><i class="dashicons dashicons-tag"></i><span>' . str_replace(",", ", ", $Section_Tags) . '</span></div>'; } if ($Section_Categories != '') { $output .= '<div class="ts-timeline-css-output-cats"><i class="dashicons dashicons-category"></i><span>' . str_replace(",", ", ", $Section_Categories) . '</span></div>'; } } else { $output .= $media_string; if (isset($Timeline_Eventtitletext)) { $output .= '<h3 class="ts-timeline-css-title" style="color: ' . (isset($Timeline_Eventtitlecolor) ? $Timeline_Eventtitlecolor : $title_color) . '; text-align: ' . (isset($Timeline_Eventtitlealign) ? $Timeline_Eventtitlealign : $title_align) . '; ' . (!isset($Timeline_Eventcontent) && empty($section_icon) ? "border: none; margin-bottom: 0; padding-bottom: 0;" : "") . ' ' . $title_margin . '">' . $Timeline_Eventtitletext . '</h3>'; } if (!empty($section_icon) && $section_icon != "transparent" || isset($Timeline_Eventcontent)) { $output .= '<div style="width: 100%; display: block; float: left; position: relative; padding-bottom: 15px; ' . (!isset($Timeline_Eventcontent) && !empty($section_icon) ? "height: 60px;" : "") . '">'; if (!empty($section_icon) && $section_icon != "transparent") { $output .= '<div class="ts-timeline-css-icon ts-timeline-css-icon-half" style="' . (!isset($Timeline_Eventcontent) ? "display: inline-block; width: 100%; left: 0;" : "") . '"><i class="' . $section_icon . '" style="color: ' . $icon_color . ';"></i></div>'; } if (isset($Timeline_Eventcontent)) { $output .= '<div class="ts-timeline-css-text-wrap-inner" style="' . (empty($section_icon) ? "width: 100%; height: 100%; left: 0;" : "") . '">'; if (function_exists('wpb_js_remove_wpautop')) { $output .= '<div class="ts-timeline-css-text" style="">' . wpb_js_remove_wpautop(do_shortcode($Timeline_Eventcontent), true) . '</div>'; } else { $output .= '<div class="ts-timeline-css-text" style="">' . do_shortcode($Timeline_Eventcontent) . '</div>'; } $output .= '</div>'; } $output .= '</div>'; if (!empty($a_href) && !empty($button_string)) { $output .= '<div class="ts-timeline-css-button-container">'; $output .= $button_string; $output .= '</div>'; } } if ($Section_Tags != '') { $output .= '<div class="ts-timeline-css-output-tags"><i class="dashicons dashicons-tag"></i><span>' . str_replace(",", ", ", $Section_Tags) . '</span></div>'; } if ($Section_Categories != '') { $output .= '<div class="ts-timeline-css-output-cats"><i class="dashicons dashicons-category"></i><span>' . str_replace(",", ", ", $Section_Categories) . '</span></div>'; } } $output .= '<div class="clearFixMe"></div>'; $output .= '</div>'; $output .= '</div>'; } // Timeline Break if ($Timeline_Type == "break") { if (!isset($Timeline_Breakcontent)) { $title_margin = ' margin: 0 !important; padding: 0;'; } else { $title_margin = ''; } if (isset($Timeline_Breakfull)) { if ($Timeline_Breakfull == "true") { $break_width = 'width: 98%; margin-left: 1%; margin-right: 1%;'; $break_data = 'true'; } else { $break_width = 'width: 50%;'; $break_data = 'false'; } } else { $break_width = 'width: 50%;'; $break_data = 'false'; } if (isset($Timeline_Breakbackground)) { $break_background = 'background: ' . $Timeline_Breakbackground . ';'; } else { $break_background = ''; } $output .= '<div id="' . $timeline_id . '" class="ts-timeline-css-break ts-timeline-css-visible ' . $css_class . '" style="' . $break_width . ' ' . $vc_inline_style . '" data-fullwidth="' . $break_data . '" data-categories="' . $Section_Categories . '" data-tags="' . $Section_Tags . '" data-filtered-categories="false" data-filtered-tags="false">'; $output .= '<div class="ts-timeline-css-text-wrap ' . $border_radius . ' ' . $tooltip_class . '" ' . $tooltip_content . ' style="' . $break_background . '">'; $output .= '<div class="ts-timeline-css-text-wrap-inner" style="width: 100%; left: 0; ' . $title_margin . '">'; if (isset($Timeline_Breaktitletext)) { $output .= '<h3 class="ts-timeline-css-title" style="padding: 0 10px; text-align: ' . (isset($Timeline_Breaktitlealign) ? $Timeline_Breaktitlealign : $title_align) . '; color: ' . (isset($Timeline_Breaktitlecolor) ? $Timeline_Breaktitlecolor : $title_color) . ';' . $title_margin . '">' . $Timeline_Breaktitletext . '</h3>'; } if (!empty($section_icon) && $section_icon != "transparent") { $output .= '<div class="ts-timeline-css-icon ts-timeline-css-icon-break" style="margin: 10px auto;"><i class="' . $section_icon . '" style="color: ' . $icon_color . ';"></i></div>'; } if (isset($Timeline_Breakcontent)) { if (function_exists('wpb_js_remove_wpautop')) { $output .= '<div class="ts-timeline-css-text">' . wpb_js_remove_wpautop(do_shortcode($Timeline_Breakcontent), true) . '</div>'; } else { $output .= '<div class="ts-timeline-css-text">' . do_shortcode($Timeline_Breakcontent) . '</div>'; } } $output .= '</div>'; $output .= '<div class="clearFixMe"></div>'; $output .= '</div>'; $output .= '</div>'; } } else { $output .= '<div id="' . $timeline_id . '" class="' . $css_class . ' ts-timeline-css-fullwidth" style="width: 98%; ' . $vc_inline_style . '">'; $output .= '<div class="ts-timeline-css-text-wrap">'; $output .= '<div class="ts-timeline-css-text-wrap-inner" style="width: 100%; left: 0; margin: 20px auto;">'; $output .= '<div>Section ID: ' . $Section_ID . '</div>'; $output .= '<div>Section Title: ' . $Section_Title . '</div>'; $output .= '<div>Section Type: ' . ($Timeline_Type == "event" ? "Event" : "Break") . '</div>'; $output .= '</div>'; $output .= '<div class="clearFixMe"></div>'; $output .= '</div>'; $output .= '</div>'; } echo $output; // Clear Out all Variables foreach ($custom_fields_array as $index => $array) { ${$custom_fields_array[$index]['name']} = ""; unset(${$custom_fields_array[$index]['name']}); } $custom_fields_array = ''; $timeline_array = ''; $category_fields = ''; $media_string = ''; $output = ''; $myvariable = ob_get_clean(); return $myvariable; }
function TS_VCSC_Logos_Post_Type() { global $VISUAL_COMPOSER_EXTENSIONS; $MenuPosition_Logos = is_array($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_CustomPostTypesPositions) && array_key_exists('ts_logos', $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_CustomPostTypesPositions) ? $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_CustomPostTypesPositions['ts_logos'] : $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_Menu_Positions_Defaults['ts_logos']; $labels = array('name' => __('Logos', 'ts_visual_composer_extend'), 'singular_name' => __('Logo', 'ts_visual_composer_extend'), 'add_new' => __('Add New', 'ts_visual_composer_extend'), 'add_new_item' => __('Add New Logo', 'ts_visual_composer_extend'), 'edit_item' => __('Edit Logo', 'ts_visual_composer_extend'), 'new_item' => __('New Logo', 'ts_visual_composer_extend'), 'view_item' => __('View Logo', 'ts_visual_composer_extend'), 'search_items' => __('Search Logos', 'ts_visual_composer_extend'), 'not_found' => __('No Logo(s) found', 'ts_visual_composer_extend'), 'not_found_in_trash' => __('No Logo(s) found in the Trash', 'ts_visual_composer_extend'), 'parent_item_colon' => '', 'menu_name' => 'VC Logos'); $args = array('labels' => $labels, 'description' => __('Add Logos to be used with the "Composium - Visual Composer Extensions" plugin.', 'ts_visual_composer_extend'), 'public' => false, 'menu_icon' => TS_VCSC_GetResourceURL("css/other/ts_logo_admin.png"), 'rewrite' => true, 'exclude_from_search' => true, 'publicly_queryable' => false, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'capability_type' => 'post', 'has_archive' => false, 'hierarchical' => false, 'menu_position' => $MenuPosition_Logos, 'supports' => array('title', 'thumbnail')); register_post_type('ts_logos', $args); $labels = array('name' => __('Categories', 'ts_visual_composer_extend'), 'singular_name' => __('Category', 'ts_visual_composer_extend'), 'search_items' => __('Search in Categories', 'ts_visual_composer_extend'), 'all_items' => __('Categories', 'ts_visual_composer_extend'), 'parent_item' => __('Parent Category', 'ts_visual_composer_extend'), 'parent_item_colon' => __('Parent Category:', 'ts_visual_composer_extend'), 'edit_item' => __('Edit Category', 'ts_visual_composer_extend'), 'update_item' => __('Update Category', 'ts_visual_composer_extend'), 'add_new_item' => __('Add New Category', 'ts_visual_composer_extend'), 'new_item_name' => __('New Category', 'ts_visual_composer_extend'), 'menu_name' => __('Categories', 'ts_visual_composer_extend')); register_taxonomy('ts_logos_category', array('ts_logos'), array('hierarchical' => true, 'public' => false, 'labels' => $labels, 'show_ui' => true, 'rewrite' => true, 'show_admin_column' => true)); new TS_VCSC_Tax_CTP_Filter(array('ts_logos' => array('ts_logos_category'))); }
echo $VISUAL_COMPOSER_EXTENSIONS->settingsLink; ?> " target="_parent"><img src="<?php echo TS_VCSC_GetResourceURL('images/logos/ts_vcsc_menu_icon_16x16.png'); ?> " style="width: 16px; height: 16px; margin-right: 10px;">Back to Plugin Settings</a> <a class="button-secondary" style="width: 200px; margin: 0 5px 0 0; text-align: center;" href="http://tekanewascripts.com/vcextensions/documentation/" target="_blank"><img src="<?php echo TS_VCSC_GetResourceURL('images/other/ts_vcsc_manual_icon_16x16.png'); ?> " style="width: 16px; height: 16px; margin-right: 10px;">Manual</a> <a class="button-secondary" style="width: 200px; margin: 0 5px 0 0; text-align: center;" href="http://helpdesk.tekanewascripts.com/forums/forum/wordpress-plugins/visual-composer-extensions/" target="_blank"><img src="<?php echo TS_VCSC_GetResourceURL('images/other/ts_vcsc_support_icon_16x16.png'); ?> " style="width: 16px; height: 16px; margin-right: 10px;">Support Forum</a> <a class="button-secondary" style="width: 200px; margin: 0 5px 0 0; text-align: center;" href="http://helpdesk.tekanewascripts.com/category/visual-composer-extensions/" target="_blank"><img src="<?php echo TS_VCSC_GetResourceURL('images/other/ts_vcsc_knowledge_icon_16x16.png'); ?> " style="width: 16px; height: 16px; margin-right: 10px;">Knowledge Base</a> </div> <p>The options below allow you to export your current plugin settings and to import previously exported settings back into the plugin.</p> <p>The exported file will be created on the fly as .json file and must not be edited as the plugin requires a specific syntax in order to process an import request.</p> </div> </div> <div class="ts-vcsc-section-main"> <div class="ts-vcsc-section-title ts-vcsc-section-show"><i class="dashicons-download"></i>Export Settings</div> <div class="ts-vcsc-section-content"> <div class="ts-vcsc-notice-field ts-vcsc-success" style="margin-top: 10px; font-size: 13px; text-align: justify;">Here you can export the plugin settings in order to import them into another site.</div> <?php $secret = md5(md5(AUTH_KEY . SECURE_AUTH_KEY) . '-' . 'ts-vcsc-extend'); $link = admin_url('admin-ajax.php?action=ts_export_settings&secret=' . $secret); ?>
function TS_VCSC_Team_Mates_Slider_Category($atts, $content = null) { global $VISUAL_COMPOSER_EXTENSIONS; ob_start(); wp_enqueue_script('ts-extend-hammer'); wp_enqueue_script('ts-extend-nacho'); wp_enqueue_style('ts-extend-nacho'); wp_enqueue_style('ts-extend-owlcarousel2'); wp_enqueue_script('ts-extend-owlcarousel2'); wp_enqueue_style('ts-font-ecommerce'); wp_enqueue_style('ts-font-teammates'); if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_LoadFrontEndForcable == "false") { wp_enqueue_style('ts-extend-animations'); wp_enqueue_style('ts-extend-simptip'); wp_enqueue_style('ts-visual-composer-extend-front'); wp_enqueue_script('ts-visual-composer-extend-front'); } extract(shortcode_atts(array('teammatecat' => '', 'style' => 'style1', 'show_image' => 'true', 'image_style' => 'imagestyle1', 'show_grayscale' => 'true', 'grayscale_hover' => 'true', 'show_effects' => 'true', 'show_lightbox' => 'true', 'link_image' => 'false', 'show_title' => 'true', 'show_content' => 'true', 'show_dedicated' => 'false', 'show_download' => 'true', 'show_contact' => 'true', 'show_opening' => 'true', 'show_social' => 'true', 'show_skills' => 'true', 'icon_style' => 'simple', 'icon_color' => '#000000', 'icon_background' => '#f5f5f5', 'icon_frame_color' => '#f5f5f5', 'icon_frame_thick' => 1, 'icon_margin' => 5, 'icon_align' => 'left', 'icon_hover' => '', 'tooltip_style' => '', 'tooltip_position' => 'ts-simptip-position-top', 'teammates_slide' => 1, 'auto_height' => 'true', 'page_rtl' => 'false', 'auto_play' => 'false', 'show_playpause' => 'true', 'show_bar' => 'true', 'bar_color' => '#dd3333', 'show_speed' => 5000, 'stop_hover' => 'true', 'show_navigation' => 'true', 'show_dots' => 'true', 'page_numbers' => 'false', 'items_loop' => 'false', 'animation_in' => 'ts-viewport-css-flipInX', 'animation_out' => 'ts-viewport-css-slideOutDown', 'animation_mobile' => 'false', 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); $teammate_random = mt_rand(999999, 9999999); $animation_css = ''; $team_tooltipclasses = "ts-simptip-multiline " . $tooltip_style . " " . $tooltip_position; // Check for Front End Editor if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VCFrontEditMode == "true") { $slider_class = 'owl-carousel2-edit'; $slider_message = '<div class="ts-composer-frontedit-message">' . __('The slider is currently viewed in front-end edit mode; slider features are disabled for performance and compatibility reasons.', "ts_visual_composer_extend") . '</div>'; $product_style = 'width: ' . 100 / $teammates_slide . '%; height: 100%; float: left; margin: 0; padding: 0;'; $frontend_edit = 'true'; } else { $slider_class = 'ts-owlslider-parent owl-carousel2'; $slider_message = ''; $product_style = ''; $frontend_edit = 'false'; } if (!empty($el_id)) { $teammate_slider_id = $el_id; } else { $teammate_slider_id = 'ts-vcsc-teammate-slider-' . $teammate_random; } if (!is_array($teammatecat)) { $teammatecat = array_map('trim', explode(',', $teammatecat)); } if (empty($icon_background) || $icon_style == 'simple') { $icon_frame_style = ''; } else { $icon_frame_style = 'background: ' . $icon_background . ';'; } if ($icon_frame_thick > 0) { $icon_top_adjust = 'top: ' . (10 - $icon_frame_thick) . 'px;'; } else { $icon_top_adjust = ''; } if ($icon_style == 'simple') { $icon_frame_border = ''; } else { $icon_frame_border = ' border: ' . $icon_frame_thick . 'px solid ' . $icon_frame_color . ';'; } $icon_horizontal_adjust = ''; $team_social = ''; $output = ''; // Retrieve Teammate Post Main Content $teammate_array = array(); $category_fields = array(); $args = array('no_found_rows' => 1, 'ignore_sticky_posts' => 1, 'posts_per_page' => -1, 'post_type' => 'ts_team', 'post_status' => 'publish', 'orderby' => 'title', 'order' => 'ASC'); $teammate_query = new WP_Query($args); if ($teammate_query->have_posts()) { foreach ($teammate_query->posts as $p) { $categories = TS_VCSC_GetTheCategoryByTax($p->ID, 'ts_team_category'); if ($categories && !is_wp_error($categories)) { $category_slugs_arr = array(); $arrayMatch = 0; foreach ($categories as $category) { if (in_array($category->slug, $teammatecat)) { $arrayMatch++; } $category_slugs_arr[] = $category->slug; $category_data = array('slug' => $category->slug, 'name' => $category->cat_name, 'number' => $category->term_id); $category_fields[] = $category_data; } $categories_slug_str = join(",", $category_slugs_arr); } else { $category_slugs_arr = array(); $arrayMatch = 0; if (in_array("ts-teammate-none-applied", $teammatecat)) { $arrayMatch++; } $category_slugs_arr[] = ''; $categories_slug_str = join(",", $category_slugs_arr); } if ($arrayMatch > 0) { $teammate_data = array('author' => $p->post_author, 'name' => $p->post_name, 'title' => $p->post_title, 'id' => $p->ID, 'content' => $p->post_content, 'categories' => $categories_slug_str); $teammate_array[] = $teammate_data; } } } wp_reset_postdata(); if (function_exists('vc_shortcode_custom_css_class')) { $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'ts-teammates-slider ' . $slider_class . ' ' . $el_class . ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS_VCSC_Team_Mates_Slider_Category', $atts); } else { $css_class = 'ts-teammates-slider ' . $slider_class . ' ' . $el_class; } $output .= '<div id="' . $teammate_slider_id . '-container" class="ts-teammates-slider-container" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; // Front-Edit Message if ($frontend_edit == "true") { $output .= $slider_message; } // Add Progressbar if ($auto_play == "true" && $show_bar == "true" && $frontend_edit == "false") { $output .= '<div id="ts-owlslider-progressbar-' . $teammate_random . '" class="ts-owlslider-progressbar-holder" style=""><div class="ts-owlslider-progressbar" style="background: ' . $bar_color . '; height: 100%; width: 0%;"></div></div>'; } // Add Navigation Controls if ($frontend_edit == "false") { $output .= '<div id="ts-owlslider-controls-' . $teammate_random . '" class="ts-owlslider-controls" style="' . ($auto_play == "true" && $show_playpause == "true" || $show_navigation == "true" ? "display: block;" : "display: none;") . '">'; $output .= '<div id="ts-owlslider-controls-next-' . $teammate_random . '" style="' . ($show_navigation == "true" ? "display: block;" : "display: none;") . '" class="ts-owlslider-controls-next"><span class="ts-ecommerce-arrowright5"></span></div>'; $output .= '<div id="ts-owlslider-controls-prev-' . $teammate_random . '" style="' . ($show_navigation == "true" ? "display: block;" : "display: none;") . '" class="ts-owlslider-controls-prev"><span class="ts-ecommerce-arrowleft5"></span></div>'; if ($auto_play == "true" && $show_playpause == "true") { $output .= '<div id="ts-owlslider-controls-play-' . $teammate_random . '" class="ts-owlslider-controls-play active"><span class="ts-ecommerce-pause"></span></div>'; } $output .= '</div>'; } // Add Slider $output .= '<div id="' . $teammate_slider_id . '" class="' . $css_class . '" data-id="' . $teammate_random . '" data-items="' . $teammates_slide . '" data-rtl="' . $page_rtl . '" data-loop="' . $items_loop . '" data-navigation="' . $show_navigation . '" data-dots="' . $show_dots . '" data-mobile="' . $animation_mobile . '" data-animationin="' . $animation_in . '" data-animationout="' . $animation_out . '" data-height="' . $auto_height . '" data-play="' . $auto_play . '" data-bar="' . $show_bar . '" data-color="' . $bar_color . '" data-speed="' . $show_speed . '" data-hover="' . $stop_hover . '">'; // Build Teammate Post Main Content foreach ($teammate_array as $index => $array) { $Team_Author = $teammate_array[$index]['author']; $Team_Name = $teammate_array[$index]['name']; $Team_Title = $teammate_array[$index]['title']; $Team_ID = $teammate_array[$index]['id']; $Team_Content = $teammate_array[$index]['content']; $Team_Category = $teammate_array[$index]['categories']; $Team_Image = wp_get_attachment_image_src(get_post_thumbnail_id($Team_ID), 'full'); if ($Team_Image == false) { $Team_Image = TS_VCSC_GetResourceURL('images/defaults/default_person.jpg'); } else { $Team_Image = $Team_Image[0]; } // Retrieve Teammate Post Meta Content $custom_fields = get_post_custom($Team_ID); $custom_fields_array = array(); foreach ($custom_fields as $field_key => $field_values) { if (!isset($field_values[0])) { continue; } if (in_array($field_key, array("_edit_lock", "_edit_last"))) { continue; } if (strpos($field_key, 'ts_vcsc_team_') !== false) { $field_key_split = explode("_", $field_key); $field_key_length = count($field_key_split) - 1; $custom_data = array('group' => $field_key_split[$field_key_length - 1], 'name' => 'Team_' . ucfirst($field_key_split[$field_key_length]), 'value' => $field_values[0]); $custom_fields_array[] = $custom_data; } } foreach ($custom_fields_array as $index => $array) { ${$custom_fields_array[$index]['name']} = $custom_fields_array[$index]['value']; } if (isset($Team_Position)) { $Team_Position = $Team_Position; } else { $Team_Position = ''; } if (isset($Team_Buttonlabel)) { $Team_Buttonlabel = $Team_Buttonlabel; } else { $Team_Buttonlabel = ''; } // Build Dedicated Page Link $team_dedicated = ''; if ($show_dedicated == "true") { if (isset($Team_Dedicatedpage) && ($Team_Dedicatedpage != -1 || $Team_Dedicatedpage == "external" && isset($Team_Dedicatedlink))) { if ($Team_Dedicatedpage == "external") { $Team_Dedicatedpage = $Team_Dedicatedlink; } else { $Team_Dedicatedpage = get_page_link($Team_Dedicatedpage); } if (isset($Team_Dedicatedtarget)) { $team_dedicated_target = '_blank'; } else { $team_dedicated_target = '_parent'; } $team_dedicated .= '<div class="ts-teammate-dedicated">'; if (isset($Team_Dedicatedtooltip)) { if (isset($Team_Dedicatedicon) && $Team_Dedicatedicon == "none" || !isset($Team_Dedicatedicon)) { $team_dedicated .= '<a class="ts-teammate-page-link ts-button ' . $Team_Dedicatedtype . ' ' . $team_tooltipclasses . '" data-tstooltip="' . $Team_Dedicatedtooltip . '" href="' . TS_VCSC_makeValidURL($Team_Dedicatedpage) . '" target="' . $team_dedicated_target . '">' . $Team_Dedicatedlabel . '</a>'; } else { $team_dedicated .= '<a class="ts-teammate-page-link ts-button ' . $Team_Dedicatedtype . ' ' . $team_tooltipclasses . '" data-tstooltip="' . $Team_Dedicatedtooltip . '" href="' . TS_VCSC_makeValidURL($Team_Dedicatedpage) . '" target="' . $team_dedicated_target . '"><i class="ts-teamicon-' . $Team_Dedicatedicon . ' ts-font-icon ts-teammate-icon" style="' . (isset($Team_Dedicatedcolor) ? "color: " . $Team_Dedicatedcolor . ";" : "") . '"></i> ' . $Team_Dedicatedlabel . '</a>'; } } else { if (isset($Team_Dedicatedicon) && $Team_Dedicatedicon == "none" || !isset($Team_Dedicatedicon)) { $team_dedicated .= '<a class="ts-teammate-page-link ts-button ' . $Team_Dedicatedtype . '" href="' . TS_VCSC_makeValidURL($Team_Dedicatedpage) . '" target="' . $team_dedicated_target . '">' . $Team_Dedicatedlabel . '</a>'; } else { $team_dedicated .= '<a class="ts-teammate-page-link ts-button ' . $Team_Dedicatedtype . '" href="' . TS_VCSC_makeValidURL($Team_Dedicatedpage) . '" target="' . $team_dedicated_target . '"><i class="ts-teamicon-' . $Team_Dedicatedicon . ' ts-font-icon ts-teammate-icon" style="' . (isset($Team_Dedicatedcolor) ? "color: " . $Team_Dedicatedcolor . ";" : "") . '"></i> ' . $Team_Dedicatedlabel . '</a>'; } } $team_dedicated .= '</div>'; if (get_option('ts_vcsc_extend_settings_loadForcable', 0) == 0) { wp_enqueue_style('ts-extend-buttons', TS_VCSC_GetResourceURL('css/jquery.buttons.css'), null, false, 'all'); } } } else { if ($show_lightbox == "false" && $link_image == "true") { if (isset($Team_Dedicatedpage) && $Team_Dedicatedpage != -1) { $Team_Dedicatedpage = get_page_link($Team_Dedicatedpage); if (isset($Team_Dedicatedtarget)) { $team_dedicated_target = '_blank'; } else { $team_dedicated_target = '_parent'; } } } } // Build Team Contact Information $team_contact = ''; $team_contact_count = 0; if ($show_contact == "true") { $team_contact .= '<div class="ts-team-contact">'; if (isset($Team_Email)) { $team_contact_count++; if (isset($Team_Emaillabel)) { $team_contact .= '<div class="ts-contact-parent"><i class="ts-teamicon-email3 ts-font-icon ts-teammate-icon" style="color: ' . $icon_color . ';"></i><a target="_blank" class="" href="mailto:' . $Team_Email . '">' . $Team_Emaillabel . '</a></div>'; } else { $team_contact .= '<div class="ts-contact-parent"><i class="ts-teamicon-email3 ts-font-icon ts-teammate-icon" style="color: ' . $icon_color . ';"></i><a target="_blank" class="" href="mailto:' . $Team_Email . '">' . $Team_Email . '</a></div>'; } } if (isset($Team_Phone)) { $team_contact_count++; $team_contact .= '<div class="ts-contact-parent"><i class="ts-teamicon-phone2 ts-font-icon ts-teammate-icon" style="color: ' . $icon_color . ';"></i>' . $Team_Phone . '</div>'; } if (isset($Team_Cell)) { $team_contact_count++; $team_contact .= '<div class="ts-contact-parent"><i class="ts-teamicon-mobile ts-font-icon ts-teammate-icon" style="color: ' . $icon_color . ';"></i>' . $Team_Cell . '</div>'; } if (isset($Team_Portfolio)) { $team_contact_count++; if (isset($Team_Portfoliolabel)) { $team_contact .= '<div class="ts-contact-parent"><i class="ts-teamicon-portfolio ts-font-icon ts-teammate-icon" style="color: ' . $icon_color . ';"></i><a style="" target="_blank" class="" href="' . TS_VCSC_makeValidURL($Team_Portfolio) . '">' . $Team_Portfoliolabel . '</a></div>'; } else { $team_contact .= '<div class="ts-contact-parent"><i class="ts-teamicon-portfolio ts-font-icon ts-teammate-icon" style="color: ' . $icon_color . ';"></i><a style="" target="_blank" class="" href="' . TS_VCSC_makeValidURL($Team_Portfolio) . '">' . TS_VCSC_makeValidURL($Team_Portfolio) . '</a></div>'; } } if (isset($Team_Other)) { $team_contact_count++; if (isset($Team_Otherlabel)) { $team_contact .= '<div class="ts-contact-parent"><i class="ts-teamicon-link ts-font-icon ts-teammate-icon" style="color: ' . $icon_color . ';"></i><a style="" target="_blank" class="" href="' . TS_VCSC_makeValidURL($Team_Other) . '">' . $Team_Otherlabel . '</a></div>'; } else { $team_contact .= '<div class="ts-contact-parent"><i class="ts-teamicon-link ts-font-icon ts-teammate-icon" style="color: ' . $icon_color . ';"></i><a style="" target="_blank" class="" href="' . TS_VCSC_makeValidURL($Team_Other) . '">' . TS_VCSC_makeValidURL($Team_Other) . '</a></div>'; } } if (isset($Team_Skype)) { $team_contact_count++; $team_contact .= '<div class="ts-contact-parent"><i class="ts-teamicon-skype ts-font-icon ts-teammate-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i>' . $Team_Skype . '</div>'; } $team_contact .= '</div>'; } // Build Opening / Contact Hours $team_opening = ''; $team_opening_count = 0; if ($show_opening == "true") { $team_opening .= '<div class="ts-team-opening-parent">'; if (isset($Team_Header)) { if ($Team_Symbol == "none") { $team_opening .= '<div class="ts-team-opening-header">' . $Team_Header . '</div>'; } else { $team_opening .= '<div class="ts-team-opening-header"><i class="ts-teamicon-' . $Team_Symbol . ' ts-font-icon ts-teammate-icon" style="' . (isset($Team_Symbolcolor) ? "color: " . $Team_Symbolcolor . ";" : "") . '"></i>' . $Team_Header . '</div>'; } } if (isset($Team_Opening) && $Team_Opening != 'block') { $team_opening_count++; $team_opening .= '<div class="ts-team-opening-block">' . $Team_Opening . '</div>'; } $team_opening .= '</div>'; } // Build Team Social Links $team_social = ''; $team_social_count = 0; if ($show_social == "true") { $team_social .= '<ul class="ts-teammate-icons ' . $icon_style . ' clearFixMe">'; if (isset($Team_Facebook)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Facebook"><a style="" target="_blank" class="ts-teammate-link facebook ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Facebook) . '"><i class="ts-teamicon-facebook1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Google)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Google+"><a style="" target="_blank" class="ts-teammate-link gplus ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Google) . '"><i class="ts-teamicon-googleplus1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Twitter)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Twitter"><a style="" target="_blank" class="ts-teammate-link twitter ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Twitter) . '"><i class="ts-teamicon-twitter1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Linkedin)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="LinkedIn"><a style="" target="_blank" class="ts-teammate-link linkedin ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Linkedin) . '"><i class="ts-teamicon-linkedin ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Xing)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Xing"><a style="" target="_blank" class="ts-teammate-link xing ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Xing) . '"><i class="ts-teamicon-xing3 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Envato)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Envato"><a style="" target="_blank" class="ts-teammate-link envato ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Envato) . '"><i class="ts-teamicon-envato ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Rss)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="RSS"><a style="" target="_blank" class="ts-teammate-link rss ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Rss) . '"><i class="ts-teamicon-rss1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Forrst)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Forrst"><a style="" target="_blank" class="ts-teammate-link forrst ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Forrst) . '"><i class="ts-teamicon-forrst1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Flickr)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Flickr"><a style="" target="_blank" class="ts-teammate-link flickr ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Flickr) . '"><i class="ts-teamicon-flickr3 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Instagram)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Instagram"><a style="" target="_blank" class="ts-teammate-link instagram ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Instagram) . '"><i class="ts-teamicon-instagram ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Picasa)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Picasa"><a style="" target="_blank" class="ts-teammate-link picasa ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Picasa) . '"><i class="ts-teamicon-picasa1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Pinterest)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Pinterest"><a style="" target="_blank" class="ts-teammate-link pinterest ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Pinterest) . '"><i class="ts-teamicon-pinterest1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Vimeo)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Vimeo"><a style="" target="_blank" class="ts-teammate-link vimeo ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Vimeo) . '"><i class="ts-teamicon-vimeo1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Youtube)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="YouTube"><a style="" target="_blank" class="ts-teammate-link youtube ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Youtube) . '"><i class="ts-teamicon-youtube1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } $team_social .= '</ul>'; } // Build Team Skills $team_skills = ''; $team_skills_count = 0; if (isset($Team_Skillset) && $show_skills == "true") { $skill_entries = get_post_meta($Team_ID, 'ts_vcsc_team_skills_skillset', true); $skill_background = ''; $team_skills .= '<div class="ts-teammate-member-skills">'; foreach ((array) $skill_entries as $key => $entry) { $skill_name = $skill_value = $skill_color = ''; if (isset($entry['skillname'])) { $skill_name = esc_html($entry['skillname']); } if (isset($entry['skillvalue'])) { $skill_value = esc_html($entry['skillvalue']); } if (isset($entry['skillcolor'])) { $skill_color = esc_html($entry['skillcolor']); } if (strlen($skill_name) != 0 && strlen($skill_value) != 0) { $team_skills_count++; if (strlen($skill_color) != 0 && $skill_color != '#') { $skill_background = 'background-color: ' . $skill_color . ';'; } $team_skills .= '<div class="ts-skillbars-style1-wrapper clearfix">'; $team_skills .= '<div class="ts-skillbars-style1-name">' . $skill_name . '<span>(' . $skill_value . '%)</span></div><div class="ts-skillbars-style1-skillbar"><div class="ts-skillbars-style1-value" data-color="' . $skill_color . '" data-level="' . $skill_value . '%" style="width: ' . $skill_value . '%; ' . $skill_background . '"></div></div>'; $team_skills .= '</div>'; } } $team_skills .= '</div>'; } else { if (!isset($Team_Skillset) && $show_skills == "true") { $skill_background = ''; $team_skills .= '<div class="ts-teammate-member-skills">'; if (isset($Team_Skillname1) && isset($Team_Skillvalue1)) { $team_skills_count++; if (isset($Team_Skillcolor1)) { $skill_background = 'background-color: ' . $Team_Skillcolor1 . ';'; } $team_skills .= '<div class="ts-skillbars-style1-name">' . $Team_Skillname1 . '<span>(' . $Team_Skillvalue1 . '%)</span></div><div class="ts-skillbars-style1-skillbar"><div class="ts-skillbars-style1-value" data-color="' . $Team_Skillcolor1 . '" data-level="' . $Team_Skillvalue1 . '%" style="width: ' . $Team_Skillvalue1 . '%; ' . $skill_background . '"></div></div>'; } if (isset($Team_Skillname2) && isset($Team_Skillvalue2)) { $team_skills_count++; if (isset($Team_Skillcolor2)) { $skill_background = 'background-color: ' . $Team_Skillcolor2 . ';'; } $team_skills .= '<div class="ts-skillbars-style1-name">' . $Team_Skillname2 . '<span>(' . $Team_Skillvalue2 . '%)</span></div><div class="ts-skillbars-style1-skillbar"><div class="ts-skillbars-style1-value" data-color="' . $Team_Skillcolor2 . '" data-level="' . $Team_Skillvalue2 . '%" style="width: ' . $Team_Skillvalue2 . '%; ' . $skill_background . '"></div></div>'; } if (isset($Team_Skillname3) && isset($Team_Skillvalue3)) { $team_skills_count++; if (isset($Team_Skillcolor3)) { $skill_background = 'background-color: ' . $Team_Skillcolor3 . ';'; } $team_skills .= '<div class="ts-skillbars-style1-name">' . $Team_Skillname3 . '<span>(' . $Team_Skillvalue3 . '%)</span></div><div class="ts-skillbars-style1-skillbar"><div class="ts-skillbars-style1-value" data-color="' . $Team_Skillcolor3 . '" data-level="' . $Team_Skillvalue3 . '%" style="width: ' . $Team_Skillvalue3 . '%; ' . $skill_background . '"></div></div>'; } if (isset($Team_Skillname4) && isset($Team_Skillvalue4)) { $team_skills_count++; if (isset($Team_Skillcolor4)) { $skill_background = 'background-color: ' . $Team_Skillcolor4 . ';'; } $team_skills .= '<div class="ts-skillbars-style1-name">' . $Team_Skillname4 . '<span>(' . $Team_Skillvalue4 . '%)</span></div><div class="ts-skillbars-style1-skillbar"><div class="ts-skillbars-style1-value" data-color="' . $Team_Skillcolor4 . '" data-level="' . $Team_Skillvalue4 . '%" style="width: ' . $Team_Skillvalue4 . '%; ' . $skill_background . '"></div></div>'; } if (isset($Team_Skillname5) && isset($Team_Skillvalue5)) { $team_skills_count++; if (isset($Team_Skillcolor5)) { $skill_background = 'background-color: ' . $Team_Skillcolor5 . ';'; } $team_skills .= '<div class="ts-skillbars-style1-name">' . $Team_Skillname5 . '<span>(' . $Team_Skillvalue5 . '%)</span></div><div class="ts-skillbars-style1-skillbar"><div class="ts-skillbars-style1-value" data-color="' . $Team_Skillcolor5 . '" data-level="' . $Team_Skillvalue5 . '%" style="width: ' . $Team_Skillvalue5 . '%; ' . $skill_background . '"></div></div>'; } if (isset($Team_Skillname6) && isset($Team_Skillvalue6)) { $team_skills_count++; if (isset($Team_Skillcolor6)) { $skill_background = 'background-color: ' . $Team_Skillcolor6 . ';'; } $team_skills .= '<div class="ts-skillbars-style1-name">' . $Team_Skillname6 . '<span>(' . $Team_Skillvalue6 . '%)</span></div><div class="ts-skillbars-style1-skillbar"><div class="ts-skillbars-style1-value" data-color="' . $Team_Skillcolor6 . '" data-level="' . $Team_Skillvalue6 . '%" style="width: ' . $Team_Skillvalue6 . '%; ' . $skill_background . '"></div></div>'; } $team_skills .= '</div>'; } } // Build Download Button $team_download = ''; if ($show_download == "true") { if (isset($Team_Buttonfile) || isset($Team_Attachment)) { if (isset($Team_Buttonfile)) { $Team_File = $Team_Buttonfile; } else { $Team_Attachment = get_post_meta($Team_ID, 'ts_vcsc_team_basic_attachment', true); $Team_Attachment = wp_get_attachment_url($Team_Attachment['id']); $Team_File = $Team_Attachment; } $Team_FileFormat = pathinfo($Team_File, PATHINFO_EXTENSION); if (isset($Team_Buttontype)) { $Team_Buttontype = $Team_Buttontype; } else { $Team_Buttontype = 'ts-button-3d'; } if (!empty($Team_File)) { $team_download .= '<div class="ts-teammate-download">'; if (isset($Team_Buttontooltip)) { if (isset($Team_Buttonicon) && $Team_Buttonicon == "none" || !isset($Team_Buttonicon)) { $team_download .= '<a class="ts-teammate-file-link ts-button ' . $Team_Buttontype . ' ' . $team_tooltipclasses . '" data-format="' . $Team_FileFormat . '" data-tstooltip="' . $Team_Buttontooltip . '" href="' . $Team_File . '" target="_blank">' . $Team_Buttonlabel . '</a>'; } else { $team_download .= '<a class="ts-teammate-file-link ts-button ' . $Team_Buttontype . ' ' . $team_tooltipclasses . '" data-format="' . $Team_FileFormat . '" data-tstooltip="' . $Team_Buttontooltip . '" href="' . $Team_File . '" target="_blank"><i class="ts-teamicon-' . $Team_Buttonicon . ' ts-font-icon ts-teammate-icon" style="' . (isset($Team_Buttoncolor) ? "color: " . $Team_Buttoncolor . ":" : "") . '"></i> ' . $Team_Buttonlabel . '</a>'; } } else { if (isset($Team_Buttonicon) && $Team_Buttonicon == "none" || !isset($Team_Buttonicon)) { $team_download .= '<a class="ts-teammate-file-link ts-button ' . $Team_Buttontype . '" data-format="' . $Team_FileFormat . '" href="' . $Team_File . '" target="_blank">' . $Team_Buttonlabel . '</a>'; } else { $team_download .= '<a class="ts-teammate-file-link ts-button ' . $Team_Buttontype . '" data-format="' . $Team_FileFormat . '" href="' . $Team_File . '" target="_blank"><i class="ts-teamicon-' . $Team_Buttonicon . ' ts-font-icon ts-teammate-icon" style="' . (isset($Team_Buttoncolor) ? "color: " . $Team_Buttoncolor . ";" : "") . '"></i> ' . $Team_Buttonlabel . '</a>'; } } $team_download .= '</div>'; if (get_option('ts_vcsc_extend_settings_loadForcable', 0) == 0) { wp_enqueue_style('ts-extend-buttons', TS_VCSC_GetResourceURL('css/jquery.buttons.css'), null, false, 'all'); } } } } // Grayscale Class if ($show_grayscale == "true" && $grayscale_hover == "true") { $grayscale_class = 'ts-grayscale-hover'; } else { if ($show_grayscale == "true" && $grayscale_hover == "false") { $grayscale_class = 'ts-grayscale-default'; } else { $grayscale_class = 'ts-grayscale-none'; } } // Create Output if ($style == "style1") { $output .= '<div class="ts-team1 ts-teammate ' . $grayscale_class . '" style="width: 95%; margin: 0 auto;">'; if ($show_image == "true" && !empty($Team_Image)) { $output .= '<div class="team-avatar">'; if ($show_lightbox == "false" && $link_image == "true" && isset($Team_Dedicatedpage) && $Team_Dedicatedpage != -1) { $output .= '<a class="ts-team-image-link" href="' . $Team_Dedicatedpage . '" target="' . $team_dedicated_target . '">'; } $output .= '<img src="' . $Team_Image . '" rel="' . ($show_lightbox == "true" ? "nachoteam" : "") . '" title="' . $Team_Title . ' / ' . $Team_Position . '" alt="" class="' . $image_style . ' ' . ($show_lightbox == "true" ? "nch-lightbox" : "") . ' ' . ($show_grayscale == "true" ? "grayscale" : "") . ' ' . ($show_effects == "true" ? "hovereffect" : "") . '">'; if ($show_lightbox == "false" && $link_image == "true" && isset($Team_Dedicatedpage) && $Team_Dedicatedpage != -1) { $output .= '</a>'; } $output .= '</div>'; } $output .= '<div class="team-user">'; if (!empty($Team_Title)) { $output .= '<h4 class="team-title">' . $Team_Title . '</h4>'; } if (!empty($Team_Position)) { $output .= '<div class="team-job">' . $Team_Position . '</div>'; } $output .= $team_dedicated; $output .= $team_download; $output .= '</div>'; if ($show_content == "true" && !empty($Team_Content)) { $output .= '<div class="team-information">'; if (function_exists('wpb_js_remove_wpautop')) { $output .= '' . wpb_js_remove_wpautop(do_shortcode($Team_Content), true) . ''; } else { $output .= '' . do_shortcode($Team_Content) . ''; } $output .= '</div>'; } if ($team_contact_count > 0) { $output .= $team_contact; } if ($team_social_count > 0) { $output .= $team_social; } if ($team_opening_count > 0) { $output .= $team_opening; } if ($team_skills_count > 0) { $output .= $team_skills; } $output .= '</div>'; } if ($style == "style2") { $output .= '<div class="ts-team2 ts-teammate ' . $grayscale_class . '" style="width: 95%; margin: 0 auto;">'; $output .= '<div style="width: 25%; float: left;">'; if ($show_image == "true" && !empty($Team_Image)) { $output .= '<div class="ts-team2-header">'; if ($show_lightbox == "false" && $link_image == "true" && isset($Team_Dedicatedpage) && $Team_Dedicatedpage != -1) { $output .= '<a class="ts-team-image-link" href="' . $Team_Dedicatedpage . '" target="' . $team_dedicated_target . '">'; } $output .= '<img src="' . $Team_Image . '" rel="' . ($show_lightbox == "true" ? "nachoteam" : "") . '" title="' . $Team_Title . ' / ' . $Team_Position . '" alt="" class="' . $image_style . ' ' . ($show_lightbox == "true" ? "nch-lightbox" : "") . ' ' . ($show_grayscale == "true" ? "grayscale" : "") . ' ' . ($show_effects == "true" ? "hovereffect" : "") . '">'; if ($show_lightbox == "false" && $link_image == "true" && isset($Team_Dedicatedpage) && $Team_Dedicatedpage != -1) { $output .= '</a>'; } $output .= '</div>'; } if ($team_social_count > 0) { if ($show_image == "true") { $output .= '<div class="ts-team2-footer" style="' . ($show_image == "false" ? "margin-top: 0px;" : "") . '">'; } else { $output .= '<div class="ts-team2-footer" style="width: 100%; margin-top: 0px;">'; } $output .= $team_social; $output .= '</div>'; } $output .= '</div>'; if ($show_image == "true" || $team_social_count > 0) { $output .= '<div class="ts-team2-content" style="">'; } else { $output .= '<div class="ts-team2-content" style="width: 100%; margin-left: 0px;">'; } $output .= '<div class="ts-team2-line"></div>'; if (!empty($Team_Title)) { $output .= '<h3>' . $Team_Title . '</h3>'; } if (!empty($Team_Position)) { $output .= '<p class="ts-team2-lead">' . $Team_Position . '</p>'; } if ($show_content == "true" && !empty($Team_Content)) { if (function_exists('wpb_js_remove_wpautop')) { $output .= '' . wpb_js_remove_wpautop(do_shortcode($Team_Content), true) . ''; } else { $output .= '' . do_shortcode($Team_Content) . ''; } } $output .= '</div>'; $output .= $team_dedicated; $output .= $team_download; if ($team_contact_count > 0) { $output .= $team_contact; } if ($team_opening_count > 0) { $output .= $team_opening; } if ($team_skills_count > 0) { $output .= $team_skills; } $output .= '</div>'; } if ($style == "style3") { $output .= '<div class="ts-team3 ts-teammate ' . $grayscale_class . '" style="width: 95%; margin: 0 auto;">'; if ($show_image == "true" && !empty($Team_Image)) { if ($show_lightbox == "false" && $link_image == "true" && isset($Team_Dedicatedpage) && $Team_Dedicatedpage != -1) { $output .= '<a class="ts-team-image-link" href="' . $Team_Dedicatedpage . '" target="' . $team_dedicated_target . '">'; } $output .= '<img class="ts-team3-person-image ' . $image_style . ' ' . ($show_lightbox == "true" ? "nch-lightbox" : "") . ' ' . ($show_grayscale == "true" ? "grayscale" : "") . ' ' . ($show_effects == "true" ? "hovereffect" : "") . '" rel="' . ($show_lightbox == "true" ? "nachoteam" : "") . '" src="' . $Team_Image . '" title="' . $Team_Title . ' / ' . $Team_Position . '" alt="">'; if ($show_lightbox == "false" && $link_image == "true" && isset($Team_Dedicatedpage) && $Team_Dedicatedpage != -1) { $output .= '</a>'; } } if (!empty($Team_Title)) { $output .= '<div class="ts-team3-person-name">' . $Team_Title . '</div>'; } if (!empty($Team_Position)) { $output .= '<div class="ts-team3-person-position">' . $Team_Position . '</div>'; } if ($show_content == "true" && !empty($Team_Content)) { if (function_exists('wpb_js_remove_wpautop')) { $output .= '<div class="ts-team3-person-description">' . wpb_js_remove_wpautop(do_shortcode($Team_Content), true) . '</div>'; } else { $output .= '<div class="ts-team3-person-description">' . do_shortcode($Team_Content) . '</div>'; } } $output .= $team_dedicated; $output .= $team_download; if ($team_contact_count > 0) { $output .= $team_contact; } if ($team_social_count > 0) { $output .= $team_social; } if ($team_opening_count > 0) { $output .= $team_opening; } if ($team_skills_count > 0) { $output .= $team_skills; } $output .= '<div class="ts-team3-person-space"></div>'; $output .= '</div>'; } foreach ($custom_fields_array as $index => $array) { unset(${$custom_fields_array[$index]['name']}); } if ($frontend_edit == "true") { break; } } $output .= '</div>'; $output .= '</div>'; echo $output; $myvariable = ob_get_clean(); return $myvariable; }
function fonts_setting_field($settings, $value) { global $VISUAL_COMPOSER_EXTENSIONS; // Main Settings $dependency = vc_generate_dependencies_attributes($settings); $param_name = isset($settings['param_name']) ? $settings['param_name'] : ''; $type = isset($settings['type']) ? $settings['type'] : ''; $preview = isset($settings['preview']) ? $settings['preview'] : 'true'; $search = isset($settings['search']) ? $settings['search'] : 'true'; $filter = isset($settings['filter']) ? $settings['filter'] : 'true'; $manager = isset($settings['manager']) ? $settings['manager'] : 'false'; $default = isset($settings['default']) ? $settings['default'] : 'true'; $connector = isset($settings['connector']) ? $settings['connector'] : 'font_type'; // Text Strings $textswitch = isset($settings['textswitch']) ? $settings['textswitch'] : __("Show Font Manager:", "ts_visual_composer_extend"); $textholder = isset($settings['textholder']) ? $settings['textholder'] : __("Select a Font", "ts_visual_composer_extend"); $textsearch = isset($settings['textsearch']) ? $settings['textsearch'] : __("Search Fonts:", "ts_visual_composer_extend"); $textfilter = isset($settings['textfilter']) ? $settings['textfilter'] : __("Filter Fonts:", "ts_visual_composer_extend"); $textvariants = isset($settings['textvariants']) ? $settings['textvariants'] : __("Select Font Variant:", "ts_visual_composer_extend"); $textfavorite = isset($settings['textfavorite']) ? $settings['textfavorite'] : __("Favorite Fonts", "ts_visual_composer_extend"); $textdefault = isset($settings['textdefault']) ? $settings['textdefault'] : __("Default Font", "ts_visual_composer_extend"); $textstandard = isset($settings['textstandard']) ? $settings['textstandard'] : __("Websave Fonts", "ts_visual_composer_extend"); $textgoogle = isset($settings['textgoogle']) ? $settings['textgoogle'] : __("Google Fonts", "ts_visual_composer_extend"); $textpreviewer = isset($settings['textpreviewer']) ? $settings['textpreviewer'] : __("Autoload CSS font files for live preview while scrolling list.", "ts_visual_composer_extend"); // Switch Settings $on = isset($settings['on']) ? $settings['on'] : __("Yes", "ts_visual_composer_extend"); $off = isset($settings['off']) ? $settings['off'] : __("No", "ts_visual_composer_extend"); $style = isset($settings['style']) ? $settings['style'] : 'select'; $design = isset($settings['design']) ? $settings['design'] : 'toggle-light'; $width = isset($settings['width']) ? $settings['width'] : '80'; // Other Variables $identifier = mt_rand(999999, 9999999); $url = $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginPath; $image = TS_VCSC_GetResourceURL('images/other/google_fonts.jpg'); /*if (($value != '') && ($value != 'Default:regular')) { $toggle = 'true'; $display = 'block'; } else {*/ $toggle = 'false'; $display = 'none'; //} $output = ''; $output .= '<div id="ts-font-selector-' . $identifier . '" class="ts-font-selector" data-manager="' . $manager . '" data-identifier="' . $identifier . '" data-toggle="ts-font-selector-toggle-' . $identifier . '" data-fontello="ts-font-selector-fontello-' . $identifier . '" data-connector="' . $connector . '" data-text-holder="' . $textholder . '" data-text-search="' . $textsearch . '" data-text-filter="' . $textfilter . '" data-text-favorite="' . $textfavorite . '" data-text-default="' . $textdefault . '" data-text-standard="' . $textstandard . '" data-text-google="' . $textgoogle . '" data-text-variants="' . $textvariants . '" data-text-previewer="' . $textpreviewer . '" data-preview="' . $preview . '" data-search="' . $search . '" data-filter="' . $filter . '">'; $output .= '<div id="ts-font-selector-switcheroo-' . $identifier . '" class="ts-font-selector-switcheroo">'; $output .= '<label for="ts-font-selector-toggle-' . $identifier . '">' . $textswitch . '</label>'; $output .= '<div id="ts-font-selector-toggle-' . $identifier . '" class="ts-switch-button ts-font-selector-toggle" data-value="' . $toggle . '" data-width="' . $width . '" data-style="' . $style . '" data-on="' . $on . '" data-off="' . $off . '">'; $output .= '<input type="hidden" style="display: none; " class="toggle-input" value="' . $toggle . '" name="ts-font-selector-toggle"/>'; $output .= '<div class="toggle ' . $design . '" style="width: ' . $width . 'px; height: 20px;">'; $output .= '<div class="toggle-slide">'; $output .= '<div class="toggle-inner">'; $output .= '<div class="toggle-on ' . ($toggle == 'true' ? 'active' : '') . '">' . $on . '</div>'; $output .= '<div class="toggle-blob"></div>'; $output .= '<div class="toggle-off ' . ($toggle == 'false' ? 'active' : '') . '">' . $off . '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '<div id="ts-font-selector-fontello-' . $identifier . '" class="ts-font-selector-fontello" style="display: ' . $display . ';">'; $output .= '<div class="ts-font-selector-block"><img src="' . $image . '" class="ts-font-selector-image"></div>'; $output .= '<input name="' . $param_name . '" id="' . $param_name . '" class="ts-font-selector-list wpb-select wpb_vc_param_value ' . $param_name . ' ' . $type . '" type="text" value="' . $value . '"/>'; $output .= '</div>'; $output .= '</div>'; return $output; }
function TS_VCSC_checkEnvatoAPI() { global $VISUAL_COMPOSER_EXTENSIONS; if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginIsMultiSiteActive == "true") { if (strlen(get_site_option('ts_vcsc_extend_settings_license')) != 0) { $envato_code = get_site_option('ts_vcsc_extend_settings_license'); } else { $envato_code = ""; } $ts_vcsc_extend_settings_licenseKeyed = get_site_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix'); } else { if (strlen(get_option('ts_vcsc_extend_settings_license')) != 0) { $envato_code = get_option('ts_vcsc_extend_settings_license'); } else { $envato_code = ""; } $ts_vcsc_extend_settings_licenseKeyed = get_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix'); } if (!in_array(base64_encode($envato_code), $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_Avoid_Duplications)) { if (function_exists('wp_remote_get') && strlen($envato_code) != 0) { $remoteResponse = wp_remote_get($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_External_URL . $envato_code . '&protocol=' . TS_VCSC_SiteProtocol() . '&clienturl=' . preg_replace('#^https?://#', '', site_url()), array('timeout' => 120, 'user-agent' => 'Composium - Visual Composer Extensions', 'httpversion' => '1.1')); $responseText = wp_remote_retrieve_body($remoteResponse); $responseCode = wp_remote_retrieve_response_code($remoteResponse); } else { if (function_exists('wp_remote_post') && strlen($envato_code) != 0) { $remoteResponse = wp_remote_post($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_External_URL . $envato_code . '&protocol=' . TS_VCSC_SiteProtocol() . '&clienturl=' . preg_replace('#^https?://#', '', site_url()), array('timeout' => 120, 'user-agent' => 'Composium - Visual Composer Extensions', 'httpversion' => '1.1')); $responseText = wp_remote_retrieve_body($remoteResponse); $responseCode = wp_remote_retrieve_response_code($remoteResponse); } else { $remoteResponse = ""; $responseText = ""; $responseCode = ""; } } } else { $remoteResponse = ""; $responseText = ""; $responseCode = ""; } if ($responseCode == 200 && strlen($responseText) != 0) { if (strlen($envato_code) == 0 || strpos($responseText, $envato_code) === FALSE) { if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginIsMultiSiteActive == "true") { update_site_option('ts_vcsc_extend_settings_licenseValid', 0); update_site_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix'); update_site_option('ts_vcsc_extend_settings_licenseInfo', strlen($envato_code) != 0 ? $responseText : ''); update_site_option('ts_vcsc_extend_settings_demo', 1); } else { update_option('ts_vcsc_extend_settings_licenseValid', 0); update_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix'); update_option('ts_vcsc_extend_settings_licenseInfo', strlen($envato_code) != 0 ? $responseText : ''); update_option('ts_vcsc_extend_settings_demo', 1); } $LicenseCheckStatus = '<div class="clearFixMe" style="color: red; font-weight: bold; padding-bottom: 10px;">License Check has been initiated but was unsuccessful!</div>'; $LicenseCheckSuccess = 0; } else { if (strlen($envato_code) != 0 && strpos($responseText, $envato_code) != FALSE) { if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginIsMultiSiteActive == "true") { update_site_option('ts_vcsc_extend_settings_licenseValid', 1); update_site_option('ts_vcsc_extend_settings_licenseKeyed', $envato_code); update_site_option('ts_vcsc_extend_settings_licenseInfo', str_replace("Link_To_Envato_Image", TS_VCSC_GetResourceURL('images/envato/envato_logo.png'), $responseText)); update_site_option('ts_vcsc_extend_settings_demo', 0); } else { update_option('ts_vcsc_extend_settings_licenseValid', 1); update_option('ts_vcsc_extend_settings_licenseKeyed', $envato_code); update_option('ts_vcsc_extend_settings_licenseInfo', str_replace("Link_To_Envato_Image", TS_VCSC_GetResourceURL('images/envato/envato_logo.png'), $responseText)); update_option('ts_vcsc_extend_settings_demo', 0); } $LicenseCheckStatus = '<div class="clearFixMe" style="color: green; font-weight: bold; padding-bottom: 10px;">License Check has been succesfully completed!</div>'; $LicenseCheckSuccess = 1; } else { if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginIsMultiSiteActive == "true") { update_site_option('ts_vcsc_extend_settings_licenseValid', 0); update_site_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix'); update_site_option('ts_vcsc_extend_settings_licenseInfo', strlen($envato_code) != 0 ? $responseText : ''); update_site_option('ts_vcsc_extend_settings_demo', 1); } else { update_option('ts_vcsc_extend_settings_licenseValid', 0); update_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix'); update_option('ts_vcsc_extend_settings_licenseInfo', strlen($envato_code) != 0 ? $responseText : ''); update_option('ts_vcsc_extend_settings_demo', 1); } $LicenseCheckStatus = '<div class="clearFixMe" style="color: red; font-weight: bold; padding-bottom: 10px;">License Check has been initiated but was unsuccessful!</div>'; $LicenseCheckSuccess = 0; } } } else { if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginIsMultiSiteActive == "true") { update_site_option('ts_vcsc_extend_settings_licenseValid', 0); update_site_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix'); update_site_option('ts_vcsc_extend_settings_licenseInfo', ''); update_site_option('ts_vcsc_extend_settings_demo', 1); } else { update_option('ts_vcsc_extend_settings_licenseValid', 0); update_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix'); update_option('ts_vcsc_extend_settings_licenseInfo', ''); update_option('ts_vcsc_extend_settings_demo', 1); } if (in_array(base64_encode($envato_code), $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_Avoid_Duplications)) { $LicenseCheckStatus = '<div class="clearFixMe" style="color: red; font-weight: bold; padding-bottom: 10px;">The License Key has been revoked by Envato due to a full refund of the purchase price!</div>'; } else { $LicenseCheckStatus = '<div class="clearFixMe" style="color: red; font-weight: bold; padding-bottom: 10px;">License Check could not be initiated - Missing License Key!</div>'; } $LicenseCheckSuccess = 0; } }
function TS_VCSC_HTML5_Audio_Function($atts, $content = null) { global $VISUAL_COMPOSER_EXTENSIONS; ob_start(); wp_enqueue_style('ts-extend-tooltipster'); wp_enqueue_script('ts-extend-tooltipster'); if (get_option('ts_vcsc_extend_settings_loadForcable', 0) == 0) { 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('audio_mp3_source' => 'true', 'audio_mp3_remote' => '', 'audio_mp3_local' => '', 'audio_ogg_source' => 'true', 'audio_ogg_remote' => '', 'audio_ogg_local' => '', 'audio_bar_only' => 'true', 'audio_fixed' => 'false', 'audio_fixed_show' => 'true', 'audio_fixed_width' => 250, 'audio_fixed_height' => 140, 'audio_fixed_adjust' => 0, 'audio_fixed_switch' => 'toggle', 'audio_fixed_position' => 'bottomleft', 'audio_poster' => '', 'audio_logo_show' => 'logonone', 'audio_logo_image' => '', 'audio_logo_height' => 50, 'audio_logo_opacity' => 50, 'audio_logo_position' => 'left', 'audio_logo_link' => '', 'audio_theme' => 'maccaco', 'audio_title' => '', 'audio_iframe' => 'true', 'audio_auto' => 'false', 'audio_stop' => 'true', 'audio_loop' => 'false', 'audio_fullscreen' => 'true', 'audio_share' => 'true', 'audio_volume' => 50, 'content_image_responsive' => 'true', 'content_image_height' => 'height: 100%;', 'content_image_width_r' => 100, 'content_image_width_f' => 300, 'content_image_size' => 'large', 'content_tooltip_css' => 'false', 'content_tooltip_title' => '', 'content_tooltip_content' => '', 'content_tooltip_position' => 'ts-simptip-position-top', 'tooltipster_offsetx' => 0, 'tooltipster_offsety' => 0, 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); $randomizer = mt_rand(999999, 9999999); if (!empty($el_id)) { $modal_id = $el_id; } else { $modal_id = 'ts-vcsc-modal-' . $randomizer; } // Audio Data if ($audio_mp3_source == "true") { $audio_url = wp_get_attachment_url($audio_mp3_local); } else { $audio_url = $audio_mp3_remote; } $audio_mp3 = $audio_url; if ($audio_ogg_source == "true") { $audio_url = wp_get_attachment_url($audio_ogg_local); } else { $audio_url = $audio_ogg_remote; } $audio_ogg = $audio_url; // Poster + Logo $poster_image = wp_get_attachment_image_src($audio_poster, 'full'); if ($poster_image != false) { $poster_image = $poster_image[0]; } else { $poster_image = TS_VCSC_GetResourceURL("images/defaults/default_html5.jpg"); } if ($audio_logo_show != "logonone") { $logo_image = wp_get_attachment_image_src($audio_logo_image, 'full'); $logo_image = $logo_image[0]; $audio_logo_link = $audio_logo_link == '||' ? '' : $audio_logo_link; $audio_logo_link = vc_build_link($audio_logo_link); $logo_link_href = $audio_logo_link['url']; $logo_link_title = $audio_logo_link['title']; $logo_link_target = $audio_logo_link['target']; } else { $logo_image = ''; $video_logo_link = ''; $logo_link_href = ''; $logo_link_title = ''; $logo_link_target = ''; } // Adjustment for Inline Edit Mode of VC if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VCFrontEditMode == "true") { $audio_fixed = 'false'; } else { $audio_fixed = $audio_fixed; } // Tooltip if ($content_tooltip_content != '') { if ($content_tooltip_position == "ts-simptip-position-top" || $content_tooltip_position == "top") { $content_tooltip_position = "top"; } if ($content_tooltip_position == "ts-simptip-position-left" || $content_tooltip_position == "left") { $content_tooltip_position = "left"; } if ($content_tooltip_position == "ts-simptip-position-right" || $content_tooltip_position == "right") { $content_tooltip_position = "right"; } if ($content_tooltip_position == "ts-simptip-position-bottom" || $content_tooltip_position == "bottom") { $content_tooltip_position = "bottom"; } $tooltip_content = 'data-tooltipster-title="' . $content_tooltip_title . '" data-tooltipster-text="' . $content_tooltip_content . '" data-tooltipster-image="" data-tooltipster-position="' . $content_tooltip_position . '" data-tooltipster-touch="false" data-tooltipster-arrow="true" data-tooltipster-theme="tooltipster-black" data-tooltipster-animation="swing" data-tooltipster-trigger="hover" data-tooltipster-offsetx="' . $tooltipster_offsetx . '" data-tooltipster-offsety="' . $tooltipster_offsety . '"'; $tooltip_class = 'ts-has-tooltipster-tooltip'; if ($audio_fixed_switch != "none") { $container_addition = 40; } else { $container_addition = 0; } } else { $tooltip_content = ''; $tooltip_class = ''; $container_addition = 0; } if ($audio_bar_only == "true") { if ($audio_fixed == "true") { $container_adjust = 'height: 38px; width: ' . $audio_fixed_width . 'px; padding-bottom: 0; padding-top: 0;'; $iframe_adjust = 'height: 38px; width: ' . $audio_fixed_width . 'px;'; } else { $container_adjust = 'height: 38px; padding-bottom: 0; padding-top: 0;'; $iframe_adjust = 'height: 38px;'; } } else { if ($audio_fixed == "true") { $container_adjust = 'margin-top: 0px; margin-bottom: 0px; height: ' . $audio_fixed_height . 'px; width: ' . $audio_fixed_width . 'px; padding-bottom: 0; padding-top: 0;'; $iframe_adjust = 'height: ' . $audio_fixed_height . 'px; width: ' . $audio_fixed_width . 'px; padding-bottom: 0; padding-top: 0;'; } else { $container_adjust = 'margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;'; $iframe_adjust = ''; } } if ($audio_fixed == "true") { if ($audio_fixed_position == "bottomleft") { $container_fixed = 'position: fixed; bottom: ' . $audio_fixed_adjust . 'px; left: 0; top: auto; right: auto; z-index: 4444;'; $container_class = 'ts_html5_audio_fixed_' . $audio_fixed_position . ''; if ($audio_bar_only == "true") { $container_controls = 'position: fixed; bottom: ' . $audio_fixed_adjust . 'px; left: ' . ($audio_fixed_width + 2) . 'px; top: auto; right: auto; height: 40px; width: auto;'; $container_info = 'float: left;'; $container_other = 'float: right;'; } else { $container_controls = 'position: fixed; bottom: ' . ($audio_fixed_height - 38 + $audio_fixed_adjust - $container_addition) . 'px; left: ' . ($audio_fixed_width + 2) . 'px; top: auto; right: auto; height: auto; width: 40px;'; $container_info = ''; $container_other = ''; } } else { if ($audio_fixed_position == "bottomright") { $container_fixed = 'position: fixed; bottom: ' . $audio_fixed_adjust . 'px; left: auto; top: auto; right: 0; z-index: 4444;'; $container_class = 'ts_html5_audio_fixed_' . $audio_fixed_position . ''; if ($audio_bar_only == "true") { $container_controls = 'position: fixed; bottom: ' . $audio_fixed_adjust . 'px; left: auto; top: auto; right: ' . ($audio_fixed_width + 2) . 'px; height: 40px; width: auto;'; $container_info = 'float: right;'; $container_other = 'float: left;'; } else { $container_controls = 'position: fixed; bottom: ' . ($audio_fixed_height - 38 + $audio_fixed_adjust - $container_addition) . 'px; left: auto; top: auto; right: ' . ($audio_fixed_width + 2) . 'px; height: auto; width: 40px;'; $container_info = ''; $container_other = ''; } } else { if ($audio_fixed_position == "topleft") { $container_fixed = 'position: fixed; bottom: auto; left: 0; top: ' . $audio_fixed_adjust . 'px; right: auto; z-index: 4444;'; $container_class = 'ts_html5_audio_fixed_' . $audio_fixed_position . ''; if ($audio_bar_only == "true") { $container_controls = 'position: fixed; bottom: auto; left: ' . ($audio_fixed_width + 2) . 'px; top: ' . $audio_fixed_adjust . 'px; right: auto; height: 40px; width: auto;'; $container_info = 'float: left;'; $container_other = 'float: right;'; } else { $container_controls = 'position: fixed; bottom: auto; left: ' . ($audio_fixed_width + 2) . 'px; top: ' . ($audio_fixed_height - 38 + $audio_fixed_adjust - $container_addition) . 'px; right: auto; height: auto; width: 40px;'; $container_info = ''; $container_other = ''; } } else { if ($audio_fixed_position == "topright") { $container_fixed = 'position: fixed; bottom: auto; left: auto; top: ' . $audio_fixed_adjust . 'px; right: 0; z-index: 4444;'; $container_class = 'ts_html5_audio_fixed_' . $audio_fixed_position . ''; if ($audio_bar_only == "true") { $container_controls = 'position: fixed; bottom: auto; left: auto; top: ' . $audio_fixed_adjust . 'px; right: ' . ($audio_fixed_width + 2) . 'px; height: 40px; width: auto;'; $container_info = 'float: right;'; $container_other = 'float: left;'; } else { $container_controls = 'position: fixed; bottom: auto; left: auto; top: ' . ($audio_fixed_height - 38 + $audio_fixed_adjust - $container_addition) . 'px; right: ' . ($audio_fixed_width + 2) . 'px; height: auto; width: 40px;'; $container_info = ''; $container_other = ''; } } } } } $iframe_fixed = 'position: relative;'; } else { $container_class = ''; $container_fixed = ''; $iframe_fixed = ''; $container_controls = ''; $container_info = ''; $container_other = ''; } $output = ''; 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_HTML5_Audio', $atts); } else { $css_class = ''; } if ($audio_fixed == "true") { $output .= '<div id="' . $modal_id . '_controls" class="ts_html5_audio_controls" style="' . $container_controls . '">'; if ($content_tooltip_content != '') { $output .= '<div id="' . $modal_id . '_info" class="ts_html5_audio_info ' . $tooltip_class . '" ' . $tooltip_content . ' data-controls="' . $modal_id . '_controls" data-player="' . $modal_id . '_audio" data-position="' . $audio_fixed_position . '" data-width="' . $audio_fixed_width . '" data-adjust="' . $audio_fixed_adjust . '" style="' . $container_info . '"></div>'; } if ($audio_fixed_switch == "remove") { $output .= '<div id="' . $modal_id . '_remove" class="ts_html5_audio_remove" data-info="' . $modal_id . '_info" data-controls="' . $modal_id . '_controls" data-player="' . $modal_id . '_audio" data-position="' . $audio_fixed_position . '" data-width="' . $audio_fixed_width . '" data-adjust="' . $audio_fixed_adjust . '" style="' . $container_other . '"></div>'; } else { if ($audio_fixed_switch == "toggle") { $output .= '<div id="' . $modal_id . '_hide" class="ts_html5_audio_hide inactive ' . $audio_fixed_position . '" data-show="' . $audio_fixed_show . '" data-info="' . $modal_id . '_info" data-controls="' . $modal_id . '_controls" data-player="' . $modal_id . '_audio" data-position="' . $audio_fixed_position . '" data-width="' . $audio_fixed_width . '" data-adjust="' . $audio_fixed_adjust . '" style="' . $container_other . '"></div>'; } } $output .= '</div>'; } $output .= '<div id="' . $modal_id . '_audio" class="ts_audio_container ts_html5_audio_frame ' . $css_class . ' ' . $el_class . ' ' . $container_class . '" style="border: 1px solid #DADADA; ' . $container_adjust . ' ' . $container_fixed . '">'; $output .= '<iframe id="' . $modal_id . '_iframe" class="ts_html5_audio_frame_insert ts_html5_media_frame_insert" style="margin: 0 auto; ' . $iframe_adjust . ' ' . $iframe_fixed . '" onload="" data-id="projekktor' . $randomizer . '" data-theme="' . $audio_theme . '" data-holder="' . $modal_id . '_iframe" data-bar-only="' . $audio_bar_only . '" data-auto-play="' . $audio_auto . '" data-auto-stop="' . $audio_stop . '" data-repeat="' . $audio_loop . '" data-poster="' . $poster_image . '" data-title="' . $audio_title . '" data-logo-show="' . $audio_logo_show . '" data-logo-image="' . $logo_image . '" data-logo-height="' . $audio_logo_height . '" data-logo-opacity="' . $audio_logo_opacity . '" data-logo-position="' . $audio_logo_position . '" data-logo-url="' . $logo_link_href . '" data-logo-title="' . $logo_link_title . '" data-logo-target="' . $logo_link_target . '" data-audio-mp3="' . $audio_mp3 . '" data-audio-ogg="' . $audio_ogg . '" data-volume="' . $audio_volume . '" data-share="' . $audio_share . '" data-fallback="' . TS_VCSC_GetResourceURL("projekktor/swf/StrobeMediaPlayback/StrobeMediaPlayback.swf") . '" width="100%" height="auto" scrolling="no" frameborder="0" type="text/html" mozallowfullscreen="mozallowfullscreen" webkitallowfullscreen="webkitallowfullscreen" allowfullscreen="allowfullscreen" src="' . TS_VCSC_GetResourceURL("projekktor/iframe-audio.html") . '"> </iframe>'; $output .= '</div>'; echo $output; $myvariable = ob_get_clean(); return $myvariable; }
function TS_VCSC_Timeline_Function_Single($atts, $content = null) { global $VISUAL_COMPOSER_EXTENSIONS; ob_start(); extract(shortcode_atts(array('full_width' => 'false', 'featured_media' => 'none', 'featured_image' => '', 'featured_image_alt' => '', 'featured_slider' => '', 'featured_youtube_url' => '', 'featured_youtube_related' => 'false', 'featured_youtube_play' => 'false', 'featured_dailymotion_url' => '', 'featured_dailymotion_play' => 'false', 'featured_vimeo_url' => '', 'featured_vimeo_play' => 'false', 'featured_media_height' => 'height: 100%;', 'featured_media_width' => 100, 'featured_media_align' => 'center', 'link' => '', 'tooltip_css' => 'false', 'tooltip_position' => 'ts-simptip-position-top', 'tooltip_style' => '', 'button_align' => 'center', 'button_width' => 100, 'button_type' => 'square', '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_size' => '', 'button_wrapper' => 'false', 'button_text' => '', 'button_change' => 'false', 'button_color' => '#666666', 'button_font' => 18, 'thumbnail_position' => 'bottom', 'thumbnail_height' => 100, 'lightbox_featured' => 'true', 'lightbox_group' => 'true', 'lightbox_group_name' => '', 'lightbox_size' => 'full', 'lightbox_effect' => 'random', 'lightbox_autoplay' => 'false', 'lightbox_speed' => 5000, 'lightbox_social' => 'true', 'lightbox_backlight' => 'auto', 'lightbox_backlight_color' => '#ffffff', 'number_images' => 1, 'auto_height' => 'true', 'page_rtl' => 'false', 'auto_play' => 'false', 'show_bar' => 'false', 'bar_color' => '#dd3333', 'show_speed' => 5000, 'stop_hover' => 'true', 'show_navigation' => 'true', "items_loop" => 'false', 'animation_in' => 'ts-viewport-css-flipInX', 'animation_out' => 'ts-viewport-css-slideOutDown', 'animation_mobile' => 'false', 'date_text' => '', 'title_text' => '', 'title_align' => 'center', 'title_color' => '#7c7979', 'icon' => '', 'icon_color' => '#7c7979', 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); $media_string = ''; $output = ''; $randomizer = mt_rand(999999, 9999999); if (!empty($el_id)) { $timeline_id = $el_id; } else { $timeline_id = 'ts-vcsc-timeline-item-' . $randomizer; } // Media Layout if ($featured_media_align == "center") { $image_alignment = "margin: 5px auto; float: none;"; } else { if ($featured_media_align == "left") { $image_alignment = "margin: 5px 0; float: left;"; } else { if ($featured_media_align == "right") { $image_alignment = "margin: 5px 0; float: right;"; } } } $image_dimensions = 'width: 100%; height: auto;'; $parent_dimensions = 'width: ' . $featured_media_width . '%; ' . $featured_media_height; if ($lightbox_backlight == "auto") { $nacho_color = ''; } else { if ($lightbox_backlight == "custom") { $nacho_color = 'data-color="' . $lightbox_backlight_color . '"'; } else { if ($lightbox_backlight == "hideit") { $nacho_color = 'data-color="#000000"'; } } } // Adjustment for Inline Edit Mode of VC if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VCFrontEditMode == "true") { $full_width = 'true'; $vcinline_active = 'true'; $vcinline_class = ''; $vcinline_slider = 'owl-carousel2-edit'; } else { $full_width = $full_width; $vcinline_active = 'false'; $vcinline_class = ''; $vcinline_slider = 'owl-carousel2'; } // Featured Media: Image if ($featured_media == 'image') { if (!empty($featured_image)) { $media_image = wp_get_attachment_image_src($featured_image, 'large'); $image_extension = pathinfo($media_image[0], PATHINFO_EXTENSION); if ($featured_image_alt != "") { $alt_attribute = $featured_image_alt; } else { $alt_attribute = basename($media_image[0], "." . $image_extension); } if ($lightbox_featured == "false") { $media_string .= '<div class="ts-timeline-media" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<img class="" src="' . $media_image[0] . '" alt="' . $alt_attribute . '" style="max-width: ' . $media_image[1] . 'px; padding: 0; margin: 0 auto; display: block; ' . $image_dimensions . '">'; $media_string .= '</div>'; } else { $media_string .= '<div class="ts-timeline-media nchgrid-item nchgrid-tile nch-lightbox-image" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<a href="' . $media_image[0] . '" class="nch-lightbox-media" data-title="' . $title_text . '" rel="' . ($lightbox_group == "true" ? "timelinegroup" : $lightbox_group_name) . '" data-effect="' . $lightbox_effect . '" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '>'; $media_string .= '<img src="' . $media_image[0] . '" alt="' . $alt_attribute . '" title="" style="max-width: ' . $media_image[1] . 'px; padding: 0; margin: 0 auto; display: block; ' . $image_dimensions . '">'; $media_string .= '<div class="nchgrid-caption"></div>'; if (!empty($title_text)) { $media_string .= '<div class="nchgrid-caption-text">' . $title_text . '</div>'; } $media_string .= '</a>'; $media_string .= '</div>'; } } } // Featured Media: Image Slider if ($featured_media == 'slider') { if (!empty($featured_slider)) { $featured_slider = explode(',', $featured_slider); $i = -1; $b = 0; $nachoLength = count($featured_slider) - 1; // Add Progressbar if ($auto_play == "true" && $show_bar == "true" && $frontend_edit == "false") { $media_string .= '<div id="ts-owlslider-progressbar-' . $randomizer . '" class="ts-owlslider-progressbar-holder" style=""><div class="ts-owlslider-progressbar" style="background: ' . $bar_color . '; height: 100%; width: 0%;"></div></div>'; } if ($auto_play == "true" && $show_bar == "true" || $show_navigation == "true") { $slider_margin = 'margin-top: -10px;'; } else { $slider_margin = 'margin-top: 5px;'; } if (($auto_play == "true" || $show_navigation == "true") && count($featured_slider) > 1) { $media_string .= '<div id="ts-owlslider-controls-' . $randomizer . '" class="ts-owlslider-controls">'; if ($show_navigation == "true") { $media_string .= '<div id="ts-owlslider-controls-next-' . $randomizer . '" class="ts-owlslider-controls-next"><span class="ts-ecommerce-arrowright5"></span></div>'; $media_string .= '<div id="ts-owlslider-controls-prev-' . $randomizer . '" class="ts-owlslider-controls-prev"><span class="ts-ecommerce-arrowleft5"></span></div>'; } if ($auto_play == "true") { $media_string .= '<div id="ts-owlslider-controls-play-' . $randomizer . '" class="ts-owlslider-controls-play active"><span class="ts-ecommerce-pause"></span></div>'; } $media_string .= '</div>'; } $media_string .= '<div id="ts-timeline-gallery-slider-' . $randomizer . '" class="ts-timeline-gallery-slider ' . $vcinline_slider . '" style="' . $slider_margin . '" data-id="' . $randomizer . '" data-items="' . $number_images . '" data-rtl="' . $page_rtl . '" data-loop="' . $items_loop . '" data-navigation="' . $show_navigation . '" data-mobile="' . $animation_mobile . '" data-animationin="' . $animation_in . '" data-animationout="' . $animation_out . '" data-height="' . $auto_height . '" data-play="' . $auto_play . '" data-bar="' . $show_bar . '" data-color="' . $bar_color . '" data-speed="' . $show_speed . '" data-hover="' . $stop_hover . '">'; foreach ($featured_slider as $single_image) { $i++; $modal_image = wp_get_attachment_image_src($single_image, $lightbox_size); $image_extension = pathinfo($modal_image[0], PATHINFO_EXTENSION); if ($lightbox_featured == "false") { if ($i == 0 && $vcinline_active == "true" || $vcinline_active == "false") { $media_string .= '<div id="' . $timeline_id . '-' . $i . '-parent" class="' . $timeline_id . '-parent ' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-image" style="">'; $media_string .= '<img src="' . $modal_image[0] . '" style="max-width: ' . $modal_image[1] . 'px; padding: 0; margin: 0 auto; display: block; ' . $image_dimensions . '">'; $media_string .= '<div class="nchgrid-caption"></div>'; $media_string .= '</div>'; } } else { if ($i == $nachoLength && $vcinline_active == "false") { $media_string .= '<div id="' . $timeline_id . '-' . $i . '-parent" class="' . $timeline_id . '-parent ' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-image" style="">'; $media_string .= '<a id="' . $timeline_id . '-' . $i . '" href="' . $modal_image[0] . '" data-title="" class="nch-lightbox-media ts-hover-image ' . $timeline_id . '-slider-image" rel="' . ($lightbox_group == "true" ? "timelinegroup" : $lightbox_group_name) . '" data-effect="' . $lightbox_effect . '" data-share="f" data-autoplay="' . ($lightbox_autoplay == "true" ? 1 : 0) . '" data-duration="' . $lightbox_speed . '" data-thumbsize="' . $thumbnail_height . '" data-thumbs="' . $thumbnail_position . '" ' . $nacho_color . '>'; $media_string .= '<img src="' . $modal_image[0] . '" style="max-width: ' . $modal_image[1] . 'px; padding: 0; margin: 0 auto; display: block; ' . $image_dimensions . '">'; $media_string .= '<div class="nchgrid-caption"></div>'; $media_string .= '</a>'; $media_string .= '</div>'; } else { if ($i == 0 && $vcinline_active == "true" || $vcinline_active == "false") { $media_string .= '<div id="' . $timeline_id . '-' . $i . '-parent" class="' . $timeline_id . '-parent ' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-image" style="">'; $media_string .= '<a id="' . $timeline_id . '-' . $i . '" href="' . $modal_image[0] . '" data-title="" class="nch-lightbox-media ts-hover-image ' . $timeline_id . '-slider-image" rel="' . ($lightbox_group == "true" ? "timelinegroup" : $lightbox_group_name) . '" data-effect="' . $lightbox_effect . '" ' . $nacho_color . '>'; $media_string .= '<img src="' . $modal_image[0] . '" style="max-width: ' . $modal_image[1] . 'px; padding: 0; margin: 0 auto; display: block; ' . $image_dimensions . '">'; $media_string .= '<div class="nchgrid-caption"></div>'; $media_string .= '</a>'; $media_string .= '</div>'; } } } } $media_string .= '</div>'; } } // Featured Media: YouTube if ($featured_media == 'youtube_default' || $featured_media == 'youtube_custom' || $featured_media == 'youtube_embed') { if (preg_match('~((http|https|ftp|ftps)://|www.)(.+?)~', $featured_youtube_url)) { $featured_youtube_url = $featured_youtube_url; } else { $featured_youtube_url = 'https://www.youtube.com/watch?v=' . $featured_youtube_url; } if ($featured_youtube_play == "true") { $video_autoplay = '?autoplay=1'; } else { $video_autoplay = '?autoplay=0'; } if ($featured_youtube_related == "true") { $video_related = '&rel=1'; } else { $video_related = '&rel=0'; } if ($featured_media == 'youtube_default') { $media_image = TS_VCSC_VideoImage_Youtube($featured_youtube_url); $media_string .= '<div class="nch-holder nchgrid-item nchgrid-tile nch-lightbox-youtube" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<a href="' . $featured_youtube_url . '" class="nch-lightbox-media" data-title="' . $title_text . '" data-related="' . $video_related . '" data-videoplay="' . $video_autoplay . '" data-type="youtube" rel="' . ($lightbox_group == "true" ? "timelinegroup" : $lightbox_group_name) . '" data-effect="' . $lightbox_effect . '" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '>'; $media_string .= '<img src="' . $media_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $media_string .= '<div class="nchgrid-caption"></div>'; if (!empty($title_text)) { $media_string .= '<div class="nchgrid-caption-text">' . $title_text . '</div>'; } $media_string .= '</a>'; $media_string .= '</div>'; } else { if ($featured_media == 'youtube_custom') { if (!empty($featured_image)) { $media_image = wp_get_attachment_image_src($featured_image, 'full'); $media_image = $media_image[0]; $image_extension = pathinfo($media_image, PATHINFO_EXTENSION); if ($featured_image_alt != "") { $alt_attribute = $featured_image_alt; } else { $alt_attribute = basename($media_image, "." . $image_extension); } } else { $media_image = TS_VCSC_GetResourceURL('images/defaults/default_youtube.jpg'); $image_extension = pathinfo($media_image, PATHINFO_EXTENSION); if ($featured_image_alt != "") { $alt_attribute = $featured_image_alt; } else { $alt_attribute = basename($media_image, "." . $image_extension); } } $media_string .= '<div class="nch-holder nchgrid-item nchgrid-tile nch-lightbox-youtube" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<a href="' . $featured_youtube_url . '" class="nch-lightbox-media" data-title="' . $title_text . '" data-related="' . $video_related . '" data-videoplay="' . $video_autoplay . '" data-type="youtube" rel="' . ($lightbox_group == "true" ? "timelinegroup" : $lightbox_group_name) . '" data-effect="' . $lightbox_effect . '" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '>'; $media_string .= '<img src="' . $media_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $media_string .= '<div class="nchgrid-caption"></div>'; if (!empty($title_text)) { $media_string .= '<div class="nchgrid-caption-text">' . $title_text . '</div>'; } $media_string .= '</a>'; $media_string .= '</div>'; } else { if ($featured_media == 'youtube_embed') { $video_id = TS_VCSC_VideoID_Youtube($featured_youtube_url); $media_string .= '<div class="ts-video-container" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<iframe width="100%" height="auto" src="//www.youtube.com/embed/' . $video_id . $video_autoplay . $video_related . '&wmode=opaque" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'; $media_string .= '</div>'; } } } } // Featured Media: DailyMotion if ($featured_media == 'dailymotion_default' || $featured_media == 'dailymotion_custom' || $featured_media == 'dailymotion_embed') { if (preg_match('~((http|https|ftp|ftps)://|www.)(.+?)~', $featured_dailymotion_url)) { $featured_dailymotion_url = $featured_dailymotion_url; } else { $featured_dailymotion_url = 'http://www.dailymotion.com/video/' . $featured_dailymotion_url; } if ($featured_dailymotion_play == "true") { $video_autoplay = '?autoplay=1'; } else { $video_autoplay = '?autoplay=0'; } if ($featured_media == 'dailymotion_default') { $media_image = TS_VCSC_VideoImage_Motion($featured_dailymotion_url); $media_string .= '<div class="nch-holder nchgrid-item nchgrid-tile nch-lightbox-motion" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<a href="' . $featured_dailymotion_url . '" class="nch-lightbox-media" data-title="' . $title_text . '" data-videoplay="' . $video_autoplay . '" data-type="dailymotion" rel="' . ($lightbox_group == "true" ? "timelinegroup" : $lightbox_group_name) . '" data-effect="' . $lightbox_effect . '" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '>'; $media_string .= '<img src="' . $media_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $media_string .= '<div class="nchgrid-caption"></div>'; if (!empty($title_text)) { $media_string .= '<div class="nchgrid-caption-text">' . $title_text . '</div>'; } $media_string .= '</a>'; $media_string .= '</div>'; } else { if ($featured_media == 'dailymotion_custom') { if (!empty($featured_image)) { $media_image = wp_get_attachment_image_src($featured_image, 'full'); $media_image = $media_image[0]; $image_extension = pathinfo($media_image, PATHINFO_EXTENSION); if ($featured_image_alt != "") { $alt_attribute = $featured_image_alt; } else { $alt_attribute = basename($media_image, "." . $image_extension); } } else { $media_image = TS_VCSC_GetResourceURL('images/defaults/default_motion.jpg'); $image_extension = pathinfo($media_image, PATHINFO_EXTENSION); if ($featured_image_alt != "") { $alt_attribute = $featured_image_alt; } else { $alt_attribute = basename($media_image, "." . $image_extension); } } $media_string .= '<div class="nch-holder nchgrid-item nchgrid-tile nch-lightbox-motion" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<a href="' . $featured_dailymotion_url . '" class="nch-lightbox-media" data-title="' . $title_text . '" data-videoplay="' . $video_autoplay . '" data-type="dailymotion" rel="' . ($lightbox_group == "true" ? "timelinegroup" : $lightbox_group_name) . '" data-effect="' . $lightbox_effect . '" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '>'; $media_string .= '<img src="' . $media_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $media_string .= '<div class="nchgrid-caption"></div>'; if (!empty($title_text)) { $media_string .= '<div class="nchgrid-caption-text">' . $title_text . '</div>'; } $media_string .= '</a>'; $media_string .= '</div>'; } else { if ($featured_media == 'dailymotion_embed') { $video_id = TS_VCSC_VideoID_Motion($featured_dailymotion_url); $media_string .= '<div class="ts-video-container" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<iframe width="100%" height="auto" src="http://www.dailymotion.com/embed/video/' . $video_id . $video_autoplay . '&forcedQuality=hq&wmode=opaque" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'; $media_string .= '</div>'; } } } } // Featured Media: Vimeo if ($featured_media == 'vimeo_default' || $featured_media == 'vimeo_custom' || $featured_media == 'vimeo_embed') { if (preg_match('~((http|https|ftp|ftps)://|www.)(.+?)~', $featured_vimeo_url)) { $featured_vimeo_url = $featured_vimeo_url; } else { $featured_vimeo_url = 'http://www.vimeo.com/video/' . $featured_vimeo_url; } if ($featured_vimeo_play == "true") { $video_autoplay = '?autoplay=1'; } else { $video_autoplay = '?autoplay=0'; } if ($featured_media == 'vimeo_default') { $media_image = TS_VCSC_VideoImage_Vimeo($featured_vimeo_url); $media_string .= '<div class="nch-holder nchgrid-item nchgrid-tile nch-lightbox-vimeo" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<a href="' . $featured_vimeo_url . '" class="nch-lightbox-media" data-title="' . $title_text . '" data-videoplay="' . $video_autoplay . '" data-type="vimeo" rel="' . ($lightbox_group == "true" ? "timelinegroup" : $lightbox_group_name) . '" data-effect="' . $lightbox_effect . '" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '>'; $media_string .= '<img src="' . $media_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $media_string .= '<div class="nchgrid-caption"></div>'; if (!empty($title_text)) { $media_string .= '<div class="nchgrid-caption-text">' . $title_text . '</div>'; } $media_string .= '</a>'; $media_string .= '</div>'; } else { if ($featured_media == 'vimeo_custom') { if (!empty($featured_image)) { $media_image = wp_get_attachment_image_src($featured_image, 'full'); $media_image = $media_image[0]; $image_extension = pathinfo($media_image, PATHINFO_EXTENSION); if ($featured_image_alt != "") { $alt_attribute = $featured_image_alt; } else { $alt_attribute = basename($media_image, "." . $image_extension); } } else { $media_image = TS_VCSC_GetResourceURL('images/defaults/default_vimeo.jpg'); $image_extension = pathinfo($media_image, PATHINFO_EXTENSION); if ($featured_image_alt != "") { $alt_attribute = $featured_image_alt; } else { $alt_attribute = basename($media_image, "." . $image_extension); } } $media_string .= '<div class="nch-holder nchgrid-item nchgrid-tile nch-lightbox-vimeo" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<a href="' . $featured_vimeo_url . '" class="nch-lightbox-media" data-title="' . $title_text . '" data-videoplay="' . $video_autoplay . '" data-type="vimeo" rel="' . ($lightbox_group == "true" ? "timelinegroup" : $lightbox_group_name) . '" data-effect="' . $lightbox_effect . '" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '>'; $media_string .= '<img src="' . $media_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $media_string .= '<div class="nchgrid-caption"></div>'; if (!empty($title_text)) { $media_string .= '<div class="nchgrid-caption-text">' . $title_text . '</div>'; } $media_string .= '</a>'; $media_string .= '</div>'; } else { if ($featured_media == 'vimeo_embed') { $video_id = TS_VCSC_VideoID_vimeo($featured_vimeo_url); $media_string .= '<div class="ts-video-container" style="' . $parent_dimensions . '; ' . $image_alignment . '">'; $media_string .= '<iframe width="100%" height="auto" src="//player.vimeo.com/video/' . $video_id . $video_autoplay . '&wmode=opaque" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'; $media_string .= '</div>'; } } } } // Link Button if (!empty($link)) { // Link Values $link = $link == '||' ? '' : $link; $link = vc_build_link($link); $a_href = $link['url']; $a_title = $link['title']; $a_target = $link['target']; // Tooltip if ($tooltip_css == "true") { if (strlen($a_title) != 0) { $button_tooltipclasses = " ts-simptip-multiline " . $tooltip_style . " " . $tooltip_position; $button_tooltipcontent = ' data-tstooltip="' . $a_title . '"'; } else { $button_tooltipclasses = ""; $button_tooltipcontent = ""; } } else { $button_tooltipclasses = ""; if (strlen($a_title) != 0) { $button_tooltipcontent = ' title="' . $a_title . '"'; } else { $button_tooltipcontent = ""; } } // Button Type if ($button_type == "square") { $button_style = $button_square; $button_font = ''; } else { if ($button_type == "rounded") { $button_style = $button_rounded; $button_font = ''; } else { if ($button_type == "pill") { $button_style = $button_pill; $button_font = ''; } else { if ($button_type == "circle") { $button_style = $button_circle; $button_font = 'font-size: ' . $button_font . 'px;'; } } } } // Button Alignment if ($button_align == "center") { $button_align = 'text-align: center;'; } else { if ($button_align == "left") { $button_align = 'text-align: left'; } else { if ($button_align == "right") { $button_align = 'text-align: right'; } } } // Button Text Color if ($button_change == "true") { $button_color = 'color: ' . $button_color . ';'; } else { $button_color = ''; } $button_string = ''; if (!empty($a_href)) { $button_string .= '<div class="ts-button-parent ts-button-type-' . $button_type . '" style="' . $button_align . '">'; if ($button_wrapper == "true") { $button_string .= '<div class="ts-button-wrap" style="">'; } $button_string .= '<a href="' . $a_href . '" target="' . trim($a_target) . '" style="' . $button_font . ' width: ' . $button_width . '%;" class="ts-button ' . $button_style . ' ' . $button_size . ' ' . $button_tooltipclasses . '" ' . $button_tooltipcontent . '>'; $button_string .= '<span class="ts-button-text" style="display: inline; ' . $button_color . '">' . $button_text . '</span>'; $button_string .= '</a>'; if ($button_wrapper == "true") { $button_string .= '</div>'; } $button_string .= '</div>'; } else { $link = ''; } } else { $button_string = ''; } // Event Icon if (empty($icon) && empty($content) && empty($featured_image)) { $title_margin = 'margin: 0;'; } else { $title_margin = ''; } // Column Adjustment for Full Width Event if ($full_width == "true" && empty($title_text) && (empty($icon) || $icon == "transparent") && empty($content) && empty($button_string)) { $columnA_adjust = 'width: 100%; margin: 0;'; $columnB_adjust = 'display: none; width: 0;'; } else { if ($full_width == "true" && $featured_media == "none") { $columnA_adjust = 'display: none; width: 0; margin: 0;'; $columnB_adjust = 'width: 100%; margin: 0;'; } else { $columnA_adjust = ''; $columnB_adjust = ''; } } // Margin Adjustment for Full Width Element if ($full_width == "true" && !empty($date_text)) { $margin_Adjust = 'margin: 25px 10px 0px 10px;'; } else { if ($full_width == "true" && empty($date_text)) { $margin_Adjust = 'margin: 0 10px;'; } else { if (!empty($date_text)) { $margin_Adjust = 'margin-top: 25px;'; } else { $margin_Adjust = 'margin-top: 0;'; } } } if (function_exists('vc_shortcode_custom_css_class')) { $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'ts-timeline-list-item ' . $el_class . ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS_VCSC_Timeline_Single', $atts); } else { $css_class = 'ts-timeline-list-item ' . $el_class; } if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VCFrontEditMode == "true") { $vc_inline_style = ' display: block;'; } else { $vc_inline_style = ''; } $output .= '<li id="' . $timeline_id . '" class="' . $css_class . ' ' . ($full_width == "true" ? "ts-timeline-full" : "") . ' ' . (!empty($date_text) ? "ts-timeline-date-true" : "ts-timeline-date-false") . '" style="' . ($full_width == "true" ? "width: 100%;" : "") . ' ' . $vc_inline_style . '">'; $output .= '<div class="ts-timeline-column">'; $output .= '<div class="ts-timeline-text-wrap ' . (!empty($date_text) ? "ts-timeline-text-wrap-date" : "ts-timeline-text-wrap-nodate") . '" style="' . $margin_Adjust . '">'; if (!empty($date_text)) { $output .= '<div class="ts-timeline-date"><span class="ts-timeline-date-connect"><span class="ts-timeline-date-text">' . $date_text . '</span></span></div>'; } if ($full_width == "true") { $output .= '<div class="ts-timeline-full-colA" style="' . $columnA_adjust . '">'; $output .= $media_string; $output .= '</div>'; $output .= '<div class="ts-timeline-full-colB" style="' . $columnB_adjust . '">'; if (!empty($title_text)) { $output .= '<h3 class="ts-timeline-title" style="color: ' . $title_color . '; text-align: ' . $title_align . '; ' . (empty($content) && empty($icon) ? "border: none; margin-bottom: 0; padding-bottom: 0;" : "") . ' ' . $title_margin . '">' . $title_text . '</h3>'; } if (!empty($icon) && $icon != "transparent" || !empty($content) || !empty($link)) { $output .= '<div style="width: 100%; display: block; float: left; position: relative; padding-bottom: 15px; ' . (empty($content) && !empty($icon) ? "height: 60px;" : "") . '">'; if (!empty($content)) { $output .= '<div class="ts-timeline-text-wrap-inner" style="' . (empty($icon) ? "width: 100%; height: 100%; left: 0;" : " left: 0;") . '">'; if (function_exists('wpb_js_remove_wpautop')) { $output .= '<div class="ts-timeline-text" style="">' . wpb_js_remove_wpautop(do_shortcode($content), true) . '</div>'; } else { $output .= '<div class="ts-timeline-text" style="">' . do_shortcode($content) . '</div>'; } $output .= '</div>'; } if (!empty($icon) && $icon != "transparent") { $output .= '<div class="ts-timeline-icon ts-timeline-icon-full" style="' . (empty($content) ? "display: inline-block; width: 100%; left: 0; margin: 0 0 0 2%;" : "left: 80%;") . '"><i class="' . $icon . '" style="color: ' . $icon_color . ';"></i></div>'; } if (!empty($button_string)) { $output .= '<div class="ts-timeline-button">'; $output .= $button_string; $output .= '</div>'; } $output .= '</div>'; } $output .= '</div>'; } else { $output .= $media_string; if (!empty($title_text)) { $output .= '<h3 class="ts-timeline-title" style="color: ' . $title_color . '; text-align: ' . $title_align . '; ' . (empty($content) && empty($icon) ? "border: none; margin-bottom: 0; padding-bottom: 0;" : "") . ' ' . $title_margin . '">' . $title_text . '</h3>'; } if (!empty($icon) && $icon != "transparent" || !empty($content)) { $output .= '<div style="width: 100%; display: block; float: left; position: relative; padding-bottom: 15px; ' . (empty($content) && !empty($icon) ? "height: 60px;" : "") . '">'; if (!empty($icon) && $icon != "transparent") { $output .= '<div class="ts-timeline-icon ts-timeline-icon-half" style="' . (empty($content) ? "display: inline-block; width: 100%; left: 0;" : "") . '"><i class="' . $icon . '" style="color: ' . $icon_color . ';"></i></div>'; } if (!empty($content)) { $output .= '<div class="ts-timeline-text-wrap-inner" style="' . (empty($icon) ? "width: 100%; height: 100%; left: 0;" : "") . '">'; if (function_exists('wpb_js_remove_wpautop')) { $output .= '<div class="ts-timeline-text" style="">' . wpb_js_remove_wpautop(do_shortcode($content), true) . '</div>'; } else { $output .= '<div class="ts-timeline-text" style="">' . do_shortcode($content) . '</div>'; } $output .= '</div>'; } $output .= '</div>'; if (!empty($link)) { $output .= '<div class="ts-timeline-button">'; $output .= $button_string; $output .= '</div>'; } } } $output .= '<div class="clearFixMe"></div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</li>'; echo $output; $myvariable = ob_get_clean(); return $myvariable; }
function TS_VCSC_Vimeo_Function($atts, $content = null) { global $VISUAL_COMPOSER_EXTENSIONS; ob_start(); wp_enqueue_script('ts-extend-hammer'); wp_enqueue_script('ts-extend-nacho'); wp_enqueue_style('ts-extend-nacho'); if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_LoadFrontEndForcable == "false") { wp_enqueue_style('ts-extend-tooltipster'); wp_enqueue_script('ts-extend-tooltipster'); 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('content_image_responsive' => 'true', 'content_image_height' => 'height: 100%;', 'content_image_width_r' => 100, 'content_image_width_f' => 300, 'content_image_size' => 'large', 'lightbox_group_name' => 'nachogroup', 'lightbox_size' => 'full', 'lightbox_effect' => 'random', 'lightbox_speed' => 5000, 'lightbox_social' => 'true', 'lightbox_play' => 'false', 'lightbox_backlight_auto' => 'true', 'lightbox_backlight_color' => '#ffffff', 'content_lightbox' => 'false', 'content_vimeo' => '', 'content_vimeo_trigger' => 'preview', 'content_vimeo_title' => '', 'content_vimeo_subtitle' => '', 'content_vimeo_image' => '', 'content_vimeo_image_simple' => 'false', 'content_vimeo_icon' => '', 'content_vimeo_iconsize' => 30, 'content_vimeo_iconcolor' => '#cccccc', 'content_vimeo_button' => '', 'content_vimeo_buttonstyle' => 'ts-dual-buttons-color-sun-flower', 'content_vimeo_buttonhover' => 'ts-dual-buttons-preview-default ts-dual-buttons-hover-default', 'content_vimeo_buttontext' => 'View Video', 'content_vimeo_buttonsize' => 16, 'content_vimeo_text' => '', 'content_raw' => '', 'content_tooltip_css' => 'false', 'content_tooltip_content' => '', 'content_tooltip_encoded' => '', 'content_tooltip_position' => 'ts-simptip-position-top', 'content_tooltip_style' => '', 'tooltipster_offsetx' => 0, 'tooltipster_offsety' => 0, 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); if (!empty($el_id)) { $modal_id = $el_id; } else { $modal_id = 'ts-vcsc-vimeo-' . mt_rand(999999, 9999999); } // Tooltip if ($content_tooltip_position == "ts-simptip-position-top" || $content_tooltip_position == "top") { $content_tooltip_position = "top"; } if ($content_tooltip_position == "ts-simptip-position-left" || $content_tooltip_position == "left") { $content_tooltip_position = "left"; } if ($content_tooltip_position == "ts-simptip-position-right" || $content_tooltip_position == "right") { $content_tooltip_position = "right"; } if ($content_tooltip_position == "ts-simptip-position-bottom" || $content_tooltip_position == "bottom") { $content_tooltip_position = "bottom"; } if ($content_tooltip_style == "" || $content_tooltip_style == "ts-simptip-style-black" || $content_tooltip_style == "tooltipster-black") { $content_tooltip_style = "tooltipster-black"; } if ($content_tooltip_style == "ts-simptip-style-gray" || $content_tooltip_style == "tooltipster-gray") { $content_tooltip_style = "tooltipster-gray"; } if ($content_tooltip_style == "ts-simptip-style-green" || $content_tooltip_style == "tooltipster-green") { $content_tooltip_style = "tooltipster-green"; } if ($content_tooltip_style == "ts-simptip-style-blue" || $content_tooltip_style == "tooltipster-blue") { $content_tooltip_style = "tooltipster-blue"; } if ($content_tooltip_style == "ts-simptip-style-red" || $content_tooltip_style == "tooltipster-red") { $content_tooltip_style = "tooltipster-red"; } if ($content_tooltip_style == "ts-simptip-style-orange" || $content_tooltip_style == "tooltipster-orange") { $content_tooltip_style = "tooltipster-orange"; } if ($content_tooltip_style == "ts-simptip-style-yellow" || $content_tooltip_style == "tooltipster-yellow") { $content_tooltip_style = "tooltipster-yellow"; } if ($content_tooltip_style == "ts-simptip-style-purple" || $content_tooltip_style == "tooltipster-purple") { $content_tooltip_style = "tooltipster-purple"; } if ($content_tooltip_style == "ts-simptip-style-pink" || $content_tooltip_style == "tooltipster-pink") { $content_tooltip_style = "tooltipster-pink"; } if ($content_tooltip_style == "ts-simptip-style-white" || $content_tooltip_style == "tooltipster-white") { $content_tooltip_style = "tooltipster-white"; } if ($content_tooltip_css == "false") { if (strlen($content_tooltip_content) != 0) { $vimeo_tooltipclasses = " ts-has-tooltipster-tooltip"; $vimeo_tooltipcontent = 'data-tooltipster-html="false" data-tooltipster-title="" data-tooltipster-text="' . strip_tags($content_tooltip_content) . '" data-tooltipster-image="" data-tooltipster-position="' . $content_tooltip_position . '" data-tooltipster-touch="false" data-tooltipster-arrow="true" data-tooltipster-theme="' . $content_tooltip_style . '" data-tooltipster-animation="swing" data-tooltipster-trigger="hover" data-tooltipster-offsetx="' . $tooltipster_offsetx . '" data-tooltipster-offsety="' . $tooltipster_offsety . '"'; } else { $vimeo_tooltipclasses = ""; $vimeo_tooltipcontent = ""; } } else { if (strlen($content_tooltip_encoded) != 0) { $vimeo_tooltipclasses = " ts-has-tooltipster-tooltip"; $vimeo_tooltipcontent = 'data-tooltipster-html="true" data-tooltipster-title="" data-tooltipster-text="' . strip_tags($content_tooltip_encoded) . '" data-tooltipster-image="" data-tooltipster-position="' . $content_tooltip_position . '" data-tooltipster-touch="false" data-tooltipster-arrow="true" data-tooltipster-theme="' . $content_tooltip_style . '" data-tooltipster-animation="swing" data-tooltipster-trigger="hover" data-tooltipster-offsetx="' . $tooltipster_offsetx . '" data-tooltipster-offsety="' . $tooltipster_offsety . '"'; } else { $vimeo_tooltipclasses = ""; $vimeo_tooltipcontent = ""; } } if ($lightbox_backlight_auto == "false") { $nacho_color = 'data-backlight="' . $lightbox_backlight_color . '"'; } else { $nacho_color = ''; } if ($content_image_responsive == "true") { $image_dimensions = 'width: 100%; height: auto;'; $parent_dimensions = 'width: ' . $content_image_width_r . '%; ' . $content_image_height . ''; } else { $image_dimensions = 'width: 100%; height: auto;'; $parent_dimensions = 'width: ' . $content_image_width_f . 'px; ' . $content_image_height . ''; } if (preg_match('~((http|https|ftp|ftps)://|www.)(.+?)~', $content_vimeo)) { $content_vimeo = $content_vimeo; } else { $content_vimeo = $content_vimeo; } if ($lightbox_play == "true") { $video_autoplay = '?autoplay=1'; } else { $video_autoplay = '?autoplay=0'; } 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-Vimeo', $atts); } else { $css_class = ''; } $output = ''; if ($content_lightbox == "true") { if ($content_vimeo_trigger == "preview") { $modal_image = TS_VCSC_VideoImage_Vimeo($content_vimeo); if ($modal_image == '') { $modal_image = TS_VCSC_GetResourceURL('images/defaults/default_vimeo.jpg'); } if ($vimeo_tooltipcontent != '') { $output .= '<div class="' . $modal_id . '-parent nch-holder ' . $vimeo_tooltipclasses . '" ' . $vimeo_tooltipcontent . ' style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; ' . $parent_dimensions . '">'; $output .= '<div id="' . $modal_id . '" class="' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-vimeo ' . $css_class . '" style="width: 100%; height: 100%;">'; } else { $output .= '<div id="' . $modal_id . '" class="' . $modal_id . '-parent nch-holder ' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-vimeo ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; ' . $parent_dimensions . '">'; } $output .= '<a href="' . $content_vimeo . '" class="nch-lightbox-media" data-title="' . $content_vimeo_title . '" data-videoplay="' . $lightbox_play . '" data-type="vimeo" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '>'; $output .= '<img src="' . $modal_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $output .= '<div class="nchgrid-caption"></div>'; if (!empty($content_vimeo_title)) { $output .= '<div class="nchgrid-caption-text">' . $content_vimeo_title . '</div>'; } $output .= '</a>'; $output .= '</div>'; if ($vimeo_tooltipcontent != '') { $output .= '</div>'; } } if ($content_vimeo_trigger == "default") { $modal_image = TS_VCSC_GetResourceURL('images/defaults/default_vimeo.jpg'); if ($vimeo_tooltipcontent != '') { $output .= '<div class="' . $modal_id . '-parent nch-holder ' . $vimeo_tooltipclasses . '" ' . $vimeo_tooltipcontent . ' style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; ' . $parent_dimensions . '">'; $output .= '<div id="' . $modal_id . '" class="' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-vimeo ' . $css_class . '" style="width: 100%; height: 100%;">'; } else { $output .= '<div id="' . $modal_id . '" class="' . $modal_id . '-parent nch-holder ' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-vimeo ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; ' . $parent_dimensions . '">'; } $output .= '<a href="' . $content_vimeo . '" class="nch-lightbox-media" data-title="' . $content_vimeo_title . '" data-videoplay="' . $lightbox_play . '" data-type="vimeo" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '>'; $output .= '<img src="' . $modal_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $output .= '<div class="nchgrid-caption"></div>'; if (!empty($content_vimeo_title)) { $output .= '<div class="nchgrid-caption-text">' . $content_vimeo_title . '</div>'; } $output .= '</a>'; $output .= '</div>'; if ($vimeo_tooltipcontent != '') { $output .= '</div>'; } } if ($content_vimeo_trigger == "image") { $modal_image = wp_get_attachment_image_src($content_vimeo_image, 'large'); $modal_image = $modal_image[0]; if ($content_vimeo_image_simple == "false") { if ($vimeo_tooltipcontent != '') { $output .= '<div class="' . $modal_id . '-parent nch-holder ' . $vimeo_tooltipclasses . '" ' . $vimeo_tooltipcontent . ' style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; ' . $parent_dimensions . '">'; $output .= '<div id="' . $modal_id . '" class="' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-vimeo ' . $css_class . '" style="width: 100%; height: 100%;">'; } else { $output .= '<div id="' . $modal_id . '" class="' . $modal_id . '-parent nch-holder ' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-vimeo ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; ' . $parent_dimensions . '">'; } $output .= '<a href="' . $content_vimeo . '" class="nch-lightbox-media" data-title="' . $content_vimeo_title . '" data-videoplay="' . $lightbox_play . '" data-type="vimeo" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '>'; $output .= '<img src="' . $modal_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $output .= '<div class="nchgrid-caption"></div>'; if (!empty($content_vimeo_title)) { $output .= '<div class="nchgrid-caption-text">' . $content_vimeo_title . '</div>'; } $output .= '</a>'; $output .= '</div>'; if ($vimeo_tooltipcontent != '') { $output .= '</div>'; } } else { $output .= '<a href="' . $content_vimeo . '" class="' . $modal_id . '-parent nch-holder nch-lightbox-media ' . $vimeo_tooltipclasses . '" ' . $vimeo_tooltipcontent . ' style="' . $parent_dimensions . '" data-title="' . $content_vimeo_title . '" data-videoplay="' . $lightbox_play . '" data-type="vimeo" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '>'; $output .= '<img class="" src="' . $modal_image . '" style="display: block; ' . $image_dimensions . '">'; $output .= '</a>'; } } if ($content_vimeo_trigger == "icon") { $icon_style = 'color: ' . $content_vimeo_iconcolor . '; width:' . $content_vimeo_iconsize . 'px; height:' . $content_vimeo_iconsize . 'px; font-size:' . $content_vimeo_iconsize . 'px; line-height:' . $content_vimeo_iconsize . 'px;'; $output .= '<div id="' . $modal_id . '" style="" class="' . $modal_id . '-parent nch-holder ts-vcsc-font-icon ts-font-icons ts-shortcode ts-icon-align-center ' . $el_class . ' ' . $css_class . ' ' . $vimeo_tooltipclasses . '" ' . $vimeo_tooltipcontent . ' style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<a class="ts-font-icons-link nch-lightbox-media" href="' . $content_vimeo . '" target="_blank" data-title="' . $content_vimeo_title . '" data-videoplay="' . $lightbox_play . '" data-type="vimeo" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '>'; $output .= '<i class="ts-font-icon ' . $content_vimeo_icon . '" style="' . $icon_style . '"></i>'; $output .= '</a>'; $output .= '</div>'; } if ($content_vimeo_trigger == "flat" || $content_vimeo_trigger == "flaticon") { wp_enqueue_style('ts-extend-buttonsdual'); $button_style = $content_vimeo_buttonstyle . ' ' . $content_vimeo_buttonhover; $output .= '<a id="' . $modal_id . '" class="ts-dual-buttons-wrapper nch-lightbox-media ' . $css_class . ' ' . $el_class . '" href="' . $content_vimeo . '" target="_blank" data-title="' . $content_vimeo_title . '" data-videoplay="' . $lightbox_play . '" data-type="vimeo" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '>'; $output .= '<div id="' . $modal_id . '-trigger" class="ts-dual-buttons-container clearFixMe ' . $button_style . ' ' . $modal_id . '-parent nch-holder ' . $vimeo_tooltipclasses . '" ' . $vimeo_tooltipcontent . ' style="display: block; width: 100%; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; if ($content_vimeo_icon != '' && $content_vimeo_icon != 'transparent' && $content_vimeo_trigger == "flaticon") { $output .= '<i class="ts-dual-buttons-icon ' . $content_vimeo_icon . '" style="font-size: ' . $content_vimeo_buttonsize . 'px; line-height: ' . $content_vimeo_buttonsize . 'px;"></i>'; } $output .= '<span class="ts-dual-buttons-title" style="font-size: ' . $content_vimeo_buttonsize . 'px; line-height: ' . $content_vimeo_buttonsize . 'px;">' . $content_vimeo_buttontext . '</span>'; $output .= '</div>'; $output .= '</a>'; } if ($content_vimeo_trigger == "winged") { $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $el_class . ' ' . $css_class . '" style="display: block; width: 100%; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<div class="ts-lightbox-button-1 clearFixMe">'; $output .= '<div class="top">' . $content_vimeo_title . '</div>'; $output .= '<div class="bottom">' . $content_vimeo_subtitle . '</div>'; $output .= '<a href="' . $content_vimeo . '" class="nch-lightbox-media icon" data-title="' . $content_vimeo_title . '" data-videoplay="' . $lightbox_play . '" data-type="vimeo" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '><span class="vimeo">' . $content_vimeo_buttontext . '</span></a>'; $output .= '</div>'; $output .= '</div>'; } if ($content_vimeo_trigger == "simple") { $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $el_class . ' ' . $vimeo_tooltipclasses . ' ' . $css_class . '" ' . $vimeo_tooltipcontent . ' style="display: block; width: 100%; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<a href="' . $content_vimeo . '" class="ts-lightbox-button-2 icon nch-lightbox-media" data-title="' . $content_vimeo_title . '" data-videoplay="' . $lightbox_play . '" data-type="vimeo" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '><span class="vimeo">' . $content_vimeo_buttontext . '</span></a>'; $output .= '</div>'; } if ($content_vimeo_trigger == "text") { $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $el_class . ' ' . $css_class . '" style="text-align: center; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<a href="' . $content_vimeo . '" class="nch-lightbox-media ' . $vimeo_tooltipclasses . '" ' . $vimeo_tooltipcontent . ' data-title="' . $content_vimeo_title . '" data-videoplay="' . $lightbox_play . '" data-type="vimeo" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" ' . $nacho_color . ' target="_blank">' . $content_vimeo_text . '</a>'; $output .= '</div>'; } if ($content_vimeo_trigger == "custom") { if ($content_raw != "") { $content_raw = rawurldecode(base64_decode(strip_tags($content_raw))); $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $el_class . ' ' . $css_class . '" style="text-align: center; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<a href="' . $content_vimeo . '" class="nch-lightbox-media ' . $vimeo_tooltipclasses . '" ' . $vimeo_tooltipcontent . ' data-title="' . $content_vimeo_title . '" data-videoplay="' . $lightbox_play . '" data-type="vimeo" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" ' . $nacho_color . 'style="" target="_blank">'; $output .= $content_raw; $output .= '</a>'; $output .= '</div>'; } } } else { $modal_image = TS_VCSC_VideoID_Vimeo($content_vimeo); $output .= '<div id="' . $modal_id . '" class="ts-video-container ' . $vimeo_tooltipclasses . '" ' . $vimeo_tooltipcontent . '>'; $output .= '<iframe class="ts-video-iframe" src="//player.vimeo.com/video/' . $modal_image . $video_autoplay . '" width="100%" height="auto" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'; $output .= '</div>'; } echo $output; $myvariable = ob_get_clean(); return $myvariable; }
function TS_VCSC_Teaser_Block_Single($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-extend-buttons'); wp_enqueue_style('ts-visual-composer-extend-front'); wp_enqueue_script('ts-visual-composer-extend-front'); } extract(shortcode_atts(array('image' => '', 'image_responsive' => 'true', 'image_width' => 300, 'image_height' => 200, 'attribute_alt' => 'false', 'attribute_alt_value' => '', 'overlay' => '#0094FF', '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, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); // 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 ($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 = ''; } $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 class="' . $css_class . '" style="width: 100%; margin: 0px auto; padding: 0px;">'; $output .= '<div class="ts-teaser-item">'; $output .= '<div class="ts-teaser-padding">'; if ($info_position == "top") { $output .= '<div class="ts-teaser-head">'; $output .= '<h2 class="ts-teaser-title" style="border-top: none; margin-top: 0;">'; if (!empty($icon) && $icon != "transparent" && $icon_position == "top") { $output .= '<span style="display: block; width: 100%; text-align: center; margin-top: 0px; margin-bottom: 5px;"><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 . '">' . $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"></div>'; $output .= '<div class="ts-teaser-text">'; $output .= $subtitle; $output .= '</div>'; } 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 .= '<div class="ts-teaser-overlay"><div class="css-loader"></div></div>'; $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">'; if (!empty($icon) && $icon != "transparent" && $icon_position == "top") { $output .= '<span style="display: block; width: 100%; text-align: center; margin-top: 0px; margin-bottom: 5px;"><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 . '">' . $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"></div>'; $output .= '<div class="ts-teaser-text">'; $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 . '"><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_Modal_Function($atts, $content = null) { global $VISUAL_COMPOSER_EXTENSIONS; ob_start(); wp_enqueue_script('ts-extend-hammer'); wp_enqueue_script('ts-extend-nacho'); wp_enqueue_style('ts-extend-nacho'); wp_enqueue_style('ts-extend-tooltipster'); wp_enqueue_script('ts-extend-tooltipster'); 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('content_image_responsive' => 'true', 'content_image_height' => 'height: 100%;', 'content_image_width_r' => 100, 'content_image_width_f' => 300, 'content_image_size' => 'large', 'lightbox_group' => 'false', 'lightbox_group_name' => 'nachogroup', 'lightbox_size' => 'full', 'lightbox_effect' => 'random', 'lightbox_speed' => 5000, 'lightbox_social' => 'true', 'lightbox_backlight_choice' => 'predefined', 'lightbox_backlight_color' => '#0084E2', 'lightbox_backlight_custom' => '#000000', 'lightbox_custom_width' => 'false', 'lightbox_width' => 960, 'lightbox_custom_height' => 'false', 'lightbox_height' => 540, 'lightbox_width' => 'auto', 'lightbox_width_percent' => 100, 'lightbox_width_pixel' => 1024, 'lightbox_height' => 'auto', 'lightbox_height_percent' => 100, 'lightbox_height_pixel' => 400, 'lightbox_custom_padding' => 15, 'lightbox_custom_background' => 'none', 'lightbox_background_image' => '', 'lightbox_background_size' => 'cover', 'lightbox_background_repeat' => 'no-repeat', 'lightbox_background_color' => '#ffffff', 'height' => 500, 'width' => 300, 'content_style' => '', 'content_provider' => 'custom', 'content_retrieve' => '', 'content_open' => 'false', 'content_open_hide' => 'true', 'content_open_delay' => 0, 'content_trigger' => 'default', 'content_title' => '', 'content_subtitle' => '', 'content_image' => '', 'content_image_simple' => 'false', 'content_icon' => '', 'content_iconsize' => 30, 'content_iconcolor' => '#cccccc', 'content_button' => '', 'content_buttonstyle' => 'ts-dual-buttons-color-sun-flower', 'content_buttonhover' => 'ts-dual-buttons-preview-default ts-dual-buttons-hover-default', 'content_buttontext' => 'View Popup', 'content_buttonsize' => 16, 'content_text' => '', 'content_raw' => '', 'content_tooltip_css' => 'true', 'content_tooltip_content' => '', 'content_tooltip_position' => 'ts-simptip-position-top', 'content_tooltip_style' => 'ts-simptip-style-black', 'tooltipster_offsetx' => 0, 'tooltipster_offsety' => 0, 'content_show_title' => 'true', 'title' => '', 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); if (!empty($el_id)) { $modal_id = $el_id; } else { $modal_id = 'ts-vcsc-modal-' . mt_rand(999999, 9999999); } if ($content_provider == "identifier" && $content_retrieve != '') { $retrieval_id = $content_retrieve; } else { $retrieval_id = $modal_id; } // Tooltip if ($content_tooltip_position == "ts-simptip-position-top" || $content_tooltip_position == "top") { $content_tooltip_position = "top"; } if ($content_tooltip_position == "ts-simptip-position-left" || $content_tooltip_position == "left") { $content_tooltip_position = "left"; } if ($content_tooltip_position == "ts-simptip-position-right" || $content_tooltip_position == "right") { $content_tooltip_position = "right"; } if ($content_tooltip_position == "ts-simptip-position-bottom" || $content_tooltip_position == "bottom") { $content_tooltip_position = "bottom"; } $tooltipclasses = 'ts-has-tooltipster-tooltip'; if ($content_tooltip_style == "" || $content_tooltip_style == "ts-simptip-style-black" || $content_tooltip_style == "tooltipster-black") { $content_tooltip_style = "tooltipster-black"; } if ($content_tooltip_style == "ts-simptip-style-gray" || $content_tooltip_style == "tooltipster-gray") { $content_tooltip_style = "tooltipster-gray"; } if ($content_tooltip_style == "ts-simptip-style-green" || $content_tooltip_style == "tooltipster-green") { $content_tooltip_style = "tooltipster-green"; } if ($content_tooltip_style == "ts-simptip-style-blue" || $content_tooltip_style == "tooltipster-blue") { $content_tooltip_style = "tooltipster-blue"; } if ($content_tooltip_style == "ts-simptip-style-red" || $content_tooltip_style == "tooltipster-red") { $content_tooltip_style = "tooltipster-red"; } if ($content_tooltip_style == "ts-simptip-style-orange" || $content_tooltip_style == "tooltipster-orange") { $content_tooltip_style = "tooltipster-orange"; } if ($content_tooltip_style == "ts-simptip-style-yellow" || $content_tooltip_style == "tooltipster-yellow") { $content_tooltip_style = "tooltipster-yellow"; } if ($content_tooltip_style == "ts-simptip-style-purple" || $content_tooltip_style == "tooltipster-purple") { $content_tooltip_style = "tooltipster-purple"; } if ($content_tooltip_style == "ts-simptip-style-pink" || $content_tooltip_style == "tooltipster-pink") { $content_tooltip_style = "tooltipster-pink"; } if ($content_tooltip_style == "ts-simptip-style-white" || $content_tooltip_style == "tooltipster-white") { $content_tooltip_style = "tooltipster-white"; } if ($content_tooltip_css == "true" && strlen($content_tooltip_content) != 0) { $Tooltip_Content = 'data-tooltipster-title="" data-tooltipster-text="' . str_replace('<br/>', ' ', $content_tooltip_content) . '" data-tooltipster-image="" data-tooltipster-position="' . $content_tooltip_position . '" data-tooltipster-touch="false" data-tooltipster-arrow="true" data-tooltipster-theme="' . $content_tooltip_style . '" data-tooltipster-animation="swing" data-tooltipster-trigger="hover" data-tooltipster-offsetx="' . $tooltipster_offsetx . '" data-tooltipster-offsety="' . $tooltipster_offsety . '"'; $Tooltip_Class = $tooltipclasses; } else { $Tooltip_Class = ""; if (strlen($content_tooltip_content) != 0) { $Tooltip_Content = ' title="' . $content_tooltip_content . '"'; } else { $Tooltip_Content = ""; } } if ($content_image_responsive == "true") { $image_dimensions = 'width: 100%; height: auto;'; $parent_dimensions = 'width: ' . $content_image_width_r . '%; ' . $content_image_height . ''; } else { $image_dimensions = 'width: 100%; height: auto;'; $parent_dimensions = 'width: ' . $content_image_width_f . 'px; ' . $content_image_height . ''; } // Auto-Open Class if ($content_open == "true") { $modal_openclass = "nch-lightbox-open"; if ($content_open_hide == "true") { $modal_hideclass = "nch-lightbox-hide"; } else { $modal_hideclass = ""; } } else { $modal_openclass = "nch-lightbox-modal no-ajaxy"; $modal_hideclass = ""; } // Backlight Color if ($lightbox_backlight_choice == "predefined") { $lightbox_backlight_selection = $lightbox_backlight_color; } else { $lightbox_backlight_selection = $lightbox_backlight_custom; } // Custom Width / Height $lightbox_dimensions = ' '; if ($lightbox_width == "auto") { $lightbox_dimensions .= ''; } else { if ($lightbox_width == "widthpercent") { $lightbox_dimensions .= 'data-width="' . $lightbox_width_percent . '%" '; } else { if ($lightbox_width == "widthpixel") { $lightbox_dimensions .= 'data-width="' . $lightbox_width_pixel . '" '; } } } if ($lightbox_height == "auto") { $lightbox_dimensions .= ''; } else { if ($lightbox_height == "heightpercent") { $lightbox_dimensions .= 'data-height="' . $lightbox_height_percent . '%" '; } else { if ($lightbox_height == "heightpixel") { $lightbox_dimensions .= 'data-height="' . $lightbox_height_pixel . '" '; } } } // Background Settings if ($lightbox_custom_background == "image") { $background_image = wp_get_attachment_image_src($lightbox_background_image, 'full'); $background_image = $background_image[0]; $lightbox_background = 'background: url(' . $background_image . ') ' . $lightbox_background_repeat . ' 0 0; background-size: ' . $lightbox_background_size . ';'; } else { if ($lightbox_custom_background == "color") { $lightbox_background = 'background: ' . $lightbox_background_color . ';'; } else { $lightbox_background = ''; } } $output = ''; 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-Modal-Popup', $atts); } else { $css_class = ''; } $output .= '<div id="' . $modal_id . '-container" class="ts-vcsc-modal-container">'; if ($content_trigger == "default") { $modal_image = TS_VCSC_GetResourceURL('images/defaults/default_modal.jpg'); if ($Tooltip_Content != '') { $output .= '<div class="' . $modal_id . '-parent nch-holder ' . $modal_hideclass . ' ' . $Tooltip_Class . '" ' . $Tooltip_Content . ' style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; ' . $parent_dimensions . '">'; $output .= '<div id="' . $modal_id . '-trigger" class="' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-modal no-ajaxy ' . $css_class . '" style="width: 100%; height: 100%;">'; } else { $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $modal_hideclass . ' ' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-modal no-ajaxy ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; ' . $parent_dimensions . '">'; } $output .= '<a href="#' . $retrieval_id . '" class="nch-lightbox-trigger ' . $modal_openclass . '" ' . $lightbox_dimensions . ' data-title="" data-open="' . $content_open . '" data-delay="' . $content_open_delay . '" data-type="html" rel="" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" data-color="' . $lightbox_backlight_selection . '">'; $output .= '<img src="' . $modal_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $output .= '<div class="nchgrid-caption"></div>'; if (!empty($content_title)) { $output .= '<div class="nchgrid-caption-text">' . $content_title . '</div>'; } $output .= '</a>'; $output .= '</div>'; if ($Tooltip_Content != '') { $output .= '</div>'; } } if ($content_trigger == "image") { $modal_image = wp_get_attachment_image_src($content_image, 'large'); $modal_image = $modal_image[0]; if ($content_image_simple == "false") { if ($Tooltip_Content != '') { $output .= '<div class="' . $modal_id . '-parent nch-holder ' . $modal_hideclass . ' ' . $Tooltip_Class . '" ' . $Tooltip_Content . ' style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; ' . $parent_dimensions . '">'; $output .= '<div id="' . $modal_id . '-trigger" class="' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-modal no-ajaxy ' . $css_class . '" style="width: 100%; height: 100%;">'; } else { $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $modal_hideclass . ' ' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-modal no-ajaxy ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; ' . $parent_dimensions . '">'; } $output .= '<a href="#' . $retrieval_id . '" class="nch-lightbox-trigger ' . $modal_openclass . '" ' . $lightbox_dimensions . ' data-title="" data-open="' . $content_open . '" data-delay="' . $content_open_delay . '" data-type="html" rel="" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" data-color="' . $lightbox_backlight_selection . '">'; $output .= '<img src="' . $modal_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $output .= '<div class="nchgrid-caption"></div>'; if (!empty($content_title)) { $output .= '<div class="nchgrid-caption-text">' . $content_title . '</div>'; } $output .= '</a>'; $output .= '</div>'; if ($Tooltip_Content != '') { $output .= '</div>'; } } else { $output .= '<a href="#' . $retrieval_id . '" class="' . $modal_id . '-parent nch-holder nch-lightbox-modal no-ajaxy ' . $Tooltip_Class . '" ' . $Tooltip_Content . ' style="' . $parent_dimensions . '" ' . $lightbox_dimensions . ' data-title="' . $content_title . '" data-type="html" rel="' . ($lightbox_group == "true" ? "nachogroup" : $lightbox_group) . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" data-color="' . $lightbox_backlight_selection . '">'; $output .= '<img class="" src="' . $modal_image . '" style="display: block; ' . $image_dimensions . '">'; $output .= '</a>'; } } if ($content_trigger == "icon") { $icon_style = 'color: ' . $content_iconcolor . '; width:' . $content_iconsize . 'px; height:' . $content_iconsize . 'px; font-size:' . $content_iconsize . 'px; line-height:' . $content_iconsize . 'px;'; $output .= '<div id="' . $modal_id . '-trigger" style="" class="' . $modal_id . '-parent nch-holder ts-vcsc-font-icon ts-font-icons ts-shortcode ts-icon-align-center ' . $el_class . ' ' . $css_class . ' ' . $Tooltip_Class . '" ' . $Tooltip_Content . ' style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<a href="#' . $retrieval_id . '" class="' . $modal_openclass . '" ' . $lightbox_dimensions . ' data-title="" data-open="' . $content_open . '" data-delay="' . $content_open_delay . '" data-type="html" rel="" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" data-color="' . $lightbox_backlight_selection . '">'; $output .= '<i class="ts-font-icon ' . $content_icon . '" style="' . $icon_style . '"></i>'; $output .= '</a>'; $output .= '</div>'; } if ($content_trigger == "flat" || $content_trigger == "flaticon") { wp_enqueue_style('ts-extend-buttonsdual'); $button_style = $content_buttonstyle . ' ' . $content_buttonhover; $output .= '<a href="#' . $retrieval_id . '" target="_blank" class="ts-dual-buttons-wrapper ' . $modal_openclass . '" ' . $lightbox_dimensions . ' data-open="' . $content_open . '" data-delay="' . $content_open_delay . '" data-type="html" rel="" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" data-color="' . $lightbox_backlight_selection . '">'; $output .= '<div id="' . $modal_id . '-trigger" class="ts-dual-buttons-container clearFixMe ' . $button_style . ' ' . $modal_id . '-parent nch-holder ' . $modal_hideclass . ' ' . $el_class . ' ' . $Tooltip_Class . ' ' . $css_class . '" ' . $Tooltip_Content . ' style="display: block; width: 100%; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; if ($content_icon != '' && $content_icon != 'transparent' && $content_trigger == "flaticon") { $output .= '<i class="ts-dual-buttons-icon ' . $content_icon . '" style="font-size: ' . $content_buttonsize . 'px; line-height: ' . $content_buttonsize . 'px;"></i>'; } $output .= '<span class="ts-dual-buttons-title" style="font-size: ' . $content_buttonsize . 'px; line-height: ' . $content_buttonsize . 'px;">' . $content_buttontext . '</span>'; $output .= '</div>'; $output .= '</a>'; } if ($content_trigger == "winged") { $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $modal_hideclass . ' ' . $el_class . ' ' . $Tooltip_Class . ' ' . $css_class . '" ' . $Tooltip_Content . ' style="display: block; width: 100%; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<div class="ts-lightbox-button-1 clearFixMe">'; $output .= '<div class="top">' . $content_title . '</div>'; $output .= '<div class="bottom">' . $content_subtitle . '</div>'; $output .= '<a href="#' . $retrieval_id . '" class="icon ' . $modal_openclass . '" ' . $lightbox_dimensions . ' data-open="' . $content_open . '" data-delay="' . $content_open_delay . '" data-type="html" rel="" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" data-color="' . $lightbox_backlight_selection . '"><span class="popup">' . $content_buttontext . '</span></a>'; $output .= '</div>'; $output .= '</div>'; } if ($content_trigger == "simple") { $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $modal_hideclass . ' ' . $el_class . ' ' . $Tooltip_Class . ' ' . $css_class . '" ' . $Tooltip_Content . ' style="display: block; width: 100%; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<a href="#' . $retrieval_id . '" class="ts-lightbox-button-2 icon ' . $modal_openclass . '" ' . $lightbox_dimensions . ' data-open="' . $content_open . '" data-delay="' . $content_open_delay . '" data-type="html" rel="" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" data-color="' . $lightbox_backlight_selection . '"><span class="popup">' . $content_buttontext . '</span></a>'; $output .= '</div>'; } if ($content_trigger == "text") { $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $modal_hideclass . ' ' . $el_class . ' ' . $css_class . ' ' . $Tooltip_Class . '" ' . $Tooltip_Content . ' style="text-align: center; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<a href="#' . $retrieval_id . '" class="' . $modal_openclass . '" ' . $lightbox_dimensions . ' data-open="' . $content_open . '" data-delay="' . $content_open_delay . '" data-type="html" rel="" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" data-color="' . $lightbox_backlight_selection . '">' . $content_text . '</a>'; $output .= '</div>'; } if ($content_trigger == "custom") { if ($content_raw != "") { $content_raw = rawurldecode(base64_decode(strip_tags($content_raw))); $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $modal_hideclass . ' ' . $el_class . ' ' . $css_class . ' ' . $Tooltip_Class . '" ' . $Tooltip_Content . ' style="text-align: center; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<a href="#' . $retrieval_id . '" class="' . $modal_openclass . '" ' . $lightbox_dimensions . ' data-open="' . $content_open . '" data-delay="' . $content_open_delay . '" data-type="html" rel="" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" data-color="' . $lightbox_backlight_selection . '">'; $output .= $content_raw; $output .= '</a>'; $output .= '</div>'; } } // Create hidden DIV with Modal Content if ($content_provider == "custom" || $content_provider == "identifier" && $content_retrieve == '') { $output .= '<div id="' . $modal_id . '" class="ts-modal-content nch-hide-if-javascript ' . $el_class . '" style="display: none; padding: ' . $lightbox_custom_padding . 'px; ' . $lightbox_background . '">'; $output .= '<div class="ts-modal-white-header"></div>'; $output .= '<div class="ts-modal-white-frame" style="">'; $output .= '<div class="ts-modal-white-inner">'; if ($content_show_title == "true" && $title != "") { $output .= '<h2 style="border-bottom: 1px solid #eeeeee; padding-bottom: 10px; margin-bottom: 10px;">' . $title . '</h2>'; } if (function_exists('wpb_js_remove_wpautop')) { $output .= wpb_js_remove_wpautop(do_shortcode($content), true); } else { $output .= do_shortcode($content); } $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; } $output .= '</div>'; echo $output; $myvariable = ob_get_clean(); return $myvariable; }
function TS_VCSC_Google_Charts_Function($atts) { global $VISUAL_COMPOSER_EXTENSIONS; ob_start(); if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VCFrontEditMode == "true") { $charts_frontend = "true"; } else { $charts_frontend = "false"; } wp_enqueue_style('ts-extend-google-charts'); if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_LoadFrontEndForcable == "false") { wp_enqueue_style('ts-visual-composer-extend-front'); } extract(shortcode_atts(array('chart_height' => '400', 'chart_type' => 'pie', 'chart_legend' => 'top', 'chart_title' => '', 'chart_label' => 'percentage', 'chart_image' => 'false', 'chart_transparent' => 'true', 'chart_background' => '#ffffff', 'chart_colors_custom' => 'false', 'chart_colors' => '', 'chart_border_show' => 'false', 'chart_border_color' => '#cccccc', 'chart_border_stroke' => 1, 'chart_external_doc' => 'false', 'chart_external_key' => '', 'chart_external_sheet' => '', 'chart_external_range' => '', 'chart_external_header' => 1, 'chart_pie_3d' => 'true', 'chart_pie_hole' => 20, 'chart_pie_data' => '', 'chart_donut_data' => '', 'chart_bar_data' => '', 'chart_bar_stack' => 'false', 'chart_bar_vertical' => '', 'chart_bar_horizontal' => '', 'chart_column_data' => '', 'chart_column_stack' => 'false', 'chart_column_vertical' => '', 'chart_column_horizontal' => '', 'chart_area_data' => '', 'chart_area_vertical' => '', 'chart_area_horizontal' => '', 'chart_line_data' => '', 'chart_line_curved' => 'false', 'chart_line_vertical' => '', 'chart_line_horizontal' => '', 'chart_geo_data' => '', 'chart_geo_region' => 'world', 'chart_geo_colorstart' => '#ffff00', 'chart_geo_colorend' => '#ebe5d8', 'chart_combo_data' => '', 'chart_combo_vertical' => '', 'chart_combo_horizontal' => '', 'chart_org_data' => '', 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); if (!empty($el_id)) { $google_chart_id = $el_id; } else { $google_chart_id = 'ts_vcsc_google_chart_' . mt_rand(999999, 9999999); } if ($chart_external_doc == 'true' && $chart_external_key != '') { if ($chart_external_sheet == '') { $chart_external_sheet = 0; } if ($chart_external_range != '') { $chart_external_range = '&range=' . $chart_external_range; } if ($chart_external_header != '') { $chart_external_header = '&headers=' . $chart_external_header; } $chart_external_url = 'https://docs.google.com/spreadsheet/ccc?key=' . $chart_external_key . '&usp=drive_web' . $chart_external_range . '' . $chart_external_header . '&gid=' . $chart_external_sheet . '#'; } else { $chart_external_url = ''; } if ($charts_frontend == "false") { if ($chart_type == "pie") { $chart_pie_data = trim($chart_pie_data); $chart_pie_data = str_replace("<br/>", '', $chart_pie_data); $chart_pie_data = str_replace("<br>", '', $chart_pie_data); $chart_pie_data = str_replace("'", '"', $chart_pie_data); $chart_pie_data = str_replace('``', '"', $chart_pie_data); $chart_pie_data = str_replace('(', '[', $chart_pie_data); $chart_pie_data = str_replace(')', ']', $chart_pie_data); $chart_data_array = $chart_pie_data; } else { if ($chart_type == "donut") { $chart_donut_data = trim($chart_donut_data); $chart_donut_data = str_replace("<br/>", '', $chart_donut_data); $chart_donut_data = str_replace("<br>", '', $chart_donut_data); $chart_donut_data = str_replace("'", '"', $chart_donut_data); $chart_donut_data = str_replace('``', '"', $chart_donut_data); $chart_donut_data = str_replace('(', '[', $chart_donut_data); $chart_donut_data = str_replace(')', ']', $chart_donut_data); $chart_data_array = $chart_donut_data; $chart_pie_hole = $chart_pie_hole / 100; } else { if ($chart_type == "bar") { $chart_bar_data = trim($chart_bar_data); $chart_bar_data = str_replace("<br/>", '', $chart_bar_data); $chart_bar_data = str_replace("<br>", '', $chart_bar_data); $chart_bar_data = str_replace("'", '"', $chart_bar_data); $chart_bar_data = str_replace('``', '"', $chart_bar_data); $chart_bar_data = str_replace('(', '[', $chart_bar_data); $chart_bar_data = str_replace(')', ']', $chart_bar_data); $chart_data_array = $chart_bar_data; } else { if ($chart_type == "column") { $chart_column_data = trim($chart_column_data); $chart_column_data = str_replace("<br/>", '', $chart_column_data); $chart_column_data = str_replace("<br>", '', $chart_column_data); $chart_column_data = str_replace("'", '"', $chart_column_data); $chart_column_data = str_replace('``', '"', $chart_column_data); $chart_column_data = str_replace('(', '[', $chart_column_data); $chart_column_data = str_replace(')', ']', $chart_column_data); $chart_data_array = $chart_column_data; } else { if ($chart_type == "area") { $chart_area_data = trim($chart_area_data); $chart_area_data = str_replace("<br/>", '', $chart_area_data); $chart_area_data = str_replace("<br>", '', $chart_area_data); $chart_area_data = str_replace("'", '"', $chart_area_data); $chart_area_data = str_replace('``', '"', $chart_area_data); $chart_area_data = str_replace('(', '[', $chart_area_data); $chart_area_data = str_replace(')', ']', $chart_area_data); $chart_data_array = $chart_area_data; } else { if ($chart_type == "line") { $chart_line_data = trim($chart_line_data); $chart_line_data = str_replace("<br/>", '', $chart_line_data); $chart_line_data = str_replace("<br>", '', $chart_line_data); $chart_line_data = str_replace("'", '"', $chart_line_data); $chart_line_data = str_replace('``', '"', $chart_line_data); $chart_line_data = str_replace('(', '[', $chart_line_data); $chart_line_data = str_replace(')', ']', $chart_line_data); $chart_data_array = $chart_line_data; } else { if ($chart_type == "geo") { $chart_geo_data = trim($chart_geo_data); $chart_geo_data = str_replace("<br/>", '', $chart_geo_data); $chart_geo_data = str_replace("<br>", '', $chart_geo_data); $chart_geo_data = str_replace("'", '"', $chart_geo_data); $chart_geo_data = str_replace('``', '"', $chart_geo_data); $chart_geo_data = str_replace('(', '[', $chart_geo_data); $chart_geo_data = str_replace(')', ']', $chart_geo_data); $chart_data_array = $chart_geo_data; } else { if ($chart_type == "combo") { $chart_combo_data = trim($chart_combo_data); $chart_combo_data = str_replace("<br/>", '', $chart_combo_data); $chart_combo_data = str_replace("<br>", '', $chart_combo_data); $chart_combo_data = str_replace("'", '"', $chart_combo_data); $chart_combo_data = str_replace('``', '"', $chart_combo_data); $chart_combo_data = str_replace('(', '[', $chart_combo_data); $chart_combo_data = str_replace(')', ']', $chart_combo_data); $chart_data_array = $chart_combo_data; } else { if ($chart_type == "org") { $chart_org_data = trim($chart_org_data); $chart_org_data = str_replace("<br/>", '', $chart_org_data); $chart_org_data = str_replace("<br>", '', $chart_org_data); $chart_org_data = str_replace("'", '"', $chart_org_data); $chart_org_data = str_replace('``', '"', $chart_org_data); $chart_org_data = str_replace('(', '[', $chart_org_data); $chart_org_data = str_replace(')', ']', $chart_org_data); $chart_data_array = $chart_org_data; } } } } } } } } } $chart_data_array = explode('],', $chart_data_array); $chart_data_count = count($chart_data_array) - 1; } if ($chart_colors_custom == 'true' && $chart_colors != '') { $chart_colors = trim($chart_colors); $chart_colors = ltrim($chart_colors, ","); $chart_colors = rtrim($chart_colors, ","); } else { $chart_colors = ""; } if ($chart_transparent == "true") { $chart_background = 'transparent'; } else { $chart_background = $chart_background; } if ($chart_border_show == "true") { $chart_border_stroke = $chart_border_stroke; } else { $chart_border_stroke = 0; } 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-Google-Charts', $atts); } else { $css_class = ''; } $output = ''; $output .= '<div class="ts-google-chart-holder" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; if ($charts_frontend == "false") { if ($chart_type == "pie") { ?> <script type="text/javascript"> google.load('visualization', '1.0', {'packages':['corechart']}); google.setOnLoadCallback(drawChart_<?php echo $google_chart_id; ?> ); function drawChart_<?php echo $google_chart_id; ?> () { var options = { 'legend': { 'position': '<?php echo $chart_legend; ?> ', 'alignment': 'center' }, 'title': '', 'pieSliceText': '<?php echo $chart_label; ?> ', // percentage, value, label, none 'is3D': <?php echo $chart_pie_3d; ?> , 'width': '100%', 'height': '<?php echo $chart_height; ?> ', 'backgroundColor': { 'fill': '<?php echo $chart_background; ?> ', 'stroke': '<?php echo $chart_border_color; ?> ', 'strokeWidth': <?php echo $chart_border_stroke; ?> , }, <?php echo $chart_colors != '' ? "'colors': \t\t\t[" . $chart_colors . "]," : ""; ?> }; var data = query = ''; <?php if ($chart_external_doc == 'true' && $chart_external_url != '') { ?> query = new google.visualization.Query('<?php echo rawurldecode($chart_external_url); ?> '); query.send(handleQueryResponse_<?php echo $google_chart_id; ?> ); <?php } else { ?> data = new google.visualization.arrayToDataTable([<?php echo trim($chart_pie_data); ?> ]); <?php } ?> function resizeChart_<?php echo $google_chart_id; ?> () { var chart = new google.visualization.PieChart(document.getElementById('<?php echo $google_chart_id; ?> ')); <?php if ($chart_image == 'true') { ?> google.visualization.events.addListener(chart, 'ready', function () { jQuery('#<?php echo $google_chart_id; ?> -image').html('<a href="' + chart.getImageURI() + '" target="_blank"><img src="' + chart.getImageURI() + '"></a>'); }); <?php } ?> chart.draw(data, options); } <?php if ($chart_external_doc == 'true' && $chart_external_url != '') { ?> function handleQueryResponse_<?php echo $google_chart_id; ?> (response) { if (response.isError()) { jQuery("#<?php echo $google_chart_id; ?> ").html('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage()); return; } else { data = response.getDataTable(); resizeChart_<?php echo $google_chart_id; ?> (); } } <?php } else { ?> window.onload = resizeChart_<?php echo $google_chart_id; ?> (); <?php } ?> jQuery(window).on("debouncedresize", function(event) { if (data != '') { resizeChart_<?php echo $google_chart_id; ?> (); } }); } </script> <?php } if ($chart_type == "donut") { ?> <script type="text/javascript"> google.load('visualization', '1.0', {'packages':['corechart']}); google.setOnLoadCallback(drawChart_<?php echo $google_chart_id; ?> ); function drawChart_<?php echo $google_chart_id; ?> () { var options = { 'legend': { 'position': '<?php echo $chart_legend; ?> ', 'alignment': 'center' }, 'title': '', 'pieSliceText': '<?php echo $chart_label; ?> ', 'pieHole': <?php echo $chart_pie_hole; ?> , 'width': '100%', 'height': '<?php echo $chart_height; ?> ', 'backgroundColor': { 'fill': '<?php echo $chart_background; ?> ', 'stroke': '<?php echo $chart_border_color; ?> ', 'strokeWidth': <?php echo $chart_border_stroke; ?> , }, <?php echo $chart_colors != '' ? "'colors': \t\t\t[" . $chart_colors . "]," : ""; ?> }; var data = query = ''; <?php if ($chart_external_doc == 'true' && $chart_external_url != '') { ?> query = new google.visualization.Query('<?php echo rawurldecode($chart_external_url); ?> '); query.send(handleQueryResponse_<?php echo $google_chart_id; ?> ); <?php } else { ?> data = new google.visualization.arrayToDataTable([<?php echo trim($chart_donut_data); ?> ]); <?php } ?> function resizeChart_<?php echo $google_chart_id; ?> () { var chart = new google.visualization.PieChart(document.getElementById('<?php echo $google_chart_id; ?> ')); <?php if ($chart_image == 'true') { ?> google.visualization.events.addListener(chart, 'ready', function () { jQuery('#<?php echo $google_chart_id; ?> -image').html('<a href="' + chart.getImageURI() + '" target="_blank"><img src="' + chart.getImageURI() + '"></a>'); }); <?php } ?> chart.draw(data, options); } <?php if ($chart_external_doc == 'true' && $chart_external_url != '') { ?> function handleQueryResponse_<?php echo $google_chart_id; ?> (response) { if (response.isError()) { jQuery("#<?php echo $google_chart_id; ?> ").html('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage()); return; } else { data = response.getDataTable(); resizeChart_<?php echo $google_chart_id; ?> (); } } <?php } else { ?> window.onload = resizeChart_<?php echo $google_chart_id; ?> (); <?php } ?> jQuery(window).on("debouncedresize", function(event) { if (data != '') { resizeChart_<?php echo $google_chart_id; ?> (); } }); } </script> <?php } if ($chart_type == "bar") { ?> <script type="text/javascript"> google.load('visualization', '1.0', {'packages':['corechart']}); google.setOnLoadCallback(drawChart_<?php echo $google_chart_id; ?> ); function drawChart_<?php echo $google_chart_id; ?> () { var options = { 'legend': { 'position': '<?php echo $chart_legend; ?> ', 'alignment': 'center' }, 'title': '', 'width': '100%', 'height': '<?php echo $chart_height; ?> ', 'backgroundColor': { 'fill': '<?php echo $chart_background; ?> ', 'stroke': '<?php echo $chart_border_color; ?> ', 'strokeWidth': <?php echo $chart_border_stroke; ?> , }, 'isStacked': <?php echo $chart_bar_stack; ?> , 'orientation': 'vertical', 'vAxis': { //'format': '###,###', 'title': '<?php echo $chart_bar_vertical; ?> ', }, 'hAxis': { //'format': '###,###', 'title': '<?php echo $chart_bar_horizontal; ?> ', }, <?php echo $chart_colors != '' ? "'colors': \t\t\t[" . $chart_colors . "]," : ""; ?> }; var data = query = ''; <?php if ($chart_external_doc == 'true' && $chart_external_url != '') { ?> query = new google.visualization.Query('<?php echo rawurldecode($chart_external_url); ?> '); query.send(handleQueryResponse_<?php echo $google_chart_id; ?> ); <?php } else { ?> data = new google.visualization.arrayToDataTable([<?php echo trim($chart_bar_data); ?> ]); <?php } ?> function resizeChart_<?php echo $google_chart_id; ?> () { /* // Format hAxis var formatter1 = new google.visualization.NumberFormat({pattern:'###,###'}); formatter1.format(data, 0); // Format vAxis var formatter2 = new google.visualization.NumberFormat({pattern:'###,###'}); formatter2.format(data, 1); var formatter2 = new google.visualization.NumberFormat({pattern:'###,###'}); formatter2.format(data, 2); */ // Create Chart var chart = new google.visualization.BarChart(document.getElementById('<?php echo $google_chart_id; ?> ')); <?php if ($chart_image == 'true') { ?> google.visualization.events.addListener(chart, 'ready', function () { jQuery('#<?php echo $google_chart_id; ?> -image').html('<a href="' + chart.getImageURI() + '" target="_blank"><img src="' + chart.getImageURI() + '"></a>'); }); <?php } ?> chart.draw(data, options); } <?php if ($chart_external_doc == 'true' && $chart_external_url != '') { ?> function handleQueryResponse_<?php echo $google_chart_id; ?> (response) { if (response.isError()) { jQuery("#<?php echo $google_chart_id; ?> ").html('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage()); return; } else { data = response.getDataTable(); resizeChart_<?php echo $google_chart_id; ?> (); } } <?php } else { ?> window.onload = resizeChart_<?php echo $google_chart_id; ?> (); <?php } ?> jQuery(window).on("debouncedresize", function(event) { if (data != '') { resizeChart_<?php echo $google_chart_id; ?> (); } }); } </script> <?php } if ($chart_type == "column") { ?> <script type="text/javascript"> google.load('visualization', '1.0', {'packages':['corechart']}); google.setOnLoadCallback(drawChart_<?php echo $google_chart_id; ?> ); function drawChart_<?php echo $google_chart_id; ?> () { var options = { 'legend': { 'position': '<?php echo $chart_legend; ?> ', 'alignment': 'center' }, 'title': '', 'width': '100%', 'height': '<?php echo $chart_height; ?> ', 'backgroundColor': { 'fill': '<?php echo $chart_background; ?> ', 'stroke': '<?php echo $chart_border_color; ?> ', 'strokeWidth': <?php echo $chart_border_stroke; ?> , }, 'isStacked': <?php echo $chart_column_stack; ?> , 'orientation': 'horizontal', 'vAxis': { 'title': '<?php echo $chart_column_vertical; ?> ', }, 'hAxis': { 'title': '<?php echo $chart_column_horizontal; ?> ', }, <?php echo $chart_colors != '' ? "'colors': \t\t\t[" . $chart_colors . "]," : ""; ?> }; var data = query = ''; <?php if ($chart_external_doc == 'true' && $chart_external_url != '') { ?> query = new google.visualization.Query('<?php echo rawurldecode($chart_external_url); ?> '); query.send(handleQueryResponse_<?php echo $google_chart_id; ?> ); <?php } else { ?> data = new google.visualization.arrayToDataTable([<?php echo trim($chart_column_data); ?> ]); <?php } ?> function resizeChart_<?php echo $google_chart_id; ?> () { var chart = new google.visualization.ColumnChart(document.getElementById('<?php echo $google_chart_id; ?> ')); <?php if ($chart_image == 'true') { ?> google.visualization.events.addListener(chart, 'ready', function () { jQuery('#<?php echo $google_chart_id; ?> -image').html('<a href="' + chart.getImageURI() + '" target="_blank"><img src="' + chart.getImageURI() + '"></a>'); }); <?php } ?> chart.draw(data, options); } <?php if ($chart_external_doc == 'true' && $chart_external_url != '') { ?> function handleQueryResponse_<?php echo $google_chart_id; ?> (response) { if (response.isError()) { jQuery("#<?php echo $google_chart_id; ?> ").html('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage()); return; } else { data = response.getDataTable(); resizeChart_<?php echo $google_chart_id; ?> (); } } <?php } else { ?> window.onload = resizeChart_<?php echo $google_chart_id; ?> (); <?php } ?> jQuery(window).on("debouncedresize", function(event) { if (data != '') { resizeChart_<?php echo $google_chart_id; ?> (); } }); } </script> <?php } if ($chart_type == "area") { ?> <script type="text/javascript"> google.load('visualization', '1.0', {'packages':['corechart']}); google.setOnLoadCallback(drawChart_<?php echo $google_chart_id; ?> ); function drawChart_<?php echo $google_chart_id; ?> () { var options = { 'legend': { 'position': '<?php echo $chart_legend; ?> ', 'alignment': 'center' }, 'title': '', 'width': '100%', 'height': '<?php echo $chart_height; ?> ', 'backgroundColor': { 'fill': '<?php echo $chart_background; ?> ', 'stroke': '<?php echo $chart_border_color; ?> ', 'strokeWidth': <?php echo $chart_border_stroke; ?> , }, 'vAxis': { 'title': '<?php echo $chart_area_vertical; ?> ', }, 'hAxis': { 'title': '<?php echo $chart_area_horizontal; ?> ', }, <?php echo $chart_colors != '' ? "'colors': \t\t\t[" . $chart_colors . "]," : ""; ?> }; var data = query = ''; <?php if ($chart_external_doc == 'true' && $chart_external_url != '') { ?> query = new google.visualization.Query('<?php echo rawurldecode($chart_external_url); ?> '); query.send(handleQueryResponse_<?php echo $google_chart_id; ?> ); <?php } else { ?> data = new google.visualization.arrayToDataTable([<?php echo trim($chart_area_data); ?> ]); <?php } ?> function resizeChart_<?php echo $google_chart_id; ?> () { var chart = new google.visualization.AreaChart(document.getElementById('<?php echo $google_chart_id; ?> ')); <?php if ($chart_image == 'true') { ?> google.visualization.events.addListener(chart, 'ready', function () { jQuery('#<?php echo $google_chart_id; ?> -image').html('<a href="' + chart.getImageURI() + '" target="_blank"><img src="' + chart.getImageURI() + '"></a>'); }); <?php } ?> chart.draw(data, options); } <?php if ($chart_external_doc == 'true' && $chart_external_url != '') { ?> function handleQueryResponse_<?php echo $google_chart_id; ?> (response) { if (response.isError()) { jQuery("#<?php echo $google_chart_id; ?> ").html('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage()); return; } else { data = response.getDataTable(); resizeChart_<?php echo $google_chart_id; ?> (); } } <?php } else { ?> window.onload = resizeChart_<?php echo $google_chart_id; ?> (); <?php } ?> jQuery(window).on("debouncedresize", function(event) { if (data != '') { resizeChart_<?php echo $google_chart_id; ?> (); } }); } </script> <?php } if ($chart_type == "line") { ?> <script type="text/javascript"> google.load('visualization', '1.0', {'packages':['corechart']}); google.setOnLoadCallback(drawChart_<?php echo $google_chart_id; ?> ); function drawChart_<?php echo $google_chart_id; ?> () { var options = { 'legend': { 'position': '<?php echo $chart_legend; ?> ', 'alignment': 'center' }, 'title': '', 'width': '100%', 'curveType': '<?php echo $chart_line_curved == "true" ? "function" : "none"; ?> ', 'interpolateNulls': false, 'height': '<?php echo $chart_height; ?> ', 'backgroundColor': { 'fill': '<?php echo $chart_background; ?> ', 'stroke': '<?php echo $chart_border_color; ?> ', 'strokeWidth': <?php echo $chart_border_stroke; ?> , }, 'vAxis': { 'title': '<?php echo $chart_line_vertical; ?> ', }, 'hAxis': { 'title': '<?php echo $chart_line_horizontal; ?> ', }, <?php echo $chart_colors != '' ? "'colors': \t\t\t[" . $chart_colors . "]," : ""; ?> }; var data = query = ''; <?php if ($chart_external_doc == 'true' && $chart_external_url != '') { ?> query = new google.visualization.Query('<?php echo rawurldecode($chart_external_url); ?> '); query.send(handleQueryResponse_<?php echo $google_chart_id; ?> ); <?php } else { ?> data = new google.visualization.arrayToDataTable([<?php echo trim($chart_line_data); ?> ]); <?php } ?> function resizeChart_<?php echo $google_chart_id; ?> () { var chart = new google.visualization.LineChart(document.getElementById('<?php echo $google_chart_id; ?> ')); <?php if ($chart_image == 'true') { ?> google.visualization.events.addListener(chart, 'ready', function () { jQuery('#<?php echo $google_chart_id; ?> -image').html('<a href="' + chart.getImageURI() + '" target="_blank"><img src="' + chart.getImageURI() + '"></a>'); }); <?php } ?> chart.draw(data, options); } <?php if ($chart_external_doc == 'true' && $chart_external_url != '') { ?> function handleQueryResponse_<?php echo $google_chart_id; ?> (response) { if (response.isError()) { jQuery("#<?php echo $google_chart_id; ?> ").html('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage()); return; } else { data = response.getDataTable(); resizeChart_<?php echo $google_chart_id; ?> (); } } <?php } else { ?> window.onload = resizeChart_<?php echo $google_chart_id; ?> (); <?php } ?> jQuery(window).on("debouncedresize", function(event) { if (data != '') { resizeChart_<?php echo $google_chart_id; ?> (); } }); } </script> <?php } if ($chart_type == "geo") { ?> <script type="text/javascript"> google.load('visualization', '1.0', {'packages':['geochart']}); google.setOnLoadCallback(drawChart_<?php echo $google_chart_id; ?> ); function drawChart_<?php echo $google_chart_id; ?> () { var options = { 'title': '', 'width': '100%', 'height': '<?php echo $chart_height; ?> ', 'backgroundColor': { 'fill': '<?php echo $chart_background; ?> ', 'stroke': '<?php echo $chart_border_color; ?> ', 'strokeWidth': <?php echo $chart_border_stroke; ?> , }, 'region': '<?php echo $chart_geo_region; ?> ', 'colorAxis': { 'colors': ['<?php echo $chart_geo_colorstart; ?> ', '<?php echo $chart_geo_colorend; ?> '] } }; var data = query = ''; <?php if ($chart_external_doc == 'true' && $chart_external_url != '') { ?> query = new google.visualization.Query('<?php echo rawurldecode($chart_external_url); ?> '); query.send(handleQueryResponse_<?php echo $google_chart_id; ?> ); <?php } else { ?> data = new google.visualization.arrayToDataTable([<?php echo trim($chart_geo_data); ?> ]); <?php } ?> function resizeChart_<?php echo $google_chart_id; ?> () { var chart = new google.visualization.GeoChart(document.getElementById('<?php echo $google_chart_id; ?> ')); <?php if ($chart_image == 'true') { ?> google.visualization.events.addListener(chart, 'ready', function () { jQuery('#<?php echo $google_chart_id; ?> -image').html('<a href="' + chart.getImageURI() + '" target="_blank"><img src="' + chart.getImageURI() + '"></a>'); }); <?php } ?> chart.draw(data, options); } <?php if ($chart_external_doc == 'true' && $chart_external_url != '') { ?> function handleQueryResponse_<?php echo $google_chart_id; ?> (response) { if (response.isError()) { jQuery("#<?php echo $google_chart_id; ?> ").html('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage()); return; } else { data = response.getDataTable(); resizeChart_<?php echo $google_chart_id; ?> (); } } <?php } else { ?> window.onload = resizeChart_<?php echo $google_chart_id; ?> (); <?php } ?> jQuery(window).on("debouncedresize", function(event) { if (data != '') { resizeChart_<?php echo $google_chart_id; ?> (); } }); } </script> <?php } if ($chart_type == "combo") { ?> <script type="text/javascript"> google.load('visualization', '1.0', {'packages':['corechart']}); google.setOnLoadCallback(drawChart_<?php echo $google_chart_id; ?> ); function drawChart_<?php echo $google_chart_id; ?> () { var options = { 'legend': { 'position': '<?php echo $chart_legend; ?> ', 'alignment': 'center' }, 'title': '', 'width': '100%', 'height': '<?php echo $chart_height; ?> ', 'backgroundColor': { 'fill': '<?php echo $chart_background; ?> ', 'stroke': '<?php echo $chart_border_color; ?> ', 'strokeWidth': <?php echo $chart_border_stroke; ?> , }, 'vAxis': { 'title': '<?php echo $chart_bar_vertical; ?> ', }, 'hAxis': { 'title': '<?php echo $chart_bar_horizontal; ?> ', }, 'seriesType': 'bars', 'series': {<?php echo $chart_data_count; ?> : {type: "line"}}, <?php echo $chart_colors != '' ? "'colors': \t\t\t[" . $chart_colors . "]," : ""; ?> }; var data = query = ''; <?php if ($chart_external_doc == 'true' && $chart_external_url != '') { ?> query = new google.visualization.Query('<?php echo rawurldecode($chart_external_url); ?> '); query.send(handleQueryResponse_<?php echo $google_chart_id; ?> ); <?php } else { ?> data = new google.visualization.arrayToDataTable([<?php echo trim($chart_combo_data); ?> ]); <?php } ?> function resizeChart_<?php echo $google_chart_id; ?> () { var chart = new google.visualization.ComboChart(document.getElementById('<?php echo $google_chart_id; ?> ')); <?php if ($chart_image == 'true') { ?> google.visualization.events.addListener(chart, 'ready', function () { jQuery('#<?php echo $google_chart_id; ?> -image').html('<a href="' + chart.getImageURI() + '" target="_blank"><img src="' + chart.getImageURI() + '"></a>'); }); <?php } ?> chart.draw(data, options); } <?php if ($chart_external_doc == 'true' && $chart_external_url != '') { ?> function handleQueryResponse_<?php echo $google_chart_id; ?> (response) { if (response.isError()) { jQuery("#<?php echo $google_chart_id; ?> ").html('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage()); return; } else { data = response.getDataTable(); resizeChart_<?php echo $google_chart_id; ?> (); } } <?php } else { ?> window.onload = resizeChart_<?php echo $google_chart_id; ?> (); <?php } ?> jQuery(window).on("debouncedresize", function(event) { if (data != '') { resizeChart_<?php echo $google_chart_id; ?> (); } }); } </script> <?php } if ($chart_type == "org") { ?> <script type="text/javascript"> google.load('visualization', '1.0', {'packages':['orgchart']}); google.setOnLoadCallback(drawChart_<?php echo $google_chart_id; ?> ); function drawChart_<?php echo $google_chart_id; ?> () { var options = { 'title': '', 'width': '100%', 'height': '<?php echo $chart_height; ?> ', 'backgroundColor': { 'fill': '<?php echo $chart_background; ?> ', 'stroke': '<?php echo $chart_border_color; ?> ', 'strokeWidth': <?php echo $chart_border_stroke; ?> , }, 'allowHtml': true }; var data = query = ''; <?php if ($chart_external_doc == 'true' && $chart_external_url != '') { ?> query = new google.visualization.Query('<?php echo rawurldecode($chart_external_url); ?> '); query.send(handleQueryResponse_<?php echo $google_chart_id; ?> ); <?php } else { ?> data = new google.visualization.arrayToDataTable([<?php echo trim($chart_org_data); ?> ]); <?php } ?> function resizeChart_<?php echo $google_chart_id; ?> () { var chart = new google.visualization.OrgChart(document.getElementById('<?php echo $google_chart_id; ?> ')); chart.draw(data, options); } <?php if ($chart_external_doc == 'true' && $chart_external_url != '') { ?> function handleQueryResponse_<?php echo $google_chart_id; ?> (response) { if (response.isError()) { jQuery("#<?php echo $google_chart_id; ?> ").html('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage()); return; } else { data = response.getDataTable(); resizeChart_<?php echo $google_chart_id; ?> (); } } <?php } else { ?> window.onload = resizeChart_<?php echo $google_chart_id; ?> (); <?php } ?> jQuery(window).on("debouncedresize", function(event) { if (data != '') { resizeChart_<?php echo $google_chart_id; ?> (); } }); } </script> <?php } } else { $output .= '<div style="width: 100%; text-align: center; color: #D10000; font-weight: bold;">TS Google Charts</div>'; $output .= '<div class="ts-composer-frontedit-message">' . __('The chart is currently viewed in front-end edit mode; due to incompatibility of the Google Chart API with the frontend editor, only chart data will be shown but no rendering will take place.', "ts_visual_composer_extend") . '</div>'; if ($chart_title != '') { $output .= '<div class="ts-google-chart-title">' . $chart_title . '</div>'; } $output .= '<div class="ts-google-chart-data">'; $output .= __("Chart Type", "ts_visual_composer_extend") . ': ' . ucwords($chart_type) . '<br/>'; $output .= __("Data", "ts_visual_composer_extend") . ': '; if ($chart_external_doc == 'true' && $chart_external_url != '') { $output .= $chart_external_url; } else { if ($chart_type == "pie") { $output .= $chart_pie_data; } if ($chart_type == "donut") { $output .= $chart_donut_data; } if ($chart_type == "bar") { $output .= $chart_bar_data; } if ($chart_type == "column") { $output .= $chart_column_data; } if ($chart_type == "area") { $output .= $chart_area_data; } if ($chart_type == "line") { $output .= $chart_line_data; } if ($chart_type == "geo") { $output .= $chart_geo_data; } if ($chart_type == "combo") { $output .= $chart_combo_data; } if ($chart_type == "org") { $output .= $chart_org_data; } } $output .= '</div>'; } if ($charts_frontend == "false") { if ($chart_title != '') { $output .= '<div class="ts-google-chart-title">' . $chart_title . '</div>'; } $output .= '<div id="' . $google_chart_id . '" class="' . $el_class . ' ts-google-chart-draw ' . $css_class . '">'; $output .= '<img src="' . TS_VCSC_GetResourceURL('images/other/ajax_loader.gif') . '" style="display: block; margin: 0 auto; padding: 0; width: 128px; height: 128px; text-align: center;">'; $output .= '</div>'; if ($chart_image == 'true' && $chart_type != 'org') { $output .= '<div id="' . $google_chart_id . '-image" class="ts-google-chart-draw-image"></div>'; } } $output .= '</div>'; echo $output; $myvariable = ob_get_clean(); return $myvariable; }
<?php global $VISUAL_COMPOSER_EXTENSIONS; ?> <div id="ts-settings-changelog" class="tab-content"> <div class="ts-vcsc-section-main"> <div class="ts-vcsc-section-title ts-vcsc-section-show"><i class="dashicons-media-text"></i>Changelog</div> <div class="ts-vcsc-section-content"> <div class="ts-vcsc-notice-field ts-vcsc-success" style="margin-top: 10px; font-size: 13px; text-align: justify;"> The plugin is constantly evolving and adding new features. The listing below is a summary of all changes and additions so far. </div> <?php $changelog = file_get_contents(TS_VCSC_GetResourceURL('Changelog.txt'), true); echo nl2br(str_replace('<br/>', PHP_EOL, $changelog)); ?> </div> </div> </div>
" style="width: 16px; height: 16px; margin-right: 10px;">Support Forum</a> <a class="button-secondary" style="width: 150px; margin: 0px auto; text-align: center;" href="http://support.tekanewascripts.info/category/visual-composer-extensions/" target="_blank"><img src="<?php echo TS_VCSC_GetResourceURL('images/other/ts_vcsc_knowledge_icon_16x16.png'); ?> " style="width: 16px; height: 16px; margin-right: 10px;">Knowledge Base</a> <a class="button-secondary" style="width: 150px; margin: 0px auto; text-align: center;" href="admin.php?page=TS_VCSC_CSS" target="_parent"><img src="<?php echo TS_VCSC_GetResourceURL('images/other/ts_vcsc_customcss_icon_16x16.png'); ?> " style="width: 16px; height: 16px; margin-right: 10px;">Custom CSS</a> <a class="button-secondary" style="width: 150px; margin: 0px auto; text-align: center;" href="admin.php?page=TS_VCSC_JS" target="_parent"><img src="<?php echo TS_VCSC_GetResourceURL('images/other/ts_vcsc_customjs_icon_16x16.png'); ?> " style="width: 16px; height: 16px; margin-right: 10px;">Custom JS</a> <?php if (get_option('ts_vcsc_extend_settings_extended', 0) == 0) { echo '<a class="button-secondary" style="width: 150px; margin: 0px auto; text-align: center;" href="admin.php?page=TS_VCSC_License" target="_parent"><img src="' . TS_VCSC_GetResourceURL('images/other/ts_vcsc_license_icon_16x16.png') . '" style="width: 16px; height: 16px; margin-right: 10px;">License</a>'; } ?> </div> </div> </div> </div> <div class="ts-vcsc-section-main"> <div class="ts-vcsc-section-title ts-vcsc-section-hide"><i class="dashicons-admin-generic"></i>Basic Settings</div> <div class="ts-vcsc-section-content slideFade" style="display: none;"> <div style="margin-top: 10px;"> <h4>Placement of Visual Composer Extensions Menu:</h4> <p style="font-size: 12px;">Define where the menu for this plugin should be placed in WordPress; if disabled, the main menu will be placed in the 'Settings' section:</p> <div class="ts-switch-button ts-composer-switch" data-value="<?php echo $ts_vcsc_extend_settings_mainmenu == 1 ? 'true' : 'false'; ?>
function TS_VCSC_HTML5_Video_Function($atts, $content = null) { global $VISUAL_COMPOSER_EXTENSIONS; ob_start(); wp_enqueue_script('ts-extend-hammer'); wp_enqueue_script('ts-extend-nacho'); wp_enqueue_style('ts-extend-nacho'); wp_enqueue_style('ts-extend-tooltipster'); wp_enqueue_script('ts-extend-tooltipster'); 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('video_dual_version' => 'false', 'video_mp4_source' => 'true', 'video_mp4_remote' => '', 'video_mp4_local' => '', 'video_ogg_source' => 'true', 'video_ogg_remote' => '', 'video_ogg_local' => '', 'video_webm_source' => 'true', 'video_webm_remote' => '', 'video_webm_local' => '', 'video_poster' => '', 'video_posterfit' => 'aspectratio', 'video_fixed' => 'false', 'video_fixed_show' => 'true', 'video_fixed_width' => 250, 'video_fixed_height' => 140, 'video_fixed_adjust' => 0, 'video_fixed_switch' => 'toggle', 'video_fixed_position' => 'bottomleft', 'video_logo_show' => 'logotop', 'video_logo_image' => '', 'video_logo_height' => 50, 'video_logo_opacity' => 50, 'video_logo_position' => 'left', 'video_logo_link' => '', 'video_theme' => 'maccaco', 'video_title' => '', 'video_iframe' => 'true', 'video_auto' => 'false', 'video_stop' => 'true', 'video_loop' => 'false', 'video_fullscreen' => 'true', 'video_share' => 'true', 'video_volume' => 50, 'video_objectfit' => 'aspectratio', 'content_image_responsive' => 'true', 'content_image_height' => 'height: 100%;', 'content_image_width_r' => 100, 'content_image_width_f' => 300, 'content_image_size' => 'large', 'frame_border_type' => 'none', 'frame_border_width' => 1, 'frame_border_color' => '#dadada', 'lightbox_group_name' => 'nachogroup', 'lightbox_size' => 50, 'lightbox_effect' => 'random', 'lightbox_speed' => 5000, 'lightbox_social' => 'true', 'lightbox_backlight_choice' => 'predefined', 'lightbox_backlight_color' => '#0084E2', 'lightbox_backlight_custom' => '#000000', 'lightbox_width' => 'auto', 'lightbox_width_percent' => 100, 'lightbox_width_pixel' => 1024, 'lightbox_height' => 'auto', 'lightbox_height_percent' => 100, 'lightbox_height_pixel' => 400, 'content_lightbox' => 'false', 'content_open' => 'false', 'content_open_hide' => 'true', 'content_open_delay' => 0, 'content_trigger' => 'poster', 'content_subtitle' => '', 'content_image' => '', 'content_image_simple' => 'false', 'content_icon' => '', 'content_iconsize' => 30, 'content_iconcolor' => '#cccccc', 'content_button' => '', 'content_buttonstyle' => 'ts-dual-buttons-color-sun-flower', 'content_buttonhover' => 'ts-dual-buttons-preview-default ts-dual-buttons-hover-default', 'content_buttontext' => 'View Video', 'content_buttonsize' => 16, 'content_text' => '', 'content_raw' => '', 'content_tooltip_css' => 'false', 'content_tooltip_content' => '', 'content_tooltip_encoded' => '', 'content_tooltip_position' => 'ts-simptip-position-top', 'content_tooltip_style' => '', 'tooltipster_offsetx' => 0, 'tooltipster_offsety' => 0, 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); $randomizer = mt_rand(999999, 9999999); if (!empty($el_id)) { $modal_id = $el_id; } else { $modal_id = 'ts-vcsc-modal-' . $randomizer; } // Tooltip if ($content_tooltip_position == "ts-simptip-position-top" || $content_tooltip_position == "top") { $content_tooltip_position = "top"; } if ($content_tooltip_position == "ts-simptip-position-left" || $content_tooltip_position == "left") { $content_tooltip_position = "left"; } if ($content_tooltip_position == "ts-simptip-position-right" || $content_tooltip_position == "right") { $content_tooltip_position = "right"; } if ($content_tooltip_position == "ts-simptip-position-bottom" || $content_tooltip_position == "bottom") { $content_tooltip_position = "bottom"; } if ($content_tooltip_style == "" || $content_tooltip_style == "ts-simptip-style-black" || $content_tooltip_style == "tooltipster-black") { $content_tooltip_style = "tooltipster-black"; } if ($content_tooltip_style == "ts-simptip-style-gray" || $content_tooltip_style == "tooltipster-gray") { $content_tooltip_style = "tooltipster-gray"; } if ($content_tooltip_style == "ts-simptip-style-green" || $content_tooltip_style == "tooltipster-green") { $content_tooltip_style = "tooltipster-green"; } if ($content_tooltip_style == "ts-simptip-style-blue" || $content_tooltip_style == "tooltipster-blue") { $content_tooltip_style = "tooltipster-blue"; } if ($content_tooltip_style == "ts-simptip-style-red" || $content_tooltip_style == "tooltipster-red") { $content_tooltip_style = "tooltipster-red"; } if ($content_tooltip_style == "ts-simptip-style-orange" || $content_tooltip_style == "tooltipster-orange") { $content_tooltip_style = "tooltipster-orange"; } if ($content_tooltip_style == "ts-simptip-style-yellow" || $content_tooltip_style == "tooltipster-yellow") { $content_tooltip_style = "tooltipster-yellow"; } if ($content_tooltip_style == "ts-simptip-style-purple" || $content_tooltip_style == "tooltipster-purple") { $content_tooltip_style = "tooltipster-purple"; } if ($content_tooltip_style == "ts-simptip-style-pink" || $content_tooltip_style == "tooltipster-pink") { $content_tooltip_style = "tooltipster-pink"; } if ($content_tooltip_style == "ts-simptip-style-white" || $content_tooltip_style == "tooltipster-white") { $content_tooltip_style = "tooltipster-white"; } if ($content_tooltip_css == "false") { if (strlen($content_tooltip_content) != 0) { $popup_tooltipclasses = " ts-has-tooltipster-tooltip"; $popup_tooltipcontent = 'data-tooltipster-html="false" data-tooltipster-title="" data-tooltipster-text="' . strip_tags($content_tooltip_content) . '" data-tooltipster-image="" data-tooltipster-position="' . $content_tooltip_position . '" data-tooltipster-touch="false" data-tooltipster-arrow="true" data-tooltipster-theme="' . $content_tooltip_style . '" data-tooltipster-animation="swing" data-tooltipster-trigger="hover" data-tooltipster-offsetx="' . $tooltipster_offsetx . '" data-tooltipster-offsety="' . $tooltipster_offsety . '"'; } else { $popup_tooltipclasses = ""; $popup_tooltipcontent = ""; } } else { if (strlen($content_tooltip_encoded) != 0) { $popup_tooltipclasses = " ts-has-tooltipster-tooltip"; $popup_tooltipcontent = 'data-tooltipster-html="true" data-tooltipster-title="" data-tooltipster-text="' . strip_tags($content_tooltip_encoded) . '" data-tooltipster-image="" data-tooltipster-position="' . $content_tooltip_position . '" data-tooltipster-touch="false" data-tooltipster-arrow="true" data-tooltipster-theme="' . $content_tooltip_style . '" data-tooltipster-animation="swing" data-tooltipster-trigger="hover" data-tooltipster-offsetx="' . $tooltipster_offsetx . '" data-tooltipster-offsety="' . $tooltipster_offsety . '"'; } else { $popup_tooltipclasses = ""; $popup_tooltipcontent = ""; } } if ($content_image_responsive == "true") { $image_dimensions = 'width: 100%; height: auto;'; $parent_dimensions = 'width: ' . $content_image_width_r . '%; ' . $content_image_height . ''; } else { $image_dimensions = 'width: 100%; height: auto;'; $parent_dimensions = 'width: ' . $content_image_width_f . 'px; ' . $content_image_height . ''; } // Auto-Open Class if ($content_open == "true") { $modal_openclass = "nch-lightbox-open"; if ($content_open_hide == "true") { $modal_hideclass = "nch-lightbox-hide"; } else { $modal_hideclass = ""; } } else { $modal_openclass = "nch-lightbox-html5 no-ajaxy"; $modal_hideclass = ""; } // Backlight Color if ($lightbox_backlight_choice == "predefined") { $lightbox_backlight_selection = $lightbox_backlight_color; } else { $lightbox_backlight_selection = $lightbox_backlight_custom; } $lightbox_dimensions = ' '; if ($lightbox_width == "auto") { $lightbox_dimensions .= ''; } else { if ($lightbox_width == "widthpercent") { $lightbox_dimensions .= 'data-width="' . $lightbox_width_percent . '%" '; } else { if ($lightbox_width == "widthpixel") { $lightbox_dimensions .= 'data-width="' . $lightbox_width_pixel . '" '; } } } if ($lightbox_height == "auto") { $lightbox_dimensions .= ''; } else { if ($lightbox_height == "heightpercent") { $lightbox_dimensions .= 'data-height="' . $lightbox_height_percent . '%" '; } else { if ($lightbox_height == "heightpixel") { $lightbox_dimensions .= 'data-height="' . $lightbox_height_pixel . '" '; } } } $nacho_color .= $lightbox_dimensions; // Video Data if ($video_mp4_source == "true") { $video_url = wp_get_attachment_url($video_mp4_local); } else { $video_url = $video_mp4_remote; } $video_mp4 = $video_url; if ($video_webm_source == "true") { $video_url = wp_get_attachment_url($video_webm_local); } else { $video_url = $video_webm_remote; } $video_webm = $video_url; //$video_webm = pathinfo($video_url, PATHINFO_DIRNAME) . '/' . pathinfo($video_url, PATHINFO_FILENAME) . '.webm'; if ($video_ogg_source == "true") { $video_url = wp_get_attachment_url($video_ogg_local); } else { $video_url = $video_ogg_remote; } $video_ogg = $video_url; //$video_ogg = pathinfo($video_url, PATHINFO_DIRNAME) . '/' . pathinfo($video_url, PATHINFO_FILENAME) . '.ogv'; $poster_image = wp_get_attachment_image_src($video_poster, 'full'); if ($poster_image != false) { $poster_image = $poster_image[0]; } else { $poster_image = TS_VCSC_GetResourceURL("images/defaults/default_html5.jpg"); } if ($video_logo_show != "logonone") { $logo_image = wp_get_attachment_image_src($video_logo_image, 'full'); $logo_image = $logo_image[0]; // Link Values $video_logo_link = $video_logo_link == '||' ? '' : $video_logo_link; $video_logo_link = vc_build_link($video_logo_link); $logo_link_href = $video_logo_link['url']; $logo_link_title = $video_logo_link['title']; $logo_link_target = $video_logo_link['target']; } else { $logo_image = ''; $video_logo_link = ''; $logo_link_href = ''; $logo_link_title = ''; $logo_link_target = ''; } // Frame Border Type if ($frame_border_type != 'none') { $frame_border_type = 'border: ' . $frame_border_width . 'px ' . $frame_border_type . ' ' . $frame_border_color . ';'; } else { $frame_border_type = ''; } // Adjustment for Inline Edit Mode of VC if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VCFrontEditMode == "true") { $video_fixed = 'false'; } else { $video_fixed = $video_fixed; } if ($video_fixed == "true") { $container_adjust = 'margin-top: 0px; margin-bottom: 0px; height: ' . $video_fixed_height . 'px; width: ' . $video_fixed_width . 'px; padding-bottom: 0; padding-top: 0;'; $iframe_adjust = 'height: ' . $video_fixed_height . 'px; width: ' . $video_fixed_width . 'px; padding-bottom: 0; padding-top: 0;'; } else { $container_adjust = 'margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;'; $iframe_adjust = ''; } if ($video_fixed == "true") { if ($video_fixed_position == "bottomleft") { $container_fixed = 'position: fixed; bottom: ' . $video_fixed_adjust . 'px; left: 0; top: auto; right: auto; z-index: 4444;'; $container_remove = 'position: fixed; bottom: ' . ($video_fixed_height - 38 + $video_fixed_adjust) . 'px; left: ' . ($video_fixed_width + 2) . 'px; top: auto; right: auto;'; } else { if ($video_fixed_position == "bottomright") { $container_fixed = 'position: fixed; bottom: ' . $video_fixed_adjust . 'px; left: auto; top: auto; right: 0; z-index: 4444;'; $container_remove = 'position: fixed; bottom: ' . ($video_fixed_height - 38 + $video_fixed_adjust) . 'px; left: auto; top: auto; right: ' . ($video_fixed_width + 2) . 'px;'; } else { if ($video_fixed_position == "topleft") { $container_fixed = 'position: fixed; bottom: auto; left: 0; top: ' . $video_fixed_adjust . 'px; right: auto; z-index: 4444;'; $container_remove = 'position: fixed; bottom: auto; left: ' . ($video_fixed_width + 2) . 'px; top: ' . ($video_fixed_height - 38 + $video_fixed_adjust) . 'px; right: auto;'; } else { if ($video_fixed_position == "topright") { $container_fixed = 'position: fixed; bottom: auto; left: auto; top: ' . $video_fixed_adjust . 'px; right: 0; z-index: 4444;'; $container_remove = 'position: fixed; bottom: auto; left: auto; top: ' . ($video_fixed_height - 38 + $video_fixed_adjust) . 'px; right: ' . ($video_fixed_width + 2) . 'px;'; } } } } $iframe_fixed = 'position: relative;'; } else { $container_fixed = ''; $iframe_fixed = ''; $container_remove = ''; } 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_HTML5_Video', $atts); } else { $css_class = ''; } $output = ''; if ($content_lightbox == "true") { if ($content_trigger == "poster") { if ($popup_tooltipcontent != '') { $output .= '<div class="' . $modal_id . '-parent nch-holder ' . $modal_hideclass . ' ' . $popup_tooltipclasses . '" ' . $popup_tooltipcontent . ' style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; ' . $parent_dimensions . '">'; $output .= '<div id="' . $modal_id . '-trigger" class="' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-modal no-ajaxy nch-lightbox-video ' . $css_class . '" style="width: 100%; height: 100%;">'; } else { $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $modal_hideclass . ' ' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-modal no-ajaxy nch-lightbox-video ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; ' . $parent_dimensions . '">'; } $output .= '<a id="nch-lightbox-trigger-video-' . $randomizer . '" href="#' . $modal_id . '" class="nch-lightbox-trigger ' . $modal_openclass . ' nch-lightbox-trigger-video" data-title="' . $video_title . '" data-open="' . $content_open . '" data-lightbox-size="' . $lightbox_size . '" data-delay="' . $content_open_delay . '" data-type="video" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" data-color="' . $lightbox_backlight_selection . '">'; $output .= '<img src="' . $poster_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $output .= '<div class="nchgrid-caption"></div>'; if (!empty($video_title)) { $output .= '<div class="nchgrid-caption-text">' . $video_title . '</div>'; } $output .= '</a>'; $output .= '</div>'; if ($popup_tooltipcontent != '') { $output .= '</div>'; } } if ($content_trigger == "default") { $modal_image = TS_VCSC_GetResourceURL('images/defaults/default_html5.jpg'); if ($popup_tooltipcontent != '') { $output .= '<div class="' . $modal_id . '-parent nch-holder ' . $modal_hideclass . ' ' . $popup_tooltipclasses . '" ' . $popup_tooltipcontent . ' style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; ' . $parent_dimensions . '">'; $output .= '<div id="' . $modal_id . '-trigger" class="' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-modal no-ajaxy nch-lightbox-video ' . $css_class . '" style="width: 100%; height: 100%;">'; } else { $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $modal_hideclass . ' ' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-modal no-ajaxy nch-lightbox-video ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; ' . $parent_dimensions . '">'; } $output .= '<a id="nch-lightbox-trigger-video-' . $randomizer . '" href="#' . $modal_id . '" class="nch-lightbox-trigger ' . $modal_openclass . ' nch-lightbox-trigger-video" data-title="' . $video_title . '" data-open="' . $content_open . '" data-lightbox-size="' . $lightbox_size . '" data-delay="' . $content_open_delay . '" data-type="video" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" data-color="' . $lightbox_backlight_selection . '">'; $output .= '<img src="' . $modal_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $output .= '<div class="nchgrid-caption"></div>'; if (!empty($video_title)) { $output .= '<div class="nchgrid-caption-text">' . $video_title . '</div>'; } $output .= '</a>'; $output .= '</div>'; if ($popup_tooltipcontent != '') { $output .= '</div>'; } } if ($content_trigger == "image") { $modal_image = wp_get_attachment_image_src($content_image, 'large'); $modal_image = $modal_image[0]; if ($content_image_simple == "false") { if ($popup_tooltipcontent != '') { $output .= '<div class="' . $modal_id . '-parent nch-holder ' . $modal_hideclass . ' ' . $popup_tooltipclasses . '" ' . $popup_tooltipcontent . ' style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; ' . $parent_dimensions . '">'; $output .= '<div id="' . $modal_id . '-trigger" class="' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-modal no-ajaxy nch-lightbox-video ' . $css_class . '" style="width: 100%; height: 100%;">'; } else { $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $modal_hideclass . ' ' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-modal no-ajaxy nch-lightbox-video ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; ' . $parent_dimensions . '">'; } $output .= '<a id="nch-lightbox-trigger-video-' . $randomizer . '" href="#' . $modal_id . '" class="nch-lightbox-trigger ' . $modal_openclass . ' nch-lightbox-trigger-video" data-title="' . $video_title . '" data-open="' . $content_open . '" data-lightbox-size="' . $lightbox_size . '" data-delay="' . $content_open_delay . '" data-type="video" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" data-color="' . $lightbox_backlight_selection . '">'; $output .= '<img src="' . $modal_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $output .= '<div class="nchgrid-caption"></div>'; if (!empty($video_title)) { $output .= '<div class="nchgrid-caption-text">' . $video_title . '</div>'; } $output .= '</a>'; $output .= '</div>'; if ($popup_tooltipcontent != '') { $output .= '</div>'; } } else { $output .= '<a id="nch-lightbox-trigger-video-' . $randomizer . '" href="#' . $modal_id . '" class="' . $modal_id . '-parent nch-holder nch-lightbox ' . $popup_tooltipclasses . ' nch-lightbox-trigger-video" ' . $popup_tooltipcontent . ' style="' . $parent_dimensions . '" data-lightbox-size="' . $lightbox_size . '" data-title="' . $video_title . '" data-type="video" rel="' . ($lightbox_group == "true" ? "nachogroup" : $lightbox_group) . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" data-color="' . $lightbox_backlight_selection . '">'; $output .= '<img class="" src="' . $modal_image . '" style="display: block; ' . $image_dimensions . '">'; $output .= '</a>'; } } if ($content_trigger == "icon") { $icon_style = 'color: ' . $content_iconcolor . '; width:' . $content_iconsize . 'px; height:' . $content_iconsize . 'px; font-size:' . $content_iconsize . 'px; line-height:' . $content_iconsize . 'px;'; $output .= '<div id="' . $modal_id . '-trigger" style="" class="' . $modal_id . '-parent nch-holder ts-vcsc-font-icon ts-font-icons ts-shortcode ts-icon-align-center ' . $el_class . ' ' . $css_class . ' ' . $popup_tooltipclasses . '" ' . $popup_tooltipcontent . ' style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<a id="nch-lightbox-trigger-video-' . $randomizer . '" href="#' . $modal_id . '" class="' . $modal_openclass . ' nch-lightbox-trigger-video" data-title="' . $video_title . '" data-open="' . $content_open . '" data-lightbox-size="' . $lightbox_size . '" data-delay="' . $content_open_delay . '" data-type="video" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" data-color="' . $lightbox_backlight_selection . '">'; $output .= '<i class="ts-font-icon ' . $content_icon . '" style="' . $icon_style . '"></i>'; $output .= '</a>'; $output .= '</div>'; } if ($content_trigger == "flat" || $content_trigger == "flaticon") { wp_enqueue_style('ts-extend-buttonsdual'); $button_style = $content_buttonstyle . ' ' . $content_buttonhover; $output .= '<a id="nch-lightbox-trigger-video-' . $randomizer . '" href="#' . $modal_id . '" class="ts-dual-buttons-wrapper ' . $modal_openclass . ' nch-lightbox-trigger-video" data-title="' . $video_title . '" data-open="' . $content_open . '" data-lightbox-size="' . $lightbox_size . '" data-delay="' . $content_open_delay . '" data-type="video" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" data-color="' . $lightbox_backlight_selection . '">'; $output .= '<div id="' . $modal_id . '-trigger" class="ts-dual-buttons-container clearFixMe ' . $button_style . ' ' . $modal_id . '-parent nch-holder ' . $modal_hideclass . ' ' . $el_class . ' ' . $popup_tooltipclasses . ' ' . $css_class . '" ' . $popup_tooltipcontent . ' style="display: block; width: 100%; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; if ($content_icon != '' && $content_icon != 'transparent' && $content_trigger == "flaticon") { $output .= '<i class="ts-dual-buttons-icon ' . $content_icon . '" style="font-size: ' . $content_buttonsize . 'px; line-height: ' . $content_buttonsize . 'px;"></i>'; } $output .= '<span class="ts-dual-buttons-title" style="font-size: ' . $content_buttonsize . 'px; line-height: ' . $content_buttonsize . 'px;">' . $content_buttontext . '</span>'; $output .= '</div>'; $output .= '</a>'; } if ($content_trigger == "winged") { $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $modal_hideclass . ' ' . $el_class . ' ' . $popup_tooltipclasses . ' ' . $css_class . '" ' . $popup_tooltipcontent . ' style="display: block; width: 100%; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<div class="ts-lightbox-button-1 clearFixMe">'; $output .= '<div class="top">' . $video_title . '</div>'; $output .= '<div class="bottom">' . $content_subtitle . '</div>'; $output .= '<a id="nch-lightbox-trigger-video-' . $randomizer . '" href="#' . $modal_id . '" class="icon ' . $modal_openclass . ' nch-lightbox-trigger-video" data-open="' . $content_open . '" data-lightbox-size="' . $lightbox_size . '" data-delay="' . $content_open_delay . '" data-type="video" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" data-color="' . $lightbox_backlight_selection . '"><span class="popup">' . $content_buttontext . '</span></a>'; $output .= '</div>'; $output .= '</div>'; } if ($content_trigger == "simple") { $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $modal_hideclass . ' ' . $el_class . ' ' . $popup_tooltipclasses . ' ' . $css_class . '" ' . $popup_tooltipcontent . ' style="display: block; width: 100%; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<a id="nch-lightbox-trigger-video-' . $randomizer . '" href="#' . $modal_id . '" class="ts-lightbox-button-2 icon ' . $modal_openclass . ' nch-lightbox-trigger-video" data-open="' . $content_open . '" data-lightbox-size="' . $lightbox_size . '" data-delay="' . $content_open_delay . '" data-type="video" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" data-color="' . $lightbox_backlight_selection . '"><span class="popup">' . $content_buttontext . '</span></a>'; $output .= '</div>'; } if ($content_trigger == "text") { $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $modal_hideclass . ' ' . $el_class . ' ' . $css_class . '" style="text-align: center; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<a id="nch-lightbox-trigger-video-' . $randomizer . '" href="#' . $modal_id . '" class="' . $popup_tooltipclasses . ' ' . $modal_openclass . ' nch-lightbox-trigger-video" ' . $popup_tooltipcontent . ' data-open="' . $content_open . '" data-lightbox-size="' . $lightbox_size . '" data-delay="' . $content_open_delay . '" data-type="video" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" data-color="' . $lightbox_backlight_selection . '">' . $content_text . '</a>'; $output .= '</div>'; } if ($content_trigger == "custom") { if ($content_raw != "") { $content_raw = rawurldecode(base64_decode(strip_tags($content_raw))); $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $modal_hideclass . ' ' . $el_class . ' ' . $css_class . '" style="text-align: center; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<a id="nch-lightbox-trigger-video-' . $randomizer . '" href="#' . $modal_id . '" class="' . $popup_tooltipclasses . ' ' . $modal_openclass . ' nch-lightbox-trigger-video" ' . $popup_tooltipcontent . ' data-open="' . $content_open . '" data-lightbox-size="' . $lightbox_size . '" data-delay="' . $content_open_delay . '" data-type="video" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" data-color="' . $lightbox_backlight_selection . '">'; $output .= $content_raw; $output .= '</a>'; $output .= '</div>'; } } // Create hidden DIV with Modal Content $output .= '<div id="' . $modal_id . '" class="ts-modal-content nch-hide-if-javascript" style="display: none;">'; $output .= '<div class="ts-modal-white-header"></div>'; $output .= '<div class="ts-modal-white-frame">'; $output .= '<div class="ts-modal-white-inner">'; $output .= '<div id="' . $modal_id . '_video" class="ts_video_container ts_html5_video_frame" style="' . $frame_border_type . '">'; $output .= '<iframe id="' . $modal_id . '_iframe" class="ts_html5_video_frame_insert ts_html5_media_frame_insert" style="margin: 0 auto;" onload="" data-id="projekktor' . $randomizer . '" data-theme="' . $video_theme . '" data-holder="' . $modal_id . '_iframe" data-auto-play="' . $video_auto . '" data-auto-stop="' . $video_stop . '" data-repeat="' . $video_loop . '" data-fullscreen="' . $video_fullscreen . '" data-poster="' . $poster_image . '" data-posterfit="' . $video_posterfit . '" data-title="' . $video_title . '" data-objectfit="' . $video_objectfit . '" data-logo-show="' . $video_logo_show . '" data-logo-image="' . $logo_image . '" data-logo-height="' . $video_logo_height . '" data-logo-opacity="' . $video_logo_opacity . '" data-logo-position="' . $video_logo_position . '" data-logo-url="' . $logo_link_href . '" data-logo-title="' . $logo_link_title . '" data-logo-target="' . $logo_link_target . '" data-video-mp4="' . $video_mp4 . '" data-video-webm="' . $video_webm . '" data-video-ogg="' . $video_ogg . '" data-volume="' . $video_volume . '" data-lightbox="' . $content_lightbox . '" data-share="' . $video_share . '" data-fallback="' . TS_VCSC_GetResourceURL("projekktor/swf/StrobeMediaPlayback/StrobeMediaPlayback.swf") . '" data-lightbox="' . $content_lightbox . '" data-screen-size="' . $lightbox_size . '" width="100%" height="auto" scrolling="no" frameborder="0" type="text/html" mozallowfullscreen="mozallowfullscreen" webkitallowfullscreen="webkitallowfullscreen" allowfullscreen="allowfullscreen" src="' . TS_VCSC_GetResourceURL("projekktor/iframe-video.html") . '"> </iframe>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; } else { if ($video_fixed == "true") { if ($video_fixed_switch == "remove") { $output .= '<div id="' . $modal_id . '_remove" class="ts_html5_video_remove" data-player="' . $modal_id . '_video" data-position="' . $video_fixed_position . '" data-width="' . $video_fixed_width . '" data-adjust="' . $video_fixed_adjust . '" style="' . $container_remove . '"></div>'; } else { if ($video_fixed_switch == "toggle") { $output .= '<div id="' . $modal_id . '_hide" class="ts_html5_video_hide inactive ' . $video_fixed_position . '" data-show="' . $video_fixed_show . '" data-player="' . $modal_id . '_video" data-position="' . $video_fixed_position . '" data-width="' . $video_fixed_width . '" data-adjust="' . $video_fixed_adjust . '" style="' . $container_remove . '"></div>'; } } } $output .= '<div id="' . $modal_id . '_video" class="ts_video_container ts_html5_video_frame ' . ($video_fixed == 'true' ? 'ts_html5_video_fixed_' . $video_fixed_position : '') . ' ' . $el_class . ' ' . $css_class . '" style="' . $frame_border_type . ' ' . $container_adjust . ' ' . $container_fixed . '">'; $output .= '<iframe id="' . $modal_id . '_iframe" class="ts_html5_video_frame_insert ts_html5_media_frame_insert" style="margin: 0 auto; ' . $iframe_adjust . ' ' . $iframe_fixed . '" onload="" data-id="projekktor' . $randomizer . '" data-theme="' . $video_theme . '" data-holder="' . $modal_id . '_iframe" data-auto-play="' . $video_auto . '" data-auto-stop="' . $video_stop . '" data-repeat="' . $video_loop . '" data-fullscreen="' . $video_fullscreen . '" data-poster="' . $poster_image . '" data-posterfit="' . $video_posterfit . '" data-title="' . $video_title . '" data-objectfit="' . $video_objectfit . '" data-logo-show="' . $video_logo_show . '" data-logo-image="' . $logo_image . '" data-logo-height="' . $video_logo_height . '" data-logo-opacity="' . $video_logo_opacity . '" data-logo-position="' . $video_logo_position . '" data-logo-url="' . $logo_link_href . '" data-logo-title="' . $logo_link_title . '" data-logo-target="' . $logo_link_target . '" data-video-mp4="' . $video_mp4 . '" data-video-webm="' . $video_webm . '" data-video-ogg="' . $video_ogg . '" data-volume="' . $video_volume . '" data-lightbox="' . $content_lightbox . '" data-screen-size="' . $lightbox_size . '" data-share="' . $video_share . '" data-fallback="' . TS_VCSC_GetResourceURL("projekktor/swf/StrobeMediaPlayback/StrobeMediaPlayback.swf") . '" width="100%" height="auto" scrolling="no" frameborder="0" type="text/html" mozallowfullscreen="mozallowfullscreen" webkitallowfullscreen="webkitallowfullscreen" allowfullscreen="allowfullscreen" src="' . TS_VCSC_GetResourceURL("projekktor/iframe-video.html") . '"> </iframe>'; $output .= '</div>'; } echo $output; $myvariable = ob_get_clean(); return $myvariable; }
function TS_VCSC_GetCSSAnimation($css_animation) { $output = ''; if (get_option('ts_vcsc_extend_settings_loadHeader', 0) == 0) { $FOOTER = true; } else { $FOOTER = false; } if ($css_animation != '') { if (get_option('ts_vcsc_extend_settings_loadWaypoints', 1) == 1) { if (wp_script_is('waypoints', $list = 'registered')) { wp_enqueue_script('waypoints'); } else { wp_enqueue_script('ts-extend-waypoints', TS_VCSC_GetResourceURL('js/jquery.vcsc.waypoints.min.js'), array('jquery'), false, $FOOTER); } } $output = ' wpb_animate_when_almost_visible wpb_' . $css_animation; } return $output; }
function TS_VCSC_IFrame_Function($atts, $content = null) { global $VISUAL_COMPOSER_EXTENSIONS; ob_start(); wp_enqueue_script('ts-extend-hammer'); wp_enqueue_script('ts-extend-nacho'); wp_enqueue_style('ts-extend-nacho'); if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_LoadFrontEndForcable == "false") { wp_enqueue_style('ts-extend-tooltipster'); wp_enqueue_script('ts-extend-tooltipster'); 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('content_image_responsive' => 'true', 'content_image_width_r' => 100, 'content_image_width_f' => 300, 'content_image_size' => 'large', 'iframe_width' => 'auto', 'iframe_width_percent' => 100, 'iframe_width_pixel' => 1024, 'iframe_height' => 'auto', 'iframe_height_pixel' => 400, 'iframe_transparency' => 'true', 'lightbox_width' => 'auto', 'lightbox_width_percent' => 100, 'lightbox_width_pixel' => 1024, 'lightbox_height' => 'auto', 'lightbox_height_percent' => 100, 'lightbox_height_pixel' => 400, 'border_type' => '', 'border_thick' => 1, 'border_color' => '#000000', 'iframefullwidth' => 'false', 'breakouts' => 6, 'lightbox_group_name' => '', 'lightbox_size' => 'full', 'lightbox_effect' => 'random', 'lightbox_speed' => 5000, 'lightbox_social' => 'true', 'lightbox_backlight_auto' => 'true', 'lightbox_backlight_color' => '#ffffff', 'content_lightbox' => 'false', 'content_iframe' => '', 'content_iframe_trigger' => 'preview', 'content_iframe_title' => '', 'content_iframe_subtitle' => '', 'content_iframe_image' => '', 'content_iframe_image_simple' => 'false', 'content_iframe_icon' => '', 'content_iframe_iconsize' => 30, 'content_iframe_iconcolor' => '#cccccc', 'content_iframe_button' => '', 'content_iframe_buttonstyle' => 'ts-dual-buttons-color-sun-flower', 'content_iframe_buttonhover' => 'ts-dual-buttons-preview-default ts-dual-buttons-hover-default', 'content_iframe_buttontext' => '', 'content_iframe_buttonsize' => 16, 'content_iframe_buttontext' => '', 'content_iframe_text' => '', 'content_raw' => '', 'content_tooltip_css' => 'true', 'content_tooltip_content' => '', 'content_tooltip_position' => 'ts-simptip-position-top', 'content_tooltip_style' => '', 'tooltipster_offsetx' => 0, 'tooltipster_offsety' => 0, 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); if (!empty($el_id)) { $modal_id = $el_id; } else { $modal_id = 'ts-vcsc-iframe-' . mt_rand(999999, 9999999); } // Check for Front End Editor if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VCFrontEditMode == "true") { $editor_frontend = "true"; } else { $editor_frontend = "false"; } // Tooltip if ($content_tooltip_position == "ts-simptip-position-top" || $content_tooltip_position == "top") { $content_tooltip_position = "top"; } if ($content_tooltip_position == "ts-simptip-position-left" || $content_tooltip_position == "left") { $content_tooltip_position = "left"; } if ($content_tooltip_position == "ts-simptip-position-right" || $content_tooltip_position == "right") { $content_tooltip_position = "right"; } if ($content_tooltip_position == "ts-simptip-position-bottom" || $content_tooltip_position == "bottom") { $content_tooltip_position = "bottom"; } $tooltipclasses = 'ts-has-tooltipster-tooltip'; if ($content_tooltip_style == "" || $content_tooltip_style == "ts-simptip-style-black" || $content_tooltip_style == "tooltipster-black") { $content_tooltip_style = "tooltipster-black"; } if ($content_tooltip_style == "ts-simptip-style-gray" || $content_tooltip_style == "tooltipster-gray") { $content_tooltip_style = "tooltipster-gray"; } if ($content_tooltip_style == "ts-simptip-style-green" || $content_tooltip_style == "tooltipster-green") { $content_tooltip_style = "tooltipster-green"; } if ($content_tooltip_style == "ts-simptip-style-blue" || $content_tooltip_style == "tooltipster-blue") { $content_tooltip_style = "tooltipster-blue"; } if ($content_tooltip_style == "ts-simptip-style-red" || $content_tooltip_style == "tooltipster-red") { $content_tooltip_style = "tooltipster-red"; } if ($content_tooltip_style == "ts-simptip-style-orange" || $content_tooltip_style == "tooltipster-orange") { $content_tooltip_style = "tooltipster-orange"; } if ($content_tooltip_style == "ts-simptip-style-yellow" || $content_tooltip_style == "tooltipster-yellow") { $content_tooltip_style = "tooltipster-yellow"; } if ($content_tooltip_style == "ts-simptip-style-purple" || $content_tooltip_style == "tooltipster-purple") { $content_tooltip_style = "tooltipster-purple"; } if ($content_tooltip_style == "ts-simptip-style-pink" || $content_tooltip_style == "tooltipster-pink") { $content_tooltip_style = "tooltipster-pink"; } if ($content_tooltip_style == "ts-simptip-style-white" || $content_tooltip_style == "tooltipster-white") { $content_tooltip_style = "tooltipster-white"; } if ($content_tooltip_css == "true" && strlen($content_tooltip_content) != 0) { $Tooltip_Content = 'data-tooltipster-html="false" data-tooltipster-title="" data-tooltipster-text="' . str_replace('<br/>', ' ', $content_tooltip_content) . '" data-tooltipster-image="" data-tooltipster-position="' . $content_tooltip_position . '" data-tooltipster-touch="false" data-tooltipster-arrow="true" data-tooltipster-theme="' . $content_tooltip_style . '" data-tooltipster-animation="swing" data-tooltipster-trigger="hover" data-tooltipster-offsetx="' . $tooltipster_offsetx . '" data-tooltipster-offsety="' . $tooltipster_offsety . '"'; $Tooltip_Class = $tooltipclasses; } else { $Tooltip_Class = ""; if (strlen($content_tooltip_content) != 0) { $Tooltip_Content = ' title="' . $content_tooltip_content . '"'; } else { $Tooltip_Content = ""; } } if ($lightbox_backlight_auto == "false") { $nacho_color = 'data-backlight="' . $lightbox_backlight_color . '"'; } else { $nacho_color = ''; } if ($content_image_responsive == "true") { $image_dimensions = 'width: 100%; height: auto;'; $parent_dimensions = 'width: ' . $content_image_width_r . '%; height: 100%;'; } else { $image_dimensions = 'width: 100%; height: auto;'; $parent_dimensions = 'width: ' . $content_image_width_f . 'px; height: 100%;'; } 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-IFrame', $atts); } else { $css_class = ''; } $output = ''; if ($content_lightbox == "true") { $lightbox_dimensions = ' '; if ($lightbox_width == "auto") { $lightbox_dimensions .= ''; } else { if ($lightbox_width == "widthpercent") { $lightbox_dimensions .= 'data-width="' . $lightbox_width_percent . '%" '; } else { if ($lightbox_width == "widthpixel") { $lightbox_dimensions .= 'data-width="' . $lightbox_width_pixel . '" '; } } } if ($lightbox_height == "auto") { $lightbox_dimensions .= ''; } else { if ($lightbox_height == "heightpercent") { $lightbox_dimensions .= 'data-height="' . $lightbox_height_percent . '%" '; } else { if ($lightbox_height == "heightpixel") { $lightbox_dimensions .= 'data-height="' . $lightbox_height_pixel . '" '; } } } if ($content_iframe_trigger == "default") { $modal_image = TS_VCSC_GetResourceURL('images/defaults/default_iframe.jpg'); if ($Tooltip_Content != '') { $output .= '<div class="' . $modal_id . '-parent nch-holder ' . $Tooltip_Class . '" ' . $Tooltip_Content . ' style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; ' . $parent_dimensions . '">'; $output .= '<div id="' . $modal_id . '" class="' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-iframe ' . $css_class . '" style="width: 100%; height: 100%;">'; } else { $output .= '<div id="' . $modal_id . '" class="' . $modal_id . '-parent nch-holder ' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-iframe ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; ' . $parent_dimensions . '">'; } $output .= '<a href="' . $content_iframe . '" class="nch-lightbox-media" ' . $lightbox_dimensions . ' data-title="' . $content_iframe_title . '" data-type="iframe" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '>'; $output .= '<img src="' . $modal_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $output .= '<div class="nchgrid-caption"></div>'; if (!empty($content_iframe_title)) { $output .= '<div class="nchgrid-caption-text">' . $content_iframe_title . '</div>'; } $output .= '</a>'; $output .= '</div>'; if ($Tooltip_Content != '') { $output .= '</div>'; } } if ($content_iframe_trigger == "image") { $modal_image = wp_get_attachment_image_src($content_iframe_image, 'large'); $modal_image = $modal_image[0]; if ($content_iframe_image_simple == "false") { if ($Tooltip_Content != '') { $output .= '<div class="' . $modal_id . '-parent nch-holder ' . $Tooltip_Class . '" ' . $Tooltip_Content . ' style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; ' . $parent_dimensions . '">'; $output .= '<div id="' . $modal_id . '" class="' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-iframe ' . $css_class . '" style="width: 100%; height: 100%;">'; } else { $output .= '<div id="' . $modal_id . '" class="' . $modal_id . '-parent nch-holder ' . $el_class . ' nchgrid-item nchgrid-tile nch-lightbox-iframe ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; ' . $parent_dimensions . '">'; } $output .= '<a href="' . $content_iframe . '" class="nch-lightbox-media" ' . $lightbox_dimensions . ' data-title="' . $content_iframe_title . '" data-type="iframe" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '>'; $output .= '<img src="' . $modal_image . '" title="" style="display: block; ' . $image_dimensions . '">'; $output .= '<div class="nchgrid-caption"></div>'; if (!empty($content_iframe_title)) { $output .= '<div class="nchgrid-caption-text">' . $content_iframe_title . '</div>'; } $output .= '</a>'; $output .= '</div>'; if ($Tooltip_Content != '') { $output .= '</div>'; } } else { $output .= '<a href="' . $content_iframe . '" class="' . $modal_id . '-parent nch-holder nch-lightbox-media ' . $Tooltip_Class . '" ' . $Tooltip_Content . ' style="' . $parent_dimensions . '" ' . $iframe_dimensions . ' data-title="' . $content_iframe_title . '" data-type="iframe" rel="' . ($lightbox_group == "true" ? "nachogroup" : $lightbox_group) . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '>'; $output .= '<img class="" src="' . $modal_image . '" style="display: block; ' . $image_dimensions . '">'; $output .= '</a>'; } } if ($content_iframe_trigger == "icon") { $icon_style = 'color: ' . $content_iframe_iconcolor . '; width:' . $content_iframe_iconsize . 'px; height:' . $content_iframe_iconsize . 'px; font-size:' . $content_iframe_iconsize . 'px; line-height:' . $content_iframe_iconsize . 'px;'; $output .= '<div id="' . $modal_id . '" style="" class="' . $modal_id . '-parent nch-holder ts-vcsc-font-icon ts-font-icons ts-shortcode ts-icon-align-center ' . $el_class . ' ' . $css_class . ' ' . $Tooltip_Class . '" ' . $Tooltip_Content . ' style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<a class="ts-font-icons-link nch-lightbox-media" href="' . $content_iframe . '" target="_blank" ' . $lightbox_dimensions . ' data-title="' . $content_iframe_title . '" data-type="iframe" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '>'; $output .= '<i class="ts-font-icon ' . $content_iframe_icon . '" style="' . $icon_style . '"></i>'; $output .= '</a>'; $output .= '</div>'; } if ($content_iframe_trigger == "flat" || $content_iframe_trigger == "flaticon") { wp_enqueue_style('ts-extend-buttonsdual'); $button_style = $content_iframe_buttonstyle . ' ' . $content_iframe_buttonhover; $output .= '<a id="' . $modal_id . '" class="ts-dual-buttons-wrapper nch-lightbox-media ' . $css_class . ' ' . $el_class . '" href="' . $content_iframe . '" target="_blank" data-title="' . $content_iframe_title . '" data-type="iframe" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '>'; $output .= '<div id="' . $modal_id . '-trigger" class="ts-dual-buttons-container clearFixMe ' . $button_style . ' ' . $modal_id . '-parent nch-holder ' . $Tooltip_Class . '" ' . $Tooltip_Content . ' style="display: block; width: 100%; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; if ($content_iframe_icon != '' && $content_iframe_icon != 'transparent' && $content_iframe_trigger == "flaticon") { $output .= '<i class="ts-dual-buttons-icon ' . $content_iframe_icon . '" style="font-size: ' . $content_iframe_buttonsize . 'px; line-height: ' . $content_iframe_buttonsize . 'px;"></i>'; } $output .= '<span class="ts-dual-buttons-title" style="font-size: ' . $content_iframe_buttonsize . 'px; line-height: ' . $content_iframe_buttonsize . 'px;">' . $content_iframe_buttontext . '</span>'; $output .= '</div>'; $output .= '</a>'; } if ($content_iframe_trigger == "winged") { $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $el_class . ' ' . $css_class . '" style="display: block; width: 100%; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<div class="ts-lightbox-button-1 clearFixMe">'; $output .= '<div class="top">' . $content_iframe_title . '</div>'; $output .= '<div class="bottom">' . $content_iframe_subtitle . '</div>'; $output .= '<a href="' . $content_iframe . '" class="nch-lightbox-media icon" ' . $lightbox_dimensions . ' data-title="' . $content_iframe_title . '" data-type="iframe" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '><span class="iframe">' . $content_iframe_buttontext . '</span></a>'; $output .= '</div>'; $output .= '</div>'; } if ($content_iframe_trigger == "simple") { $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $el_class . ' ' . $Tooltip_Class . ' ' . $css_class . '" ' . $Tooltip_Content . ' style="display: block; width: 100%; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<a href="' . $content_iframe . '" class="ts-lightbox-button-2 icon nch-lightbox-media" ' . $lightbox_dimensions . ' data-title="' . $content_iframe_title . '" data-type="iframe" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" ' . $nacho_color . '><span class="iframe">' . $content_iframe_buttontext . '</span></a>'; $output .= '</div>'; } if ($content_iframe_trigger == "text") { $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $el_class . ' ' . $css_class . ' ' . $Tooltip_Class . '" ' . $Tooltip_Content . ' style="text-align: center; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<a href="' . $content_iframe . '" class="nch-lightbox-media" ' . $lightbox_dimensions . ' data-title="' . $content_iframe_title . '" data-type="iframe" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" ' . $nacho_color . ' target="_blank">' . $content_iframe_text . '</a>'; $output .= '</div>'; } if ($content_iframe_trigger == "custom") { if ($content_raw != "") { $content_raw = rawurldecode(base64_decode(strip_tags($content_raw))); $output .= '<div id="' . $modal_id . '-trigger" class="' . $modal_id . '-parent nch-holder ' . $el_class . ' ' . $css_class . ' ' . $Tooltip_Class . '" ' . $Tooltip_Content . ' style="text-align: center; margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<a href="' . $content_iframe . '" class="nch-lightbox-media" ' . $lightbox_dimensions . ' data-title="' . $content_iframe_title . '" data-type="iframe" rel="' . $lightbox_group_name . '" data-effect="' . $lightbox_effect . '" data-share="0" data-duration="' . $lightbox_speed . '" ' . $nacho_color . 'style="" target="_blank">'; $output .= $content_raw; $output .= '</a>'; $output .= '</div>'; } } } else { $iframe_dimensions = ''; if ($iframe_width == "auto") { $iframe_dimensions .= ''; $iframe_width_set = '100%'; } else { if ($iframe_width == "widthpercent") { $iframe_dimensions .= 'width: ' . $iframe_width_percent . '%; '; $iframe_width_set = '' . $iframe_width_percent . '%'; } else { if ($iframe_width == "widthpixel") { $iframe_dimensions .= 'width: ' . $iframe_width_pixel . 'px; '; $iframe_width_set = '' . $iframe_width_pixel . ''; } } } if ($iframe_height == "auto") { $iframe_dimensions .= ''; $iframe_height_set = 'auto'; $iframe_height_parent = ''; } else { if ($iframe_height == "heightpixel") { $iframe_dimensions .= 'height: ' . $iframe_height_pixel . 'px; '; $iframe_height_set = '' . $iframe_height_pixel . 'px'; $iframe_height_parent = 'height: ' . $iframe_height_pixel . 'px; padding: 0;'; } } if ($border_type != "") { $border_style = 'border: ' . $border_thick . 'px ' . $border_type . ' ' . $border_color . ';'; } else { $border_style = ''; } if ($iframe_transparency == "true") { $iframe_transparent = 'transparent'; } else { $iframe_transparent = ''; } $output .= '<div id="' . $modal_id . '-parent" class="ts-iframe-container ' . ($iframefullwidth == "true" ? "ts-iframe-full-frame" : "") . ' ' . $Tooltip_Class . '" ' . $Tooltip_Content . ' data-break-parents="' . $breakouts . '" data-inline="' . $editor_frontend . '" data-border="' . ($border_type != '' ? $border_thick : 0) . '" style="' . $iframe_height_parent . ' ' . $border_style . ' margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<iframe id="' . $modal_id . '" class="' . $iframe_transparent . ' ' . $el_class . ' ' . $css_class . '" src="' . $content_iframe . '" style="' . $iframe_dimensions . '" width="' . $iframe_width_set . '" height="' . $iframe_height_set . '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'; $output .= '</div>'; } echo $output; $myvariable = ob_get_clean(); return $myvariable; }
function TS_VCSC_Add_Circle_Loop_Elements() { global $VISUAL_COMPOSER_EXTENSIONS; // Add Single Circle Step Item if (function_exists('vc_map')) { vc_map(array("name" => __("TS Circle Steps Item", "ts_visual_composer_extend"), "base" => "TS_VCSC_Circle_Steps_Item", "icon" => "icon-wpb-ts_vcsc_circle_steps_item", "class" => "", "content_element" => true, "as_child" => array('only' => 'TS_VCSC_Circle_Steps_Container'), "category" => __('VC Extensions', "ts_visual_composer_extend"), "description" => __("Place a single circle steps item", "ts_visual_composer_extend"), "admin_enqueue_js" => "", "admin_enqueue_css" => "", "js_view" => "TS_VCSC_CircleStepSingleViewCustom", "front_enqueue_js" => preg_replace('/\\s/', '%20', TS_VCSC_GetResourceURL('/js/frontend/ts-vcsc-frontend-circlestep-single.min.js')), "params" => array(array("type" => "seperator", "heading" => __("", "ts_visual_composer_extend"), "param_name" => "seperator_1", "value" => "", "seperator" => "Icon Settings", "description" => __("", "ts_visual_composer_extend")), array("type" => "switch_button", "heading" => __("Use Normal Image", "ts_visual_composer_extend"), "param_name" => "step_replace", "value" => "false", "on" => __('Yes', "ts_visual_composer_extend"), "off" => __('No', "ts_visual_composer_extend"), "style" => "select", "design" => "toggle-light", "admin_label" => true, "description" => __("Switch the toggle to either use an icon or a normal image.", "ts_visual_composer_extend"), "dependency" => ""), array('type' => $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_IconSelectorType, 'heading' => __('Icon', 'ts_visual_composer_extend'), 'param_name' => 'step_icon', 'value' => '', 'source' => $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_IconSelectorValue, 'settings' => array('emptyIcon' => false, 'type' => 'extensions', 'iconsPerPage' => $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_IconSelectorPager, 'source' => $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_IconSelectorSource), "admin_label" => true, "description" => $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_EditorVisualSelector == "true" ? __("Select the icon for the tab.", "ts_visual_composer_extend") : $VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_IconSelectorString, "dependency" => array('element' => "step_replace", 'value' => 'false')), array("type" => "attach_image", "heading" => __("Select Image", "ts_visual_composer_extend"), "param_name" => "step_image", "value" => "", "admin_label" => true, "description" => __("Image must have equal dimensions for scaling purposes (i.e. 100x100).", "ts_visual_composer_extend"), "dependency" => array('element' => "step_replace", 'value' => 'true')), array("type" => "colorpicker", "heading" => __("Icon: Color", "ts_visual_composer_extend"), "param_name" => "icon_color_default", "value" => "#CCCCCC", "description" => __("Define the color for the icon.", "ts_visual_composer_extend"), "dependency" => array('element' => "step_replace", 'value' => 'false')), array("type" => "colorpicker", "heading" => __("Icon: Background", "ts_visual_composer_extend"), "param_name" => "icon_back_default", "value" => "#FFFFFF", "description" => __("Define the background color for the icon or image.", "ts_visual_composer_extend")), array("type" => "colorpicker", "heading" => __("Icon: Border", "ts_visual_composer_extend"), "param_name" => "icon_border_default", "value" => "#636363", "description" => __("Define the border color for the icon or image.", "ts_visual_composer_extend")), array("type" => "colorpicker", "heading" => __("Icon: Shadow", "ts_visual_composer_extend"), "param_name" => "icon_shadow_default", "value" => "rgba(99, 99, 99, 0.25)", "description" => __("Define the shadow color for the icon or image.", "ts_visual_composer_extend")), array("type" => "dropdown", "heading" => __("Tooltip Source", "ts_visual_composer_extend"), "param_name" => "tooltip_source", "width" => 150, "value" => array(__("Use Step Title", "ts_visual_composer_extend") => "title", __("Enter Custom Tooltip", "ts_visual_composer_extend") => "custom", __("No Tooltip", "ts_visual_composer_extend") => "none"), "admin_label" => true, "description" => __("Select if and what type of tooltip should be used for the circle step.", "ts_visual_composer_extend")), array("type" => "textarea_raw_html", "class" => "", "heading" => __("Tooltip Content", "ts_visual_composer_extend"), "param_name" => "tooltip_content", "value" => base64_encode(""), "description" => __("Enter the tooltip that should be used for the circle step; HTML code can be used.", "ts_visual_composer_extend"), "dependency" => array('element' => "tooltip_source", 'value' => 'custom')), array("type" => "seperator", "heading" => __("", "ts_visual_composer_extend"), "param_name" => "seperator_2", "value" => "", "seperator" => "Title Settings", "description" => __("", "ts_visual_composer_extend"), "group" => "Step Content"), array('type' => 'textfield', 'heading' => __('Title', 'ts_visual_composer_extend'), 'param_name' => 'step_title', "admin_label" => true, 'description' => __('Provide a title or name for this step element.', 'ts_visual_composer_extend'), "group" => "Step Content"), array("type" => "colorpicker", "heading" => __("Title Font Color", "ts_visual_composer_extend"), "param_name" => "title_color", "value" => "#4E4E4E", "description" => __("Define the font color for the title.", "ts_visual_composer_extend"), "group" => "Step Content"), array("type" => "nouislider", "heading" => __("Title Font Size", "ts_visual_composer_extend"), "param_name" => "title_size", "value" => "26", "min" => "16", "max" => "60", "step" => "1", "unit" => 'px', "description" => __("Define the font size for the title.", "ts_visual_composer_extend"), "group" => "Step Content"), array("type" => "dropdown", "heading" => __("Title Font Weight", "ts_visual_composer_extend"), "param_name" => "title_weight", "width" => 150, "value" => array(__('Normal', "ts_visual_composer_extend") => "normal", __('Bold', "ts_visual_composer_extend") => "bold", __('Bolder', "ts_visual_composer_extend") => "bolder", __('Light', "ts_visual_composer_extend") => "300", __('Lighter', "ts_visual_composer_extend") => "100"), "std" => "300", "default" => "300", "description" => __("Select the font weight for the title text.", "ts_visual_composer_extend"), "group" => "Step Content"), array("type" => "dropdown", "heading" => __("Title Align", "ts_visual_composer_extend"), "param_name" => "title_align", "width" => 150, "value" => array(__("Center", "ts_visual_composer_extend") => "center", __("Left", "ts_visual_composer_extend") => "left", __("Right", "ts_visual_composer_extend") => "right", __("Justify", "ts_visual_composer_extend") => "justify"), "std" => "center", "default" => "center", "description" => __("Select how the title text should be aligned.", "ts_visual_composer_extend"), "group" => "Step Content"), array("type" => "seperator", "heading" => __("", "ts_visual_composer_extend"), "param_name" => "seperator_3", "value" => "", "seperator" => "Content Settings", "description" => __("", "ts_visual_composer_extend"), "group" => "Step Content"), array("type" => "textarea_html", "class" => "", "heading" => __("Content", "ts_visual_composer_extend"), "param_name" => "content", "value" => "", "description" => __("Create the content for this step element.", "ts_visual_composer_extend"), "group" => "Step Content"), array("type" => "colorpicker", "heading" => __("Content Font Color", "ts_visual_composer_extend"), "param_name" => "content_color", "value" => "#6C6C6C", "description" => __("Define the font color for the content.", "ts_visual_composer_extend"), "group" => "Step Content"), array("type" => "nouislider", "heading" => __("Content Font Size", "ts_visual_composer_extend"), "param_name" => "content_size", "value" => "18", "min" => "12", "max" => "60", "step" => "1", "unit" => 'px', "description" => __("Define the font size for the content.", "ts_visual_composer_extend"), "group" => "Step Content"), array("type" => "dropdown", "heading" => __("Content Align", "ts_visual_composer_extend"), "param_name" => "content_align", "width" => 150, "value" => array(__("Justify", "ts_visual_composer_extend") => "justify", __("Center", "ts_visual_composer_extend") => "center", __("Left", "ts_visual_composer_extend") => "left", __("Right", "ts_visual_composer_extend") => "right"), "std" => "justify", "default" => "justify", "description" => __("Select how the content text should be aligned.", "ts_visual_composer_extend"), "group" => "Step Content"), array("type" => "seperator", "heading" => __("", "ts_visual_composer_extend"), "param_name" => "seperator_4", "value" => "", "seperator" => "Other Settings", "description" => __("", "ts_visual_composer_extend"), "group" => "Other Settings"), array('type' => 'auto_generate', 'heading' => __('Deeplink ID', 'ts_visual_composer_extend'), 'param_name' => "hash_id", "prefix" => 'step-', 'description' => __('This is the automatic identifier used for the optional deeplinking; it can not be changed.', 'ts_visual_composer_extend'), "admin_label" => true, "group" => "Other Settings"), array("type" => "textfield", "heading" => __("Define ID Name", "ts_visual_composer_extend"), "param_name" => "el_id", "value" => "", "description" => __("Enter an unique ID for the element.", "ts_visual_composer_extend"), "group" => "Other Settings"), array("type" => "textfield", "heading" => __("Extra Class Name", "ts_visual_composer_extend"), "param_name" => "el_class", "value" => "", "description" => __("Enter a class name for the element.", "ts_visual_composer_extend"), "group" => "Other Settings"), array("type" => "load_file", "heading" => __("", "ts_visual_composer_extend"), "param_name" => "el_file", "value" => "", "file_type" => "js", "file_path" => "js/ts-visual-composer-extend-element.min.js", "description" => __("", "ts_visual_composer_extend"))))); } // Add Steps Container if (function_exists('vc_map')) { vc_map(array("name" => __("TS Circle Steps", "ts_visual_composer_extend"), "base" => "TS_VCSC_Circle_Steps_Container", "icon" => "icon-wpb-ts_vcsc_circle_steps_container", "class" => "", "as_parent" => array('only' => 'TS_VCSC_Circle_Steps_Item'), "category" => "VC Extensions", "description" => "Place a circle steps element.", "controls" => "full", "content_element" => true, "is_container" => true, "container_not_allowed" => false, "show_settings_on_create" => true, "admin_enqueue_js" => "", "admin_enqueue_css" => "", "params" => array(array("type" => "seperator", "heading" => __("", "ts_visual_composer_extend"), "param_name" => "seperator_1", "value" => "", "seperator" => "Circle Setup", "description" => __("", "ts_visual_composer_extend")), array("type" => "dropdown", "heading" => __("Circle Direction", "ts_visual_composer_extend"), "param_name" => "circle_direction", "width" => 150, "value" => array(__("Clockwise (Right)", "ts_visual_composer_extend") => "clockwise", __("Counterclockwise (Left)", "ts_visual_composer_extend") => "counterclockwise"), "admin_label" => true, "description" => __("Define in which direction the circle should be rotated.", "ts_visual_composer_extend")), array("type" => "nouislider", "heading" => __("Circle Speed", "ts_visual_composer_extend"), "param_name" => "circle_speed", "value" => "500", "min" => "100", "max" => "2000", "step" => "100", "unit" => 'ms', "admin_label" => true, "description" => __("Define the speed in ms at which the circle should be rotated.", "ts_visual_composer_extend")), array("type" => "dropdown", "heading" => __("Text Position", "ts_visual_composer_extend"), "param_name" => "circle_position", "width" => 150, "value" => array(__("Right", "ts_visual_composer_extend") => "right", __("Left", "ts_visual_composer_extend") => "left", __("Top", "ts_visual_composer_extend") => "top", __("Bottom", "ts_visual_composer_extend") => "bottom"), "admin_label" => true, "description" => __("Select where the step content block should be placed in relation to the circle.", "ts_visual_composer_extend")), array("type" => "dropdown", "heading" => __("Step Indicator", "ts_visual_composer_extend"), "param_name" => "circle_indicator", "width" => 150, "value" => array(__('Auto Standard Number', "ts_visual_composer_extend") => "number", __('Auto Roman Number', "ts_visual_composer_extend") => "roman", __('Auto Letter', "ts_visual_composer_extend") => "alpha", __("None", "ts_visual_composer_extend") => "none"), "admin_label" => true, "description" => __("Select if and what type of indicator should be shown, highlighting the step position in the circle.", "ts_visual_composer_extend")), array("type" => "nouislider", "heading" => __("Initial Step", "ts_visual_composer_extend"), "param_name" => "circle_initial", "value" => "1", "min" => "1", "max" => "20", "step" => "1", "unit" => '', "admin_label" => true, "description" => __("Define the step the circle should initially be starting out.", "ts_visual_composer_extend")), array('type' => 'dropdown', 'heading' => __('Step Deeplinking', 'ts_visual_composer_extend'), 'param_name' => 'circle_deeplinking', 'value' => array(__('No Deeplinking', 'ts_visual_composer_extend') => 'none', __('Only for Active Session', 'ts_visual_composer_extend') => 'session', __('Page Load + Active Session', 'ts_visual_composer_extend') => 'all'), 'description' => __('Select what type of deeplinking should be applied to the steps.', 'ts_visual_composer_extend')), array("type" => "seperator", "heading" => __("", "ts_visual_composer_extend"), "param_name" => "seperator_2", "value" => "", "seperator" => "Mobile Settings", "description" => __("", "ts_visual_composer_extend")), array("type" => "nouislider", "heading" => __("Two Columns Switch", "ts_visual_composer_extend"), "param_name" => "mobile_large", "value" => "720", "min" => "480", "max" => "1280", "step" => "1", "unit" => "px", "description" => __("Define the width at which the element should switch to a basic two column layout.", "ts_visual_composer_extend")), array("type" => "nouislider", "heading" => __("Single Column Switch", "ts_visual_composer_extend"), "param_name" => "mobile_small", "value" => "480", "min" => "240", "max" => "780", "step" => "1", "unit" => "px", "description" => __("Define the width at which the element should switch to a basic one column layout.", "ts_visual_composer_extend")), array("type" => "seperator", "heading" => __("", "ts_visual_composer_extend"), "param_name" => "seperator_3", "value" => "", "seperator" => "AutoPlay Settings", "description" => __("", "ts_visual_composer_extend")), array("type" => "switch_button", "heading" => __("Use AutoPlay", "ts_visual_composer_extend"), "param_name" => "automatic_rotation", "value" => "false", "on" => __('Yes', "ts_visual_composer_extend"), "off" => __('No', "ts_visual_composer_extend"), "style" => "select", "design" => "toggle-light", "admin_label" => true, "description" => __("Switch the toggle if you want to apply an AutoPlay to the circle steps.", "ts_visual_composer_extend")), array("type" => "nouislider", "heading" => __("AutoPlay Speed", "ts_visual_composer_extend"), "param_name" => "automatic_interval", "value" => "5000", "min" => "2000", "max" => "10000", "step" => "100", "unit" => "ms", "dependency" => array('element' => "automatic_rotation", 'value' => 'true'), "description" => __("Define the autoplay interval speed in ms.", "ts_visual_composer_extend")), array("type" => "switch_button", "heading" => __("Show Controls", "ts_visual_composer_extend"), "param_name" => "automatic_controls", "value" => "true", "on" => __('Yes', "ts_visual_composer_extend"), "off" => __('No', "ts_visual_composer_extend"), "style" => "select", "design" => "toggle-light", "description" => __("Switch the toggle if you want to show play and pause control buttons for the autoplay feature.", "ts_visual_composer_extend"), "dependency" => array('element' => "automatic_rotation", 'value' => 'true')), array("type" => "colorpicker", "heading" => __("Controls Color", "ts_visual_composer_extend"), "param_name" => "automatic_color", "value" => "#CCCCCC", "description" => __("Define the color for the autoplay controls.", "ts_visual_composer_extend"), "dependency" => array('element' => "automatic_controls", 'value' => 'true')), array("type" => "switch_button", "heading" => __("Stop on Hover", "ts_visual_composer_extend"), "param_name" => "automatic_hover", "value" => "true", "on" => __('Yes', "ts_visual_composer_extend"), "off" => __('No', "ts_visual_composer_extend"), "style" => "select", "design" => "toggle-light", "description" => __("Switch the toggle if you want to automatically pause the autoplay when hovering over the element.", "ts_visual_composer_extend"), "dependency" => array('element' => "automatic_rotation", 'value' => 'true')), array("type" => "seperator", "heading" => __("", "ts_visual_composer_extend"), "param_name" => "seperator_4", "value" => "", "seperator" => "Circle Styling", "description" => __("", "ts_visual_composer_extend"), "group" => "Circle Styling"), array("type" => "nouislider", "heading" => __("Circle: Radius", "ts_visual_composer_extend"), "param_name" => "circle_radius", "value" => "220", "min" => "100", "max" => "400", "step" => "1", "unit" => "px", "admin_label" => true, "description" => __("Define the radius for the circle.", "ts_visual_composer_extend"), "group" => "Circle Styling"), array("type" => "nouislider", "heading" => __("Circle: Border Strength", "ts_visual_composer_extend"), "param_name" => "circle_strength", "value" => "2", "min" => "1", "max" => "10", "step" => "1", "unit" => "px", "description" => __("Define the border strength for the circle.", "ts_visual_composer_extend"), "group" => "Circle Styling"), array("type" => "colorpicker", "heading" => __("Circle: Border Color", "ts_visual_composer_extend"), "param_name" => "circle_color", "value" => "#CCCCCC", "description" => __("Define the border color for the circle.", "ts_visual_composer_extend"), "group" => "Circle Styling"), array("type" => "colorpicker", "heading" => __("Circle: Background Color", "ts_visual_composer_extend"), "param_name" => "circle_back", "value" => "#F7F7F7", "description" => __("Define the background color for the circle.", "ts_visual_composer_extend"), "group" => "Circle Styling"), array("type" => "seperator", "heading" => __("", "ts_visual_composer_extend"), "param_name" => "seperator_5", "value" => "", "seperator" => "Step Styling", "description" => __("", "ts_visual_composer_extend"), "group" => "Circle Styling"), array("type" => "nouislider", "heading" => __("Step: Border Strength", "ts_visual_composer_extend"), "param_name" => "size_border", "value" => "3", "min" => "1", "max" => "6", "step" => "1", "unit" => "px", "description" => __("Define the border strength for the steps.", "ts_visual_composer_extend"), "group" => "Circle Styling"), array("type" => "nouislider", "heading" => __("Step: Normal Size", "ts_visual_composer_extend"), "param_name" => "size_normal", "value" => "100", "min" => "50", "max" => "150", "step" => "1", "unit" => "px", "description" => __("Define the standard (non-active) size for the steps.", "ts_visual_composer_extend"), "group" => "Circle Styling"), array("type" => "nouislider", "heading" => __("Step: Active Size", "ts_visual_composer_extend"), "param_name" => "size_selected", "value" => "150", "min" => "75", "max" => "200", "step" => "1", "unit" => "px", "description" => __("Define the size for the active step.", "ts_visual_composer_extend"), "group" => "Circle Styling"), array("type" => "nouislider", "heading" => __("Step: Icon Size", "ts_visual_composer_extend"), "param_name" => "size_icon", "value" => "75", "min" => "50", "max" => "150", "step" => "1", "unit" => "px", "description" => __("Define the size for the icon or image in the step; in relation to the active step size.", "ts_visual_composer_extend"), "group" => "Circle Styling"), array("type" => "seperator", "heading" => __("", "ts_visual_composer_extend"), "param_name" => "seperator_6", "value" => "", "seperator" => "Active Icon Styling", "description" => __("", "ts_visual_composer_extend"), "group" => "Circle Styling"), array("type" => "colorpicker", "heading" => __("Active Icon: Color", "ts_visual_composer_extend"), "param_name" => "icon_color_active", "value" => "#D63838", "description" => __("Define the color for the icon in the active step.", "ts_visual_composer_extend"), "group" => "Circle Styling"), array("type" => "colorpicker", "heading" => __("Active Icon: Background Color", "ts_visual_composer_extend"), "param_name" => "icon_back_active", "value" => "#FFF782", "description" => __("Define the background color for the icon in the active step.", "ts_visual_composer_extend"), "group" => "Circle Styling"), array("type" => "colorpicker", "heading" => __("Active Icon: Border Color", "ts_visual_composer_extend"), "param_name" => "icon_border_active", "value" => "#D63838", "description" => __("Define the border color for the icon in the active step.", "ts_visual_composer_extend"), "group" => "Circle Styling"), array("type" => "colorpicker", "heading" => __("Active Icon: Shadow Color", "ts_visual_composer_extend"), "param_name" => "icon_shadow_active", "value" => "rgba(0, 0, 0, 0.25)", "description" => __("Define the shadow color for the icon in the active step.", "ts_visual_composer_extend"), "group" => "Circle Styling"), array("type" => "seperator", "heading" => __("", "ts_visual_composer_extend"), "param_name" => "seperator_7", "value" => "", "seperator" => "Hover Icon Styling", "description" => __("", "ts_visual_composer_extend"), "group" => "Circle Styling"), array("type" => "colorpicker", "heading" => __("Hover Icon: Color", "ts_visual_composer_extend"), "param_name" => "icon_color_hover", "value" => "#333333", "description" => __("Define the hover color for the icon in a non-active step.", "ts_visual_composer_extend"), "group" => "Circle Styling"), array("type" => "colorpicker", "heading" => __("Hover Icon: Background Color", "ts_visual_composer_extend"), "param_name" => "icon_back_hover", "value" => "#F7F7F7", "description" => __("Define the hover background color for the icon in a non-active step.", "ts_visual_composer_extend"), "group" => "Circle Styling"), array("type" => "colorpicker", "heading" => __("Hover Icon: Border Color", "ts_visual_composer_extend"), "param_name" => "icon_border_hover", "value" => "#636363", "description" => __("Define the hover border color for the icon in a non-active step.", "ts_visual_composer_extend"), "group" => "Circle Styling"), array("type" => "colorpicker", "heading" => __("Hover Icon: Shadow Color", "ts_visual_composer_extend"), "param_name" => "icon_shadow_hover", "value" => "rgba(0, 0, 0, 0.25)", "description" => __("Define the hover shadow color for the icon in a non-active step.", "ts_visual_composer_extend"), "group" => "Circle Styling"), array("type" => "seperator", "heading" => __("", "ts_visual_composer_extend"), "param_name" => "seperator_8", "value" => "", "seperator" => "Tooltip Settings", "description" => __("", "ts_visual_composer_extend"), "group" => "Additional Effects"), array("type" => "switch_button", "heading" => __("Use Tooltips", "ts_visual_composer_extend"), "param_name" => "tooltipster_allow", "value" => "true", "on" => __('Yes', "ts_visual_composer_extend"), "off" => __('No', "ts_visual_composer_extend"), "style" => "select", "design" => "toggle-light", "description" => __("Switch the toggle if you want to apply a tooltip to each step icon.", "ts_visual_composer_extend"), "group" => "Additional Effects"), array("type" => "dropdown", "heading" => __("Tooltip Position", "ts_visual_composer_extend"), "param_name" => "tooltipster_position", "value" => array(__("Top", "ts_visual_composer_extend") => "ts-simptip-position-top", __("Bottom", "ts_visual_composer_extend") => "ts-simptip-position-bottom", __("Left", "ts_visual_composer_extend") => "ts-simptip-position-left", __("Right", "ts_visual_composer_extend") => "ts-simptip-position-right"), "description" => __("Select the tooltip position in relation to the hotspot.", "ts_visual_composer_extend"), "dependency" => array('element' => "tooltipster_allow", 'value' => 'true'), "group" => "Additional Effects"), array("type" => "dropdown", "heading" => __("Tooltip Animation", "ts_visual_composer_extend"), "param_name" => "tooltipster_effect", "value" => array(__("Swing", "ts_visual_composer_extend") => "swing", __("Fall", "ts_visual_composer_extend") => "fall", __("Grow", "ts_visual_composer_extend") => "grow", __("Slide", "ts_visual_composer_extend") => "slide", __("Fade", "ts_visual_composer_extend") => "fade"), "description" => __("Select how the tooltip entry and exit should be animated once triggered.", "ts_visual_composer_extend"), "dependency" => array('element' => "tooltipster_allow", 'value' => 'true'), "group" => "Additional Effects"), array("type" => "dropdown", "heading" => __("Tooltip Style", "ts_visual_composer_extend"), "param_name" => "tooltipster_style", "value" => array(__("Black", "ts_visual_composer_extend") => "", __("Gray", "ts_visual_composer_extend") => "ts-simptip-style-gray", __("Green", "ts_visual_composer_extend") => "ts-simptip-style-green", __("Blue", "ts_visual_composer_extend") => "ts-simptip-style-blue", __("Red", "ts_visual_composer_extend") => "ts-simptip-style-red", __("Orange", "ts_visual_composer_extend") => "ts-simptip-style-orange", __("Yellow", "ts_visual_composer_extend") => "ts-simptip-style-yellow", __("Purple", "ts_visual_composer_extend") => "ts-simptip-style-purple", __("Pink", "ts_visual_composer_extend") => "ts-simptip-style-pink", __("White", "ts_visual_composer_extend") => "ts-simptip-style-white"), "description" => __("Select the tooltip style.", "ts_visual_composer_extend"), "dependency" => array('element' => "tooltipster_allow", 'value' => 'true'), "group" => "Additional Effects"), array("type" => "nouislider", "heading" => __("Tooltip X-Offset", "ts_visual_composer_extend"), "param_name" => "tooltipster_offsetx", "value" => "0", "min" => "-100", "max" => "100", "step" => "1", "unit" => 'px', "description" => __("Define an optional X-Offset for the tooltip position.", "ts_visual_composer_extend"), "dependency" => array('element' => "tooltipster_allow", 'value' => 'true'), "group" => "Additional Effects"), array("type" => "nouislider", "heading" => __("Tooltip Y-Offset", "ts_visual_composer_extend"), "param_name" => "tooltipster_offsety", "value" => "0", "min" => "-100", "max" => "100", "step" => "1", "unit" => 'px', "description" => __("Define an optional Y-Offset for the tooltip position.", "ts_visual_composer_extend"), "dependency" => array('element' => "tooltipster_allow", 'value' => 'true'), "group" => "Additional Effects"), array("type" => "seperator", "heading" => __("", "ts_visual_composer_extend"), "param_name" => "seperator_9", "value" => "", "seperator" => "NiceScroll Settings", "description" => __("", "ts_visual_composer_extend"), "group" => "Additional Effects"), array("type" => "switch_button", "heading" => __("Use NiceScroll", "ts_visual_composer_extend"), "param_name" => "scroll_nice", "value" => "true", "on" => __('Yes', "ts_visual_composer_extend"), "off" => __('No', "ts_visual_composer_extend"), "style" => "select", "design" => "toggle-light", "description" => __("Switch the toggle if you want to apply a niceScrollBar to the step content if taller than circle.", "ts_visual_composer_extend"), "group" => "Additional Effects"), array("type" => "colorpicker", "heading" => __("Scrollbar: Background Color", "ts_visual_composer_extend"), "param_name" => "scroll_color", "value" => "#EDEDED", "description" => __("Define the background color for the niceScroll scrollbar.", "ts_visual_composer_extend"), "dependency" => array('element' => "scroll_nice", 'value' => 'true'), "group" => "Additional Effects"), array("type" => "colorpicker", "heading" => __("Scrollbar: Border Color", "ts_visual_composer_extend"), "param_name" => "scroll_border", "value" => "#CACACA", "description" => __("Define the border color for the niceScroll scrollbar.", "ts_visual_composer_extend"), "dependency" => array('element' => "scroll_nice", 'value' => 'true'), "group" => "Additional Effects"), array("type" => "nouislider", "heading" => __("Scrollbar: Offset", "ts_visual_composer_extend"), "param_name" => "scroll_offset", "value" => "0", "min" => "-100", "max" => "100", "step" => "1", "unit" => 'px', "description" => __("Define an optional offset (top) for the scrollbar.", "ts_visual_composer_extend"), "dependency" => array('element' => "scroll_nice", 'value' => 'true'), "group" => "Additional Effects"), array("type" => "seperator", "heading" => __("", "ts_visual_composer_extend"), "param_name" => "seperator_10", "value" => "", "seperator" => "Other Settings", "description" => __("", "ts_visual_composer_extend"), "group" => "Other Settings"), array("type" => "nouislider", "heading" => __("Margin: Top", "ts_visual_composer_extend"), "param_name" => "margin_top", "value" => "0", "min" => "0", "max" => "200", "step" => "1", "unit" => 'px', "description" => __("Select the top margin for the element.", "ts_visual_composer_extend"), "group" => "Other Settings"), array("type" => "nouislider", "heading" => __("Margin: Bottom", "ts_visual_composer_extend"), "param_name" => "margin_bottom", "value" => "0", "min" => "0", "max" => "200", "step" => "1", "unit" => 'px', "description" => __("Select the bottom margin for the element.", "ts_visual_composer_extend"), "group" => "Other Settings"), array("type" => "textfield", "heading" => __("Define ID Name", "ts_visual_composer_extend"), "param_name" => "el_id", "value" => "", "description" => __("Enter an unique ID for the element.", "ts_visual_composer_extend"), "group" => "Other Settings"), array("type" => "textfield", "heading" => __("Extra Class Name", "ts_visual_composer_extend"), "param_name" => "el_class", "value" => "", "description" => __("Enter a class name for the element.", "ts_visual_composer_extend"), "group" => "Other Settings"), array("type" => "load_file", "heading" => __("", "ts_visual_composer_extend"), "param_name" => "el_file", "value" => "", "file_type" => "js", "file_path" => "js/ts-visual-composer-extend-element.min.js", "description" => __("", "ts_visual_composer_extend")), array("type" => "load_file", "heading" => __("", "ts_visual_composer_extend"), "value" => "Animation Files", "param_name" => "el_file2", "file_type" => "css", "file_id" => "ts-extend-animations", "file_path" => "css/ts-visual-composer-extend-animations.min.css", "description" => __("", "ts_visual_composer_extend"))), "js_view" => 'VcColumnView')); } }
</div> <div id="ts_tiny_tinymce_html_insert" style="display: none !important"></div> <textarea rows="10" id="ts_tiny_tinymce_html_copy" name="ts_tiny_tinymce_html_copy" style="display: none !important; width: 100%;"></textarea> <input style="margin-top: 10px; margin-right: 20px; width: 200px; display: inline-block;" data-clipboard-target="ts_tiny_tinymce_html_copy" type="button" value="<?php _e("Copy HTML Code", "ts_visual_composer_extend"); ?> " name="ts_tiny_clipboard_copy_html" id="ts_tiny_clipboard_copy_html" class="button-secondary" data-error="<?php _e("No Icon HTML Code has been generated yet.", "ts_visual_composer_extend"); ?> " data-success="<?php _e("Icon HTML Code has been copied to Clipboard.", "ts_visual_composer_extend"); ?> "/> </div> <?php echo '<script type="text/javascript">'; echo 'var pathVCSCMCEIconImage = "' . TS_VCSC_GetResourceURL('images/other/ts_vcsc_tinymce.png') . '";'; echo 'var pathCopyToClipboardSWF = "' . TS_VCSC_GetResourceURL('js/zeroclipboard.swf') . '";'; if (get_option('ts_vcsc_extend_settings_useTinyMCEMedia', 1) == 1) { echo 'var TS_VCSC_tinyMCE_Media = true;'; } else { echo 'var TS_VCSC_tinyMCE_Media = false;'; } echo '</script>'; ?> </div> </div> </div> </div>
$social_array[] = $social_lines; $social_count = $social_count + 1; } ?> <div id="ts-settings-social" class="tab-content"> <div class="ts-vcsc-section-main"> <div class="ts-vcsc-section-title ts-vcsc-section-show"><i class="dashicons-share"></i>Social Network Links</div> <div class="ts-vcsc-section-content"> <div class="ts-vcsc-notice-field ts-vcsc-success" style="margin-top: 10px; font-size: 13px; text-align: justify;"> These settings will be used as global settings for all social network buttons used in the element "TS Social Networks". You can drag and drop each network to change the order in which the network buttons will be shown on your website. </div> <div> <h4>Social Network Links:</h4> <div id="ts-vcsc-social-network-links-restore" class="button-secondary" style="width: 120px; margin-top: 20px; text-align: center;"><img src="<?php echo TS_VCSC_GetResourceURL('images/other/ts_vcsc_sortalpha_icon_16x16.png'); ?> " style="width: 16px; height: 16px; margin-right: 10px;">Restore</div> </div> <?php TS_VCSC_SortMultiArray($social_array, 'order'); // Output Array Input Fields $social_networks = ''; $social_networks .= '<ul id="ts-vcsc-social-network-links" class="ts-social-icons">'; foreach ($social_array as $index => $array) { $Social_Network = $social_array[$index]['network']; $Social_Class = $social_array[$index]['class']; $Social_Icon = $social_array[$index]['icon']; $Social_Order = $social_array[$index]['order']; $Social_Link = $social_array[$index]['link']; $Social_Original = $social_array[$index]['original'];
function TS_VCSC_WooCommerce_ImageGrid_Basic_Function($atts, $content = null) { global $VISUAL_COMPOSER_EXTENSIONS; global $product; global $woocommerce; ob_start(); wp_enqueue_script('ts-extend-hammer'); wp_enqueue_script('ts-extend-nacho'); wp_enqueue_style('ts-extend-nacho'); wp_enqueue_style('ts-font-ecommerce'); 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('selection' => 'recent_products', 'category' => '', 'ids' => '', 'orderby' => 'date', 'order' => 'desc', 'products_total' => 12, 'exclude_outofstock' => 'false', 'post_type' => 'product', 'limit_posts' => 'true', 'limit_by' => 'category', 'limit_term' => '', 'filter_by' => 'category', 'posts_limit' => 25, 'content_images_size' => 'medium', 'filters_show' => 'true', 'filters_available' => 'Available Groups', 'filters_selected' => 'Filtered Groups', 'filters_nogroups' => 'No Groups', 'filters_toggle' => 'Toggle Filter', 'filters_toggle_style' => '', 'filters_showall' => 'Show All', 'filters_showall_style' => '', 'data_grid_machine' => 'internal', 'data_grid_invalid' => 'false', 'data_grid_target' => '_blank', 'data_grid_breaks' => '240,480,720,960', 'data_grid_width' => 250, 'data_grid_space' => 2, 'data_grid_order' => 'false', 'data_grid_always' => 'true', 'data_grid_price' => 'true', 'fullwidth' => 'false', 'breakouts' => 6, 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); // Check for Front End Editor if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VCFrontEditMode == "true") { $grid_class = 'ts-image-link-grid-edit'; $grid_message = '<div class="ts-composer-frontedit-message">' . __('The grid is currently viewed in front-end edit mode; grid and filter features are disabled for performance and compatibility reasons.', "ts_visual_composer_extend") . '</div>'; $image_style = 'width: 20%; height: 100%; display: inline-block; margin: 0; padding: 0;'; $grid_style = 'height: 100%;'; $frontend_edit = 'true'; } else { if ($data_grid_machine == 'internal') { $grid_class = 'ts-image-link-grid'; } else { if ($data_grid_machine == 'freewall') { $grid_class = 'ts-freewall-link-grid'; } } $image_style = ''; $grid_style = ''; $grid_message = ''; $frontend_edit = 'false'; } $randomizer = mt_rand(999999, 9999999); if (!empty($el_id)) { $modal_id = $el_id; } else { $modal_id = 'ts-vcsc-product-link-grid-' . $randomizer; } $valid_images = 0; if (!empty($data_grid_breaks)) { $data_grid_breaks = str_replace(' ', '', $data_grid_breaks); $count_columns = substr_count($data_grid_breaks, ",") + 1; } else { $count_columns = 0; } $i = -1; $b = 0; $output = ''; if ($filters_toggle_style != '') { wp_enqueue_style('ts-extend-buttonsflat'); } wp_enqueue_style('ts-extend-multiselect'); wp_enqueue_script('ts-extend-multiselect'); $meta_query = ''; $menu_tax = 'product_cat'; $limit_tax = 'product_cat'; // Recent Products if ($selection == "recent_products") { $meta_query = WC()->query->get_meta_query(); } // Featured Products if ($selection == "featured_products") { $meta_query = array(array('key' => '_visibility', 'value' => array('catalog', 'visible'), 'compare' => 'IN'), array('key' => '_featured', 'value' => 'yes')); } // Top Rated Products if ($selection == "top_rated_products") { add_filter('posts_clauses', array(WC()->query, 'order_by_rating_post_clauses')); $meta_query = WC()->query->get_meta_query(); } // Final Query Arguments $args = array('post_type' => 'product', 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'posts_per_page' => $products_total, 'orderby' => $orderby, 'order' => $order, 'paged' => 1, 'meta_query' => $meta_query); // Products on Sale if ($selection == "sale_products") { $product_ids_on_sale = woocommerce_get_product_ids_on_sale(); $meta_query = array(); $meta_query[] = $woocommerce->query->visibility_meta_query(); $meta_query[] = $woocommerce->query->stock_status_meta_query(); $args['meta_query'] = $meta_query; $args['post__in'] = $product_ids_on_sale; } // Best Selling Products if ($selection == "best_selling_products") { $args['meta_key'] = 'total_sales'; $args['orderby'] = 'meta_value_num'; $args['meta_query'] = array(array('key' => '_visibility', 'value' => array('catalog', 'visible'), 'compare' => 'IN')); } // Products in Single Category if ($selection == "product_category") { $args['tax_query'] = array(array('taxonomy' => 'product_cat', 'terms' => array(esc_attr($category)), 'field' => 'slug', 'operator' => 'IN')); } // Products in Multiple Categories if ($selection == "product_categories") { $args['tax_query'] = array(array('taxonomy' => 'product_cat', 'terms' => explode(",", $ids), 'field' => 'term_id', 'operator' => 'IN')); } // Start WordPress Query $loop = new WP_Query($args); if ($data_grid_machine == 'internal') { $class_name = 'ts-image-link-grid-frame'; } else { if ($data_grid_machine == 'freewall') { wp_enqueue_script('ts-extend-freewall'); $class_name = 'ts-image-freewall-grid-frame'; } } if (function_exists('vc_shortcode_custom_css_class')) { $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $el_class . ' ' . $class_name . ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS_VCSC_WooCommerce_ImageGrid_Basic', $atts); } else { $css_class = $class_name . ' ' . $el_class; } $fullwidth_allow = "true"; $postCounter = 0; $modal_gallery = ''; // Front-Edit Message if ($frontend_edit == "true") { $modal_gallery .= $grid_message; if ($loop->have_posts()) { while ($loop->have_posts()) { $loop->the_post(); $matched_terms = 0; $post_thumbnail = get_the_post_thumbnail(); if ($matched_terms == 0 && ($post_thumbnail != '' || $data_grid_invalid == "false")) { $postCounter++; if ($postCounter < $posts_limit + 1) { $product_id = get_the_ID(); $product_title = get_the_title($product_id); $post = get_post($product_id); $product = new WC_Product($product_id); $attachment_ids = $product->get_gallery_attachment_ids(); $product_sku = $product->get_sku(); $attributes = $product->get_attributes(); $stock = $product->is_in_stock() ? 'true' : 'false'; if ('' != $post_thumbnail) { $grid_image = wp_get_attachment_image_src(get_post_thumbnail_id(), $content_images_size); $modal_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); $grid_image = $grid_image[0]; $modal_image = $modal_image[0]; } else { $grid_image = TS_VCSC_GetResourceURL('images/defaults/no_featured.png'); $modal_image = TS_VCSC_GetResourceURL('images/defaults/no_featured.png'); } $categories = array(); if (taxonomy_exists($menu_tax)) { foreach (get_the_terms($loop->post->ID, $menu_tax) as $term) { array_push($categories, $term->name); } $categories = implode($categories, ','); } $valid_images++; $modal_gallery .= '<a style="' . $image_style . '" href="' . get_permalink() . '" target="_blank" title="' . get_the_title() . '">'; $modal_gallery .= '<img id="ts-image-link-picture-' . $randomizer . '-' . $i . '" class="ts-image-link-picture" src="' . $grid_image . '" rel="link-group-' . $randomizer . '" data-include="true" data-image="' . $modal_image . '" width="100%" height="auto" title="' . get_the_title() . '" data-groups="' . $categories . '" data-target="' . $data_grid_target . '" data-link="' . get_permalink() . '">'; $modal_gallery .= '</a>'; $categories = array(); } } } } else { echo __("No products could be found.", "ts_visual_composer_extend"); } wp_reset_postdata(); wp_reset_query(); } else { if ($loop->have_posts()) { if ($data_grid_machine == 'freewall') { $filter_settings = 'data-gridfilter="' . $filters_show . '" data-gridavailable="' . $filters_available . '" data-gridselected="' . $filters_selected . '" data-gridnogroups="' . $filters_nogroups . '" data-gridtoggle="' . $filters_toggle . '" data-gridtogglestyle="' . $filters_toggle_style . '" data-gridshowall="' . $filters_showall . '" data-gridshowallstyle="' . $filters_showall_style . '"'; $modal_gallery .= '<div id="ts-lightbox-freewall-grid-' . $randomizer . '-container" class="ts-lightbox-freewall-grid-container" data-random="' . $randomizer . '" data-width="' . $data_grid_width . '" data-gutter="' . $data_grid_space . '" ' . $filter_settings . ' style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; } while ($loop->have_posts()) { $loop->the_post(); $matched_terms = 0; $post_thumbnail = get_the_post_thumbnail(); if ($matched_terms == 0 && ($post_thumbnail != '' || $data_grid_invalid == "false")) { $postCounter++; if ($postCounter < $posts_limit + 1) { $product_id = get_the_ID(); $product_title = get_the_title($product_id); $post = get_post($product_id); $product = new WC_Product($product_id); $attachment_ids = $product->get_gallery_attachment_ids(); $product_sku = $product->get_sku(); $attributes = $product->get_attributes(); $stock = $product->is_in_stock() ? 'true' : 'false'; if ('' != $post_thumbnail) { $grid_image = wp_get_attachment_image_src(get_post_thumbnail_id(), $content_images_size); $modal_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); $grid_image = $grid_image[0]; $modal_image = $modal_image[0]; } else { $grid_image = TS_VCSC_GetResourceURL('images/defaults/no_featured.png'); $modal_image = TS_VCSC_GetResourceURL('images/defaults/no_featured.png'); } $categories = array(); if (taxonomy_exists($menu_tax)) { if ($filters_show == "true") { foreach (get_the_terms($loop->post->ID, $menu_tax) as $term) { array_push($categories, $term->name); } } $categories = implode($categories, ','); } $valid_images++; $costs = $product->price; $costs = is_numeric($costs) ? wc_price($costs) : $costs; $costs = strip_tags($costs); if ($data_grid_price == "true") { $price = $costs . ' / '; } else { $price = ''; } if ($data_grid_machine == 'internal') { $modal_gallery .= '<img id="ts-image-link-picture-' . $randomizer . '-' . $i . '" class="ts-image-link-picture" src="' . $grid_image . '" rel="link-group-' . $randomizer . '" data-no-lazy="1" data-price="' . $costs . '" data-include="true" data-image="' . $modal_image . '" width="100%" height="auto" title="' . $price . get_the_title() . '" data-groups="' . $categories . '" data-target="' . $data_grid_target . '" data-link="' . get_permalink() . '">'; } else { if ($data_grid_machine == 'freewall') { $modal_gallery .= '<div id="ts-lightbox-freewall-item-' . $randomizer . '-' . $i . '-parent" class="ts-lightbox-freewall-item ts-lightbox-freewall-active ' . $el_class . ' nchgrid-item nchgrid-tile" data-fixSize="false" data-groups="' . $categories . '" data-target="' . $data_grid_target . '" data-link="' . get_permalink() . '" data-showing="true" data-groups="' . (!empty($categories) ? str_replace('/', ',', $categories) : "") . '" style="width: ' . $data_grid_width . 'px; margin: 0; padding: 0;">'; $modal_gallery .= '<a id="ts-lightbox-freewall-item-' . $randomizer . '-' . $i . '" href="' . get_permalink() . '" target="' . $data_grid_target . '" title="' . get_the_title() . '">'; $modal_gallery .= '<img id="ts-lightbox-freewall-picture-' . $randomizer . '-' . $i . '" class="ts-lightbox-freewall-picture" src="' . $grid_image . '" width="100%" height="auto" title="' . $price . get_the_title() . '">'; $modal_gallery .= '<div class="nchgrid-caption"></div>'; $modal_gallery .= '<div class="nchgrid-caption-text ' . ($data_grid_always == 'true' ? 'nchgrid-caption-text-always' : '') . '">' . $price . get_the_title() . '</div>'; $modal_gallery .= '</a>'; $modal_gallery .= '</div>'; } } $categories = array(); } } } if ($data_grid_machine == 'freewall') { $modal_gallery .= '</div>'; } } else { echo __("No products could be found.", "ts_visual_composer_extend"); } wp_reset_postdata(); wp_reset_query(); } if ($valid_images < $count_columns) { $data_grid_string = explode(',', $data_grid_breaks); $data_grid_breaks = array(); foreach ($data_grid_string as $single_break) { $b++; if ($b <= $valid_images) { array_push($data_grid_breaks, $single_break); } else { break; } } $data_grid_breaks = implode(",", $data_grid_breaks); } else { $data_grid_breaks = $data_grid_breaks; } $output .= '<div id="' . $modal_id . '-frame" class="' . $grid_class . ' ' . $css_class . ' ' . ($fullwidth == "true" && $fullwidth_allow == "true" ? "ts-lightbox-nacho-full-frame" : "") . '" data-random="' . $randomizer . '" data-grid="' . $data_grid_breaks . '" data-margin="' . $data_grid_space . '" data-always="' . $data_grid_always . '" data-order="' . $data_grid_order . '" data-break-parents="' . $breakouts . '" data-inline="' . $frontend_edit . '" data-gridfilter="' . $filters_show . '" data-gridavailable="' . $filters_available . '" data-gridselected="' . $filters_selected . '" data-gridnogroups="' . $filters_nogroups . '" data-gridtoggle="' . $filters_toggle . '" data-gridtogglestyle="' . $filters_toggle_style . '" data-gridshowall="' . $filters_showall . '" data-gridshowallstyle="' . $filters_showall_style . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; position: relative;">'; if ($data_grid_machine == 'internal') { $output .= '<div id="nch-lb-grid-' . $randomizer . '" class="nch-lb-grid" data-filter="nch-lb-filter-' . $randomizer . '" style="' . $grid_style . '" data-toggle="nch-lb-toggle-' . $randomizer . '" data-random="' . $randomizer . '">'; } $output .= $modal_gallery; if ($data_grid_machine == 'internal') { $output .= '</div>'; } $output .= '</div>'; echo $output; $myvariable = ob_get_clean(); return $myvariable; }
} ?> </select> </div> <div style="margin-top: 20px;"> <h4>Lightbox Button Scheme:</h4> <p style="font-size: 12px;">Select the button scheme (color) that should be used with the lightbox:</p> <select id="ts_vcsc_extend_settings_defaultLightboxScheme" name="ts_vcsc_extend_settings_defaultLightboxScheme" data-background="true" data-width="286" data-height="60" class="ts-image-picker ts_vcsc_extend_settings_defaultLightboxScheme" value="<?php echo $Lightbox_ButtonScheme; ?> "> <?php $selected = selected($Lightbox_ButtonScheme == 'dark', true, false); echo '<option data-img-src="' . TS_VCSC_GetResourceURL("images/other/lightbox_dark.jpg") . '" value="dark" ' . $selected . '>Dark</option>'; $selected = selected($Lightbox_ButtonScheme == 'light', true, false); echo '<option data-img-src="' . TS_VCSC_GetResourceURL("images/other/lightbox_light.jpg") . '" value="light" ' . $selected . '>Light</option>'; ?> </select> </div> <div style="margin-top: 20px;"> <h4>Incorporate into "Add-Media" Process:</h4> <p style="font-size: 12px;">Define if the lightbox should automatically add a custom class name ("ts-lightbox-integration") and data-title attribute to image links created via the tinyMCE "Add Media" button, so those image links can be opened with the lightbox as well. Activating this setting will cause the lightbox files to be loaded on all pages and posts:</p> <div class="ts-switch-button ts-composer-switch" data-value="<?php echo $ts_vcsc_extend_settings_lightboxIntegration == 1 ? 'true' : 'false'; ?> " data-width="80" data-style="compact" data-on="Yes" data-off="No" style="float: left; margin-right: 10px;"> <input type="checkbox" style="display: none; " id="ts_vcsc_extend_settings_lightboxIntegration" class="toggle-check ts_vcsc_extend_settings_lightboxIntegration" name="ts_vcsc_extend_settings_lightboxIntegration" value="1" <?php echo checked('1', $ts_vcsc_extend_settings_lightboxIntegration); ?> />
function TS_VCSC_Team_Page_Elements($atts, $content = null) { global $VISUAL_COMPOSER_EXTENSIONS; ob_start(); wp_enqueue_script('ts-extend-hammer'); wp_enqueue_script('ts-extend-nacho'); wp_enqueue_style('ts-extend-nacho'); wp_enqueue_style('ts-font-teammates'); wp_enqueue_style('ts-extend-simptip'); wp_enqueue_style('ts-extend-animations'); wp_enqueue_style('ts-visual-composer-extend-front'); wp_enqueue_script('ts-visual-composer-extend-front'); extract(shortcode_atts(array('team_member' => '', 'custompost_name' => '', 'element' => 'image', 'style' => 'style1', 'show_grayscale' => 'true', 'grayscale_hover' => 'true', 'show_effects' => 'true', 'show_lightbox' => 'true', 'name_align' => 'left', 'name_title_size' => 18, 'name_job_size' => 16, 'contact_icon_color' => '#000000', 'contact_icon_size' => 14, 'contact_font_size' => 14, 'social_icon_style' => 'simple', 'social_icon_size' => 16, 'social_icon_background' => '#f5f5f5', 'social_icon_frame_color' => '#f5f5f5', 'social_icon_frame_thick' => 1, 'social_icon_margin' => 5, 'social_icon_align' => 'left', 'social_icon_hover' => '', 'tooltip_style' => '', 'tooltip_position' => 'ts-simptip-position-top', 'optional_title_align' => 'left', 'optional_text_align' => 'left', 'optional_title_size' => 14, 'optional_font_size' => 14, 'button_width' => 100, 'button_align' => 'center', 'skills_height' => 2, 'skills_stripes' => 'false', 'skills_animation' => 'false', 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); $output = ''; // Check for Teammate and End Shortcode if Empty if (empty($team_member)) { $output .= '<div style="text-align: justify; font-weight: bold; font-size: 14px; color: red;">Please select a teammate in the element settings!</div>'; echo $output; $myvariable = ob_get_clean(); return $myvariable; } if (!empty($el_id)) { $team_block_id = $el_id; } else { $team_block_id = 'ts-vcsc-teampage-' . $element . '-' . mt_rand(999999, 9999999); } $animation_css = ''; $team_tooltipclasses = "ts-simptip-multiline " . $tooltip_style . " " . $tooltip_position; if (empty($social_icon_background) || $social_icon_style == 'simple') { $icon_frame_style = ''; } else { $icon_frame_style = 'background: ' . $social_icon_background . ';'; } if ($social_icon_frame_thick > 0) { $icon_top_adjust = 'top: ' . (10 - $social_icon_frame_thick) . 'px;'; } else { $icon_top_adjust = ''; } $icon_frame_size = 'font-size: ' . $social_icon_size . 'px; line-height: ' . $social_icon_size . 'px; width: ' . $social_icon_size . 'px; height: ' . $social_icon_size . 'px;'; if ($social_icon_style == 'simple') { $icon_frame_border = ''; } else { $icon_frame_border = ' border: ' . $social_icon_frame_thick . 'px solid ' . $social_icon_frame_color . ';'; } $icon_size_adjust = 'font-size: ' . $contact_icon_size . 'px; line-height: ' . $contact_icon_size . 'px; height: ' . $contact_icon_size . 'px; width: ' . $contact_icon_size . 'px; '; $icon_horizontal_adjust = ''; $icon_top_adjust = ''; if ($contact_icon_size > $contact_font_size) { $line_height_adjust = 'line-height: ' . $contact_icon_size . 'px;'; } else { $line_height_adjust = 'line-height: ' . $contact_font_size . 'px;'; } $team_social = ''; // Retrieve Team Post Main Content $team_array = array(); $category_fields = array(); $args = array('no_found_rows' => 1, 'ignore_sticky_posts' => 1, 'posts_per_page' => -1, 'post_type' => 'ts_team', 'post_status' => 'publish', 'orderby' => 'title', 'order' => 'ASC'); $team_query = new WP_Query($args); if ($team_query->have_posts()) { foreach ($team_query->posts as $p) { if ($p->ID == $team_member) { $team_data = array('author' => $p->post_author, 'name' => $p->post_name, 'title' => $p->post_title, 'id' => $p->ID, 'content' => $p->post_content); $team_array[] = $team_data; } } } wp_reset_postdata(); // Build Team Post Main Content foreach ($team_array as $index => $array) { $Team_Author = $team_array[$index]['author']; $Team_Name = $team_array[$index]['name']; $Team_Title = $team_array[$index]['title']; $Team_ID = $team_array[$index]['id']; $Team_Content = $team_array[$index]['content']; $Team_Image = wp_get_attachment_image_src(get_post_thumbnail_id($Team_ID), 'full'); if ($Team_Image == false) { $Team_Image = TS_VCSC_GetResourceURL('images/Default_person.jpg'); } else { $Team_Image = $Team_Image[0]; } } // Retrieve Team Post Meta Content $custom_fields = get_post_custom($Team_ID); $custom_fields_array = array(); foreach ($custom_fields as $field_key => $field_values) { if (!isset($field_values[0])) { continue; } if (in_array($field_key, array("_edit_lock", "_edit_last"))) { continue; } if (strpos($field_key, 'ts_vcsc_team_') !== false) { $field_key_split = explode("_", $field_key); $field_key_length = count($field_key_split) - 1; $custom_data = array('group' => $field_key_split[$field_key_length - 1], 'name' => 'Team_' . ucfirst($field_key_split[$field_key_length]), 'value' => $field_values[0]); $custom_fields_array[] = $custom_data; } } foreach ($custom_fields_array as $index => $array) { ${$custom_fields_array[$index]['name']} = $custom_fields_array[$index]['value']; } if (isset($Team_Position)) { $Team_Position = $Team_Position; } else { $Team_Position = ''; } if (isset($Team_Buttonlabel)) { $Team_Buttonlabel = $Team_Buttonlabel; } else { $Team_Buttonlabel = ''; } // Build Team Contact Information $team_contact = ''; $team_contact_count = 0; if ($element == 'contact') { $team_contact = ''; $team_contact_count = 0; $team_contact .= '<div class="ts-team-contact">'; if (isset($Team_Email)) { $team_contact_count++; if (isset($Team_Emaillabel)) { $team_contact .= '<div class="ts-contact-parent" style="font-size: ' . $contact_font_size . 'px; ' . $line_height_adjust . '"><i class="ts-teamicon-email3 ts-font-icon ts-teammate-icon" style="' . $icon_size_adjust . 'color: ' . $contact_icon_color . ';"></i><a target="_blank" class="" href="mailto:' . $Team_Email . '">' . $Team_Emaillabel . '</a></div>'; } else { $team_contact .= '<div class="ts-contact-parent" style="font-size: ' . $contact_font_size . 'px; ' . $line_height_adjust . '"><i class="ts-teamicon-email3 ts-font-icon ts-teammate-icon" style="' . $icon_size_adjust . 'color: ' . $contact_icon_color . ';"></i><a target="_blank" class="" href="mailto:' . $Team_Email . '">' . $Team_Email . '</a></div>'; } } if (isset($Team_Phone)) { $team_contact_count++; $team_contact .= '<div class="ts-contact-parent" style="font-size: ' . $contact_font_size . 'px; ' . $line_height_adjust . '"><i class="ts-teamicon-phone2 ts-font-icon ts-teammate-icon" style="' . $icon_size_adjust . 'color: ' . $contact_icon_color . ';"></i>' . $Team_Phone . '</div>'; } if (isset($Team_Cell)) { $team_contact_count++; $team_contact .= '<div class="ts-contact-parent" style="font-size: ' . $contact_font_size . 'px; ' . $line_height_adjust . '"><i class="ts-teamicon-mobile ts-font-icon ts-teammate-icon" style="' . $icon_size_adjust . 'color: ' . $contact_icon_color . ';"></i>' . $Team_Cell . '</div>'; } if (isset($Team_Portfolio)) { $team_contact_count++; if (isset($Team_Portfoliolabel)) { $team_contact .= '<div class="ts-contact-parent" style="font-size: ' . $contact_font_size . 'px; ' . $line_height_adjust . '"><i class="ts-teamicon-portfolio ts-font-icon ts-teammate-icon" style="' . $icon_size_adjust . 'color: ' . $contact_icon_color . ';"></i><a style="" target="_blank" class="" href="' . TS_VCSC_makeValidURL($Team_Portfolio) . '">' . $Team_Portfoliolabel . '</a></div>'; } else { $team_contact .= '<div class="ts-contact-parent" style="font-size: ' . $contact_font_size . 'px; ' . $line_height_adjust . '"><i class="ts-teamicon-portfolio ts-font-icon ts-teammate-icon" style="' . $icon_size_adjust . 'color: ' . $contact_icon_color . ';"></i><a style="" target="_blank" class="" href="' . TS_VCSC_makeValidURL($Team_Portfolio) . '">' . TS_VCSC_makeValidURL($Team_Portfolio) . '</a></div>'; } } if (isset($Team_Other)) { $team_contact_count++; if (isset($Team_Otherlabel)) { $team_contact .= '<div class="ts-contact-parent" style="font-size: ' . $contact_font_size . 'px; ' . $line_height_adjust . '"><i class="ts-teamicon-link ts-font-icon ts-teammate-icon" style="' . $icon_size_adjust . 'color: ' . $contact_icon_color . ';"></i><a style="" target="_blank" class="" href="' . TS_VCSC_makeValidURL($Team_Other) . '">' . $Team_Otherlabel . '</a></div>'; } else { $team_contact .= '<div class="ts-contact-parent" style="font-size: ' . $contact_font_size . 'px; ' . $line_height_adjust . '"><i class="ts-teamicon-link ts-font-icon ts-teammate-icon" style="' . $icon_size_adjust . 'color: ' . $contact_icon_color . ';"></i><a style="" target="_blank" class="" href="' . TS_VCSC_makeValidURL($Team_Other) . '">' . TS_VCSC_makeValidURL($Team_Other) . '</a></div>'; } } if (isset($Team_Skype)) { $team_contact_count++; $team_contact .= '<div class="ts-contact-parent" style="font-size: ' . $contact_font_size . 'px; ' . $line_height_adjust . '"><i class="ts-teamicon-skype ts-font-icon ts-teammate-icon" style="' . $icon_size_adjust . ' ' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i>' . $Team_Skype . '</div>'; } $team_contact .= '</div>'; } // Build Opening / Contact Hours $team_opening = ''; $team_opening_count = 0; if ($element == "optional") { $team_opening = ''; $team_opening_count = 0; $team_opening .= '<div class="ts-team-opening-parent">'; if (isset($Team_Header)) { if ($Team_Symbol == "none") { $team_opening .= '<div class="ts-team-opening-header" style="text-align: ' . $optional_title_align . '; font-size: ' . $optional_title_size . 'px;">' . $Team_Header . '</div>'; } else { $team_opening .= '<div class="ts-team-opening-header" style="text-align: ' . $optional_title_align . '; font-size: ' . $optional_title_size . 'px;"><i class="ts-teamicon-' . $Team_Symbol . ' ts-font-icon ts-teammate-icon" style="font-size: ' . $optional_title_size . 'px; line-height: ' . $optional_title_size . 'px; width: ' . $optional_title_size . 'px; height: ' . $optional_title_size . 'px;' . (isset($Team_Symbolcolor) ? "color: " . $Team_Symbolcolor . ";" : "") . '"></i>' . $Team_Header . '</div>'; } } if (isset($Team_Opening) && $Team_Opening != 'block') { $team_opening_count++; $team_opening .= '<div class="ts-team-opening-block" style="text-align: ' . $optional_text_align . '; font-size: ' . $optional_font_size . 'px;">' . $Team_Opening . '</div>'; } $team_opening .= '</div>'; } // Build Team Social Links $team_social = ''; $team_social_count = 0; if ($element == "social") { $team_social .= '<ul class="ts-teammate-icons ' . $social_icon_style . ' clearFixMe" style="">'; if (isset($Team_Facebook)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $social_icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $social_icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Facebook"><a style="" target="_blank" class="ts-teammate-link facebook ' . $social_icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Facebook) . '"><i class="ts-teamicon-facebook1 ts-font-icon" style="' . $icon_frame_size . ' ' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Google)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $social_icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $social_icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Google+"><a style="" target="_blank" class="ts-teammate-link gplus ' . $social_icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Google) . '"><i class="ts-teamicon-googleplus1 ts-font-icon" style="' . $icon_frame_size . ' ' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Twitter)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $social_icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $social_icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Twitter"><a style="" target="_blank" class="ts-teammate-link twitter ' . $social_icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Twitter) . '"><i class="ts-teamicon-twitter1 ts-font-icon" style="' . $icon_frame_size . ' ' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Linkedin)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $social_icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $social_icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="LinkedIn"><a style="" target="_blank" class="ts-teammate-link linkedin ' . $social_icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Linkedin) . '"><i class="ts-teamicon-linkedin ts-font-icon" style="' . $icon_frame_size . ' ' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Xing)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $social_icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $social_icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Xing"><a style="" target="_blank" class="ts-teammate-link xing ' . $social_icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Xing) . '"><i class="ts-teamicon-xing3 ts-font-icon" style="' . $icon_frame_size . ' ' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Envato)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $social_icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $social_icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Envato"><a style="" target="_blank" class="ts-teammate-link envato ' . $social_icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Envato) . '"><i class="ts-teamicon-envato ts-font-icon" style="' . $icon_frame_size . ' ' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Rss)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $social_icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $social_icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="RSS"><a style="" target="_blank" class="ts-teammate-link rss ' . $social_icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Rss) . '"><i class="ts-teamicon-rss1 ts-font-icon" style="' . $icon_frame_size . ' ' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Forrst)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $social_icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $social_icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Forrst"><a style="" target="_blank" class="ts-teammate-link forrst ' . $social_icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Forrst) . '"><i class="ts-teamicon-forrst1 ts-font-icon" style="' . $icon_frame_size . ' ' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Flickr)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $social_icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $social_icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Flickr"><a style="" target="_blank" class="ts-teammate-link flickr ' . $social_icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Flickr) . '"><i class="ts-teamicon-flickr3 ts-font-icon" style="' . $icon_frame_size . ' ' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Instagram)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $social_icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $social_icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Instagram"><a style="" target="_blank" class="ts-teammate-link instagram ' . $social_icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Instagram) . '"><i class="ts-teamicon-instagram ts-font-icon" style="' . $icon_frame_size . ' ' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Picasa)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $social_icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $social_icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Picasa"><a style="" target="_blank" class="ts-teammate-link picasa ' . $social_icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Picasa) . '"><i class="ts-teamicon-picasa1 ts-font-icon" style="' . $icon_frame_size . ' ' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Pinterest)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $social_icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $social_icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Pinterest"><a style="" target="_blank" class="ts-teammate-link pinterest ' . $social_icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Pinterest) . '"><i class="ts-teamicon-pinterest1 ts-font-icon" style="' . $icon_frame_size . ' ' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Vimeo)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $social_icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $social_icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Vimeo"><a style="" target="_blank" class="ts-teammate-link vimeo ' . $social_icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Vimeo) . '"><i class="ts-teamicon-vimeo1 ts-font-icon" style="' . $icon_frame_size . ' ' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (isset($Team_Youtube)) { $team_social_count++; $team_social .= '<li class="ts-teammate-icon ' . $social_icon_align . ' ' . $team_tooltipclasses . '" style="margin: ' . $social_icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="YouTube"><a style="" target="_blank" class="ts-teammate-link youtube ' . $social_icon_hover . '" href="' . TS_VCSC_makeValidURL($Team_Youtube) . '"><i class="ts-teamicon-youtube1 ts-font-icon" style="' . $icon_frame_size . ' ' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } $team_social .= '</ul>'; } // Build Team Skills $team_skills = ''; $team_skills_count = 0; if ($element == "skillsets") { $skills_classes = ''; if ($skills_stripes == "true") { $skills_classes .= ' striped'; if ($skills_animation == "true") { $skills_classes .= ' animated'; } } if (isset($Team_Skillset)) { $skill_entries = get_post_meta($Team_ID, 'ts_vcsc_team_skills_skillset', true); $skill_background = ''; $team_skills .= '<div class="ts-teampage-member-skills">'; foreach ((array) $skill_entries as $key => $entry) { $skill_name = $skill_value = $skill_color = ''; if (isset($entry['skillname'])) { $skill_name = esc_html($entry['skillname']); } if (isset($entry['skillvalue'])) { $skill_value = esc_html($entry['skillvalue']); } if (isset($entry['skillcolor'])) { $skill_color = esc_html($entry['skillcolor']); } if (strlen($skill_name) != 0 && strlen($skill_value) != 0) { $team_skills_count++; if (strlen($skill_color) != 0 && $skill_color != '#') { $skill_background = 'background-color: ' . $skill_color . ';'; } $team_skills .= '<div class="ts-skillbars-style1-wrapper clearfix">'; $team_skills .= '<div class="ts-skillbars-style1-name">' . $skill_name . '<span>(' . $skill_value . '%)</span></div><div class="ts-skillbars-style1-skillbar" style="height: ' . $skills_height . 'px;"><div class="ts-skillbars-style1-value' . $skills_classes . '" data-color="' . $skill_color . '" data-level="' . $skill_value . '%" style="width: ' . $skill_value . '%; ' . $skill_background . '"></div></div>'; $team_skills .= '</div>'; } } $team_skills .= '</div>'; } else { if (!isset($Team_Skillset)) { $skill_background = ''; $team_skills .= '<div class="ts-member-skills">'; if (isset($Team_Skillname1) && isset($Team_Skillvalue1)) { $team_skills_count++; if (isset($Team_Skillcolor1)) { $skill_background = 'background-color: ' . $Team_Skillcolor1 . ';'; } $team_skills .= '<div class="ts-skillbars-style1-name">' . $Team_Skillname1 . '<span>(' . $Team_Skillvalue1 . '%)</span></div><div class="ts-skillbars-style1-skillbar" style="height: ' . $skills_height . 'px;"><div class="ts-skillbars-style1-value' . $skills_classes . '" data-color="' . $Team_Skillcolor1 . '" data-level="' . $Team_Skillvalue1 . '%" style="width: ' . $Team_Skillvalue1 . '%; ' . $skill_background . '"></div></div>'; } if (isset($Team_Skillname2) && isset($Team_Skillvalue2)) { $team_skills_count++; if (isset($Team_Skillcolor2)) { $skill_background = 'background-color: ' . $Team_Skillcolor2 . ';'; } $team_skills .= '<div class="ts-skillbars-style1-name">' . $Team_Skillname2 . '<span>(' . $Team_Skillvalue2 . '%)</span></div><div class="ts-skillbars-style1-skillbar" style="height: ' . $skills_height . 'px;"><div class="ts-skillbars-style1-value' . $skills_classes . '" data-color="' . $Team_Skillcolor2 . '" data-level="' . $Team_Skillvalue2 . '%" style="width: ' . $Team_Skillvalue2 . '%; ' . $skill_background . '"></div></div>'; } if (isset($Team_Skillname3) && isset($Team_Skillvalue3)) { $team_skills_count++; if (isset($Team_Skillcolor3)) { $skill_background = 'background-color: ' . $Team_Skillcolor3 . ';'; } $team_skills .= '<div class="ts-skillbars-style1-name">' . $Team_Skillname3 . '<span>(' . $Team_Skillvalue3 . '%)</span></div><div class="ts-skillbars-style1-skillbar" style="height: ' . $skills_height . 'px;"><div class="ts-skillbars-style1-value' . $skills_classes . '" data-color="' . $Team_Skillcolor3 . '" data-level="' . $Team_Skillvalue3 . '%" style="width: ' . $Team_Skillvalue3 . '%; ' . $skill_background . '"></div></div>'; } if (isset($Team_Skillname4) && isset($Team_Skillvalue4)) { $team_skills_count++; if (isset($Team_Skillcolor4)) { $skill_background = 'background-color: ' . $Team_Skillcolor4 . ';'; } $team_skills .= '<div class="ts-skillbars-style1-name">' . $Team_Skillname4 . '<span>(' . $Team_Skillvalue4 . '%)</span></div><div class="ts-skillbars-style1-skillbar" style="height: ' . $skills_height . 'px;"><div class="ts-skillbars-style1-value' . $skills_classes . '" data-color="' . $Team_Skillcolor4 . '" data-level="' . $Team_Skillvalue4 . '%" style="width: ' . $Team_Skillvalue4 . '%; ' . $skill_background . '"></div></div>'; } if (isset($Team_Skillname5) && isset($Team_Skillvalue5)) { $team_skills_count++; if (isset($Team_Skillcolor5)) { $skill_background = 'background-color: ' . $Team_Skillcolor5 . ';'; } $team_skills .= '<div class="ts-skillbars-style1-name">' . $Team_Skillname5 . '<span>(' . $Team_Skillvalue5 . '%)</span></div><div class="ts-skillbars-style1-skillbar" style="height: ' . $skills_height . 'px;"><div class="ts-skillbars-style1-value' . $skills_classes . '" data-color="' . $Team_Skillcolor5 . '" data-level="' . $Team_Skillvalue5 . '%" style="width: ' . $Team_Skillvalue5 . '%; ' . $skill_background . '"></div></div>'; } if (isset($Team_Skillname6) && isset($Team_Skillvalue6)) { $team_skills_count++; if (isset($Team_Skillcolor6)) { $skill_background = 'background-color: ' . $Team_Skillcolor6 . ';'; } $team_skills .= '<div class="ts-skillbars-style1-name">' . $Team_Skillname6 . '<span>(' . $Team_Skillvalue6 . '%)</span></div><div class="ts-skillbars-style1-skillbar" style="height: ' . $skills_height . 'px;"><div class="ts-skillbars-style1-value' . $skills_classes . '" data-color="' . $Team_Skillcolor6 . '" data-level="' . $Team_Skillvalue6 . '%" style="width: ' . $Team_Skillvalue6 . '%; ' . $skill_background . '"></div></div>'; } $team_skills .= '</div>'; } } } // Build Download Button $team_download = ''; if ($element == 'download') { if (isset($Team_Buttonfile) || isset($Team_Attachment)) { if (isset($Team_Buttonfile)) { $Team_File = $Team_Buttonfile; } else { $Team_Attachment = get_post_meta($Team_ID, 'ts_vcsc_team_basic_attachment', true); $Team_Attachment = wp_get_attachment_url($Team_Attachment['id']); $Team_File = $Team_Attachment; } $Team_FileFormat = pathinfo($Team_File, PATHINFO_EXTENSION); if (isset($Team_Buttontype)) { $Team_Buttontype = $Team_Buttontype; } else { $Team_Buttontype = 'ts-button-3d'; } // Button Width + Position Adjustment if ($button_width < 100) { $button_style = 'width: ' . $button_width . '%; margin: 0 auto; display: block;'; if ($button_align == 'center') { $button_style .= ' float: none;'; } else { if ($button_align == 'left') { $button_style .= ' float: left;'; } else { if ($button_align == 'right') { $button_style .= ' float: right;'; } } } } if (!empty($Team_File)) { $team_download .= '<div class="ts-teammate-download" style="' . $button_style . '">'; if (isset($Team_Buttontooltip)) { if (isset($Team_Buttonicon) && $Team_Buttonicon == "none" || !isset($Team_Buttonicon)) { $team_download .= '<a class="ts-teammate-file-link ts-button ' . $Team_Buttontype . ' ' . $team_tooltipclasses . '" data-format="' . $Team_FileFormat . '" data-tstooltip="' . $Team_Buttontooltip . '" href="' . $Team_File . '" target="_blank">' . $Team_Buttonlabel . '</a>'; } else { $team_download .= '<a class="ts-teammate-file-link ts-button ' . $Team_Buttontype . ' ' . $team_tooltipclasses . '" data-format="' . $Team_FileFormat . '" data-tstooltip="' . $Team_Buttontooltip . '" href="' . $Team_File . '" target="_blank"><i class="ts-teamicon-' . $Team_Buttonicon . ' ts-font-icon ts-teammate-icon" style="' . (isset($Team_Buttoncolor) ? "color: " . $Team_Buttoncolor . ":" : "") . '"></i> ' . $Team_Buttonlabel . '</a>'; } } else { if (isset($Team_Buttonicon) && $Team_Buttonicon == "none" || !isset($Team_Buttonicon)) { $team_download .= '<a class="ts-teammate-file-link ts-button ' . $Team_Buttontype . '" data-format="' . $Team_FileFormat . '" href="' . $Team_File . '" target="_blank">' . $Team_Buttonlabel . '</a>'; } else { $team_download .= '<a class="ts-teammate-file-link ts-button ' . $Team_Buttontype . '" data-format="' . $Team_FileFormat . '" href="' . $Team_File . '" target="_blank"><i class="ts-teamicon-' . $Team_Buttonicon . ' ts-font-icon ts-teammate-icon" style="' . (isset($Team_Buttoncolor) ? "color: " . $Team_Buttoncolor . ";" : "") . '"></i> ' . $Team_Buttonlabel . '</a>'; } } $team_download .= '</div>'; if (get_option('ts_vcsc_extend_settings_loadForcable', 0) == 0) { wp_enqueue_style('ts-extend-buttons', TS_VCSC_GetResourceURL('css/jquery.buttons.css'), null, false, 'all'); } } } } if (function_exists('vc_shortcode_custom_css_class')) { $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'ts-teampage ' . $animation_css . ' ' . $el_class . ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS_VCSC_Team_Page_Element', $atts); } else { $css_class = 'ts-teampage ' . $animation_css . ' ' . $el_class; } // Create Output if ($element == 'image') { // Grayscale Class if ($show_grayscale == "true" && $grayscale_hover == "true") { $grayscale_class = 'ts-grayscale-hover'; } else { if ($show_grayscale == "true" && $grayscale_hover == "false") { $grayscale_class = 'ts-grayscale-default'; } else { $grayscale_class = 'ts-grayscale-none'; } } if ($style == "style1" || $style == "style2") { $output .= '<div id="' . $team_block_id . '" class="ts-teampage-image ts-team1 ' . $css_class . ' ' . $grayscale_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; padding: 0;">'; if (!empty($Team_Image)) { $output .= '<div class="team-avatar" style="margin: 0 auto;">'; $output .= '<img src="' . $Team_Image . '" style="max-width: 100%; max-height: 100%;" rel="' . ($show_lightbox == "true" ? "nachoteam" : "") . '" title="' . $Team_Title . ' / ' . $Team_Position . '" alt="" class="image' . $style . ' ' . ($show_lightbox == "true" ? "nch-lightbox" : "") . ' ' . ($show_grayscale == "true" ? "grayscale" : "") . ' ' . ($show_effects == "true" ? "hovereffect" : "") . '">'; $output .= '</div>'; } $output .= '</div>'; } if ($style == "style3") { $output .= '<div id="' . $team_block_id . '" class="ts-teampage-image ts-team2 ' . $css_class . ' ' . $grayscale_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; padding: 0;">'; if (!empty($Team_Image)) { $output .= '<div class="ts-team2-header" style="margin: 0 auto;">'; $output .= '<img src="' . $Team_Image . '" rel="' . ($show_lightbox == "true" ? "nachoteam" : "") . '" title="' . $Team_Title . ' / ' . $Team_Position . '" alt="" class="image' . $style . ' ' . ($show_lightbox == "true" ? "nch-lightbox" : "") . ' ' . ($show_grayscale == "true" ? "grayscale" : "") . ' ' . ($show_effects == "true" ? "hovereffect" : "") . '">'; $output .= '</div>'; } $output .= '</div>'; } if ($style == "style4") { $output .= '<div id="' . $team_block_id . '" class="ts-teampage-image ts-team3 ' . $css_class . ' ' . $grayscale_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; padding: 0;">'; if (!empty($Team_Image)) { $output .= '<img class="ts-team3-person-image image' . $style . ' ' . ($show_lightbox == "true" ? "nch-lightbox" : "") . ' ' . ($show_grayscale == "true" ? "grayscale" : "") . ' ' . ($show_effects == "true" ? "hovereffect" : "") . '" rel="' . ($show_lightbox == "true" ? "nachoteam" : "") . '" src="' . $Team_Image . '" title="' . $Team_Title . ' / ' . $Team_Position . '" alt="">'; } $output .= '</div>'; } } if ($element == 'name') { $output .= '<div id="' . $team_block_id . '" class="ts-teampage-name ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; padding: 0;">'; $output .= '<div class="team-user" style="text-align: ' . $name_align . '">'; if (!empty($Team_Title)) { $output .= '<h4 class="team-title" style="font-size: ' . $name_title_size . 'px;">' . $Team_Title . '</h4>'; } if (!empty($Team_Position)) { $output .= '<div class="team-job" style="font-size: ' . $name_job_size . 'px;">' . $Team_Position . '</div>'; } $output .= '</div>'; $output .= '</div>'; } if ($element == 'contact') { $output .= '<div id="' . $team_block_id . '" class="ts-teampage-contact ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; padding: 0;">'; if ($team_contact_count > 0) { $output .= $team_contact; } $output .= '</div>'; } if ($element == 'social') { $output .= '<div id="' . $team_block_id . '" class="ts-teampage-social ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; padding: 0;">'; $output .= $team_social; $output .= '</div>'; } if ($element == 'description') { $output .= '<div id="' . $team_block_id . '" class="ts-teampage-description ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; padding: 0;">'; $output .= '<div class="team-information">'; if (function_exists('wpb_js_remove_wpautop')) { $output .= '' . wpb_js_remove_wpautop(do_shortcode($Team_Content), true) . ''; } else { $output .= '' . do_shortcode($Team_Content) . ''; } $output .= '</div>'; $output .= '</div>'; } if ($element == 'optional') { $output .= '<div id="' . $team_block_id . '" class="ts-teampage-opening ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; padding: 0;">'; if ($team_opening_count > 0) { $output .= $team_opening; } $output .= '</div>'; } if ($element == 'download') { $output .= '<div id="' . $team_block_id . '" class="ts-teampage-download ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; padding: 0;">'; $output .= $team_download; $output .= '</div>'; } if ($element == 'skillsets') { $output .= '<div id="' . $team_block_id . '" class="ts-teampage-skills ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px; padding: 0;">'; if ($team_skills_count > 0) { $output .= $team_skills; } $output .= '</div>'; } echo $output; $myvariable = ob_get_clean(); return $myvariable; }
?> <div class="ts-vcsc-section-main" style="<?php echo get_option('ts_vcsc_extend_settings_tinymceCustomArray', '') != '' ? "" : "display: none;"; ?> "> <div class="ts-vcsc-section-title ts-vcsc-section-show"><i class="dashicons-upload"></i>Custom Uploaded Icon Font:</div> <div class="ts-vcsc-section-content"> <div style="margin-top: 20px; height: 315px;" class="ts_vcsc_extend_font_selector_container clearFixMe"> <?php foreach ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_Icon_Font_Settings as $Icon_Font => $iconfont) { if ($iconfont['setting'] == "Custom") { $output = ''; if (get_option('ts_vcsc_extend_settings_tinymceCustomArray', '') != '') { $output = ''; echo '<div class="ts_vcsc_extend_font_selector ' . $iconfont['type'] . '" data-active="' . (${'ts_vcsc_extend_settings_tinymce' . $iconfont['setting'] . ''} == 1 ? 'true' : 'false') . '" data-icons="' . $iconfont['count'] . '" data-name="' . $iconfont['setting'] . '" data-type="' . $iconfont['type'] . '">'; echo '<img id="ts_vcsc_extend_settings_tinymce' . $iconfont['setting'] . '_image" data-toggle="ts-switch-toggle-' . $iconfont['setting'] . '" data-load="ts-load-toggle-' . $iconfont['setting'] . '" class="ts_vcsc_check_image' . (${'ts_vcsc_extend_settings_tinymce' . $iconfont['setting'] . ''} == 1 ? " checked" : "") . '" style="" src=' . TS_VCSC_GetResourceURL('images/fonts/font_' . strtolower($iconfont['setting']) . '.jpg') . '>'; echo '<div class="ts_vcsc_extend_font_summary" style="margin-bottom: 10px;">Created by ' . get_option('ts_vcsc_extend_settings_tinymceCustomAuthor', 'Custom User') . '</div>'; echo '<div class="ts-switch-button ts-composer-switch" data-value="' . (${'ts_vcsc_extend_settings_tinymce' . $iconfont['setting'] . ''} == 1 ? 'true' : 'false') . '" data-width="60" data-style="compact" data-on="Yes" data-off="No" style="float: left; margin-right: 10px;">'; echo '<input style="display: none; " type="checkbox" data-load="ts_vcsc_extend_settings_load' . $iconfont['setting'] . '" data-image="ts_vcsc_extend_settings_tinymce' . $iconfont['setting'] . '_image" data-check="ts_vcsc_extend_settings_tinymceIconFont" name="ts_vcsc_extend_settings_tinymce' . $iconfont['setting'] . '" id="ts_vcsc_extend_settings_tinymce' . $iconfont['setting'] . '" class="validate[funcCall[checkIconFontSelect]] toggle-check ts_vcsc_extend_settings_font" data-error="Allowable Icon Fonts Selection" data-order="3" value="1" ' . (${'ts_vcsc_extend_settings_tinymce' . $iconfont['setting'] . ''} == 1 ? ' checked="checked"' : '') . ' />'; echo '<div id="ts-switch-toggle-' . $iconfont['setting'] . '" data-load="ts-load-toggle-' . $iconfont['setting'] . '" data-image="ts_vcsc_extend_settings_tinymce' . $iconfont['setting'] . '_image" class="toggle toggle-light ts-switch-toggle" style="width: 60px; height: 20px;">'; echo '<div class="toggle-slide">'; echo '<div class="toggle-inner">'; echo '<div class="toggle-on ' . (${'ts_vcsc_extend_settings_tinymce' . $iconfont['setting'] . ''} == 1 ? 'active' : '') . '">Yes</div>'; echo '<div class="toggle-blob"></div>'; echo '<div class="toggle-off ' . (${'ts_vcsc_extend_settings_tinymce' . $iconfont['setting'] . ''} == 0 ? 'active' : '') . '">No</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '<label style="font-weight: bold;" class="labelToggleBox" for="ts_vcsc_extend_settings_tinymce' . $iconfont['setting'] . '">' . get_option('ts_vcsc_extend_settings_tinymceCustomName', 'Custom User Font') . ' (' . $iconfont['count'] . ' Icons)</label>'; echo '<span class="ts_tiny_check_load ts_vcsc_extend_settings_load' . $iconfont['setting'] . '_span" style="width: 100%; display: block; margin-top: 5px; margin-bottom: 10px; margin-left: 20px;">';
function TS_VCSC_WooCommerce_Grid_Function_Isotope() { echo '<script data-cfasync="false" type="text/javascript" src="' . TS_VCSC_GetResourceURL('js/jquery.vcsc.isotope.custom.min.js') . '"></script>'; }