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; }
function TS_VCSC_Icons_Social_Function($atts) { global $VISUAL_COMPOSER_EXTENSIONS; ob_start(); wp_enqueue_style('ts-font-teammates'); 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('icon_style' => 'simple', 'icon_background' => '#f5f5f5', 'icon_frame_color' => '#f5f5f5', 'icon_size' => 20, 'icon_frame_thick' => 1, 'icon_margin' => 5, 'icon_padding' => 10, 'icon_align' => 'left', 'icon_hover' => '', 'tooltip_show' => 'true', 'tooltip_text' => 'Click here to view our profile on ', 'tooltip_css' => 'false', 'tooltip_style' => 'ts-simptip-style-black', 'tooltip_position' => 'ts-simptip-position-top', 'tooltipster_offsetx' => 0, 'tooltipster_offsety' => 0, 'email' => '', 'phone' => '', 'cell' => '', 'portfolio' => '', 'link' => '', 'behance' => '', 'digg' => '', 'dribbble' => '', 'dropbox' => '', 'envato' => '', 'evernote' => '', 'facebook' => '', 'flickr' => '', 'github' => '', 'gplus' => '', 'instagram' => '', 'lastfm' => '', 'linkedin' => '', 'paypal' => '', 'picasa' => '', 'pinterest' => '', 'rss' => '', 'skype' => '', 'soundcloud' => '', 'spotify' => '', 'stumbleupon' => '', 'twitter' => '', 'tumblr' => '', 'vimeo' => '', 'xing' => '', 'youtube' => '', 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); if (!empty($el_id)) { $social_icon_id = $el_id; } else { $social_icon_id = 'ts-vcsc-social-icons-' . mt_rand(999999, 9999999); } if (empty($icon_background) || $icon_style == 'simple') { $icon_frame_style = 'padding: 0px;'; } else { $icon_frame_style = 'padding: 0px; background: ' . $icon_background . ';'; } if ($icon_style == 'simple') { $icon_frame_border = ''; } else { $icon_frame_border = ' border: ' . $icon_frame_thick . 'px solid ' . $icon_frame_color . ';'; } if ($icon_align == "left") { $icon_margin_adjust = "margin-left: -" . $icon_margin . "px;"; $icon_horizontal_adjust = ""; } else { if ($icon_align == "right") { $icon_margin_adjust = "margin-right: -" . $icon_margin . "px;"; $icon_horizontal_adjust = ""; } else { $icon_margin_adjust = ""; $icon_horizontal_adjust = ""; } } $icon_size_adjust = "font-size: " . $icon_size . "px; line-height: " . ($icon_size + $icon_padding) . "px; height: " . $icon_size . "px; width: " . $icon_size . "px;"; $link_size_adjust = "height: " . ($icon_size + $icon_padding) . "px; width: " . ($icon_size + $icon_padding) . "px; line-height: " . ($icon_size + $icon_padding) . "px;"; // Tooltip if ($tooltip_position == "ts-simptip-position-top" || $tooltip_position == "top") { $tooltip_position = "top"; } if ($tooltip_position == "ts-simptip-position-left" || $tooltip_position == "left") { $tooltip_position = "left"; } if ($tooltip_position == "ts-simptip-position-right" || $tooltip_position == "right") { $tooltip_position = "right"; } if ($tooltip_position == "ts-simptip-position-bottom" || $tooltip_position == "bottom") { $tooltip_position = "bottom"; } $tooltip_class = 'ts-has-tooltipster-tooltip'; if ($tooltip_style == "" || $tooltip_style == "ts-simptip-style-black" || $tooltip_style == "tooltipster-black") { $tooltip_style = "tooltipster-black"; } if ($tooltip_style == "ts-simptip-style-gray" || $tooltip_style == "tooltipster-gray") { $tooltip_style = "tooltipster-gray"; } if ($tooltip_style == "ts-simptip-style-green" || $tooltip_style == "tooltipster-green") { $tooltip_style = "tooltipster-green"; } if ($tooltip_style == "ts-simptip-style-blue" || $tooltip_style == "tooltipster-blue") { $tooltip_style = "tooltipster-blue"; } if ($tooltip_style == "ts-simptip-style-red" || $tooltip_style == "tooltipster-red") { $tooltip_style = "tooltipster-red"; } if ($tooltip_style == "ts-simptip-style-orange" || $tooltip_style == "tooltipster-orange") { $tooltip_style = "tooltipster-orange"; } if ($tooltip_style == "ts-simptip-style-yellow" || $tooltip_style == "tooltipster-yellow") { $tooltip_style = "tooltipster-yellow"; } if ($tooltip_style == "ts-simptip-style-purple" || $tooltip_style == "tooltipster-purple") { $tooltip_style = "tooltipster-purple"; } if ($tooltip_style == "ts-simptip-style-pink" || $tooltip_style == "tooltipster-pink") { $tooltip_style = "tooltipster-pink"; } if ($tooltip_style == "ts-simptip-style-white" || $tooltip_style == "tooltipster-white") { $tooltip_style = "tooltipster-white"; } if (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-Social-Icons', $atts); } else { $css_class = ''; } $output = ''; $output .= '<div class="ts-social-icon-links ' . $el_class . ' ' . $css_class . '" style="' . $icon_margin_adjust . '">'; $output .= '<div id="social-networks-' . $social_icon_id . '" class="ts-social-network-shortcode ts-shortcode social-align-' . $icon_align . '">'; $output .= '<ul class="ts-social-icons ' . $icon_style . '">'; $social_array = array(); $social_count = 0; $social_defaults = get_option('ts_vcsc_extend_settings_socialDefaults', ''); if ($social_defaults == false || empty($social_defaults) || $social_defaults == "" || !is_array($social_defaults)) { $social_defaults = array(); } foreach ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_Social_Networks_Array as $Social_Network => $social) { if ($social['class'] == "ts-social-email" || $social['class'] == "ts-social-phone" || $social['class'] == "ts-social-cell" || $social['class'] == "ts-social-skype") { $social_lines = array('network' => $Social_Network, 'class' => $social['class'], 'icon' => $social['icon'], 'link' => ${$social['string']} == ' ' ? '' : ${$social['string']}, 'order' => isset($social_defaults[$Social_Network]['order']) ? $social_defaults[$Social_Network]['order'] : $social['order'], 'title' => '' . ${$social['string']} . ''); } else { if ($social['class'] == "ts-social-portfolio" || $social['class'] == "ts-social-link") { $social_lines = array('network' => $Social_Network, 'class' => $social['class'], 'icon' => $social['icon'], 'link' => ${$social['string']} == ' ' ? '' : ${$social['string']}, 'order' => isset($social_defaults[$Social_Network]['order']) ? $social_defaults[$Social_Network]['order'] : $social['order'], 'title' => '' . ucfirst($Social_Network) . ''); } else { $social_lines = array('network' => $Social_Network, 'class' => $social['class'], 'icon' => $social['icon'], 'link' => ${$social['string']} == ' ' ? '' : ${$social['string']}, 'order' => isset($social_defaults[$Social_Network]['order']) ? $social_defaults[$Social_Network]['order'] : $social['order'], 'title' => '' . $tooltip_text . ucfirst($Social_Network) . ''); } } $social_array[] = $social_lines; $social_count = $social_count + 1; } TS_VCSC_SortMultiArray($social_array, 'order'); if ($icon_align == "right") { $social_array = array_reverse($social_array); } 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']; if ($Social_Class == "ts-social-phone" || $Social_Class == "ts-social-cell") { if ($tooltip_css == "false") { $Social_Title = 'title="' . $social_array[$index]['title'] . '"'; $Tooltip_Class = ''; } else { $Social_Title = 'data-tooltipster-html="false" data-tooltipster-title="" data-tooltipster-text="' . $social_array[$index]['title'] . '" 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 = $tooltip_class; } } else { if ($tooltip_show == 'true') { if ($tooltip_css == "false") { $Social_Title = 'title="' . $social_array[$index]['title'] . '"'; $Tooltip_Class = ''; } else { $Social_Title = 'data-tooltipster-html="false" data-tooltipster-title="" data-tooltipster-text="' . $social_array[$index]['title'] . '" 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 = $tooltip_class; } } else { $Social_Title = ''; $Tooltip_Class = ''; } } if (!empty($Social_Link)) { if ($Social_Class == "ts-social-email") { $output .= '<li class="ts-social-icon ' . $icon_hover . ' ' . $icon_align . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . ' ' . $link_size_adjust . '"><a style="" target="_blank" class="' . $Social_Class . ' ' . $Tooltip_Class . '" style="" href="mailto:' . $Social_Link . '" ' . $Social_Title . '><i class="' . $Social_Icon . '" style="' . $icon_horizontal_adjust . ' ' . $icon_size_adjust . '"></i></a></li>'; } else { if ($Social_Class == "ts-social-phone") { $output .= '<li class="ts-social-icon ' . $icon_hover . ' ' . $icon_align . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . ' ' . $link_size_adjust . '"><a style="" target="_blank" class="' . $Social_Class . ' ' . $Tooltip_Class . '" style="" href="#" ' . $Social_Title . '" onclick="return false"><i class="' . $Social_Icon . '" style="' . $icon_horizontal_adjust . ' ' . $icon_size_adjust . '"></i></a></li>'; } else { if ($Social_Class == "ts-social-cell") { $output .= '<li class="ts-social-icon ' . $icon_hover . ' ' . $icon_align . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . ' ' . $link_size_adjust . '"><a style="" target="_blank" class="' . $Social_Class . ' ' . $Tooltip_Class . '" style="" href="#" ' . $Social_Title . '" onclick="return false"><i class="' . $Social_Icon . '" style="' . $icon_horizontal_adjust . ' ' . $icon_size_adjust . '"></i></a></li>'; } else { if ($Social_Class == "ts-social-skype") { $output .= '<li class="ts-social-icon ' . $icon_hover . ' ' . $icon_align . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . ' ' . $link_size_adjust . '"><a style="" target="_blank" class="' . $Social_Class . ' ' . $Tooltip_Class . '" style="" href="#" ' . $Social_Title . '" onclick="return false"><i class="' . $Social_Icon . '" style="' . $icon_horizontal_adjust . ' ' . $icon_size_adjust . '"></i></a></li>'; } else { $output .= '<li class="ts-social-icon ' . $icon_hover . ' ' . $icon_align . '" style="margin: ' . $icon_margin . 'px; ' . $icon_frame_border . ' ' . $icon_frame_style . ' ' . $link_size_adjust . '"><a style="" target="_blank" class="' . $Social_Class . ' ' . $Tooltip_Class . '" style="" href="' . TS_VCSC_makeValidURL($Social_Link) . '" ' . $Social_Title . '><i class="' . $Social_Icon . '" style="' . $icon_horizontal_adjust . ' ' . $icon_size_adjust . '"></i></a></li>'; } } } } } } $output .= '</ul>'; $output .= '</div>'; $output .= '</div>'; echo $output; $myvariable = ob_get_clean(); return $myvariable; }
function TS_VCSC_Meet_Team_Function($atts, $content = null) { global $VISUAL_COMPOSER_EXTENSIONS; ob_start(); wp_enqueue_style('ts-extend-simptip'); wp_enqueue_style('ts-extend-animations'); wp_enqueue_style('ts-font-teammates'); wp_enqueue_style('ts-visual-composer-extend-front'); wp_enqueue_script('ts-visual-composer-extend-front'); extract(shortcode_atts(array('style' => 'style1', 'image' => '', 'name' => '', 'title' => '', 'description' => '', 'icon_style' => 'simple', 'icon_background' => '#f5f5f5', 'icon_frame_color' => '#f5f5f5', 'icon_frame_thick' => 1, 'icon_margin' => 5, 'icon_align' => 'left', 'icon_hover' => '', 'phone' => '', 'cell' => '', 'portfolio' => '', 'link' => '', 'email' => '', 'facebook' => '', 'gplus' => '', 'twitter' => '', 'linkedin' => '', 'xing' => '', 'skype' => '', 'flickr' => '', 'picasa' => '', 'instagram' => '', 'vimeo' => '', 'youtube' => '', 'tooltip_style' => '', 'tooltip_position' => 'ts-simptip-position-top', 'animation_view' => '', 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); if (!empty($el_id)) { $team_id = $el_id; } else { $team_id = 'ts-vcsc-meet-team-' . mt_rand(999999, 9999999); } $team_image = wp_get_attachment_image_src($image, 'large'); if ($animation_view != '') { $animation_css = TS_VCSC_GetCSSAnimation($animation_view); } else { $animation_css = ''; } $output = ''; $team_tooltipclasses = "ts-simptip-multiline " . $tooltip_style . " " . $tooltip_position; if (empty($icon_background) || $icon_style == 'simple') { $icon_frame_style = ''; } else { $icon_frame_style = 'background: ' . $icon_background . ';'; } if ($icon_frame_thick > 0) { $icon_top_adjust = 'top: ' . (10 - $icon_frame_thick) . 'px;'; } else { $icon_top_adjust = ''; } if ($icon_style == 'simple') { $icon_frame_border = ''; } else { $icon_frame_border = ' border: ' . $icon_frame_thick . 'px solid ' . $icon_frame_color . ';'; } $icon_horizontal_adjust = ''; $team_social = ''; $team_social .= '<ul class="ts-teammate-icons ' . $icon_style . '">'; if (strlen($email) != 0) { //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="email ' . $team_tooltipclasses . '" href="mailto:' . $email . '" data-tstooltip="' . $email . '"><i class="email" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Email"><a style="" target="_blank" class="ts-teammate-link email ' . $icon_hover . '" href="mailto:' . $email . '"><i class="ts-teamicon-email2 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (strlen($phone) != 0) { //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="phone ' . $team_tooltipclasses . '" href="#" data-tstooltip="' . $phone . '"><i class="phone" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="' . $phone . '"><a style="" target="_blank" class="ts-teammate-link phone ' . $icon_hover . '" href="#"><i class="ts-teamicon-phone2 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (strlen($cell) != 0) { //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="cell ' . $team_tooltipclasses . '" href="#" data-tstooltip="' . $cell . '"><i class="cell" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="' . $cell . '"><a style="" target="_blank" class="ts-teammate-link mobile ' . $icon_hover . '" href="#"><i class="ts-teamicon-mobile ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (strlen($skype) != 0) { //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="skype ' . $team_tooltipclasses . '" href="#" data-tstooltip="' . $skype . '"><i class="skype" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="' . $skype . '"><a style="" target="_blank" class="ts-teammate-link skype ' . $icon_hover . '" href="#"><i class="ts-teamicon-skype ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (strlen($portfolio) != 0) { //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="portfolio ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($portfolio) . '" data-tstooltip="' . $portfolio . '"><i class="portfolio" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Portfolio"><a style="" target="_blank" class="ts-teammate-link portfolio ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($portfolio) . '"><i class="ts-teamicon-portfolio ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (strlen($link) != 0) { //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="link ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($link) . '" data-tstooltip="' . $link . '"><i class="link" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Other"><a style="" target="_blank" class="ts-teammate-link portfolio ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($link) . '"><i class="ts-teamicon-link ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (strlen($facebook) != 0) { //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="facebook ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($facebook) . '" data-tstooltip="' . $facebook . '"><i class="facebook" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Facebook"><a style="" target="_blank" class="ts-teammate-link facebook ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($facebook) . '"><i class="ts-teamicon-facebook1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (strlen($gplus) != 0) { //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="gplus ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($gplus) . '" data-tstooltip="' . $gplus . '"><i class="gplus" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Google+"><a style="" target="_blank" class="ts-teammate-link gplus ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($gplus) . '"><i class="ts-teamicon-googleplus1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (strlen($twitter) != 0) { //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="twitter ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($twitter) . '" data-tstooltip="' . $twitter . '"><i class="twitter" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Twitter"><a style="" target="_blank" class="ts-teammate-link twitter ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($twitter) . '"><i class="ts-teamicon-twitter1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (strlen($linkedin) != 0) { //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="linkedin ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($linkedin) . '" data-tstooltip="' . $linkedin . '"><i class="linkedin" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="LinkedIn"><a style="" target="_blank" class="ts-teammate-link linkedin ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($linkedin) . '"><i class="ts-teamicon-linkedin ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (strlen($xing) != 0) { //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="xing ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($xing) . '" data-tstooltip="' . $xing . '"><i class="xing" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Xing"><a style="" target="_blank" class="ts-teammate-link xing ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($xing) . '"><i class="ts-teamicon-xing3 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (strlen($flickr) != 0) { //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="flickr ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($flickr) . '" data-tstooltip="' . $flickr . '"><i class="flickr" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Flickr"><a style="" target="_blank" class="ts-teammate-link flickr ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($flickr) . '"><i class="ts-teamicon-flickr3 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (strlen($instagram) != 0) { //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="instagram ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($instagram) . '" data-tstooltip="' . $instagram . '"><i class="instagram" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Instagram"><a style="" target="_blank" class="ts-teammate-link instagram ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($instagram) . '"><i class="ts-teamicon-instagram ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (strlen($picasa) != 0) { //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="picasa ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($picasa) . '" data-tstooltip="' . $picasa . '"><i class="picasa" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Picasa"><a style="" target="_blank" class="ts-teammate-link picasa ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($picasa) . '"><i class="ts-teamicon-picasa1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (strlen($vimeo) != 0) { //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="vimeo ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($vimeo) . '" data-tstooltip="' . $vimeo . '"><i class="vimeo" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="Vimeo"><a style="" target="_blank" class="ts-teammate-link vimeo ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($vimeo) . '"><i class="ts-teamicon-vimeo1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } if (strlen($youtube) != 0) { //$team_social .= '<li class="ts-social-icon ' . $icon_align . ' ' . $icon_hover . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '"><a style="" target="_blank" class="youtube ' . $team_tooltipclasses . '" href="' . TS_VCSC_makeValidURL($youtube) . '" data-tstooltip="' . $youtube . '"><i class="youtube" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; $team_social .= '<li class="ts-teammate-icon ' . $icon_align . ' ' . $team_tooltipclasses . '" style="' . $icon_frame_border . ' ' . $icon_frame_style . '" data-tstooltip="YouTube"><a style="" target="_blank" class="ts-teammate-link youtube ' . $icon_hover . '" href="' . TS_VCSC_makeValidURL($youtube) . '"><i class="ts-teamicon-youtube1 ts-font-icon" style="' . $icon_top_adjust . ' ' . $icon_horizontal_adjust . '"></i></a></li>'; } $team_social .= '</ul>'; if (function_exists('vc_shortcode_custom_css_class')) { $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS-VCSC-Meet-Team', $atts); } else { $css_class = ''; } if ($style == "style1") { $output .= '<div id="' . $team_id . '" class="ts-team1 ts-team-member ' . $animation_css . ' ' . $el_class . ' ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<div class="team-avatar">'; $output .= '<img src="' . $team_image[0] . '" alt="">'; $output .= '</div>'; $output .= '<div class="team-user">'; $output .= '<h4 class="team-title">' . $name . '</h4>'; $output .= '<div class="team-job">' . $title . '</div>'; $output .= '</div>'; $output .= '<div class="team-information">'; $output .= '' . $description . ''; $output .= '<br></div>'; $output .= $team_social; $output .= '</div>'; } else { if ($style == "style2") { $output .= '<article id="' . $team_id . '" class="ts-team2 ts-team-member ' . $animation_css . ' ' . $el_class . ' ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<div class="ts-team2-header">'; $output .= '<img src="' . $team_image[0] . '" class="img-circle">'; $output .= '</div>'; $output .= '<div class="ts-team2-content">'; $output .= '<div class="ts-team2-line"></div>'; $output .= '<h3>' . $name . '</h3>'; $output .= '<p class="ts-team2-lead">' . $title . '</p>'; $output .= '<p>' . $description . '</p>'; $output .= '</div>'; $output .= '<div class="ts-team2-footer">'; $output .= $team_social; $output .= '</div>'; $output .= '</article>'; } else { if ($style == "style3") { $output .= '<div id="' . $team_id . '" class="ts-team3 ts-team-member ' . $animation_css . ' ' . $el_class . ' ' . $css_class . '" style="margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;">'; $output .= '<img class="ts-team3-person-image" src="' . $team_image[0] . '" alt="' . $name . '">'; $output .= '<p class="ts-team3-person-name">' . $name . '</p>'; $output .= '<p class="ts-team3-person-position">' . $title . '</p>'; $output .= '<p class="ts-team3-person-description">' . $description . '</p>'; //$output .= '<div class="ts-team3-person-line"></div>'; $output .= $team_social; $output .= '<div class="ts-team3-person-space"></div>'; $output .= '</div>'; } } } echo $output; $myvariable = ob_get_clean(); return $myvariable; }
function TS_VCSC_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 TS_VCSC_Logo_Standalone($atts, $content = null) { global $VISUAL_COMPOSER_EXTENSIONS; ob_start(); wp_enqueue_script('ts-extend-hammer'); wp_enqueue_script('ts-extend-nacho'); wp_enqueue_style('ts-extend-nacho'); wp_enqueue_style('ts-font-ecommerce'); wp_enqueue_style('ts-font-teammates'); if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_LoadFrontEndForcable == "false") { wp_enqueue_style('ts-extend-simptip'); wp_enqueue_style('ts-extend-animations'); wp_enqueue_script('ts-extend-badonkatrunc'); wp_enqueue_style('ts-visual-composer-extend-front'); wp_enqueue_script('ts-visual-composer-extend-front'); } extract(shortcode_atts(array('logo' => '', 'hover_type' => 'ts-imagehover-style1', 'hover_active' => 'false', 'show_title' => 'false', 'show_button' => 'true', 'overlay_trigger' => 'ts-trigger-hover', 'overlay_handle_show' => 'true', 'overlay_handle_color' => '#0094FF', 'icon_style' => 'square', 'icon_background' => '#f5f5f5', 'lightbox_group' => 'true', 'lightbox_group_name' => '', 'lightbox_effect' => 'random', 'lightbox_backlight' => 'hideit', 'lightbox_backlight_color' => '#ffffff', 'image_fixed' => 'false', 'image_width' => 300, 'image_height' => 200, 'image_position' => 'ts-imagefloat-center', 'title_truncate' => 'true', 'button_url' => '', 'button_target' => '_parent', 'margin_top' => 0, 'margin_bottom' => 0, 'el_id' => '', 'el_class' => '', 'css' => ''), $atts)); $output = ''; if (empty($icon_background) || $icon_style == 'simple') { $icon_background_style = ''; } else { $icon_background_style = 'background: ' . $icon_background . ';'; } $icon_top_adjust = 'top: 5px;'; 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"'; } } } // Handle Padding if ($overlay_handle_show == "true") { $overlay_padding = "padding-bottom: 25px;"; $switch_handle_adjust = ""; } else { $overlay_padding = ""; $switch_handle_adjust = ""; } // Handle Icon if ($overlay_trigger == "ts-trigger-click") { $switch_handle_icon = 'handle_click'; } else { if ($overlay_trigger == "ts-trigger-hover") { $switch_handle_icon = 'handle_hover'; } } // Check for Logo and End Shortcode if Empty if (empty($logo)) { $output .= '<div style="text-align: justify; font-weight: bold; font-size: 14px; color: red;">Please select a logo in the element settings!</div>'; echo $output; $myvariable = ob_get_clean(); return $myvariable; } if (!empty($el_id)) { $logo_block_id = $el_id; } else { $logo_block_id = 'ts-vcsc-logo-' . mt_rand(999999, 9999999); } // Retrieve Logo Post Main Content $logo_array = array(); $args = array('no_found_rows' => 1, 'ignore_sticky_posts' => 1, 'posts_per_page' => -1, 'post_type' => 'ts_logos', 'post_status' => 'publish', 'orderby' => 'title', 'order' => 'ASC'); $logo_query = new WP_Query($args); if ($logo_query->have_posts()) { foreach ($logo_query->posts as $p) { if ($p->ID == $logo) { $logo_data = array('author' => $p->post_author, 'name' => $p->post_name, 'title' => $p->post_title, 'id' => $p->ID, 'content' => $p->post_content); $logo_array[] = $logo_data; } } } wp_reset_postdata(); // Build Logo Post Main Content foreach ($logo_array as $index => $array) { $Logo_Title = $logo_array[$index]['title']; $Logo_ID = $logo_array[$index]['id']; $Logo_Content = $logo_array[$index]['content']; $Logo_Image = wp_get_attachment_image_src(get_post_thumbnail_id($Logo_ID), 'full'); if ($Logo_Image == false) { $Logo_Image = TS_VCSC_GetResourceURL('images/defaults/default_person.jpg'); } else { $Logo_Image = $Logo_Image[0]; } // Retrieve Logo Post Meta Content $custom_fields = get_post_custom($Logo_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_logo_') !== 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' => 'Logo_' . 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($Logo_Name)) { $Logo_Title = $Logo_Name; } else { $Logo_Title = $Logo_Title; } // Build Logo Links $hover_links = ''; $hover_links_count = 0; $hover_links .= '<ul class="ts-logo-icons ' . $icon_style . ' clearFixMe" style="margin: 0;">'; if (isset($Logo_Email)) { $hover_links_count++; $hover_links .= '<li class="ts-logo-icon center" style="' . $icon_background_style . '"><a style="" target="_blank" class="ts-teammate-link email" href="mailto:' . $Logo_Email . '"><i class="ts-teamicon-email2 ts-font-icon" style="' . $icon_top_adjust . '"></i></a></li>'; } if (isset($Logo_Link)) { $hover_links_count++; $hover_links .= '<li class="ts-logo-icon center" style="' . $icon_background_style . '"><a style="" target="_blank" class="ts-teammate-link link" href="' . TS_VCSC_makeValidURL($Logo_Link) . '"><i class="ts-teamicon-link ts-font-icon" style="' . $icon_top_adjust . '"></i></a></li>'; } if ($show_button == "true") { $hover_links .= '<li class="ts-logo-icon center" style="' . $icon_background_style . '"><a href="#' . $logo_block_id . '-modal" class="nch-lightbox-trigger nch-lightbox-modal" target="' . $button_target . '" data-title="" data-type="html" rel="' . ($lightbox_group == "true" ? "logogroup" : $lightbox_group_name) . '" data-effect="' . $lightbox_effect . '" ' . $nacho_color . '><i class="ts-teamicon-info3 ts-font-icon" style="' . $icon_top_adjust . '"></i></a></li>'; } $hover_links .= '</ul>'; $logo_links = ''; $logo_links_count = 0; $logo_links .= '<ul class="ts-logo-icons ' . $icon_style . ' clearFixMe" style="margin: 0;">'; if (isset($Logo_Email)) { $logo_links_count++; $logo_links .= '<li class="ts-logo-icon center" style="' . $icon_background_style . '"><a style="" target="_blank" class="ts-teammate-link email" href="mailto:' . $Logo_Email . '"><i class="ts-teamicon-email2 ts-font-icon" style="' . $icon_top_adjust . '"></i></a></li>'; } if (isset($Logo_Link)) { $logo_links_count++; $logo_links .= '<li class="ts-logo-icon center" style="' . $icon_background_style . '"><a style="" target="_blank" class="ts-teammate-link link" href="' . TS_VCSC_makeValidURL($Logo_Link) . '"><i class="ts-teamicon-link ts-font-icon" style="' . $icon_top_adjust . '"></i></a></li>'; } if (isset($Logo_Facebook)) { $logo_links_count++; $logo_links .= '<li class="ts-logo-icon center" style="' . $icon_background_style . '"><a style="" target="_blank" class="ts-teammate-link facebook" href="' . TS_VCSC_makeValidURL($Logo_Facebook) . '"><i class="ts-teamicon-facebook1 ts-font-icon" style="' . $icon_top_adjust . '"></i></a></li>'; } if (isset($Logo_Google)) { $logo_links_count++; $logo_links .= '<li class="ts-logo-icon center" style="' . $icon_background_style . '"><a style="" target="_blank" class="ts-teammate-link gplus" href="' . TS_VCSC_makeValidURL($Logo_Google) . '"><i class="ts-teamicon-googleplus1 ts-font-icon" style="' . $icon_top_adjust . '"></i></a></li>'; } if (isset($Logo_Twitter)) { $logo_links_count++; $logo_links .= '<li class="ts-logo-icon center" style="' . $icon_background_style . '"><a style="" target="_blank" class="ts-teammate-link twitter" href="' . TS_VCSC_makeValidURL($Logo_Twitter) . '"><i class="ts-teamicon-twitter1 ts-font-icon" style="' . $icon_top_adjust . '"></i></a></li>'; } if (isset($Logo_Linkedin)) { $logo_links_count++; $logo_links .= '<li class="ts-logo-icon center" style="' . $icon_background_style . '"><a style="" target="_blank" class="ts-teammate-link linkedin" href="' . TS_VCSC_makeValidURL($Logo_Linkedin) . '"><i class="ts-teamicon-linkedin ts-font-icon" style="' . $icon_top_adjust . '"></i></a></li>'; } if (isset($Logo_Xing)) { $logo_links_count++; $logo_links .= '<li class="ts-logo-icon center" style="' . $icon_background_style . '"><a style="" target="_blank" class="ts-teammate-link xing" href="' . TS_VCSC_makeValidURL($Logo_Xing) . '"><i class="ts-teamicon-xing3 ts-font-icon" style="' . $icon_top_adjust . '"></i></a></li>'; } if (isset($Logo_Envato)) { $logo_links_count++; $logo_links .= '<li class="ts-logo-icon center" style="' . $icon_background_style . '"><a style="" target="_blank" class="ts-teammate-link envato" href="' . TS_VCSC_makeValidURL($Logo_Envato) . '"><i class="ts-teamicon-envato ts-font-icon" style="' . $icon_top_adjust . '"></i></a></li>'; } if (isset($Logo_Rss)) { $logo_links_count++; $logo_links .= '<li class="ts-logo-icon center" style="' . $icon_background_style . '"><a style="" target="_blank" class="ts-teammate-link rss" href="' . TS_VCSC_makeValidURL($Logo_Rss) . '"><i class="ts-teamicon-rss1 ts-font-icon" style="' . $icon_top_adjust . '"></i></a></li>'; } if (isset($Logo_Forrst)) { $logo_links_count++; $logo_links .= '<li class="ts-logo-icon center" style="' . $icon_background_style . '"><a style="" target="_blank" class="ts-teammate-link forrst" href="' . TS_VCSC_makeValidURL($Logo_Forrst) . '"><i class="ts-teamicon-forrst1 ts-font-icon" style="' . $icon_top_adjust . '"></i></a></li>'; } if (isset($Logo_Flickr)) { $logo_links_count++; $logo_links .= '<li class="ts-logo-icon center" style="' . $icon_background_style . '"><a style="" target="_blank" class="ts-teammate-link flickr" href="' . TS_VCSC_makeValidURL($Logo_Flickr) . '"><i class="ts-teamicon-flickr3 ts-font-icon" style="' . $icon_top_adjust . '"></i></a></li>'; } if (isset($Logo_Instagram)) { $logo_links_count++; $logo_links .= '<li class="ts-logo-icon center" style="' . $icon_background_style . '"><a style="" target="_blank" class="ts-teammate-link instagram" href="' . TS_VCSC_makeValidURL($Logo_Instagram) . '"><i class="ts-teamicon-instagram ts-font-icon" style="' . $icon_top_adjust . '"></i></a></li>'; } if (isset($Logo_Picasa)) { $logo_links_count++; $logo_links .= '<li class="ts-logo-icon center" style="' . $icon_background_style . '"><a style="" target="_blank" class="ts-teammate-link picasa" href="' . TS_VCSC_makeValidURL($Logo_Picasa) . '"><i class="ts-teamicon-picasa1 ts-font-icon" style="' . $icon_top_adjust . '"></i></a></li>'; } if (isset($Logo_Pinterest)) { $logo_links_count++; $logo_links .= '<li class="ts-logo-icon center" style="' . $icon_background_style . '"><a style="" target="_blank" class="ts-teammate-link pinterest" href="' . TS_VCSC_makeValidURL($Logo_Pinterest) . '"><i class="ts-teamicon-pinterest1 ts-font-icon" style="' . $icon_top_adjust . '"></i></a></li>'; } if (isset($Logo_Vimeo)) { $logo_links_count++; $logo_links .= '<li class="ts-logo-icon center" style="' . $icon_background_style . '"><a style="" target="_blank" class="ts-teammate-link vimeo" href="' . TS_VCSC_makeValidURL($Logo_Vimeo) . '"><i class="ts-teamicon-vimeo1 ts-font-icon" style="' . $icon_top_adjust . '"></i></a></li>'; } if (isset($Logo_Youtube)) { $logo_links_count++; $logo_links .= '<li class="ts-logo-icon center" style="' . $icon_background_style . '"><a style="" target="_blank" class="ts-teammate-link youtube" href="' . TS_VCSC_makeValidURL($Logo_Youtube) . '"><i class="ts-teamicon-youtube1 ts-font-icon" style="' . $icon_top_adjust . '"></i></a></li>'; } $logo_links .= '</ul>'; $logo_margin = 'margin-top: ' . $margin_top . 'px; margin-bottom: ' . $margin_bottom . 'px;'; if ($show_title == "true") { $inner_position = 'margin: 20px 10px;'; } else { $inner_position = 'margin: -17px auto 0 auto; padding: 0; top: 50%;'; } $image_extension = pathinfo($Logo_Image, PATHINFO_EXTENSION); $alt_attribute = basename($Logo_Image, "." . $image_extension); if (function_exists('vc_shortcode_custom_css_class')) { $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'ts-image-hover-frame ' . $image_position . ' ' . $el_class . ' ' . vc_shortcode_custom_css_class($css, ' '), 'TS_VCSC_Logo_Standalone', $atts); } else { $css_class = 'ts-image-hover-frame ' . $image_position . ' ' . $el_class; } $output .= '<div id="' . $logo_block_id . '-container" class="ts-image-hover-container" style="width: 100%; height: 100%; margin: 0; padding: 0;">'; if ($image_fixed == "true") { $output .= '<div id="' . $logo_block_id . '" class="' . $css_class . '" style="width: ' . $image_width . 'px; ' . $logo_margin . '">'; $output .= '<div id="' . $logo_block_id . '-counter" class="ts-fluid-wrapper " style="width: ' . $image_width . 'px; height: auto;">'; if ($overlay_handle_show == "true") { $output .= '<div style="' . $overlay_padding . '">'; } $output .= '<div id="' . $logo_block_id . '-mask" class="ts-imagehover ' . ($title_truncate == "true" && $show_title == "true" ? "ts-logohover-truncate" : "") . ' ' . $hover_type . ' ' . $overlay_trigger . ' ' . ($show_title == "true" ? "" : "notitle") . ' ' . (($hover_active == "true" && $overlay_trigger == "ts-trigger-click") == "true" ? "active" : "") . '" data-trigger="' . $overlay_trigger . '" data-closer="' . $logo_block_id . '-closer" style="width: ' . $image_width . 'px; height: ' . $image_height . 'px;">'; if ($overlay_trigger == "ts-trigger-click") { $output .= '<div id="' . $logo_block_id . '-closer" class="ts-imagecloser" data-mask="' . $logo_block_id . '-mask"></div>'; } $output .= '<img src="' . $Logo_Image . '" alt="' . $alt_attribute . '" style="width: ' . $image_width . 'px; height: ' . $image_height . 'px;"/>'; $output .= '<div class="mask" style="width: ' . $image_width . 'px; height: ' . $image_height . 'px; display: ' . ($hover_active == "false" && $overlay_trigger == "ts-trigger-click" ? "none;" : "block;") . '">'; $output .= '<div class="logocontent" style="width: 100%; height: 100%;">'; if ($show_title == "true") { $output .= '<h2 class="logotitle" style="padding:10px 20px;">' . $Logo_Title . '</h2>'; } $output .= '<div class="maskcontent" style="' . $inner_position . '">' . $hover_links . '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; if ($overlay_handle_show == "true") { $output .= '<div class="ts-image-hover-handle" style="' . $switch_handle_adjust . '"><span class="frame_' . $switch_handle_icon . '" style="background-color: ' . $overlay_handle_color . '"><i class="' . $switch_handle_icon . '"></i></span></div>'; } if ($overlay_handle_show == "true") { $output .= '</div>'; } $output .= '</div>'; $output .= '</div>'; } else { $output .= '<div id="' . $logo_block_id . '" class="' . $css_class . '" style="width: 100%; ' . $logo_margin . '">'; $output .= '<div id="' . $logo_block_id . '-counter" class="ts-fluid-wrapper " style="width: 100%; height: auto;">'; if ($overlay_handle_show == "true") { $output .= '<div style="' . $overlay_padding . '">'; } $output .= '<div id="' . $logo_block_id . '-mask" class="ts-imagehover ' . ($title_truncate == "true" && $show_title == "true" ? "ts-logohover-truncate" : "") . ' ' . $hover_type . ' ' . $overlay_trigger . ' ' . ($show_title == "true" ? "" : "notitle") . ' ' . ($hover_active == "true" && $overlay_trigger == "ts-trigger-click" ? "active" : "") . '" data-trigger="' . $overlay_trigger . '" data-closer="' . $logo_block_id . '-closer" style="width: 100%; height: auto;">'; if ($overlay_trigger == "ts-trigger-click") { $output .= '<div id="' . $logo_block_id . '-closer" class="ts-imagecloser" data-mask="' . $logo_block_id . '-mask"></div>'; } $output .= '<img src="' . $Logo_Image . '" alt="' . $alt_attribute . '" style="width: 100%; height: auto;"/>'; $output .= '<div class="mask" style="width: 100%; height: 100%; display: ' . ($hover_active == "false" && $overlay_trigger == "ts-trigger-click" ? "none;" : "block;") . '">'; $output .= '<div class="logocontent" style="width: 100%; height: 100%;">'; if ($show_title == "true") { $output .= '<h2 class="logotitle" style="padding:10px 20px;">' . $Logo_Title . '</h2>'; } $output .= '<div class="maskcontent" style="' . $inner_position . '">' . $hover_links . '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; if ($overlay_handle_show == "true") { $output .= '<div class="ts-image-hover-handle" style="' . $switch_handle_adjust . '"><span class="frame_' . $switch_handle_icon . '" style="background-color: ' . $overlay_handle_color . '"><i class="' . $switch_handle_icon . '"></i></span></div>'; } if ($overlay_handle_show == "true") { $output .= '</div>'; } $output .= '</div>'; $output .= '</div>'; } // Create hidden DIV with Modal Content $output .= '<div id="' . $logo_block_id . '-modal" class="ts-modal-content nch-hide-if-javascript" style="padding: 15px;">'; $output .= '<div class="ts-modal-white-header"></div>'; $output .= '<div class="ts-modal-white-frame">'; $output .= '<div class="ts-modal-white-inner">'; $output .= '<h2 style="border-bottom: 1px solid #eeeeee; padding-bottom: 10px;">' . $Logo_Title . '</h2>'; $output .= '<div style="width: 100%; height: 100%; display: block; margin-top: 15px;">'; $output .= '<img src="' . $Logo_Image . '" alt="' . $alt_attribute . '" style="width: 25%; height: auto; float: left;"/>'; $output .= '<div style="width: 70%; margin: 0 0 20px 30%;">'; if (function_exists('wpb_js_remove_wpautop')) { $output .= '<div style="width: 100%; display: block; margin: 0 0 20px 0;">' . wpb_js_remove_wpautop(do_shortcode($Logo_Content), true) . '</div>'; } else { $output .= '<div style="width: 100%; display: block; margin: 0 0 20px 0;">' . do_shortcode($Logo_Content) . '</div>'; } $output .= $logo_links; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; break; } echo $output; $myvariable = ob_get_clean(); return $myvariable; }