"", "name" => "", "pos_in_org" => "", "text_align" => "", "team_member_name_tag" => "", "team_member_name_font" => "", "team_member_name_font_style" => "", "team_member_name_font_size" => "", "team_member_name_line_height" => "", "team_member_position_font" => "", "team_member_position_font_style" => "", "team_member_position_font_size" => "", "team_member_position_line_height" => "", "team_member_description_font" => "", "team_member_description_font_style" => "", "team_member_description_font_size" => "", "team_member_description_line_height" => "", "team_member_name_color" => "", "team_member_org_color" => "", "team_member_desc_color" => "", "img_hover_eft" => "", "img_hover_color" => "", "img_border_style" => "", "img_border_width" => "", "img_border_radius" => "", "img_border_color" => "", "staff_link" => "", "link_switch" => "", //New attributes for style 2 "team_member_style" => "", "divider_effect" => "", // "team_member_bg_color" => "", "team_member_align_style" => "", "team_member_divider_color" => "", "team_member_divider_width" => "", "team_member_divider_height" => "", "social_icon_effect" => "", "social_links" => "", "social_icon_size" => "", "social_icon_space" => "", //"title_box_margin" => "", "title_box_padding" => "", "custom_team_class" => "", "team_css" => "", "team_member_responsive_enable" => "", "team_responsive_width" => "", "team_img_opacity" => "", "team_img_hover_opacity" => "", "team_img_hover_opacity_style3" => "", "team_img_bg_color" => "", "team_img_grayscale" => "on", ),$atts)); // Grayscale Image $team_img_grayscale_cls = ( $team_img_grayscale != 'off' ) ? 'ult-team-grayscale' : ''; // Style-2 Image Opacity $team_img_opacity = ( isset( $team_img_opacity ) && trim( $team_img_opacity ) !== '' ) ? $team_img_opacity : '1'; $team_img_hover_opacity = ( isset( $team_img_hover_opacity ) && trim( $team_img_hover_opacity ) !== '' ) ? $team_img_hover_opacity : '0.65'; $team_img_hover_opacity_style3 = ( isset( $team_img_hover_opacity_style3 ) && trim( $team_img_hover_opacity_style3 ) !== '' ) ? $team_img_hover_opacity_style3 : '0.1'; $team_img_bg_color = ( isset( $team_img_bg_color ) && trim( $team_img_bg_color ) !== '' ) ? $team_img_bg_color : 'inherit'; $team_member_style = ( isset( $team_member_style ) && trim( $team_member_style ) !== '' ) ? $team_member_style : 'style-1'; $custom_team_class = ( isset( $custom_team_class ) && trim( $custom_team_class ) !== '' ) ? $custom_team_class : ''; // Set responsive width $team_responsive_width = ( isset( $team_responsive_width ) && trim( $team_responsive_width ) !== '' ) ? $team_responsive_width : ''; $team_responsive_width = ( isset( $team_member_responsive_enable ) && trim( $team_member_responsive_enable ) == 'on' ) ? $team_responsive_width : ''; // Set typography colors $team_member_name_color = ( isset( $team_member_name_color ) && trim( $team_member_name_color ) !== '' ) ? $team_member_name_color : 'inherit'; $team_member_org_color = ( isset( $team_member_org_color ) && trim( $team_member_org_color ) !== '' ) ? $team_member_org_color : 'inherit'; $team_member_desc_color = ( isset( $team_member_desc_color ) && trim( $team_member_desc_color ) !== '' ) ? $team_member_desc_color : 'inherit'; // Set team Member name's tag element $team_member_name_tag = ( isset( $team_member_name_tag ) && trim( $team_member_name_tag ) !== '' ) ? $team_member_name_tag : 'h2'; $team_css = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $team_css, ' ' ), "ult_team", $atts ); //title box style $title_box_style = ""; //$title_box_style .= trim( $title_box_margin ) != '' ? $title_box_margin." " : '' ; $title_box_style .= trim( $title_box_padding ) != '' ? $title_box_padding : '' ; $href = vc_build_link( $staff_link ); $url = $href['url']; $target = trim( $href['target'] , ' '); $font_args = array(); $team_member_name_font_styling = ''; if ( ! $team_member_name_font == '' ) { $team_member_font_family = function_exists( "get_ultimate_font_family" ) ? get_ultimate_font_family( $team_member_name_font ) : ''; $team_member_font_family = ( $team_member_font_family != '') ? $team_member_font_family : 'inherit'; $team_member_name_font_styling .= 'font-family:' . $team_member_font_family . ';'; array_push( $font_args, $team_member_name_font ); } if ( function_exists( 'get_ultimate_font_style' ) ) { if( isset($team_member_name_font_style) && trim($team_member_name_font_style) != '') { $team_member_name_font_styling .= get_ultimate_font_style($team_member_name_font_style); } } if ( ! ($team_member_name_color == '') && ! ($team_member_name_color == 'inherit') ) { $team_member_name_font_styling .= 'color:' . $team_member_name_color . ';'; } $team_member_position_font_styling = ''; if ( ! $team_member_position_font == '' ) { $team_member_font_family = function_exists( "get_ultimate_font_family" ) ? get_ultimate_font_family( $team_member_position_font ) : ''; $team_member_font_family = ( $team_member_font_family != '') ? $team_member_font_family : 'inherit'; $team_member_position_font_styling .= 'font-family:' . $team_member_font_family . ';'; array_push( $font_args, $team_member_position_font ); } if ( ! $team_member_position_font_style == '' ) { $team_member_position_font_styling .= $team_member_position_font_style . ';'; } if ( ! ($team_member_org_color == '') && ! ($team_member_org_color == 'inherit') ) { $team_member_position_font_styling .= 'color:' . $team_member_org_color . ';'; } $team_member_description_font_styling = ''; if ( ! $team_member_description_font == '' ) { $team_member_font_family = function_exists( "get_ultimate_font_family" ) ? get_ultimate_font_family( $team_member_description_font ) : ''; $team_member_font_family = ( $team_member_font_family != '') ? $team_member_font_family : 'inherit'; $team_member_description_font_styling .= 'font-family:' . $team_member_font_family . ';'; array_push( $font_args, $team_member_description_font ); } if ( ! $team_member_description_font_style == '' ) { $team_member_description_font_styling .= $team_member_description_font_style . ';'; } if ( ! ($team_member_desc_color == '') && ! ($team_member_desc_color == 'inherit') ) { $team_member_description_font_styling .= 'color:' . $team_member_desc_color . ';'; } $img_hver_class = ''; $img_hver_data = ''; if ( $img_hover_eft == 'on' ) { $img_hver_class = 'ult-team_img_hover'; $img_hover_color = ( isset( $img_hover_color ) && trim( $img_hover_color ) != "" ) ? $img_hover_color : 'rgba(100,100,100,0.6)'; $img_hver_data = 'data-background_clr = "' . $img_hover_color . '"'; } elseif ( $img_hover_eft == 'off' ) { $img_hver_class = ''; $img_hver_data = ''; } $team_image_style = ''; if ( !$img_border_style == '' ) { $team_image_style .= 'border-style:'.$img_border_style.';'; } if ( !$img_border_width == '' ) { $team_image_style .= 'border-width:'.$img_border_width.'px;'; } if ( !$img_border_radius == '' ) { $team_image_style .= 'border-radius:'.$img_border_radius.'px;'; } if ( !$img_border_color == '' ) { $team_image_style .= 'border-color:'.$img_border_color.';'; } $img = apply_filters('ult_get_img_single', $image, 'url'); $alt = apply_filters('ult_get_img_single', $image, 'alt'); // Code for Responsive font-size [Open] $id = uniqid('ultimate-heading'); // FIX: set old font size before implementing responsive param if(is_numeric($team_member_name_font_size)) { $team_member_name_font_size = 'desktop:'.$team_member_name_font_size.'px;'; } if(is_numeric($team_member_name_line_height)) { $team_member_name_line_height = 'desktop:'.$team_member_name_line_height.'px;'; } $team_name_args = array( 'target' => '.ult-team-member-bio-wrap.'. $id .' .ult-team-member-name', 'media_sizes' => array( 'font-size' => $team_member_name_font_size, 'line-height' => $team_member_name_line_height, ), ); $team_member_name_responsive = get_ultimate_vc_responsive_media_css($team_name_args); if(is_numeric($team_member_position_font_size)) { $team_member_position_font_size = 'desktop:'.$team_member_position_font_size.'px;'; } if(is_numeric($team_member_position_line_height)) { $team_member_position_line_height = 'desktop:'.$team_member_position_line_height.'px;'; } $team_position_args = array( 'target' => '.ult-team-member-bio-wrap.'. $id .' .ult-team-member-position', 'media_sizes' => array( 'font-size' => $team_member_position_font_size, 'line-height' => $team_member_position_line_height, ), ); $team_member_position_responsive = get_ultimate_vc_responsive_media_css($team_position_args); if(is_numeric($team_member_description_font_size)) { $team_member_description_font_size = 'desktop:'.$team_member_description_font_size.'px;'; } if(is_numeric($team_member_description_line_height)) { $team_member_description_line_height = 'desktop:'.$team_member_description_line_height.'px;'; } $team_desc_args = array( 'target' => '.ult-team-member-bio-wrap.'. $id .' .ult-team-member-description', 'media_sizes' => array( 'font-size' => $team_member_description_font_size, 'line-height' => $team_member_description_line_height, ), ); $team_member_desc_responsive = get_ultimate_vc_responsive_media_css($team_desc_args); $team_member_divider_color = ( isset( $team_member_divider_color ) && trim( $team_member_divider_color ) !== '' ) ? $team_member_divider_color : ''; //$team_member_bg_color = ( isset( $team_member_bg_color ) && trim( $team_member_bg_color ) !== '' ) ? $team_member_bg_color : '#ffffff'; $team_member_align_style = ( isset( $team_member_align_style ) && trim( $team_member_align_style ) !== '' ) ? $team_member_align_style : 'center'; $social_icon_size = ( isset( $social_icon_size ) && trim( $social_icon_size ) !== '' ) ? $social_icon_size."px" : '16px'; $social_icon_space = ( isset( $social_icon_space ) && trim( $social_icon_space ) !== '' ) ? ( $social_icon_space / 2)."px" : '5px'; $team_member_divider_width = ( isset( $team_member_divider_width ) && trim($team_member_divider_width) !== '' ) ? $team_member_divider_width : '80'; $team_member_divider_width = ( $team_member_divider_width <= 100 ) ? $team_member_divider_width : '100'; $team_member_divider_height = ( isset( $team_member_divider_height ) && trim($team_member_divider_height) !== '' ) ? $team_member_divider_height : '1'; // Code for Responsive font-size [Closed] ob_start(); //echo do_shortcode( $content ); if ( $team_member_style == 'style-3' ) { $team_desc_args = array( 'target' => '.ult-team-member-image.'. $id .' .ult-team-member-description', 'media_sizes' => array( 'font-size' => $team_member_description_font_size, 'line-height' => $team_member_description_line_height, ), ); $team_member_desc_responsive = get_ultimate_vc_responsive_media_css($team_desc_args); echo '
' . do_shortcode( $content ) . '
' . do_shortcode( $content ) . '
'; $output .= $text; $output .= ''; } echo $output; return ob_get_clean(); } function init_team(){ if(function_exists("vc_map")) { vc_map( array( "name" => __("Team", "ultimate_vc"), "base" => "ult_team", "icon" => "vc_icon_team", "class" => "", "content_element" => true, "controls" => "full", "category" => "Ultimate VC Addons", "description" => __("Show your awesome team.","ultimate_vc"), "admin_enqueue_js" => preg_replace( '/\s/', '%20', plugins_url('../admin/js/team-admin.js',__FILE__) ), "params" => array( // Custom Coding for new team styles array( "type" => "dropdown", "class" => "", "heading" => __( "Team Style", "ultimate_vc" ), "param_name" => "team_member_style", "value" => array( __( "Style 1", "ultimate_vc" ) => "style-1", __( "Style 2", "ultimate_vc" ) => "style-2", __( "Style 3", "ultimate_vc" ) => "style-3", ), "description" => __( "", "ultimate_vc" ), "group" => "Image", ), array( "type" => "ult_img_single", "heading" => __( "Select Image", "ultimate_vc" ), "param_name" => "image", "description" => "", "group" => "Image" ), array( "type" => "ult_switch", "class" => "", "heading" => __( "Grayscale Image", "ultimate_vc" ), "param_name" => "team_img_grayscale", "value" => "on", "options" => array( "on" => array( "label" => __( "", "ultimate_vc" ), "on" => "Yes", "off" => "No", ), ), "default_set" => true, "description" => "", "dependency" => Array( "element" => "team_member_style", "value" => Array('style-1' , 'style-3') ), "group" => "Image", ), array( "type" => "dropdown", "class" => "", "heading" => __( "Image Border Style", "ultimate_vc" ), "param_name" => "img_border_style", "value" => array( __( "None", "ultimate_vc" ) => "", __( "Solid", "ultimate_vc" ) => "solid", __( "Dashed", "ultimate_vc" ) => "dashed", __( "Dotted", "ultimate_vc" ) => "dotted", __( "Double", "ultimate_vc" ) => "double", __( "Inset", "ultimate_vc" ) => "inset", __( "Outset", "ultimate_vc" ) => "outset", ), "description" => __( "", "ultimate_vc" ), "group" => "Image", ), array( "type" => "number", "class" => "", "heading" => __( "Image Border Width", "ultimate_vc" ), "param_name" => "img_border_width", "value" => "", "suffix" => "", "dependency" => Array( "element" => "img_border_style", "not_empty" => true ), "description" => __( "", "ultimate_vc" ), "group" => "Image", ), array( "type" => "colorpicker", "class" => "", "heading" => __( "Image Border Color", "ultimate_vc" ), "param_name" => "img_border_color", "value" => "", "dependency" => Array( "element" => "img_border_style", "not_empty" => true ), "description" => __( "", "ultimate_vc" ), "group" => "Image", ), array( "type" => "number", "class" => "", "heading" => __( "Image border radius", "ultimate_vc" ), "param_name" => "img_border_radius", "value" => "0", "min" => "0", "max" => "500", "step" => "1", "suffix" => "px", "description" => "", "dependency" => Array( "element" => "img_border_style", "not_empty" => true ), "group" => "Image", ), array( "type" => "ult_switch", "class" => "", "heading" => __( "Image Hover Effect", "ultimate_vc" ), "param_name" => "img_hover_eft", "value" => "off", "options" => array( "on" => array( "label" => __( "Hover effect for the team member image", "ultimate_vc" ), "on" => "Yes", "off" => "No", ), ), "description" => "", "dependency" => Array( "element" => "team_member_style", "value" => 'style-1' ), "group" => "Image", ), array( "type" => "colorpicker", "class" => "", "heading" => __( "Image Hover Color", "ultimate_vc" ), "param_name" => "img_hover_color", "value" => "", "description" => "", "group" => "Image", "dependency" => Array( "element" => "img_hover_eft", "value" => 'on' ), ), array( "type" => "colorpicker", "class" => "", "heading" => __( "Background Color", "ultimate_vc" ), "param_name" => "team_img_bg_color", "value" => "", "description" => "", "group" => "Image", "dependency" => Array( "element" => "team_member_style", "value" => Array( 'style-2' , 'style-3') ), ), array( "type" => "number", "class" => "", "heading" => __("Image Opacity", "ultimate_vc"), "param_name" => "team_img_opacity", "value" => 1, "min" => 0, "max" => 1, "description"=> __( "Enter value between 0.0 to 1 (0 is maximum transparency, while 1 is lowest)", "ultimate_vc" ), "group" => "Image", "dependency" => Array( "element" => "team_member_style", "value" => Array( 'style-2' ) ), ), array( "type" => "number", "class" => "", "heading" => __("Image Opacity on Hover", "ultimate_vc"), "param_name" => "team_img_hover_opacity", "value" => '0.65', "min" => 0, "max" => 1, "description"=> __( "Enter value between 0.0 to 1 (0 is maximum transparency, while 1 is lowest)", "ultimate_vc" ), "group" => "Image", "dependency" => Array( "element" => "team_member_style", "value" => Array( 'style-2' ) ), ), array( "type" => "number", "class" => "", "heading" => __("Image Opacity on Hover", "ultimate_vc"), "param_name" => "team_img_hover_opacity_style3", "value" => 0.1, "min" => 0, "max" => 1, "description"=> __( "Enter value between 0.0 to 1 (0 is maximum transparency, while 1 is lowest)", "ultimate_vc" ), "group" => "Image", "dependency" => Array( "element" => "team_member_style", "value" => Array( 'style-3') ), ), array( "type" => "textfield", "heading" => __( "Custom Class", "ultimate_vc" ), "param_name" => "custom_team_class", "description" => "", "group" => "Image" ), array( "type" => "textfield", "heading" => __( "Name", "ultimate_vc" ), "param_name" => "name", "admin_label" => true, "description" => "", "group" => "Text" ), array( "type" => "textfield", "heading" => __( "Designation", "ultimate_vc" ), "param_name" => "pos_in_org", "description" => "", "group" => "Text" ), array( "type" => "textarea_html", "heading" => __( "Description", "ultimate_vc" ), "param_name" => "content", "description" => "", "group" => "Text" ), array( "type" => "dropdown", "class" => "", "heading" => __( "Text Alignment", "ultimate_vc" ), "param_name" => "team_member_align_style", "value" => array( __( "Center", "ultimate_vc" ) => "center", __( "Left", "ultimate_vc" ) => "left", __( "Right", "ultimate_vc" ) => "right", ), "description" => __( "", "ultimate_vc" ), "group" => "Text", ), array( "type" => "ultimate_spacing", "heading" => __("Space around text","ultimate_vc"), "param_name" => "title_box_padding", "mode" => "padding", // margin/padding "unit" => "px", // [required] px,em,%,all Default all "positions" => array( // Also set 'defaults' __("Top","ultimate_vc") => "", __("Right","ultimate_vc") => "", __("Bottom","ultimate_vc") => "", __("Left","ultimate_vc") => "" ), "group" => __( "Text", "ultimate_vc" ) ), /*array( "type" => "text", "param_name" => "social_link_setting", "heading" => __( "