示例#1
0
 function icon_list_item_shortcode($atts, $content = null)
 {
     $icon_type = $icon_img = $img_width = $icon = $icon_color = $icon_color_bg = $icon_size = $icon_style = $icon_border_style = $icon_border_radius = $icon_color_border = $icon_border_size = $icon_border_spacing = $icon_link = $el_class = $icon_animation = $tooltip_disp = $tooltip_text = $icon_margin = '';
     $content_font_family = $content_font_style = $content_font_size = $content_line_ht = $content_font_color = '';
     extract(shortcode_atts(array('icon_type' => 'selector', 'icon' => '', 'icon_img' => '', 'icon_color' => '#333333', 'icon_style' => 'none', 'icon_color_bg' => '#ffffff', 'icon_color_border' => '#333333', 'icon_border_style' => '', 'icon_border_size' => '1', 'icon_border_radius' => '500', 'icon_border_spacing' => '50', "icon_size" => "", "icon_margin" => "", 'el_class' => '', 'content_font_family' => '', 'content_font_style' => '', 'content_font_size' => '', 'content_font_color' => '', 'content_line_ht' => '', 'content_font_size' => ''), $atts));
     global $vc_list_icon_size, $vc_list_icon_margin;
     if (empty($icon_size)) {
         $icon_size = $vc_list_icon_size;
     }
     if (empty($icon_margin)) {
         $icon_margin = $vc_list_icon_margin;
     }
     if ($icon_animation !== 'none') {
         $css_trans = 'data-animation="' . $icon_animation . '" data-animation-delay="03"';
     }
     $output = $style = $link_sufix = $link_prefix = $target = $content_style = $href = $icon_align_style = '';
     if ($icon_margin !== '') {
         $style .= 'margin-right:' . $icon_margin . 'px;';
     }
     if ($content_font_family != '') {
         $apply_font_family = get_ultimate_font_family($content_font_family);
         if ($apply_font_family) {
             $content_style .= 'font-family:\'' . $apply_font_family . '\';';
         }
     }
     if ($content_font_style != '') {
         $content_style .= get_ultimate_font_style($content_font_style);
     }
     if ($content_font_color != '') {
         $content_style .= 'color:' . $content_font_color . ';';
     }
     // if($content_font_size != '')
     // 	$content_style .= 'font-size:'.$content_font_size.'px;';
     // if($content_line_ht)
     // 	$content_style .='line-height:'.$content_line_ht.'px;';
     if (is_numeric($content_font_size)) {
         $content_font_size = 'desktop:' . $content_font_size . 'px;';
     }
     if (is_numeric($content_line_ht)) {
         $content_line_ht = 'desktop:' . $content_line_ht . 'px;';
     }
     $list_icon_id = 'list-icon-wrap-' . rand(1000, 9999);
     $list_icon_args = array('target' => '#' . $list_icon_id . ' .uavc-list-desc', 'media_sizes' => array('font-size' => $content_font_size, 'line-height' => $content_line_ht));
     $list_icon_data_list = get_ultimate_vc_responsive_media_css($list_icon_args);
     $icon_animation = $icon_link = '';
     $output .= '<div class="uavc-list-content" id="' . $list_icon_id . '">';
     if ($icon !== "" || $icon_img !== '') {
         if ($icon_type == 'custom') {
             $icon_style = 'none';
         }
         $main_icon = do_shortcode('[just_icon icon_type="' . $icon_type . '" icon="' . $icon . '" icon_img="' . $icon_img . '" img_width="' . $icon_size . '" icon_size="' . $icon_size . '" icon_color="' . $icon_color . '" icon_style="' . $icon_style . '" icon_color_bg="' . $icon_color_bg . '" icon_color_border="' . $icon_color_border . '"  icon_border_style="' . $icon_border_style . '" icon_border_size="' . $icon_border_size . '" icon_border_radius="' . $icon_border_radius . '" icon_border_spacing="' . $icon_border_spacing . '" icon_link="' . $icon_link . '" icon_animation="' . $icon_animation . '"]');
         $output .= "\n" . '<div class="uavc-list-icon ' . $el_class . ' ' . $css_icon_list . '" ' . $css_trans . ' style="' . $style . '">';
         $output .= $main_icon;
         $output .= "\n" . '</div>';
     }
     $output .= '<span ' . $list_icon_data_list . ' class="uavc-list-desc ult-responsive" style="' . $content_style . '">' . do_shortcode($content) . '</span>';
     $output .= '</div>';
     $output = '<li>' . $output . '</li>';
     return $output;
 }
 function ultimate_headings_shortcode($atts, $content = null)
 {
     $wrapper_style = $main_heading_style_inline = $sub_heading_style_inline = $line_style_inline = $icon_inline = $output = $el_class = '';
     extract(shortcode_atts(array('main_heading' => '', "main_heading_font_size" => "", "main_heading_line_height" => "", "main_heading_font_family" => "", "main_heading_style" => "", "main_heading_color" => "", "main_heading_margin" => "", "sub_heading" => "", "sub_heading_font_size" => "", "sub_heading_line_height" => "", "sub_heading_font_family" => "", "sub_heading_style" => "", "sub_heading_color" => "", "sub_heading_margin" => "", "spacer" => "no_spacer", "spacer_position" => "top", "spacer_img" => "", "spacer_img_width" => "", "line_style" => "solid", "line_width" => "auto", "line_height" => "1", "line_color" => "#ccc", "icon_type" => "selector", "icon" => "", "icon_color" => "", "icon_style" => "none", "icon_color_bg" => "", "icon_border_style" => "", "icon_color_border" => "#333333", "icon_border_size" => "1", "icon_border_radius" => "", "icon_border_spacing" => "", "icon_img" => "", "img_width" => "48", "icon_size" => "32", "alignment" => "center", "spacer_margin" => "top", "line_icon_fixer" => "10", "heading_tag" => "", "el_class" => ""), $atts));
     $wrapper_class = $spacer;
     if ($heading_tag == '') {
         $heading_tag = 'h2';
     }
     /* ---- main heading styles ---- */
     if ($main_heading_font_family != '') {
         $mhfont_family = get_ultimate_font_family($main_heading_font_family);
         if ($mhfont_family) {
             $main_heading_style_inline .= 'font-family:\'' . $mhfont_family . '\';';
         }
     }
     // main heading font style
     $main_heading_style_inline .= get_ultimate_font_style($main_heading_style);
     //attach font size if set
     //attach font color if set
     if ($main_heading_color != '') {
         $main_heading_style_inline .= 'color:' . $main_heading_color . ';';
     }
     //attach margins for main heading
     if ($main_heading_margin != '') {
         $main_heading_style_inline .= $main_heading_margin;
     }
     /* ----- sub heading styles ----- */
     if ($sub_heading_font_family != '') {
         $shfont_family = get_ultimate_font_family($sub_heading_font_family);
         if ($shfont_family != '') {
             $sub_heading_style_inline .= 'font-family:\'' . $shfont_family . '\';';
         }
     }
     //sub heaing font style
     $sub_heading_style_inline .= get_ultimate_font_style($sub_heading_style);
     //attach font color if set
     if ($sub_heading_color != '') {
         $sub_heading_style_inline .= 'color:' . $sub_heading_color . ';';
     }
     //attach margins for sub heading
     if ($sub_heading_margin != '') {
         $sub_heading_style_inline .= $sub_heading_margin;
     }
     if ($spacer != '') {
         $wrapper_style .= $spacer_margin;
     }
     if ($spacer == 'line_with_icon') {
         if ($line_width < $icon_size) {
             $wrap_width = $icon_size;
         } else {
             $wrap_width = $line_width;
         }
         if ($icon_type == 'selector') {
             if ($icon_style == 'advanced') {
                 //if($icon_border_spacing != '')
                 //$wrapper_style .= 'padding:'.$icon_border_spacing.'px 0;';
             } else {
                 $wrapper_style .= 'height:' . $icon_size . 'px;';
             }
         }
         $icon_style_inline = 'font-size:' . $icon_size . 'px;';
     } else {
         if ($spacer == 'line_only') {
             $wrap_width = $line_width;
             $line_style_inline = 'border-style:' . $line_style . ';';
             $line_style_inline .= 'border-bottom-width:' . $line_height . 'px;';
             $line_style_inline .= 'border-color:' . $line_color . ';';
             $line_style_inline .= 'width:' . $wrap_width . 'px;';
             $wrapper_style .= 'height:' . $line_height . 'px;';
             $line = '<span class="uvc-headings-line" style="' . $line_style_inline . '"></span>';
             $icon_inline = $line;
         } else {
             if ($spacer == 'icon_only') {
                 $icon_style_inline = 'font-size:' . $icon_size . 'px;';
             } else {
                 if ($spacer == 'image_only') {
                     if (!empty($spacer_img_width)) {
                         $siwidth = array($spacer_img_width, $spacer_img_width);
                     } else {
                         $siwidth = 'full';
                     }
                     $spacer_inline = '';
                     //$icon_inline = wp_get_attachment_image( $spacer_img, $siwidth, false, array("class"=>"ultimate-headings-icon-image") );
                     $icon_inline = apply_filters('ult_get_img_single', $spacer_img, 'url');
                     if ($spacer_img_width !== '') {
                         $spacer_inline = 'width:' . $spacer_img_width . 'px';
                     }
                     $icon_inline = '<img src="' . $icon_inline . '" class="ultimate-headings-icon-image" style="' . $spacer_inline . '"/>';
                 }
             }
         }
     }
     //if spacer type is line with icon or only icon show icon or image respectively
     if ($spacer == 'line_with_icon' || $spacer == 'icon_only') {
         $icon_animation = '';
         $icon_inline = do_shortcode('[just_icon icon_align="' . $alignment . '" icon_type="' . $icon_type . '" icon="' . $icon . '" icon_img="' . $icon_img . '" img_width="' . $img_width . '" icon_size="' . $icon_size . '" icon_color="' . $icon_color . '" icon_style="' . $icon_style . '" icon_color_bg="' . $icon_color_bg . '" icon_color_border="' . $icon_color_border . '"  icon_border_style="' . $icon_border_style . '" icon_border_size="' . $icon_border_size . '" icon_border_radius="' . $icon_border_radius . '" icon_border_spacing="' . $icon_border_spacing . '" icon_animation="' . $icon_animation . '"]');
     }
     if ($spacer == 'line_with_icon') {
         $data = 'data-hline_width="' . $wrap_width . '" data-hicon_type="' . $icon_type . '" data-hborder_style="' . $line_style . '" data-hborder_height="' . $line_height . '" data-hborder_color="' . $line_color . '"';
         if ($icon_type == 'selector') {
             $data .= ' data-icon_width="' . $icon_size . '"';
         } else {
             $data .= ' data-icon_width="' . $img_width . '"';
         }
         if ($line_icon_fixer != '') {
             $data .= ' data-hfixer="' . $line_icon_fixer . '" ';
         }
     } else {
         $data = '';
     }
     $id = uniqid('ultimate-heading');
     $uid = 'uvc-' . rand(00, 9999);
     // FIX: set old font size before implementing responsive param
     if (is_numeric($main_heading_font_size)) {
         $main_heading_font_size = 'desktop:' . $main_heading_font_size . 'px;';
     }
     if (is_numeric($main_heading_line_height)) {
         $main_heading_line_height = 'desktop:' . $main_heading_line_height . 'px;';
     }
     // responsive {main} heading styles
     $args = array('target' => '.uvc-heading.' . $id . ' ' . $heading_tag, 'media_sizes' => array('font-size' => $main_heading_font_size, 'line-height' => $main_heading_line_height));
     $main_heading_responsive = get_ultimate_vc_responsive_media_css($args);
     // FIX: set old font size before implementing responsive param
     if (is_numeric($sub_heading_font_size)) {
         $sub_heading_font_size = 'desktop:' . $sub_heading_font_size . 'px;';
     }
     if (is_numeric($sub_heading_line_height)) {
         $sub_heading_line_height = 'desktop:' . $sub_heading_line_height . 'px;';
     }
     // responsive {sub} heading styles
     $args = array('target' => '.uvc-heading.' . $id . ' .uvc-sub-heading ', 'media_sizes' => array('font-size' => $sub_heading_font_size, 'line-height' => $sub_heading_line_height));
     $sub_heading_responsive = get_ultimate_vc_responsive_media_css($args);
     $output = '<div id="' . $id . '" class="uvc-heading ' . $id . ' ' . $uid . ' ' . $el_class . '" data-hspacer="' . $spacer . '" ' . $data . ' data-halign="' . $alignment . '" style="text-align:' . $alignment . '">';
     if ($spacer_position == 'top') {
         $output .= $this->ultimate_heading_spacer($wrapper_class, $wrapper_style, $icon_inline);
     }
     if ($main_heading != '') {
         $output .= '<div class="uvc-main-heading ult-responsive" ' . $main_heading_responsive . '><' . $heading_tag . ' style="' . $main_heading_style_inline . '">' . $main_heading . '</' . $heading_tag . '></div>';
     }
     if ($spacer_position == 'middle') {
         $output .= $this->ultimate_heading_spacer($wrapper_class, $wrapper_style, $icon_inline);
     }
     if ($content != '') {
         $output .= '<div class="uvc-sub-heading ult-responsive" ' . $sub_heading_responsive . ' style="' . $sub_heading_style_inline . '">' . do_shortcode($content) . '</div>';
     }
     if ($spacer_position == 'bottom') {
         $output .= $this->ultimate_heading_spacer($wrapper_class, $wrapper_style, $icon_inline);
     }
     $output .= '</div>';
     return $output;
 }
示例#3
0
        function block_shortcode($atts)
        {
            $icon_type = $icon_img = $img_width = $icon = $icon_color = $icon_color_bg = $icon_size = $icon_style = $icon_border_style = $icon_border_radius = $icon_color_border = $icon_border_size = $icon_border_spacing = $icon_link = $el_class = $icon_animation = $block_title_front = $block_desc_front = $block_title_back = $block_desc_back = $button_text = $button_link = $block_text_color = $block_front_color = $block_back_color = $block_back_text_color = $animation = $font_size_icon = $box_border_style = $box_border_size = $box_border_color = $border_size = $border_color = $box_border_color_back = $custom_link = $button_bg = $button_txt = $height_type = $box_height = $flip_type = $flip_box_style = $text_color = $bg_color = $front_text = $back_text = '';
            $desc_font_line_height = $title_font_line_height = $title_font = $title_font_style = $title_font_size = $desc_font = $desc_font_style = $desc_font_size = '';
            extract(shortcode_atts(array('icon_type' => '', 'icon' => '', 'icon_img' => '', 'img_width' => '', 'icon_size' => '', 'icon_color' => '', 'icon_style' => '', 'icon_color_bg' => '', 'icon_color_border' => '', 'icon_border_style' => '', 'icon_border_size' => '', 'icon_border_radius' => '', 'icon_border_spacing' => '', 'icon_link' => '', 'icon_animation' => '', 'block_title_front' => '', 'block_desc_front' => '', 'block_title_back' => '', 'block_desc_back' => '', 'custom_link' => '', 'button_text' => '', 'button_link' => '', 'button_bg' => '', 'button_txt' => '', 'flip_type' => '', 'text_color' => '', 'bg_color' => '', 'block_text_color' => '', 'block_front_color' => '', 'block_back_color' => '', 'el_class' => '', 'block_back_text_color' => '', 'border_size' => '', 'border_color' => '', 'box_border_style' => '', 'box_border_size' => '', 'box_border_color' => '', 'box_border_color_back' => '', 'height_type' => '', 'box_height' => '', 'flip_box_style' => '', 'title_font' => '', 'title_font_style' => '', 'title_font_size' => '', 'title_font_line_height' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_font_size' => '', 'desc_font_line_height' => ''), $atts));
            $output = $f_style = $b_style = $ico_color = $box_border = $icon_border = $link_style = $height = $link_sufix = $link_prefix = $link_style = '';
            $title_style = $desc_style = '';
            $border_front = $border_back = '';
            //$font_args = array();
            if ($icon_type == 'custom') {
                $icon_style = 'none';
            }
            $flip_icon = do_shortcode('[just_icon icon_type="' . $icon_type . '" icon="' . $icon . '" icon_img="' . $icon_img . '" img_width="' . $img_width . '" icon_size="' . $icon_size . '" icon_color="' . $icon_color . '" icon_style="' . $icon_style . '" icon_color_bg="' . $icon_color_bg . '" icon_color_border="' . $icon_color_border . '"  icon_border_style="' . $icon_border_style . '" icon_border_size="' . $icon_border_size . '" icon_border_radius="' . $icon_border_radius . '" icon_border_spacing="' . $icon_border_spacing . '" icon_link="' . $icon_link . '" icon_animation="' . $icon_animation . '"]');
            $css_trans = $icon_border = $box_border = '';
            $height = $target = '';
            /* title */
            if ($title_font != '') {
                $font_family = get_ultimate_font_family($title_font);
                $title_style .= 'font-family:\'' . $font_family . '\';';
                //array_push($font_args, $title_font);
            }
            if ($title_font_style != '') {
                $title_style .= get_ultimate_font_style($title_font_style);
            }
            if ($title_font_size != '') {
                $title_style .= 'font-size:' . $title_font_size . 'px;';
            }
            if ($title_font_line_height != '') {
                $title_style .= 'line-height:' . $title_font_line_height . 'px;';
            }
            /* description */
            if ($desc_font != '') {
                $font_family = get_ultimate_font_family($desc_font);
                $desc_style .= 'font-family:\'' . $font_family . '\';';
                //array_push($font_args, $desc_font);
            }
            if ($desc_font_style != '') {
                $desc_style .= get_ultimate_font_style($desc_font_style);
            }
            if ($desc_font_size != '') {
                $desc_style .= 'font-size:' . $desc_font_size . 'px;';
            }
            if ($desc_font_line_height != '') {
                $desc_style .= 'line-height:' . $desc_font_line_height . 'px;';
            }
            //enquque_ultimate_google_fonts($font_args);
            if ($icon_border_style !== 'none') {
                $icon_border .= 'border-style: ' . $icon_border_style . ';';
                $icon_border .= 'border-width: ' . $icon_border_size . 'px;';
            }
            $box_style_data = '';
            if ($height_type == "ifb-custom-height") {
                $box_style_data .= " data-min-height='" . $box_height . "px'";
                /*$height = 'height:'.$box_height.'px;';*/
                $flip_type .= ' flip-box-custom-height';
            }
            if ($flip_box_style !== 'simple') {
                $border_front = 'border-color:' . $box_border_color . ';';
                $border_back = 'border-color:' . $box_border_color_back . ';';
                if ($box_border_style !== 'none') {
                    $box_border .= 'border-style: ' . $box_border_style . ';';
                    $box_border .= 'border-width: ' . $box_border_size . 'px;';
                }
                if ($animation !== 'none') {
                    $css_trans = 'data-animation="' . $animation . '" data-animation-delay="03"';
                }
                if ($block_text_color != '') {
                    $f_style .= 'color:' . $block_text_color . ';';
                    $front_text .= 'color:' . $block_text_color . ';';
                }
                if ($block_front_color != '') {
                    $f_style .= 'background:' . $block_front_color . ';';
                }
                if ($block_back_text_color != '') {
                    $b_style .= 'color:' . $block_back_text_color . ';';
                    $back_text .= 'color:' . $block_back_text_color . ';';
                }
                if ($block_back_color != '') {
                    $b_style .= 'background:' . $block_back_color . ';';
                }
            } else {
                if ($text_color != '') {
                    $f_style .= 'color:' . $text_color . ';';
                    $b_style .= 'color:' . $text_color . ';';
                    $front_text = $back_text = 'color:' . $text_color . ';';
                }
                if ($bg_color != '') {
                    $f_style .= 'background:' . $bg_color . ';';
                    $b_style .= 'background:' . $bg_color . ';';
                }
                if ($border_color != '') {
                    $border_front = 'border-color:' . $border_color . ';';
                    $border_back = 'border-color:' . $border_color . ';';
                    $box_border = 'border-width: ' . $border_size . 'px;';
                    $box_border .= 'border-style: solid;';
                }
            }
            $output .= '<div class="flip-box-wrap">';
            $output .= '<div class="flip-box ' . $height_type . ' ' . $el_class . ' ' . $flip_type . '" ' . $css_trans . ' style="' . $height . '" ' . $box_style_data . '>';
            $output .= '<div class="ifb-flip-box">';
            $output .= '<div class="ifb-face ifb-front" style="' . $f_style . ' ' . $box_border . ' ' . $border_front . '">';
            if ($icon !== '' || $icon_img !== '') {
                $output .= '<div class="flip-box-icon">' . $flip_icon . '</div>';
            }
            if ($block_title_front != '') {
                $output .= '<h3 style="' . $front_text . ' ' . $title_style . '">' . $block_title_front . '</h3>';
            }
            if ($block_desc_front != '') {
                $output .= '<p style="' . $desc_style . '">' . $block_desc_front . '</p>';
            }
            $output .= '</div><!-- END .front -->
						<div class="ifb-face ifb-back" style="' . $b_style . ' ' . $box_border . ' ' . $border_back . '">';
            if ($block_title_back != '') {
                $output .= '<h3 style="' . $back_text . ' ' . $title_style . '">' . $block_title_back . '</h3>';
            }
            if ($block_desc_back != '') {
                if ($button_link !== '') {
                    $output .= '<div class="ifb-desc-back">';
                }
                $output .= '<p style="' . $desc_style . '" >' . $block_desc_back . '</p>';
                if ($button_link !== '') {
                    $output .= '</div>';
                }
            }
            if ($button_text !== '' && $custom_link) {
                $link_prefix = '<div class="flip_link">';
                if ($button_bg !== '' && $button_txt !== '') {
                    $link_style = 'style="background:' . $button_bg . '; color:' . $button_txt . ';"';
                }
                if ($button_link !== '') {
                    $href = vc_build_link($button_link);
                    if (isset($href['target']) && $href['target'] != '') {
                        $target = 'target="' . $href['target'] . '"';
                    }
                    $link_prefix .= '<a href = "' . $href['url'] . '" ' . $target . ' ' . $link_style . '>';
                    $link_sufix .= '</a>';
                }
                $link_sufix .= '</div>';
                $output .= $link_prefix . $button_text . $link_sufix;
            }
            $output .= '</div><!-- END .back -->';
            $output .= '</div> <!-- ifb-flip-box -->';
            $output .= '</div> <!-- flip-box -->';
            $output .= '</div><!-- End icon block -->';
            return $output;
        }
    function ult_info_table_generate_design01($atts, $content = null)
    {
        $icon_type = $icon_img = $img_width = $icon = $icon_color = $icon_color_bg = $icon_size = $icon_style = $icon_border_style = $icon_border_radius = $icon_color_border = $icon_border_size = $icon_border_spacing = $el_class = $package_heading = $package_sub_heading = $package_price = $package_unit = $package_btn_text = $package_link = $package_featured = $color_bg_main = $color_txt_main = $color_bg_highlight = $color_txt_highlight = $color_scheme = $use_cta_btn = '';
        extract(shortcode_atts(array('color_scheme' => 'black', 'package_heading' => '', 'package_sub_heading' => '', 'icon_type' => 'none', 'icon' => '', 'icon_img' => '', 'img_width' => '48', 'icon_size' => '32', 'icon_color' => '#333333', 'icon_style' => 'none', 'icon_color_bg' => '#ffffff', 'icon_color_border' => '#333333', 'icon_border_style' => '', 'icon_border_size' => '1', 'icon_border_radius' => '500', 'icon_border_spacing' => '50', 'use_cta_btn' => '', 'package_btn_text' => '', 'package_link' => '', 'package_featured' => '', 'color_bg_main' => '', 'color_txt_main' => '', 'color_bg_highlight' => '', 'color_txt_highlight' => '', 'heading_font_family' => '', 'heading_font_style' => '', 'heading_font_size' => '', 'heading_font_color' => '', 'heading_line_height' => '', 'subheading_font_family' => '', 'subheading_font_style' => '', 'subheading_font_size' => '', 'subheading_font_color' => '', 'subheading_line_height' => '', 'features_font_family' => '', 'features_font_style' => '', 'features_font_size' => '', 'features_font_color' => '', 'features_line_height' => '', 'button_font_family' => '', 'button_font_style' => '', 'button_font_size' => '', 'button_font_color' => '', 'button_line_height' => '', 'el_class' => '', 'features_min_ht' => ''), $atts));
        $output = $link = $target = $featured = $featured_style = $normal_style = $dynamic_style = $box_icon = '';
        if ($icon_type !== "none") {
            $box_icon = do_shortcode('[just_icon icon_type="' . $icon_type . '" icon="' . $icon . '" icon_img="' . $icon_img . '" img_width="' . $img_width . '" icon_size="' . $icon_size . '" icon_color="' . $icon_color . '" icon_style="' . $icon_style . '" icon_color_bg="' . $icon_color_bg . '" icon_color_border="' . $icon_color_border . '"  icon_border_style="' . $icon_border_style . '" icon_border_size="' . $icon_border_size . '" icon_border_radius="' . $icon_border_radius . '" icon_border_spacing="' . $icon_border_spacing . '"]');
        }
        if ($color_scheme == "custom") {
            if ($color_bg_main !== "") {
                $normal_style .= 'background:' . $color_bg_main . ';';
            }
            if ($color_txt_main !== "") {
                $normal_style .= 'color:' . $color_txt_main . ';';
            }
            if ($color_bg_highlight !== "") {
                $featured_style .= 'background:' . $color_bg_highlight . ';';
            }
            if ($color_txt_highlight !== "") {
                $featured_style .= 'color:' . $color_txt_highlight . ';';
            }
        }
        if ($package_link !== "") {
            $link = vc_build_link($package_link);
            if (isset($link['target'])) {
                $target = 'target="' . $link['target'] . '"';
            } else {
                $target = '';
            }
            $link = $link['url'];
        } else {
            $link = "#";
        }
        if ($package_featured !== "") {
            $featured = "ult_featured";
            $dynamic_style = $featured_style;
        } else {
            $dynamic_style = $normal_style;
        }
        if ($use_cta_btn == "box") {
            $output .= '<a href="' . $link . '" ' . $target . ' class="ult_price_action_button">' . $package_btn_text;
        }
        /*---min ht style---*/
        $info_tab_ht = '';
        $info_tab_ht_style = '';
        if ($features_min_ht !== "") {
            $info_tab_ht = 'info_min_ht';
            $info_tab_ht_style .= 'min-height:' . $features_min_ht . 'px;';
        }
        /* typography */
        $heading_style_inline = $sub_heading_inline = $features_inline = $button_inline = '';
        // heading
        if ($heading_font_family != '') {
            $hdfont_family = get_ultimate_font_family($heading_font_family);
            if ($hdfont_family !== '') {
                $heading_style_inline .= 'font-family:\'' . $hdfont_family . '\';';
            }
        }
        $heading_style_inline .= get_ultimate_font_style($heading_font_style);
        if ($heading_font_color != '') {
            $heading_style_inline .= 'color:' . $heading_font_color . ';';
        }
        // if($heading_font_size != '')
        // 	$heading_style_inline .= 'font-size:'.$heading_font_size.'px;';
        // if($heading_line_height != '')
        // 	$heading_style_inline .= 'line-height:'.$heading_line_height.'px;';
        if (is_numeric($heading_font_size)) {
            $heading_font_size = 'desktop:' . $heading_font_size . 'px;';
        }
        if (is_numeric($heading_line_height)) {
            $heading_line_height = 'desktop:' . $heading_line_height . 'px;';
        }
        $info_table_id = 'Info-table-wrap-' . rand(1000, 9999);
        $info_table_args = array('target' => '#' . $info_table_id . ' h3', 'media_sizes' => array('font-size' => $heading_font_size, 'line-height' => $heading_line_height));
        $info_table_data_list = get_ultimate_vc_responsive_media_css($info_table_args);
        // sub heading
        if ($subheading_font_family != '') {
            $shfont_family = get_ultimate_font_family($subheading_font_family);
            if ($shfont_family !== '') {
                $sub_heading_inline .= 'font-family:\'' . $shfont_family . '\';';
            }
        }
        $sub_heading_inline .= get_ultimate_font_style($subheading_font_style);
        // if($subheading_font_size != '')
        // 	$sub_heading_inline .= 'font-size:'.$subheading_font_size.'px;';
        // if($subheading_line_height != '')
        // 	$sub_heading_inline .= 'line-height:'.$subheading_line_height.'px;';
        if ($subheading_font_color != '') {
            $sub_heading_inline .= 'color:' . $subheading_font_color . ';';
        }
        if (is_numeric($subheading_font_size)) {
            $subheading_font_size = 'desktop:' . $subheading_font_size . 'px;';
        }
        if (is_numeric($subheading_line_height)) {
            $subheading_line_height = 'desktop:' . $subheading_line_height . 'px;';
        }
        $info_table_sub_head_args = array('target' => '#' . $info_table_id . ' h5', 'media_sizes' => array('font-size' => $subheading_font_size, 'line-height' => $subheading_line_height));
        $info_table_sub_head_data_list = get_ultimate_vc_responsive_media_css($info_table_sub_head_args);
        // features
        if ($features_font_family != '') {
            $featuresfont_family = get_ultimate_font_family($features_font_family);
            if ($featuresfont_family !== '') {
                $features_inline .= 'font-family:\'' . $featuresfont_family . '\';';
            }
        }
        $features_inline .= get_ultimate_font_style($features_font_style);
        // if($features_font_size != '')
        // 	$features_inline .= 'font-size:'.$features_font_size.'px;';
        // if($features_line_height != '')
        // 	$features_inline .= 'line-height:'.$features_line_height.'px;';
        if ($features_font_color != '') {
            $features_inline .= 'color:' . $features_font_color . ';';
        }
        if (is_numeric($features_font_size)) {
            $features_font_size = 'desktop:' . $features_font_size . 'px;';
        }
        if (is_numeric($features_line_height)) {
            $features_line_height = 'desktop:' . $features_line_height . 'px;';
        }
        $info_table_features_id = 'info_table_features_wrap-' . rand(1000, 9999);
        $info_table_features_args = array('target' => '#' . $info_table_features_id . '.ult_price_features', 'media_sizes' => array('font-size' => $features_font_size, 'line-height' => $features_line_height));
        $info_table_features_data_list = get_ultimate_vc_responsive_media_css($info_table_features_args);
        // button
        if ($button_font_family != '') {
            $buttonfont_family = get_ultimate_font_family($button_font_family);
            if ($buttonfont_family !== '') {
                $button_inline .= 'font-family:\'' . $buttonfont_family . '\';';
            }
        }
        $button_inline .= get_ultimate_font_style($button_font_style);
        // if($button_font_size != '')
        // 	$button_inline .= 'font-size:'.$button_font_size.'px;';
        // if($button_line_height != '')
        // 	$button_inline .= 'line-height:'.$button_line_height.'px;';
        if ($button_font_color != '') {
            $button_inline .= 'color:' . $button_font_color . ';';
        }
        if (is_numeric($button_font_size)) {
            $button_font_size = 'desktop:' . $button_font_size . 'px;';
        }
        if (is_numeric($button_line_height)) {
            $button_line_height = 'desktop:' . $button_line_height . 'px;';
        }
        $info_table_btn_id = 'info_table_btn_wrap-' . rand(1000, 9999);
        $info_table_btn_args = array('target' => '#' . $info_table_btn_id . ' .ult_price_action_button', 'media_sizes' => array('font-size' => $button_font_size, 'line-height' => $button_line_height));
        $info_table_btn_data_list = get_ultimate_vc_responsive_media_css($info_table_btn_args);
        $output .= '<div class="ult_pricing_table_wrap ult_info_table ult_design_1 ' . $featured . ' ult-cs-' . $color_scheme . ' ' . $el_class . '">
					<div class="ult_pricing_table ' . $info_tab_ht . '" style="' . $featured_style . ' ' . $info_tab_ht_style . '">';
        $output .= '<div class="ult_pricing_heading" id="' . $info_table_id . '">
							<h3 class="ult-responsive" ' . $info_table_data_list . ' style="' . $heading_style_inline . '">' . $package_heading . '</h3>';
        if ($package_sub_heading !== '') {
            $output .= '<h5 class="ult-responsive" ' . $info_table_sub_head_data_list . 'style="' . $sub_heading_inline . '">' . $package_sub_heading . '</h5>';
        }
        $output .= '</div><!--ult_pricing_heading-->';
        $output .= '<div class="ult_price_body_block">
							<div class="ult_price_body">
								<div class="ult_price">
								' . $box_icon . '
								</div>
							</div>
						</div><!--ult_price_body_block-->';
        $output .= '<div id="' . $info_table_features_id . '" ' . $info_table_features_data_list . ' class="ult-responsive ult_price_features" style="' . $features_inline . '">
							' . wpb_js_remove_wpautop(do_shortcode($content), true) . '
						</div><!--ult_price_features-->';
        if ($use_cta_btn == "true") {
            $output .= '<div id="' . $info_table_btn_id . '" class="ult_price_link" style="' . $normal_style . '">
							<a href="' . $link . '" ' . $target . ' ' . $info_table_btn_data_list . ' class="ult-responsive ult_price_action_button" style="' . $featured_style . ' ' . $button_inline . '">' . $package_btn_text . '</a>
						</div><!--ult_price_link-->';
        }
        $output .= '<div class="ult_clr"></div>
			</div><!--pricing_table-->
		</div><!--pricing_table_wrap-->';
        if ($use_cta_btn == "box") {
            $output .= '</a>';
        }
        return $output;
    }
        function ultimate_fancytext_shortcode($atts, $content = null)
        {
            $output = $fancytext_strings = $fancytext_prefix = $fancytext_suffix = $fancytext_effect = $strings_textspeed = $strings_tickerspeed = $typewriter_cursor = $typewriter_cursor_text = $typewriter_loop = $fancytext_align = $strings_font_family = $strings_font_style = $strings_font_size = $strings_color = $strings_line_height = $strings_startdelay = $strings_backspeed = $strings_backdelay = $ticker_wait_time = $ticker_show_items = $ticker_hover_pause = $ex_class = '';
            $id = uniqid(rand());
            extract(shortcode_atts(array('fancytext_strings' => '', 'fancytext_prefix' => '', 'fancytext_suffix' => '', 'fancytext_effect' => '', 'strings_textspeed' => '35', 'strings_tickerspeed' => '200', 'typewriter_loop' => 'false', 'typewriter_cursor_color' => '', 'fancytext_tag' => 'div', 'fancytext_align' => 'center', 'strings_font_family' => '', 'strings_font_style' => '', 'strings_font_size' => '', 'strings_color' => '', 'strings_line_height' => '', 'strings_startdelay' => '200', 'strings_backspeed' => '0', 'strings_backdelay' => '1500', 'typewriter_cursor' => 'true', 'typewriter_cursor_text' => '|', 'ticker_wait_time' => '3000', 'ticker_show_items' => '1', 'ticker_hover_pause' => 'true', 'ticker_background' => '', 'fancytext_color' => '', 'ex_class' => ''), $atts));
            $string_inline_style = $vticker_inline = $valign = '';
            if ($strings_font_family != '') {
                $font_family = get_ultimate_font_family($strings_font_family);
                $string_inline_style .= 'font-family:\'' . $font_family . '\';';
            }
            $string_inline_style .= get_ultimate_font_style($strings_font_style);
            if ($strings_font_size != '') {
                $string_inline_style .= 'font-size:' . $strings_font_size . 'px;';
            }
            if ($strings_color != '') {
                $string_inline_style .= 'color:' . $strings_color . ';';
            }
            if ($strings_line_height != '') {
                $string_inline_style .= 'line-height:' . $strings_line_height . 'px;';
            }
            if ($fancytext_align != '') {
                $string_inline_style .= 'text-align:' . $fancytext_align . ';';
            }
            // Order of replacement
            $order = array("\r\n", "\n", "\r", "<br/>", "<br>");
            $replace = '|';
            // Processes \r\n's first so they aren't converted twice.
            $str = str_replace($order, $replace, $fancytext_strings);
            $lines = explode("|", $str);
            $count_lines = count($lines);
            $ex_class .= ' uvc-type-align-' . $fancytext_align . ' ';
            if ($fancytext_prefix == '') {
                $ex_class .= 'uvc-type-no-prefix';
            }
            if ($fancytext_color != '') {
                $vticker_inline .= 'color:' . $fancytext_color . ';';
            }
            if ($ticker_background != '') {
                $vticker_inline .= 'background:' . $ticker_background . ';';
                if ($fancytext_effect == 'typewriter') {
                    $valign = 'fancytext-typewriter-background-enabled';
                } else {
                    $valign = 'fancytext-background-enabled';
                }
            }
            $ultimate_js = get_option('ultimate_js');
            $output = '<' . $fancytext_tag . ' class="uvc-type-wrap ' . $ex_class . ' uvc-wrap-' . $id . '" style="' . $string_inline_style . '">';
            if (trim($fancytext_prefix) != '') {
                $output .= '<span class="ultimate-' . $fancytext_effect . '-prefix">' . ltrim($fancytext_prefix) . '</span>';
            }
            if ($fancytext_effect == 'ticker' || $fancytext_effect == 'ticker-down') {
                if ($ultimate_js != 'enable') {
                    wp_enqueue_script('ultimate-vticker-js');
                }
                if ($strings_font_size != '') {
                    $inherit_font_size = 'ultimate-fancy-text-inherit';
                } else {
                    $inherit_font_size = '';
                }
                if ($ticker_hover_pause != 'true') {
                    $ticker_hover_pause = 'false';
                }
                if ($fancytext_effect == 'ticker-down') {
                    $direction = "down";
                } else {
                    $direction = "up";
                }
                $output .= '<div id="vticker-' . $id . '" class="ultimate-vticker ' . $fancytext_effect . ' ' . $valign . ' ' . $inherit_font_size . '" style="' . $vticker_inline . '"><ul>';
                foreach ($lines as $line) {
                    $output .= '<li>' . strip_tags($line) . '</li>';
                }
                $output .= '</ul></div>';
            } else {
                if ($ultimate_js != 'enable') {
                    wp_enqueue_script('ultimate-typed-js');
                }
                if ($typewriter_loop != 'true') {
                    $typewriter_loop = 'false';
                }
                if ($typewriter_cursor != 'true') {
                    $typewriter_cursor = 'false';
                }
                $strings = '[';
                foreach ($lines as $key => $line) {
                    $strings .= '"' . __(trim(htmlspecialchars_decode(strip_tags($line))), 'js_composer') . '"';
                    if ($key != $count_lines - 1) {
                        $strings .= ',';
                    }
                }
                $strings .= ']';
                $output .= '<span id="typed-' . $id . '" class="ultimate-typed-main ' . $valign . '" style="' . $vticker_inline . '"></span>';
            }
            if (trim($fancytext_suffix) != '') {
                $output .= '<span class="ultimate-' . $fancytext_effect . '-suffix">' . rtrim($fancytext_suffix) . '</span>';
            }
            if ($fancytext_effect == 'ticker' || $fancytext_effect == 'ticker-down') {
                $output .= '<script type="text/javascript">
						jQuery(function($){
							$("#vticker-' . $id . '")
									.vTicker(
									{
										speed: ' . $strings_tickerspeed . ',
										showItems: ' . $ticker_show_items . ',
										pause: ' . $ticker_wait_time . ',
										mousePause : ' . $ticker_hover_pause . ',
										direction: "' . $direction . '",
									}
								);
						});
					</script>';
            } else {
                $output .= '<script type="text/javascript"> jQuery(function($){ $("#typed-' . $id . '").typed({ 
								strings: ' . $strings . ',
								typeSpeed: ' . $strings_textspeed . ',
								backSpeed: ' . $strings_backspeed . ',
								startDelay: ' . $strings_startdelay . ',
								backDelay: ' . $strings_backdelay . ',
								loop: ' . $typewriter_loop . ',
								loopCount: false,
								showCursor: ' . $typewriter_cursor . ',
								cursorChar: "' . $typewriter_cursor_text . '",
								attr: null
							});
						});
					</script>';
                if ($typewriter_cursor_color != '') {
                    $output .= '<style>
							.uvc-wrap-' . $id . ' .typed-cursor {
								color:' . $typewriter_cursor_color . ';
							}
						</style>';
                }
            }
            $output .= '</' . $fancytext_tag . '>';
            /*$args = array(
            			$strings_font_family
            		);
            		enquque_ultimate_google_fonts($args);*/
            return $output;
        }
 function ult_ihover_item_callback($atts, $content = null)
 {
     global $glob_gutter_width, $glob_thumb_height_width, $glob_ihover_shape;
     global $glob_gutter_width;
     global $glob_thumb_height_width;
     global $glob_ihover_effectdirection;
     //	Item
     $title_margin = $divider_margin = $description_margin = $spacer_border = $spacer_border_color = $spacer_width = $spacer_border_width = $thumbnail_border_styling = $block_border_color = $block_border_size = $block_link = $info_color_bg = $effect_direction = $title_text_typography = $title_font = $title_font_style = $title_responsive_font_size = $title_responsive_font_line_height = $title_font_color = $desc_text_typography = $desc_font = $desc_font_style = $desc_font_size = $desc_font_line_height = $desc_font_color = $itemOutput = $title = $itemOutput = '';
     extract(shortcode_atts(array('thumb_img' => '', 'title' => '', 'title_text_typography' => '', 'title_font' => '', 'title_font_style' => '', 'title_responsive_font_size' => 'desktop:22px;', 'title_responsive_line_height' => 'desktop:28px;', 'title_font_color' => '#ffffff', 'desc_text_typography' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_responsive_font_size' => 'desktop:12px;', 'desc_responsive_line_height' => 'desktop:18px;', 'desc_font_color' => '#bbbbbb', 'info_color_bg' => 'rgba(0,0,0,0.75)', 'hover_effect' => 'effect1', 'effect_direction' => 'right_to_left', 'spacer_border' => 'solid', 'spacer_border_color' => 'rgba(255,255,255,0.75)', 'spacer_width' => '100', 'spacer_border_width' => '1', 'block_click' => '', 'block_link' => '', 'thumbnail_border_styling' => 'solid', 'block_border_color' => 'rgba(255,255,255,0.2)', 'block_border_size' => '20', 'effect_scale' => 'scale_up', 'effect_top_bottom' => 'top_to_bottom', 'effect_left_right' => 'left_to_right', 'title_margin' => '', 'divider_margin' => '', 'description_margin' => ''), $atts));
     $content = wpb_js_remove_wpautop($content, true);
     // fix unclosed/unwanted paragraph tags in $content
     $info_style = '';
     $title_style = '';
     $desc_style = '';
     $thumbnail_border_style = '';
     // $font_args = array();
     if ($info_color_bg != '') {
         $info_style .= 'background-color: ' . $info_color_bg . '; ';
     }
     if ($title_font != '') {
         $font_family = get_ultimate_font_family($title_font);
         $title_style .= 'font-family:\'' . $font_family . '\';';
         //array_push($font_args, $title_font);
     }
     if ($title_font_style != '') {
         $title_style .= get_ultimate_font_style($title_font_style);
     }
     if ($title_font_color != '') {
         $title_style .= 'color:' . $title_font_color . ';';
     }
     if ($desc_font != '') {
         $font_family = get_ultimate_font_family($desc_font);
         $desc_style .= 'font-family:\'' . $font_family . '\';';
         //array_push($font_args, $desc_font);
     }
     if ($desc_font_style != '') {
         $desc_style .= get_ultimate_font_style($desc_font_style);
     }
     if ($desc_font_color != '') {
         $desc_style .= 'color:' . $desc_font_color . ';';
     }
     //enquque_ultimate_google_fonts($font_args);
     $spacer_line_style = $spacer_style = '';
     if ($spacer_border != '') {
         $spacer_line_style .= "border-style:" . $spacer_border . ";";
         if ($spacer_border_color != '') {
             $spacer_line_style .= "border-color:" . $spacer_border_color . ";";
         }
         if ($spacer_width != '') {
             $spacer_line_style .= "width:" . $spacer_width . "px;";
         }
         if ($spacer_border_width != '') {
             $spacer_line_style .= "border-width:" . $spacer_border_width . "px;";
             /* spacer height */
             $spacer_style .= "height:" . $spacer_border_width . "px;";
         }
     }
     $thumb_url = '';
     if ($thumb_img != '') {
         $img = apply_filters('ult_get_img_single', $thumb_img, 'url');
         $thumb_url = $img;
     }
     if ($thumbnail_border_styling != '' && $thumbnail_border_styling != 'none') {
         $thumbnail_border_style .= 'border-style: ' . $thumbnail_border_styling . '; ';
         if ($block_border_color != '') {
             $thumbnail_border_style .= 'border-color: ' . $block_border_color . '; ';
         }
         if ($block_border_size != '') {
             $thumbnail_border_style .= 'border-width: ' . $block_border_size . 'px;';
         }
     }
     $HeightWidth = $imgHeight = $imgWidth = '';
     if ($glob_thumb_height_width != '') {
         $HeightWidth .= "height: " . $glob_thumb_height_width . "px; ";
         $HeightWidth .= "width: " . $glob_thumb_height_width . "px; ";
     }
     $effect = '';
     if ($hover_effect != '') {
         $effect = $hover_effect;
     }
     $Scale = '';
     switch ($effect) {
         case 'effect6':
             if ($effect_scale != '') {
                 $Scale = 'ult-ih-' . $effect_scale;
             }
             break;
     }
     //	Directions: [left, right, top, bottom]
     $Direction = '';
     switch ($effect) {
         case 'effect2':
         case 'effect3':
         case 'effect4':
         case 'effect7':
         case 'effect8':
         case 'effect9':
         case 'effect11':
         case 'effect12':
         case 'effect13':
         case 'effect14':
         case 'effect18':
             if ($effect_direction != '') {
                 $Direction = 'ult-ih-' . $effect_direction;
             }
             break;
     }
     $TopBottom = '';
     switch ($effect) {
         case 'effect10':
         case 'effect1':
             if ($effect_top_bottom != '') {
                 $TopBottom = 'ult-ih-' . $effect_top_bottom;
             }
             break;
     }
     $LeftRight = '';
     switch ($effect) {
         case 'effect16':
             if ($effect_left_right != '') {
                 $LeftRight = 'ult-ih-' . $effect_left_right;
             }
             break;
     }
     $GutterMargin = '';
     if ($glob_gutter_width != '') {
         $GutterMargin = 'margin: ' . $glob_gutter_width / 2 . 'px';
     }
     $heading_block = $description_block = '';
     if ($title_margin != '') {
         $heading_block .= $title_margin;
     }
     if ($description_margin != '') {
         $description_block .= $description_margin;
     }
     if ($divider_margin != '') {
         $spacer_style .= $divider_margin;
     }
     $url = '#';
     $link_title = $target = '';
     if ($block_link != '') {
         $href = vc_build_link($block_link);
         $url = $href['url'];
         $link_title = 'title="' . $href['title'] . '" ';
         $target = 'target="' . trim($href['target']) . '" ';
     }
     $item_id = 'ult-ih-list-item-' . rand(1000, 9999);
     //responsive font size and line height for title
     $args = array('target' => '#' . $item_id . ' .ult-ih-heading', 'media_sizes' => array('font-size' => $title_responsive_font_size, 'line-height' => $title_responsive_line_height));
     $title_responsive = get_ultimate_vc_responsive_media_css($args);
     //resposnive font size and line height for description
     $args = array('target' => '#' . $item_id . ' .ult-ih-description, #' . $item_id . ' .ult-ih-description p', 'media_sizes' => array('font-size' => $desc_responsive_font_size, 'line-height' => $desc_responsive_line_height));
     $desc_responsive = get_ultimate_vc_responsive_media_css($args);
     $itemOutput .= '<li id="' . $item_id . '" class="ult-ih-list-item" style="' . $HeightWidth . ' ' . $GutterMargin . '">';
     if ($block_click != '') {
         $itemOutput .= '<a class="ult-ih-link" href="' . $url . '" ' . $target . ' ' . $link_title . '><div style="' . $HeightWidth . '"class="ult-ih-item ult-ih-' . $effect . ' ' . $LeftRight . ' ' . $Direction . ' ' . $Scale . ' ' . $TopBottom . '">';
     } else {
         $itemOutput .= '<div style="' . $HeightWidth . '"class="ult-ih-item ult-ih-' . $effect . ' ' . $LeftRight . ' ' . $Direction . ' ' . $Scale . ' ' . $TopBottom . ' ">';
     }
     switch ($effect) {
         case 'effect8':
             $itemOutput .= '<div class="ult-ih-image-block-container">';
             $itemOutput .= '	<div class="ult-ih-image-block" style="' . $HeightWidth . '">';
             $itemOutput .= '		<div class="ult-ih-wrapper" style="' . $thumbnail_border_style . '"></div>';
             $itemOutput .= '		<img class="ult-ih-image" src="' . $thumb_url . '" alt="">';
             $itemOutput .= '	</div> ';
             $itemOutput .= '</div>';
             $itemOutput .= '<div class="info-container">';
             $itemOutput .= '	<div class="ult-ih-info" style="' . $info_style . '">';
             $itemOutput .= $this->commonStructure($desc_responsive, $title_responsive, $heading_block, $title_style, $title, $spacer_style, $spacer_line_style, $description_block, $desc_style, $content);
             $itemOutput .= '	</div>';
             $itemOutput .= '</div>';
             break;
         case 'effect1':
         case 'effect5':
         case 'effect18':
             $itemOutput .= '<div class="ult-ih-image-block" style="' . $HeightWidth . '">';
             $itemOutput .= '	<div class="ult-ih-wrapper" style="' . $thumbnail_border_style . '"></div>';
             $itemOutput .= '	<img class="ult-ih-image" src="' . $thumb_url . '" alt="">';
             $itemOutput .= '</div>';
             $itemOutput .= '<div class="ult-ih-info" >';
             $itemOutput .= '	<div class="ult-ih-info-back" style="' . $info_style . '">';
             $itemOutput .= $this->commonStructure($desc_responsive, $title_responsive, $heading_block, $title_style, $title, $spacer_style, $spacer_line_style, $description_block, $desc_style, $content);
             $itemOutput .= '	</div>';
             $itemOutput .= '</div>';
             break;
         default:
             $itemOutput .= '<div class="ult-ih-image-block" style="' . $HeightWidth . '">';
             $itemOutput .= '	<div class="ult-ih-wrapper" style="' . $thumbnail_border_style . '"></div>';
             $itemOutput .= '	<img class="ult-ih-image" src="' . $thumb_url . '" alt="">';
             $itemOutput .= '</div>';
             $itemOutput .= '<div class="ult-ih-info" style="' . $info_style . '">';
             $itemOutput .= '	<div class="ult-ih-info-back">';
             $itemOutput .= $this->commonStructure($desc_responsive, $title_responsive, $heading_block, $title_style, $title, $spacer_style, $spacer_line_style, $description_block, $desc_style, $content);
             $itemOutput .= '	</div>';
             $itemOutput .= '</div>';
             break;
     }
     //	Check anchor
     if ($block_click != '') {
         $itemOutput .= '</div></a>';
     } else {
         $itemOutput .= '</div>';
     }
     $itemOutput .= '</li>';
     return $itemOutput;
 }
示例#7
0
    function ult_info_table_generate_design06($atts, $content = null)
    {
        $icon_type = $icon_img = $img_width = $icon = $icon_color = $icon_color_bg = $icon_size = $icon_style = $icon_border_style = $icon_border_radius = $icon_color_border = $icon_border_size = $icon_border_spacing = $el_class = $package_heading = $package_sub_heading = $package_price = $package_unit = $package_btn_text = $package_link = $package_featured = $color_bg_main = $color_txt_main = $color_bg_highlight = $color_txt_highlight = $color_scheme = $use_cta_btn = '';
        extract(shortcode_atts(array('color_scheme' => '', 'package_heading' => '', 'package_sub_heading' => '', 'icon_type' => '', 'icon' => '', 'icon_img' => '', 'img_width' => '', 'icon_size' => '', 'icon_color' => '', 'icon_style' => '', 'icon_color_bg' => '', 'icon_color_border' => '', 'icon_border_style' => '', 'icon_border_size' => '', 'icon_border_radius' => '', 'icon_border_spacing' => '', 'use_cta_btn' => '', 'package_btn_text' => '', 'package_link' => '', 'package_featured' => '', 'color_bg_main' => '', 'color_txt_main' => '', 'color_bg_highlight' => '', 'color_txt_highlight' => '', 'heading_font_family' => '', 'heading_font_style' => '', 'heading_font_size' => '', 'heading_font_color' => '', 'heading_line_height' => '', 'subheading_font_family' => '', 'subheading_font_style' => '', 'subheading_font_size' => '', 'subheading_font_color' => '', 'subheading_line_height' => '', 'features_font_family' => '', 'features_font_style' => '', 'features_font_size' => '', 'features_font_color' => '', 'features_line_height' => '', 'button_font_family' => '', 'button_font_style' => '', 'button_font_size' => '', 'button_font_color' => '', 'button_line_height' => '', 'el_class' => ''), $atts));
        $output = $link = $target = $featured = $featured_style = $normal_style = $dynamic_style = $box_icon = '';
        if ($icon_type !== "none") {
            $box_icon = do_shortcode('[just_icon icon_type="' . $icon_type . '" icon="' . $icon . '" icon_img="' . $icon_img . '" img_width="' . $img_width . '" icon_size="' . $icon_size . '" icon_color="' . $icon_color . '" icon_style="' . $icon_style . '" icon_color_bg="' . $icon_color_bg . '" icon_color_border="' . $icon_color_border . '"  icon_border_style="' . $icon_border_style . '" icon_border_size="' . $icon_border_size . '" icon_border_radius="' . $icon_border_radius . '" icon_border_spacing="' . $icon_border_spacing . '"]');
        }
        if ($color_scheme == "custom") {
            if ($color_bg_main !== "") {
                $normal_style .= 'background:' . $color_bg_main . ';';
            }
            if ($color_txt_main !== "") {
                $normal_style .= 'color:' . $color_txt_main . ';';
            }
            if ($color_bg_highlight !== "") {
                $featured_style .= 'background:' . $color_bg_highlight . ';';
            }
            if ($color_txt_highlight !== "") {
                $featured_style .= 'color:' . $color_txt_highlight . ';';
            }
        }
        if ($package_link !== "") {
            $link = vc_build_link($package_link);
            if (isset($link['target'])) {
                $target = 'target="' . $link['target'] . '"';
            } else {
                $target = '';
            }
            $link = $link['url'];
        } else {
            $link = "#";
        }
        if ($package_featured !== "") {
            $featured = "ult_featured";
        }
        if ($use_cta_btn == "box") {
            $output .= '<a href="' . $link . '" ' . $target . ' class="ult_price_action_button">' . $package_btn_text;
        }
        /* typography */
        $heading_style_inline = $sub_heading_inline = $features_inline = $button_inline = '';
        // heading
        if ($heading_font_family != '') {
            $hdfont_family = get_ultimate_font_family($heading_font_family);
            $heading_style_inline .= 'font-family:\'' . $hdfont_family . '\';';
        }
        $heading_style_inline .= get_ultimate_font_style($heading_font_style);
        if ($heading_font_size != '') {
            $heading_style_inline .= 'font-size:' . $heading_font_size . 'px;';
        }
        if ($heading_font_color != '') {
            $heading_style_inline .= 'color:' . $heading_font_color . ';';
        }
        if ($heading_line_height != '') {
            $heading_style_inline .= 'line-height:' . $heading_line_height . 'px;';
        }
        // sub heading
        if ($subheading_font_family != '') {
            $shfont_family = get_ultimate_font_family($subheading_font_family);
            $sub_heading_inline .= 'font-family:\'' . $shfont_family . '\';';
        }
        $sub_heading_inline .= get_ultimate_font_style($subheading_font_style);
        if ($subheading_font_size != '') {
            $sub_heading_inline .= 'font-size:' . $subheading_font_size . 'px;';
        }
        if ($subheading_font_color != '') {
            $sub_heading_inline .= 'color:' . $subheading_font_color . ';';
        }
        if ($subheading_line_height != '') {
            $sub_heading_inline .= 'line-height:' . $subheading_line_height . 'px;';
        }
        // features
        if ($features_font_family != '') {
            $featuresfont_family = get_ultimate_font_family($features_font_family);
            $features_inline .= 'font-family:\'' . $featuresfont_family . '\';';
        }
        $features_inline .= get_ultimate_font_style($features_font_style);
        if ($features_font_size != '') {
            $features_inline .= 'font-size:' . $features_font_size . 'px;';
        }
        if ($features_font_color != '') {
            $features_inline .= 'color:' . $features_font_color . ';';
        }
        if ($features_line_height != '') {
            $features_inline .= 'line-height:' . $features_line_height . 'px;';
        }
        // button
        if ($button_font_family != '') {
            $buttonfont_family = get_ultimate_font_family($button_font_family);
            $button_inline .= 'font-family:\'' . $buttonfont_family . '\';';
        }
        $button_inline .= get_ultimate_font_style($button_font_style);
        if ($button_font_size != '') {
            $button_inline .= 'font-size:' . $button_font_size . 'px;';
        }
        if ($button_font_color != '') {
            $button_inline .= 'color:' . $button_font_color . ';';
        }
        if ($button_line_height != '') {
            $button_inline .= 'line-height:' . $button_line_height . 'px;';
        }
        $output .= '<div class="ult_pricing_table_wrap ult_info_table ult_design_6 ' . $featured . ' ult-cs-' . $color_scheme . ' ' . $el_class . '">
					<div class="ult_pricing_table" style="' . $normal_style . '">';
        $output .= '<div class="ult_pricing_heading" style="' . $featured_style . '">
							<h3 style="' . $heading_style_inline . '">' . $package_heading . '</h3>';
        if ($package_sub_heading !== '') {
            $output .= '<h5 style="' . $sub_heading_inline . '">' . $package_sub_heading . '</h5>';
        }
        $output .= '</div><!--ult_pricing_heading-->';
        if (isset($box_icon) && $box_icon != '') {
            $output .= '<div class="ult_price_body_block" style="' . $featured_style . '">
							<div class="ult_price_body">
								<div class="ult_price">
									' . $box_icon . '
								</div>
							</div>
						</div><!--ult_price_body_block-->';
        }
        $output .= '<div class="ult_price_features" style="' . $features_inline . '">
							' . wpb_js_remove_wpautop(do_shortcode($content), true) . '
						</div><!--ult_price_features-->';
        if ($use_cta_btn == "true") {
            $output .= '<div class="ult_price_link" style="' . $normal_style . '">
							<a href="' . $link . '" ' . $target . ' class="ult_price_action_button" style="' . $featured_style . ' ' . $button_inline . '">' . $package_btn_text . '</a>
						</div><!--ult_price_link-->';
        }
        $output .= '<div class="ult_clr"></div>
			</div><!--pricing_table-->
		</div><!--pricing_table_wrap-->';
        if ($use_cta_btn == "box") {
            $output .= '</a>';
        }
        return $output;
    }
示例#8
0
        function ult_createlink_shortcode($atts)
        {
            extract(shortcode_atts(array('btn_link' => '', 'text_color' => '#333333', 'text_hovercolor' => '#333333', 'background_color' => '#ffffff', 'bghovercolor' => '', 'font_family' => '', 'heading_style' => '', 'title_font_size' => '', 'title_line_ht' => '', 'link_hover_style' => '', 'border_style' => 'solid', 'border_color' => '#333333', 'border_hovercolor' => '#333333', 'border_size' => '1', 'el_class' => '', 'dot_color' => '#333333', 'css' => '', 'title' => '', 'text_style' => ''), $atts));
            $href = $target = $text = $url = $alt_text = "";
            if ($btn_link !== '') {
                $href = vc_build_link($btn_link);
                $target = isset($href['target']) ? "target='" . trim($href['target']) . "'" : '';
                $alt_text = $href['title'];
                $url = $href['url'];
                if ($url == '') {
                    $url = "javascript:void(0);";
                }
            } else {
                $url = "javascript:void(0);";
            }
            /*--- design option---*/
            if ($title !== '') {
                $text = $title;
            } else {
                $text = $alt_text;
            }
            $css_class = '';
            $title_style = '';
            $secondtitle_style = $span_style = '';
            $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class($css, ' '), "ult_createlink", $atts);
            $css_class = esc_attr($css_class);
            if ($link_hover_style == 'Style_2') {
                $span_style = 'background:' . $background_color . ';';
                //background-color
            }
            /*--- hover effect for link-----*/
            $data_link = '';
            if ($link_hover_style == '') {
                $data_link .= 'data-textcolor="' . $text_color . '"';
                $data_link .= 'data-texthover="' . $text_hovercolor . '"';
            } else {
                $data_link .= 'data-textcolor="' . $text_color . '"';
                $data_link .= 'data-texthover="' . $text_hovercolor . '"';
            }
            if ($link_hover_style == 'Style_2') {
                if ($text_hovercolor == '') {
                    $text_hovercolor = $text_color;
                }
                if ($bghovercolor == '') {
                    $bghovercolor = $background_color;
                }
                if ($text_hovercolor == '' && $bghovercolor == '') {
                    $data_link .= 'data-bgcolor="' . $background_color . '"';
                    $data_link .= 'data-bghover="' . $background_color . '"';
                    //$data_link .='data-texthover="'.$text_color.'"';
                } else {
                    $data_link .= 'data-bgcolor="' . $background_color . '"';
                    $data_link .= 'data-bghover="' . $bghovercolor . '"';
                }
                //echo$bghovercolor;
            }
            $data_link .= 'data-style="' . $link_hover_style . '"';
            /*--- border style---*/
            $data_border = '';
            if ($border_style != '') {
                $data_border .= 'border-color:' . $border_color . ';';
                $data_border .= 'border-width:' . $border_size . 'px;';
                $data_border .= 'border-style:' . $border_style . ';';
            }
            $main_span = $before = $borderhover = $ult_style2css = $ult_style11css = '';
            $after = '';
            $style = $class = $id = $colorstyle = $borderstyle = $style11_css_class = '';
            /*---- text typography----*/
            if ($text_style != '') {
                $colorstyle .= 'float:' . $text_style . ';';
            }
            if (function_exists('get_ultimate_font_family')) {
                $mhfont_family = get_ultimate_font_family($font_family);
                //for font family
                if ($mhfont_family != '') {
                    $colorstyle .= 'font-family:' . $mhfont_family . ';';
                }
                //$secondtitle_style .='font-family:'.$mhfont_family.';';
            }
            if (function_exists('get_ultimate_font_style')) {
                //for font style
                $colorstyle .= get_ultimate_font_style($heading_style);
                //$secondtitle_style .=get_ultimate_font_style($heading_style);
            }
            if ($title_font_size != '') {
                $colorstyle .= 'font-size:' . $title_font_size . 'px;';
            }
            //font-size
            $title_style .= 'color:' . $text_color . ';';
            //color
            if ($link_hover_style != 'Style_2') {
                if ($title_line_ht != '') {
                    $colorstyle .= 'line-height:' . $title_line_ht . 'px;';
                    //$colorstyle .='color:'.$text_color.';';
                }
                //font-line-height
            } else {
                if ($title_line_ht != '') {
                    $colorstyle .= 'line-height:' . $title_line_ht . 'px;';
                }
                //font-line-height
            }
            //$secondtitle_style .= 'font-size:'.$title_font_size.'px;';			//font-size for backend title
            //$secondtitle_style .= 'line-height:'.$title_line_ht.'px;';
            /*-- hover style---*/
            $id = '';
            if ($link_hover_style == 'Style_1') {
                //style1
                $class .= 'ult_cl_link_1';
                //$id .='ult_cl_link_1';
                $colorstyle .= 'color:' . $text_color . ';';
                //text color for bracket
                if ($title_font_size != '') {
                    $colorstyle .= 'font-size:' . $title_font_size . 'px;';
                }
            } else {
                if ($link_hover_style == 'Style_2') {
                    //style2
                    $class .= 'ult_cl_link_2';
                    //$id .='ult_cl_link_2';
                } else {
                    if ($link_hover_style == 'Style_3') {
                        //style3
                        $class .= 'ult_cl_link_3';
                        //$id .='ult_cl_link_3';
                        $data_border = '';
                        $data_border .= 'border-color:' . $border_color . ';';
                        $data_border .= 'border-bottom-width:' . $border_size . 'px;';
                        $data_border .= 'border-style:' . $border_style . ';';
                        if ($title_font_size != '') {
                            $colorstyle .= 'font-size:' . $title_font_size . 'px;';
                        }
                        $borderstyle .= $data_border;
                        //text color for btm border
                        $after .= '<span class="ult_link_btm3 " style="' . $borderstyle . '"></span>';
                    } else {
                        if ($link_hover_style == 'Style_4') {
                            //style4
                            $class .= 'ult_cl_link_4';
                            //$id .='ult_cl_link_4';
                            $data_border = '';
                            $data_border .= 'border-color:' . $border_color . ';';
                            $data_border .= 'border-bottom-width:' . $border_size . 'px;';
                            $data_border .= 'border-style:' . $border_style . ';';
                            if ($title_font_size != '') {
                                $colorstyle .= 'font-size:' . $title_font_size . 'px;';
                            }
                            $borderstyle .= $data_border;
                            //text color for btm border
                            $after .= '<span class="ult_link_btm4 " style="' . $borderstyle . '"></span>';
                        } else {
                            if ($link_hover_style == 'Style_6') {
                                //style6
                                $class .= 'ult_cl_link_6';
                                //$id .='ult_cl_link_6';//
                                $colorstyle .= 'color:' . $text_hovercolor . ';';
                                if ($title_font_size != '') {
                                    $colorstyle .= 'font-size:' . $title_font_size . 'px;';
                                }
                                $after .= '<span class="ult_btn6_link_top " data-color="' . $dot_color . '">•</span>';
                            } else {
                                if ($link_hover_style == 'Style_5') {
                                    //style5
                                    $class .= 'ult_cl_link_5';
                                    //$id .='ult_cl_link_5';//
                                    if ($title_font_size != '') {
                                        $colorstyle .= 'font-size:' . $title_font_size . 'px;';
                                    }
                                    $data_border = '';
                                    $data_border .= 'border-color:' . $border_color . ';';
                                    $data_border .= 'border-bottom-width:' . $border_size . 'px;';
                                    $data_border .= 'border-style:' . $border_style . ';';
                                    $borderstyle .= $data_border;
                                    //text color for btm border
                                    $before = '<span class="ult_link_top" style="' . $borderstyle . '"></span>';
                                    $after .= '<span class="ult_link_btm  " style="' . $borderstyle . '"></span>';
                                } else {
                                    if ($link_hover_style == 'Style_7') {
                                        //style7
                                        $class .= 'ult_cl_link_7';
                                        //$id .='ult_cl_link_7';//
                                        //$colorstyle .='font-size:'.$title_font_size.'px;';
                                        $borderstyle .= 'background:' . $border_color . ';';
                                        $borderstyle .= 'height:' . $border_size . 'px;';
                                        $before = '<span class="ult_link_top btn7_link_top " style="' . $borderstyle . '"></span>';
                                        $after .= '<span class="ult_link_btm  btn7_link_btm" style="' . $borderstyle . '"></span>';
                                    } else {
                                        if ($link_hover_style == 'Style_8') {
                                            //style8
                                            $class .= 'ult_cl_link_8';
                                            //$id .='ult_cl_link_8';//
                                            if ($title_font_size != '') {
                                                $colorstyle .= 'font-size:' . $title_font_size . 'px;';
                                            }
                                            $borderstyle .= 'outline-color:' . $border_color . ';';
                                            $borderstyle .= 'outline-width:' . $border_size . 'px;';
                                            $borderstyle .= 'outline-style:' . $border_style . ';';
                                            //text color for btm border
                                            $borderhover .= 'outline-color:' . $border_hovercolor . ';';
                                            $borderhover .= 'outline-width:' . $border_size . 'px;';
                                            $borderhover .= 'outline-style:' . $border_style . ';';
                                            //text color for btm border
                                            $before = '<span class="ult_link_top ult_btn8_link_top " style="' . $borderstyle . '"></span>';
                                            $after .= '<span class="ult_link_btm  ulmt_btn8_link_btm" style="' . $borderhover . '"></span>';
                                        } else {
                                            if ($link_hover_style == 'Style_9') {
                                                //style9
                                                $class .= 'ult_cl_link_9';
                                                //$id .='ult_cl_link_9';//
                                                if ($title_font_size != '') {
                                                    $colorstyle .= 'font-size:' . $title_font_size . 'px;';
                                                }
                                                //$borderstyle .='background:'.$border_color.';';
                                                //$borderstyle .='height:'.$border_size.'px;';
                                                $borderstyle .= 'border-top-width:' . $border_size . 'px;';
                                                $borderstyle .= 'border-top-style:' . $border_style . ';';
                                                $borderstyle .= 'border-top-color:' . $border_color . ';';
                                                //$borderstyle .='height:'; //text color for btm border
                                                $before = '<span class="ult_link_top ult_btn9_link_top " style="' . $borderstyle . '"></span>';
                                                $after .= '<span class="ult_link_btm  ult_btn9_link_btm" style="' . $borderstyle . '"></span>';
                                            } else {
                                                if ($link_hover_style == 'Style_10') {
                                                    //style10
                                                    $class .= 'ult_cl_link_10';
                                                    //$id .='ult_cl_link_10';//
                                                    if ($title_font_size != '') {
                                                        $colorstyle .= 'font-size:' . $title_font_size . 'px;';
                                                    }
                                                    $borderstyle .= 'background:' . $border_color . ';';
                                                    $borderstyle .= 'height:' . $border_size . 'px;';
                                                    $span_style .= 'background:' . $background_color . ';';
                                                    if ($border_style != '') {
                                                        $span_style .= 'border-top:' . $border_size . 'px ' . $border_style . ' ' . $border_color . ';';
                                                    }
                                                    $span_style1 = '';
                                                    $span_style1 .= 'background:' . $bghovercolor . ';';
                                                } else {
                                                    if ($link_hover_style == 'Style_11') {
                                                        //style11
                                                        $style11_css_class = '';
                                                        $style11_css_class = $css_class;
                                                        $css_class = '';
                                                        $class .= 'ult_cl_link_11';
                                                        //$id .='ult_cl_link_11';//
                                                        $span_style .= 'background:' . $background_color . ';';
                                                        $span_style1 = '';
                                                        $span_style1 .= 'background:' . $bghovercolor . ';';
                                                        $span_style1 .= 'color:' . $text_hovercolor . ';';
                                                        //$span_style1 .= $secondtitle_style;
                                                        //padding
                                                        $ult_style2css = $css_class;
                                                        $css_class = '';
                                                        $domain = strstr($css, 'padding');
                                                        $domain = explode("}", $domain);
                                                        $ult_style11css = $domain[0];
                                                        $before = '<span class="ult_link_top ult_btn11_link_top " style="' . $span_style1 . ';' . $ult_style11css . '">' . $text . '</span>';
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            //echo $bghovercolor;
            //$text=ucfirst($text);
            $text = $text;
            if ($link_hover_style == 'Style_2') {
                $ult_style2css = $css_class;
                $css_class = '';
            }
            $output = '';
            if ($link_hover_style != 'Style_10') {
                $output .= '<span class=" ult_main_cl ' . $el_class . ' ' . $style11_css_class . '" >
	 			<span class="' . $class . '  ult_crlink" >
					<a  href = "' . esc_attr($url) . '" ' . $target . ' class="ult_colorlink  ' . $css_class . '" style="' . $colorstyle . ' "  ' . $data_link . ' title="' . $alt_text . '">
						' . $before . '
						<span data-hover="' . $text . '" style="' . $title_style . ';' . $span_style . ';' . $ult_style11css . '" class="ult_btn10_span  ' . $ult_style2css . ' ">' . $text . '</span>
						' . $after . '
					</a>
				</span>
			</span>';
            } else {
                if ($link_hover_style == 'Style_10') {
                    $output .= '<span class=" ult_main_cl  ' . $el_class . '" >
	 			<span class="' . $class . '  ult_crlink" id="' . $id . '">
					<a  href = "' . esc_attr($url) . '" ' . $target . ' class="ult_colorlink   "  style="' . $colorstyle . ' "  ' . $data_link . ' title="' . $alt_text . '">
						<span   class="ult_btn10_span  ' . $css_class . '" style="' . $span_style . '" data-color="' . $border_color . '"  data-bhover="' . $bghovercolor . '" data-bstyle="' . $border_style . '">
							<span class="ult_link_btm  ult_btn10_link_top" style="' . $span_style1 . '">
								<span style="' . $title_style . ';color:' . $text_hovercolor . '" class="style10-span">' . $text . '</span>
							</span>
							<span style="' . $title_style . ';">' . $text . '</span>
						</span>

					</a>
				</span>
			</span>';
                }
            }
            if ($text != '') {
                return $output;
            }
            //return $output;
        }
 function ult_hotspot_items_callback($atts, $content = null)
 {
     global $hotspot_icon, $hotspot_icon_bg_color, $hotspot_icon_color, $hotspot_icon_size;
     extract(shortcode_atts(array('hotspot_content' => '', 'hotspot_label' => '', 'hotspot_position' => '0,0', 'tooltip_content' => '', 'tooltip_width' => '300', 'tooltip_padding' => '', 'tooltip_position' => '', "icon_type" => '', 'icon' => 'Defaults-circle', 'icon_color' => '', 'icon_style' => '', 'icon_color_bg' => '', 'icon_border_style' => '', 'icon_color_border' => '', 'icon_border_size' => '', 'icon_border_radius' => '', 'icon_border_spacing' => '', 'icon_img' => '', 'img_width' => '60', 'icon_size' => '', "alignment" => "center", 'tooltip_trigger' => '', 'tooltip_animation' => '', 'tooltip_continuous_animation' => '', 'enable_bubble_arrow' => '', 'tooltip_custom_bg_color' => '', 'tooltip_custom_color' => '', 'tooltip_font' => '', 'tooltip_font_style' => '', 'tooltip_font_size' => '', 'tooltip_font_line_height' => '', 'tooltip_custom_border_size' => '', 'tooltip_align' => ''), $atts));
     //$content = wpb_js_remove_wpautop($content, false); // fix unclosed/unwanted paragraph tags in $content
     $animatn = $tooltip_continuous_animation;
     if ($animatn == "on") {
         $pulse = "ult-pulse";
     } else {
         $pulse = "";
     }
     if (trim($content) !== '') {
         $hotspot_content = $content;
     }
     /**    Tooltip [Content] Styling 
      *--------------------------------------*/
     $font_args = array();
     $tooltip_content_style = '';
     $tooltip_base_style = '';
     if ($tooltip_font != '') {
         $font_family = get_ultimate_font_family($tooltip_font);
         $tooltip_content_style .= 'font-family:' . $font_family . ';';
         array_push($font_args, $tooltip_font);
     }
     if ($tooltip_font_style != '') {
         $tooltip_content_style .= get_ultimate_font_style($tooltip_font_style);
     }
     if ($tooltip_font_size != '') {
         $tooltip_content_style .= 'font-size:' . $tooltip_font_size . 'px;';
     }
     if ($tooltip_font_line_height != '') {
         $tooltip_content_style .= 'line-height:' . $tooltip_font_line_height . 'px;';
     }
     //  Width
     if ($tooltip_width != '') {
         $tooltip_content_style .= 'width:' . $tooltip_width . 'px;';
     }
     //  Padding
     if ($tooltip_padding != '') {
         $tooltip_content_style .= $tooltip_padding;
     }
     /**
      *    Tooltip [Base] Styling options
      *
      */
     //  Background
     if ($tooltip_custom_bg_color != '') {
         $tooltip_base_style .= 'background-color:' . $tooltip_custom_bg_color . ';';
     }
     /*if($tooltip_theme == 'custom' ) {*/
     if ($tooltip_custom_color != '') {
         $tooltip_base_style .= 'color:' . $tooltip_custom_color . ';';
     }
     //  Border Styling
     if ($tooltip_custom_border_size != '') {
         $bstyle = str_replace('|', '', $tooltip_custom_border_size);
         $tooltip_base_style .= $bstyle;
     }
     if ($tooltip_align != '') {
         $tooltip_base_style .= 'text-align:' . $tooltip_align . ';';
     }
     $data = '';
     if ($tooltip_content_style != '') {
         $data .= 'data-tooltip-content-style="' . $tooltip_content_style . '"';
     }
     if ($tooltip_base_style != '') {
         $data .= 'data-tooltip-base-style="' . $tooltip_base_style . '"';
     }
     if ($enable_bubble_arrow != '' && $enable_bubble_arrow == 'on') {
         $data .= ' data-bubble-arrow="true" ';
     } else {
         $data .= ' data-bubble-arrow="false" ';
     }
     $hotspot_position = explode(',', $hotspot_position);
     if ($icon_type == 'custom') {
         $temp_icon_size = $img_width / 2 - 14;
     } else {
         $temp_icon_size = $icon_size / 2 - 14;
     }
     //$temp_icon_size = 0;
     $hotspot_x_position = $hotspot_position[0];
     $hotspot_y_position = isset($hotspot_position[1]) ? $hotspot_position[1] : '0';
     $tooltip_offsetY = '';
     //if($icon_size != '')  {
     //  set offsetY for tooltip
     $tooltip_offsetY = $temp_icon_size;
     //}
     if ($tooltip_animation != '') {
         $data .= 'data-tooltipanimation="' . $tooltip_animation . '"';
     }
     if ($tooltip_trigger != '') {
         $data .= 'data-trigger="' . $tooltip_trigger . '"';
     }
     if ($tooltip_offsetY != '') {
         $data .= 'data-tooltip-offsety="' . $tooltip_offsetY . '"';
     }
     if ($tooltip_position != '') {
         $data .= 'data-arrowposition="' . $tooltip_position . '"';
     }
     $icon_animation = '';
     $icon_inline = do_shortcode('[just_icon icon_align="' . $alignment . '" icon_type="' . $icon_type . '" icon="' . $icon . '" icon_img="' . $icon_img . '" img_width="' . $img_width . '" icon_size="' . $icon_size . '" icon_color="' . $icon_color . '" icon_style="' . $icon_style . '" icon_color_bg="' . $icon_color_bg . '" icon_color_border="' . $icon_color_border . '"  icon_border_style="' . $icon_border_style . '" icon_border_size="' . $icon_border_size . '" icon_border_radius="' . $icon_border_radius . '" icon_border_spacing="' . $icon_border_spacing . '" icon_animation="' . $icon_animation . '"]');
     $output = "<div class='ult-hotspot-item " . $pulse . "' style='top:-webkit-calc(" . $hotspot_x_position . "% - " . $temp_icon_size . "px);top:-moz-calc(" . $hotspot_x_position . "% - " . $temp_icon_size . "px);top:calc(" . $hotspot_x_position . "% - " . $temp_icon_size . "px);left: -webkit-calc(" . $hotspot_y_position . "% - " . $temp_icon_size . "px);left: -moz-calc(" . $hotspot_y_position . "% - " . $temp_icon_size . "px);left: calc(" . $hotspot_y_position . "% - " . $temp_icon_size . "px);' >";
     $output .= "   <a " . $data . " class='ult-tooltip ult-tooltipstered ult-hotspot-tooltip' href='#'>";
     $output .= $icon_inline;
     $output .= "<span class='hotspot-tooltip-content'>" . esc_html(str_replace('"', '\'', $hotspot_content)) . "</span>";
     $output .= "  </a>";
     $output .= "</div>";
     return $output;
 }
 function ultimate_headings_shortcode($atts, $content = null)
 {
     $wrapper_style = $main_heading_style_inline = $sub_heading_style_inline = $line_style_inline = $icon_inline = $output = $el_class = '';
     extract(shortcode_atts(array('main_heading' => '', "main_heading_font_size" => "", "main_heading_font_family" => "", "main_heading_style" => "", "main_heading_color" => "", "main_heading_line_height" => "", "main_heading_margin" => "", "sub_heading" => "", "sub_heading_font_size" => "", "sub_heading_font_family" => "", "sub_heading_style" => "", "sub_heading_color" => "", "sub_heading_line_height" => "", "sub_heading_margin" => "", "spacer" => "", "spacer_position" => "", "spacer_img" => "", "spacer_img_width" => "", "line_style" => "solid", "line_width" => "auto", "line_height" => "1", "line_color" => "#ccc", "icon_type" => "", "icon" => "", "icon_color" => "", "icon_style" => "", "icon_color_bg" => "", "icon_border_style" => "", "icon_color_border" => "", "icon_border_size" => "", "icon_border_radius" => "", "icon_border_spacing" => "", "icon_img" => "", "img_width" => "60", "icon_size" => "", "alignment" => "center", "spacer_margin" => "", "line_icon_fixer" => "", "heading_tag" => "", "el_class" => ""), $atts));
     $wrapper_class = $spacer;
     if ($heading_tag == '') {
         $heading_tag = 'h2';
     }
     /* ---- main heading styles ---- */
     if ($main_heading_font_family != '') {
         $mhfont_family = get_ultimate_font_family($main_heading_font_family);
         if ($mhfont_family) {
             $main_heading_style_inline .= 'font-family:\'' . $mhfont_family . '\';';
         }
     }
     // main heading font style
     $main_heading_style_inline .= get_ultimate_font_style($main_heading_style);
     //attach font size if set
     if ($main_heading_font_size != '') {
         $main_heading_style_inline .= 'font-size:' . $main_heading_font_size . 'px;';
     }
     //attach font color if set
     if ($main_heading_color != '') {
         $main_heading_style_inline .= 'color:' . $main_heading_color . ';';
     }
     //attach margins for main heading
     if ($main_heading_margin != '') {
         $main_heading_style_inline .= $main_heading_margin;
     }
     //line height
     if ($main_heading_line_height != '') {
         $main_heading_style_inline .= 'line-height:' . $main_heading_line_height . 'px;';
     }
     /* ----- sub heading styles ----- */
     if ($sub_heading_font_family != '') {
         $shfont_family = get_ultimate_font_family($sub_heading_font_family);
         if ($shfont_family != '') {
             $sub_heading_style_inline .= 'font-family:\'' . $shfont_family . '\';';
         }
     }
     //sub heaing font style
     $sub_heading_style_inline .= get_ultimate_font_style($sub_heading_style);
     //attach font size if set
     if ($sub_heading_font_size != '') {
         $sub_heading_style_inline .= 'font-size:' . $sub_heading_font_size . 'px;';
     }
     //attach font color if set
     if ($sub_heading_color != '') {
         $sub_heading_style_inline .= 'color:' . $sub_heading_color . ';';
     }
     //attach margins for sub heading
     if ($sub_heading_margin != '') {
         $sub_heading_style_inline .= $sub_heading_margin;
     }
     //line height
     if ($sub_heading_line_height != '') {
         $sub_heading_style_inline .= 'line-height:' . $sub_heading_line_height . 'px;';
     }
     if ($spacer != '') {
         $wrapper_style .= $spacer_margin;
     }
     if ($spacer == 'line_with_icon') {
         if ($line_width < $icon_size) {
             $wrap_width = $icon_size;
         } else {
             $wrap_width = $line_width;
         }
         if ($icon_type == 'selector') {
             if ($icon_style == 'advanced') {
                 //if($icon_border_spacing != '')
                 //$wrapper_style .= 'padding:'.$icon_border_spacing.'px 0;';
             } else {
                 $wrapper_style .= 'height:' . $icon_size . 'px;';
             }
         }
         $icon_style_inline = 'font-size:' . $icon_size . 'px;';
     } else {
         if ($spacer == 'line_only') {
             $wrap_width = $line_width;
             $line_style_inline = 'border-style:' . $line_style . ';';
             $line_style_inline .= 'border-bottom-width:' . $line_height . 'px;';
             $line_style_inline .= 'border-color:' . $line_color . ';';
             $line_style_inline .= 'width:' . $wrap_width . 'px;';
             $wrapper_style .= 'height:' . $line_height . 'px;';
             $line = '<span class="uvc-headings-line" style="' . $line_style_inline . '"></span>';
             $icon_inline = $line;
         } else {
             if ($spacer == 'icon_only') {
                 $icon_style_inline = 'font-size:' . $icon_size . 'px;';
             } else {
                 if ($spacer == 'image_only') {
                     if (!empty($spacer_img_width)) {
                         $siwidth = array($spacer_img_width, $spacer_img_width);
                     } else {
                         $siwidth = 'full';
                     }
                     $icon_inline = wp_get_attachment_image($spacer_img, $siwidth, false, array("class" => "ultimate-headings-icon-image"));
                 }
             }
         }
     }
     //if spacer type is line with icon or only icon show icon or image respectively
     if ($spacer == 'line_with_icon' || $spacer == 'icon_only') {
         $icon_animation = '';
         $icon_inline = do_shortcode('[just_icon icon_align="' . $alignment . '" icon_type="' . $icon_type . '" icon="' . $icon . '" icon_img="' . $icon_img . '" img_width="' . $img_width . '" icon_size="' . $icon_size . '" icon_color="' . $icon_color . '" icon_style="' . $icon_style . '" icon_color_bg="' . $icon_color_bg . '" icon_color_border="' . $icon_color_border . '"  icon_border_style="' . $icon_border_style . '" icon_border_size="' . $icon_border_size . '" icon_border_radius="' . $icon_border_radius . '" icon_border_spacing="' . $icon_border_spacing . '" icon_animation="' . $icon_animation . '"]');
     }
     if ($spacer == 'line_with_icon') {
         $data = 'data-hline_width="' . $wrap_width . '" data-hicon_type="' . $icon_type . '" data-hborder_style="' . $line_style . '" data-hborder_height="' . $line_height . '" data-hborder_color="' . $line_color . '"';
         if ($icon_type == 'selector') {
             $data .= ' data-icon_width="' . $icon_size . '"';
         } else {
             $data .= ' data-icon_width="' . $img_width . '"';
         }
         if ($line_icon_fixer != '') {
             $data .= ' data-hfixer="' . $line_icon_fixer . '" ';
         }
     } else {
         $data = '';
     }
     $id = uniqid('ultimate-heading');
     $output = '<div id="' . $id . '" class="uvc-heading ' . $el_class . '" data-hspacer="' . $spacer . '" ' . $data . ' data-halign="' . $alignment . '" style="text-align:' . $alignment . '">';
     if ($spacer_position == 'top') {
         $output .= $this->ultimate_heading_spacer($wrapper_class, $wrapper_style, $icon_inline);
     }
     if ($main_heading != '') {
         $output .= '<div class="uvc-main-heading"><' . $heading_tag . ' style="' . $main_heading_style_inline . '">' . $main_heading . '</' . $heading_tag . '></div>';
     }
     if ($spacer_position == 'middle') {
         $output .= $this->ultimate_heading_spacer($wrapper_class, $wrapper_style, $icon_inline);
     }
     if ($content != '') {
         $output .= '<div class="uvc-sub-heading" style="' . $sub_heading_style_inline . '">' . do_shortcode($content) . '</div>';
     }
     if ($spacer_position == 'bottom') {
         $output .= $this->ultimate_heading_spacer($wrapper_class, $wrapper_style, $icon_inline);
     }
     $output .= '</div>';
     return $output;
 }
        function ultimate_fancytext_shortcode($atts, $content = null)
        {
            $output = $fancytext_strings = $fancytext_prefix = $fancytext_suffix = $fancytext_effect = $strings_textspeed = $strings_tickerspeed = $typewriter_cursor = $typewriter_cursor_text = $typewriter_loop = $fancytext_align = $strings_font_family = $strings_font_style = $strings_font_size = $sufpref_color = $strings_line_height = $strings_startdelay = $strings_backspeed = $strings_backdelay = $ticker_wait_time = $ticker_show_items = $ticker_hover_pause = $ex_class = '';
            $prefsuf_font_family = $prefsuf_font_style = $prefix_suffix_font_size = $prefix_suffix_line_height = $sufpref_bg_color = '';
            $id = uniqid(rand());
            extract(shortcode_atts(array('fancytext_strings' => '', 'fancytext_prefix' => '', 'fancytext_suffix' => '', 'fancytext_effect' => 'typewriter', 'strings_textspeed' => '35', 'strings_tickerspeed' => '200', 'typewriter_loop' => 'true', 'typewriter_cursor_color' => '', 'fancytext_tag' => 'div', 'fancytext_align' => 'center', 'strings_font_family' => '', 'strings_font_style' => '', 'strings_font_size' => '', 'sufpref_color' => '', 'strings_line_height' => '', 'strings_startdelay' => '200', 'strings_backspeed' => '0', 'strings_backdelay' => '1500', 'typewriter_cursor' => 'true', 'typewriter_cursor_text' => '|', 'ticker_wait_time' => '3000', 'ticker_show_items' => '1', 'ticker_hover_pause' => '', 'ticker_background' => '', 'fancytext_color' => '', 'prefsuf_font_family' => '', 'prefsuf_font_style' => '', 'prefix_suffix_font_size' => '', 'prefix_suffix_line_height' => '', 'sufpref_bg_color' => '', 'ex_class' => '', 'css_fancy_design' => ''), $atts));
            $vc_version = defined('WPB_VC_VERSION') ? WPB_VC_VERSION : 0;
            $is_vc_49_plus = version_compare(4.9, $vc_version, '<=') ? 'ult-adjust-bottom-margin' : '';
            $string_inline_style = $vticker_inline = $valign = $prefsuf_style = $css_design_style = '';
            $css_design_style = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class($css_fancy_design, ' '), "ultimate_fancytext", $atts);
            $css_design_style = esc_attr($css_design_style);
            if ($strings_font_family != '') {
                $font_family = get_ultimate_font_family($strings_font_family);
                if ($font_family !== '') {
                    $string_inline_style .= 'font-family:\'' . $font_family . '\';';
                }
            }
            $string_inline_style .= get_ultimate_font_style($strings_font_style);
            if ($prefsuf_font_family != '') {
                $font_family = get_ultimate_font_family($prefsuf_font_family);
                if ($font_family !== '') {
                    $prefsuf_style .= 'font-family:\'' . $font_family . '\';';
                }
            }
            $prefsuf_style .= get_ultimate_font_style($prefsuf_font_style);
            // if($strings_font_size != '')
            // 	$string_inline_style .= 'font-size:'.$strings_font_size.'px;';
            // if($strings_line_height != '')
            // 	$string_inline_style .= 'line-height:'.$strings_line_height.'px;';
            $fancy_text_id = 'uvc-type-wrap-' . rand(1000, 9999);
            if (is_numeric($strings_font_size)) {
                $strings_font_size = 'desktop:' . $strings_font_size . 'px;';
            }
            if (is_numeric($strings_line_height)) {
                $strings_line_height = 'desktop:' . $strings_line_height . 'px;';
            }
            $fancy_args = array('target' => '#' . $fancy_text_id . '', 'media_sizes' => array('font-size' => $strings_font_size, 'line-height' => $strings_line_height));
            $data_list = get_ultimate_vc_responsive_media_css($fancy_args);
            if (is_numeric($prefix_suffix_font_size)) {
                $prefix_suffix_font_size = 'desktop:' . $prefix_suffix_font_size . 'px !important;';
            }
            if (is_numeric($prefix_suffix_line_height)) {
                $prefix_suffix_line_height = 'desktop:' . $prefix_suffix_line_height . 'px !important;';
            }
            $fancy_prefsuf_args = array('target' => '#' . $fancy_text_id . ' .mycustfancy', 'media_sizes' => array('font-size' => $prefix_suffix_font_size, 'line-height' => $prefix_suffix_line_height));
            $prefsuf_data_list = get_ultimate_vc_responsive_media_css($fancy_prefsuf_args);
            if ($sufpref_color != '') {
                $prefsuf_style .= 'color:' . $sufpref_color . ';';
            }
            if ($sufpref_bg_color != '') {
                $prefsuf_style .= 'background :' . $sufpref_bg_color . ';';
            }
            if ($fancytext_align != '') {
                $string_inline_style .= 'text-align:' . $fancytext_align . ';';
            }
            // Order of replacement
            $order = array("\r\n", "\n", "\r", "<br/>", "<br>");
            $replace = '|';
            // Processes \r\n's first so they aren't converted twice.
            $str = str_replace($order, $replace, $fancytext_strings);
            $lines = explode("|", $str);
            $count_lines = count($lines);
            $ex_class .= ' uvc-type-align-' . $fancytext_align . ' ';
            if ($fancytext_prefix == '') {
                $ex_class .= 'uvc-type-no-prefix';
            }
            if ($fancytext_color != '') {
                $vticker_inline .= 'color:' . $fancytext_color . ';';
            }
            if ($ticker_background != '') {
                $vticker_inline .= 'background:' . $ticker_background . ';';
                if ($fancytext_effect == 'typewriter') {
                    $valign = 'fancytext-typewriter-background-enabled';
                } else {
                    $valign = 'fancytext-background-enabled';
                }
            }
            $ultimate_js = get_option('ultimate_js');
            $output = '<' . $fancytext_tag . ' id="' . $fancy_text_id . '" ' . $data_list . ' class="uvc-type-wrap ' . $css_design_style . ' ' . $is_vc_49_plus . ' ult-responsive ' . $ex_class . ' uvc-wrap-' . $id . '" style="' . $string_inline_style . '">';
            if (trim($fancytext_prefix) != '') {
                $output .= '<span ' . $prefsuf_data_list . ' class="ultimate-' . $fancytext_effect . '-prefix mycustfancy ult-responsive" style="' . $prefsuf_style . '">' . ltrim($fancytext_prefix) . '</span>';
            }
            if ($fancytext_effect == 'ticker' || $fancytext_effect == 'ticker-down') {
                if ($ultimate_js != 'enable') {
                    wp_enqueue_script('ultimate-vticker-js');
                }
                if ($strings_font_size != '') {
                    $inherit_font_size = 'ultimate-fancy-text-inherit';
                } else {
                    $inherit_font_size = '';
                }
                if ($ticker_hover_pause != 'true') {
                    $ticker_hover_pause = 'false';
                }
                if ($fancytext_effect == 'ticker-down') {
                    $direction = "down";
                } else {
                    $direction = "up";
                }
                $output .= '<div id="vticker-' . $id . '" ' . $data_list . ' class="ultimate-vticker ' . $fancytext_effect . ' ' . $valign . ' ' . $inherit_font_size . '" style="' . $vticker_inline . '"><ul>';
                foreach ($lines as $key => $line) {
                    if ($key == 0) {
                        $style = 'style="opacity:1"';
                    } else {
                        $style = 'style="opacity:0"';
                    }
                    $output .= '<li ' . $style . '>' . strip_tags($line) . '</li>';
                }
                $output .= '</ul></div>';
            } else {
                if ($ultimate_js != 'enable') {
                    wp_enqueue_script('ultimate-typed-js');
                }
                if ($typewriter_loop != 'true') {
                    $typewriter_loop = 'false';
                }
                if ($typewriter_cursor != 'true') {
                    $typewriter_cursor = 'false';
                }
                $strings = '[';
                foreach ($lines as $key => $line) {
                    $strings .= '"' . __(trim(htmlspecialchars_decode(strip_tags($line))), 'js_composer') . '"';
                    if ($key != $count_lines - 1) {
                        $strings .= ',';
                    }
                }
                $strings .= ']';
                $output .= '<span id="typed-' . $id . '" class="ultimate-typed-main ' . $valign . '" style="' . $vticker_inline . '"></span>';
            }
            if (trim($fancytext_suffix) != '') {
                $output .= '<span ' . $prefsuf_data_list . ' class="ultimate-' . $fancytext_effect . '-suffix mycustfancy ult-responsive" style="' . $prefsuf_style . '">' . rtrim($fancytext_suffix) . '</span>';
            }
            if ($fancytext_effect == 'ticker' || $fancytext_effect == 'ticker-down') {
                $output .= '<script type="text/javascript">
						jQuery(function($){
							$(document).ready(function(){
								$("#vticker-' . $id . '").find("li").css("opacity","1");
								$("#vticker-' . $id . '")
									.vTicker(
									{
										speed: ' . $strings_tickerspeed . ',
										showItems: ' . $ticker_show_items . ',
										pause: ' . $ticker_wait_time . ',
										mousePause : ' . $ticker_hover_pause . ',
										direction: "' . $direction . '",
									}
								);
							});
						});
					</script>';
            } else {
                $output .= '<script type="text/javascript"> jQuery(function($){ $("#typed-' . $id . '").typed({
								strings: ' . $strings . ',
								typeSpeed: ' . $strings_textspeed . ',
								backSpeed: ' . $strings_backspeed . ',
								startDelay: ' . $strings_startdelay . ',
								backDelay: ' . $strings_backdelay . ',
								loop: ' . $typewriter_loop . ',
								loopCount: false,
								showCursor: ' . $typewriter_cursor . ',
								cursorChar: "' . $typewriter_cursor_text . '",
								attr: null
							});
						});
					</script>';
                if ($typewriter_cursor_color != '') {
                    $output .= '<style>
							.uvc-wrap-' . $id . ' .typed-cursor {
								color:' . $typewriter_cursor_color . ';
							}
						</style>';
                }
            }
            $output .= '</' . $fancytext_tag . '>';
            /*$args = array(
            			$strings_font_family
            		);
            		enquque_ultimate_google_fonts($args);*/
            return $output;
        }
 function info_list_item($atts, $content = null)
 {
     // Do nothing
     $list_title = $list_icon = $animation = $icon_color = $icon_bg_color = $icon_img = $icon_type = $desc_font_line_height = $title_font_line_height = '';
     $title_font = $title_font_style = $title_font_size = $title_font_color = $desc_font = $desc_font_style = $desc_font_size = $desc_font_color = '';
     extract(shortcode_atts(array('list_title' => '', 'animation' => '', 'list_icon' => '', 'icon_img' => '', 'icon_type' => '', 'title_font' => '', 'title_font_style' => '', 'title_font_size' => '16', 'title_font_line_height' => '24', 'title_font_color' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_font_size' => '13', 'desc_font_color' => '', 'desc_font_line_height' => '18', 'info_list_link' => '', 'info_list_link_apply' => ''), $atts));
     //$content =  wpb_js_remove_wpautop($content);
     $css_trans = $style = $ico_col = $connector_trans = $icon_html = $title_style = $desc_style = $info_list_link_html = '';
     $font_args = array();
     $is_link = false;
     if ($info_list_link != '') {
         $info_list_link_temp = vc_build_link($info_list_link);
         $url = $info_list_link_temp['url'];
         $title = $info_list_link_temp['title'];
         $target = $info_list_link_temp['target'];
         if ($url != '') {
             if ($target != '') {
                 $target = 'target="' . $target . '"';
             }
             $info_list_link_html = '<a href="' . $url . '" class="ulimate-info-list-link" ' . $target . '></a>';
         }
         $is_link = true;
     }
     /* title */
     if ($title_font != '') {
         $font_family = get_ultimate_font_family($title_font);
         $title_style .= 'font-family:' . $font_family . ';';
         array_push($font_args, $title_font);
     }
     if ($title_font_style != '') {
         $title_style .= get_ultimate_font_style($title_font_style);
     }
     if ($title_font_size != '') {
         $title_style .= 'font-size:' . $title_font_size . 'px;';
     }
     if ($title_font_line_height != '') {
         $title_style .= 'line-height:' . $title_font_line_height . 'px;';
     }
     if ($title_font_color != '') {
         $title_style .= 'color:' . $title_font_color . ';';
     }
     /* description */
     if ($desc_font != '') {
         $font_family = get_ultimate_font_family($desc_font);
         $desc_style .= 'font-family:' . $font_family . ';';
         array_push($font_args, $desc_font);
     }
     if ($desc_font_style != '') {
         $desc_style .= get_ultimate_font_style($desc_font_style);
     }
     if ($desc_font_size != '') {
         $desc_style .= 'font-size:' . $desc_font_size . 'px;';
     }
     if ($desc_font_line_height != '') {
         $desc_style .= 'line-height:' . $desc_font_line_height . 'px;';
     }
     if ($desc_font_color != '') {
         $desc_style .= 'color:' . $desc_font_color . ';';
     }
     enquque_ultimate_google_fonts($font_args);
     if ($animation !== 'none') {
         $css_trans = 'data-animation="' . $animation . '" data-animation-delay="03"';
     }
     if ($this->connector_animate) {
         $connector_trans = 'data-animation="' . $this->connector_animate . '" data-animation-delay="02"';
     }
     if ($icon_color != '') {
         $ico_col = 'style="color:' . $icon_color . '";';
     }
     if ($icon_bg_color != '') {
         $style .= 'background:' . $icon_bg_color . ';  color:' . $icon_bg_color . ';';
     }
     if ($icon_bg_color != '') {
         $style .= 'border-color:' . $this->border_col . ';';
     }
     if ($icon_type == "selector") {
         $icon_html .= '<div class="icon_list_icon" ' . $css_trans . ' style="' . $this->icon_style . '">';
         $icon_html .= '<i class="' . $list_icon . '" ' . $ico_col . '></i>';
         if ($is_link && $info_list_link_apply == 'icon') {
             $icon_html .= $info_list_link_html;
         }
         $icon_html .= '</div>';
     } else {
         $img = wp_get_attachment_image_src($icon_img, 'large');
         $icon_html .= '<div class="icon_list_icon" ' . $css_trans . ' style="' . $this->icon_style . '">';
         $icon_html .= '<img class="list-img-icon" alt="icon" src="' . $img[0] . '"/>';
         if ($is_link && $info_list_link_apply == 'icon') {
             $icon_html .= $info_list_link_html;
         }
         $icon_html .= '</div>';
     }
     $output = '<li class="icon_list_item" style=" ' . $this->icon_font . '">';
     $output .= $icon_html;
     $output .= '<div class="icon_description">';
     if ($list_title != '') {
         $output .= '<h3 style="' . $title_style . '">';
         if ($is_link && $info_list_link_apply == 'title') {
             $output .= '<a href="' . $url . '" target="' . $target . '">' . $list_title . '</a>';
         } else {
             $output .= $list_title;
         }
         $output .= '</h3>';
     }
     $output .= '<div class="icon_description_text" style="' . $desc_style . '">' . wpb_js_remove_wpautop($content, true) . '</div>';
     $output .= '</div>';
     $output .= '<div class="icon_list_connector" ' . $connector_trans . ' style="border-color:' . $this->connect_color . ';"></div>';
     if ($is_link && $info_list_link_apply == 'container') {
         $output .= $info_list_link_html;
     }
     $output .= '</li>';
     return $output;
 }
示例#13
0
        function ultimate_main_tab($atts, $content)
        {
            $output = $title = $interval = $el_class = $shadow_color = $shadow_width = '';
            extract(shortcode_atts(array('title_color' => '', 'auto_rotate' => '', 'interval' => 0, 'tab_style' => 'Style_1', 'tab_bottom_border' => 'Disable', 'border_color' => '#1e73be', 'border_thickness' => '2', 'tab_title_color' => '#74777b', 'tab_hover_title_color' => '#ffffff', 'tab_background_color' => '#e7ecea', 'tab_hover_background_color' => '#4f90d1', 'container_width' => '', 'el_class' => '', 'container_width' => '', 'main_heading_font_family' => '', 'title_font_size' => '15', 'title_font_wt' => '', 'title_line_ht' => '', 'desc_font_family' => '', 'desc_font_size' => '', 'desc_font_style' => '', 'desc_line_ht' => '', 'shadow_color' => '#333333', 'shadow_width' => '', 'enable_bg_color' => '', 'container_border_style1' => '', 'container_color_border' => '', 'cont_border_size' => '', 'tabs_border_radius' => '8', 'tab_animation' => 'Slide', 'tab_describe_color' => '#74777b', 'title_font_style' => '', 'css' => '', 'act_icon_color' => '', 'acttab_background' => '', 'acttab_title' => '', 'resp_type' => 'Tabs', 'resp_width' => '400', 'resp_style' => 'Both', 'ac_tabs' => '', 'icon_color' => '#74777b', 'icon_hover_color' => '#ffffff', 'icon_size' => '15', 'icon_margin' => '', 'disp_icon' => 'Enable', 'tab_css' => ' ', 'font_icons_position' => 'Right', 'main_title_typograpy' => '', 'tab_max' => 'off', 'wrapper_margin' => ''), $atts));
            global $tabarr;
            $tabarr = array();
            do_shortcode($content);
            /*-----------default settings------------*/
            if ($acttab_background == '') {
                $acttab_background = $tab_hover_background_color;
            }
            if ($acttab_title == '') {
                $acttab_title = $tab_hover_title_color;
            }
            /*---------------padding---------------------*/
            $css_class = '';
            $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class($css, ' '), "ult_tab_element", $atts);
            $css_class = esc_attr($css_class);
            if ($tabs_border_radius != '') {
                //echo $tabs_border_radius;
            }
            /*-------------------font style------------------*/
            if ($tab_style == 'Style_5') {
                //$tab_bottom_border=='Enable';
            }
            $container_style = $ult_style = $tab_style_no = '';
            if ($tab_bottom_border == 'Disable') {
                $border_thickness = "0";
                $border_color = "transparent";
            }
            if ($container_width != '') {
                $container_style = 'max-width:' . $container_width . 'px;';
            }
            $border_Style = $mhfont_family = $border_style = '';
            $tabs_nav_style = '';
            // if($title_font_size!='')
            // $tabs_nav_style .= 'font-size:'.$title_font_size.'px;';
            // if($title_line_ht!='')
            // $tabs_nav_style .='line-height:'.$title_line_ht.'px;';
            if (is_numeric($title_font_size)) {
                $title_font_size = 'desktop:' . $title_font_size . 'px;';
            }
            if (is_numeric($title_line_ht)) {
                $title_line_ht = 'desktop:' . $title_line_ht . 'px;';
            }
            $advanced_tabs_id = 'advanced-tabs-wrap-' . rand(1000, 9999);
            $advanced_tabs_args = array('target' => '#' . $advanced_tabs_id . ' .ult-span-text', 'media_sizes' => array('font-size' => $title_font_size, 'line-height' => $title_line_ht));
            $advanced_tabs_data_list = get_ultimate_vc_responsive_media_css($advanced_tabs_args);
            if (function_exists('get_ultimate_font_family')) {
                $mhfont_family = get_ultimate_font_family($main_heading_font_family);
                if ($mhfont_family != '') {
                    $tabs_nav_style .= 'font-family:' . $mhfont_family . ';';
                }
            }
            if (function_exists('get_ultimate_font_style')) {
                if ($title_font_style != '') {
                    $tabs_nav_style .= get_ultimate_font_style($title_font_style);
                }
            }
            /*-------------------auto rotate------------------*/
            if ($auto_rotate == 'Disables') {
                $interval = 0;
                $autorotate = 'no';
            } else {
                $autorotate = 'yes';
            }
            if ($tab_background_color == '') {
                $tab_background_color = "transparent";
            }
            $element = 'wpb_tabs';
            //if ( 'vc_tour' == $this->shortcode ) $element = 'wpb_tour';
            $ul_style = $tabs_nav = $style = '';
            /*------------------- style------------------*/
            if ($tab_style == 'Style_1') {
                $style = 'style1';
            } else {
                if ($tab_style == 'Style_2') {
                    $style = 'style2';
                } else {
                    if ($tab_style == 'Style_3') {
                        $style = 'style3';
                    } else {
                        if ($tab_style == 'Style_4') {
                            $ult_style = 'ult_tab_style_4';
                            $style = 'style1';
                        } else {
                            if ($tab_style == 'Style_5') {
                                $ult_style = 'ult_tab_style_5';
                                $style = 'style1';
                            } else {
                                if ($tab_style == 'Style_6') {
                                    $ult_style = 'ult_tab_style_6';
                                    $style = 'style1';
                                }
                            }
                        }
                    }
                }
            }
            foreach ($tabarr as $key => $value) {
                $icon_value = $value["icon_size"];
                if (is_numeric($icon_value)) {
                    $icon_value1[] = $value["icon_size"];
                }
            }
            /*-------------- border style-----------*/
            $tab_border = '';
            $tab_border .= 'color:' . $border_color . ';';
            $tab_border .= 'border-bottom-color:' . $border_color . ';';
            $tab_border .= 'border-bottom-width:' . $border_thickness . 'px;';
            $tab_border .= 'border-bottom-style:solid;';
            if ($tab_style == 'Style_1' || $tab_style == 'Style_3') {
                $tab_border .= 'background-color:' . $tab_background_color . ';';
                $tab_border .= 'border-top-left-radius:' . $tabs_border_radius . 'px;';
                $tab_border .= 'border-top-right-radius:' . $tabs_border_radius . 'px;';
                $tab_border = '';
            }
            if ($tab_style == 'Style_2') {
                $tab_border .= 'border-bottom-width:0px;';
            }
            if ($tab_style == 'Style_4' || $tab_style == 'Style_5' || $tab_style == 'Style_6') {
                $tab_border .= 'border-bottom-width:0px;';
            }
            /*-----------------content baground-------------------*/
            $contain_bg = '';
            /*---------------- description font family-----------*/
            // if($desc_font_size!='')
            // $contain_bg .= 'font-size:'.$desc_font_size.'px;';
            // if($title_line_ht!='')
            // $contain_bg .='line-height:'.$desc_line_ht.'px;';
            //responsive param
            if (is_numeric($desc_font_size)) {
                $desc_font_size = 'desktop:' . $desc_font_size . 'px;';
            }
            if (is_numeric($desc_line_ht)) {
                $desc_line_ht = 'desktop:' . $desc_line_ht . 'px;';
            }
            $advanced_tabs_desc_id = 'advanced-tabs-desc-wrap-' . rand(1000, 9999);
            $advanced_tabs_desc_args = array('target' => '#' . $advanced_tabs_desc_id . ' .ult_tabcontent .ult_tab_min_contain  p', 'media_sizes' => array('font-size' => $desc_font_size, 'line-height' => $desc_line_ht));
            $advanced_tabs_desc_data_list = get_ultimate_vc_responsive_media_css($advanced_tabs_desc_args);
            if (function_exists('get_ultimate_font_family')) {
                $dhfont_family = get_ultimate_font_family($desc_font_family);
                if ($dhfont_family != '') {
                    $contain_bg .= 'font-family:' . $dhfont_family . ';';
                }
            }
            if (function_exists('get_ultimate_font_style')) {
                if ($desc_font_style != '') {
                    $contain_bg .= get_ultimate_font_style($desc_font_style);
                }
            }
            $ult_top = $icon_top_link = '';
            if ($tab_style == 'Style_1') {
                $ult_top = 'ult_top';
                $icon_top_link = 'icon_top_link';
            } else {
                if ($tab_style == 'Style_2') {
                    $ult_top = 'ult_top';
                    $icon_top_link = '';
                }
            }
            if ($tab_style == 'Style_4') {
                $tab_style_no .= 'Style_4';
                $ult_top = 'ult_top';
                $icon_top_link = 'style_4_top';
            }
            if ($tab_style == 'Style_5') {
                $tab_style_no .= 'Style_5';
                $icon_top_link = '';
            }
            if ($tab_style == 'Style_6') {
                $tab_style_no .= 'Style_6';
                $icon_top_link = '';
            }
            if ($tab_style == 'Style_3') {
                $ult_top = 'ult_top';
                $icon_top_link = 'icon_top_link';
            }
            if ($enable_bg_color != '') {
                $contain_bg .= 'background-color:' . $enable_bg_color . ';';
            }
            if ($container_border_style1 != '') {
                $container_border_style1 = str_replace("|", " ", $container_border_style1);
                //$contain_bg .='border-style:'.$container_border_style.';';
                //$contain_bg .='border-color:'.$container_color_border.';';
                //$contain_bg .='border-width:'.$cont_border_size.'px;';
                //$contain_bg .='border-top:none;';
                $contain_bg .= $container_border_style1;
            }
            if ($tab_describe_color != '') {
                $contain_bg .= 'color:' . $tab_describe_color . ';';
            }
            $acord = '';
            //echo $resp_style;
            $array_count = '';
            $array_count = sizeof($tabarr);
            $newtab = '';
            $newtab .= '<ul id=' . $advanced_tabs_id . ' class="ult_tabmenu ' . $style . ' ' . $tab_style_no . '" style="' . $tab_border . '">';
            $cnt = 0;
            //print_r($tabarr );
            $acord .= '';
            $accontaint = '';
            $ult_ac_border = '';
            foreach ($tabarr as $key => $value) {
                $cnt++;
                $icon_position = $font_icons_position;
                //echo $disp_icon;
                if ($disp_icon == 'Disables') {
                    $icon_position = 'none';
                }
                $tabicon = $value["icon"];
                $icon_color = $icon_color;
                $icon_size = $icon_size;
                $icon_hover_color = $icon_hover_color;
                $margin = $icon_margin;
                $tab_id = $value["tab_id"];
                $accontaint = $value['content'];
                $accontaint = wpb_js_remove_wpautop($accontaint);
                $ul_sub_class = $value['ul_sub_class'];
                /*---icon style---*/
                $icon_size;
                if ($icon_size == '') {
                    $icon_size = "15";
                }
                $tab_icon_style = '';
                $tab_icon_style .= 'color:' . $icon_color . ';';
                $tab_icon_style .= 'font-size:' . $icon_size . 'px;';
                $tab_icon_style .= $margin;
                $link_li_style = '';
                $bgcolor = '';
                if ($tab_style != 'Style_2') {
                    $link_li_style .= 'background-color:' . $tab_background_color . ';';
                } else {
                    $bgcolor .= 'background-color:' . $tab_background_color . ';';
                }
                $style5bgcolor = '';
                if ($tab_style == 'Style_5' || $tab_style == 'Style_6') {
                    $style5bgcolor = 'border-color:' . $shadow_color . ';';
                    $ult_top = 'ult_top';
                }
                if ($tab_style == 'Style_4') {
                    $ult_top = 'ult_top';
                    $link_li_style .= '';
                    $link_li_style .= 'border-color:' . $border_color . ';';
                    $link_li_style .= 'border-width:' . $border_thickness . 'px;';
                    $link_li_style .= 'border-style:solid;';
                }
                if ($tab_style == 'Style_1' || $tab_style == 'Style_3') {
                    $link_li_style .= '';
                    $link_li_style .= 'border-color:' . $border_color . ';';
                    $link_li_style .= 'border-width:' . $border_thickness . 'px;';
                    $link_li_style .= 'border-style:solid;';
                }
                /*---------------- for tabs border -----------------*/
                if ($tab_style != 'Style_2') {
                    if ($cnt == $array_count) {
                        $link_li_style .= 'border-top-right-radius:' . $tabs_border_radius . 'px;';
                    } else {
                        if ($cnt == 1) {
                            $link_li_style .= 'border-top-left-radius:' . $tabs_border_radius . 'px;';
                        }
                    }
                } else {
                    if ($cnt == $array_count) {
                        $bgcolor .= 'border-top-right-radius:' . $tabs_border_radius . 'px;';
                    } else {
                        if ($cnt == 1) {
                            $bgcolor .= 'border-top-left-radius:' . $tabs_border_radius . 'px;';
                        }
                    }
                }
                /*------------ accordian border style --------------*/
                $ult_ac_border .= 'border-bottom-color:' . $border_color . ';';
                $ult_ac_border .= 'border-bottom-width:' . $border_thickness . 'px;';
                $ult_ac_border .= 'border-bottom-style:solid;';
                if (isset($value['title'])) {
                    //echo $icon_position;
                    if ($icon_position == 'Right') {
                        $icon_position = 'right';
                        $newtab .= '<li class="ult_tab_li ' . $ult_style . ' ' . $ul_sub_class . ' " data-iconcolor="' . $icon_color . '" data-iconhover="' . $icon_hover_color . '" style="' . $link_li_style . '">
					<a href="#' . $tab_id . '" id="' . $tab_id . '" style="color:' . $tab_title_color . ';' . $bgcolor . ';' . $style5bgcolor . ' ' . $tab_css . '" class="ult_a ' . $css_class . '">
					   <span class="ult_tab_main  ' . $resp_style . ' ">
					    <span class="ult_tab_section">
					  		<span ' . $advanced_tabs_data_list . ' class="ult-span-text ult-responsive" style="' . $tabs_nav_style . '">' . $value['title'] . '</span>
						   	<span class="aio-icon none ult_tab_icon' . $icon_position . '" style="' . $tab_icon_style . '">
						   	<i class=" ' . $tabicon . ' ult_tab_icon"  ></i>
						   </span>
						</span>
					   </span>

					</a>
					</li>';
                        /*-------------------accordion right icon------------------*/
                        $acord .= '<dt class="' . $ul_sub_class . '">
        	<a class="ult-tabto-actitle withBorder ult_a" id="' . $tab_id . '" style="color:' . $tab_title_color . ';' . $style5bgcolor . ';background-color:' . $tab_background_color . ';' . $ult_ac_border . '" href="#' . $tab_id . '">
        		<i class="accordion-icon">+</i>
        			<span class="ult_tab_main ult_ac_main' . $resp_style . '">
					   <span ' . $advanced_tabs_data_list . ' class="ult-span-text ult_acordian-text ult-responsive" style="' . $tabs_nav_style . ';color:inherit " >' . $value['title'] . '</span>
					</span>
					   <div class="aio-icon none " style="' . $tab_icon_style . '" data-iconcolor="' . $icon_color . '" data-iconhover="' . $icon_hover_color . '">
					   <i class="  ' . $tabicon . ' ult_tab_icon"  ></i>
					   </div>
					</a></dt>
            		<dd class="ult-tabto-accordionItem ult-tabto-accolapsed">
			            <div class="ult-tabto-acontent" style="' . $contain_bg . '">
			               ' . $accontaint . '
			            </div>
        	</dd>';
                    } else {
                        if ($icon_position == 'Left') {
                            $icon_position = 'left';
                            $newtab .= '<li class="ult_tab_li ' . $ult_style . ' ' . $ul_sub_class . '" data-iconcolor="' . $icon_color . '" data-iconhover="' . $icon_hover_color . '" style="' . $link_li_style . '">
					<a href="#' . $tab_id . '" id="' . $tab_id . '" style="color:' . $tab_title_color . ';' . $bgcolor . ';' . $style5bgcolor . ' ' . $tab_css . '" class="ult_a  ' . $css_class . '">
					     <span class="ult_tab_main ' . $resp_style . '">
					      <span class="ult_tab_section">
						   <span class="aio-icon none ult_tab_icon' . $icon_position . '" style="' . $tab_icon_style . '">
						   <i class="  ' . $tabicon . ' ult_tab_icon"  ></i>
						   </span>
						   <span ' . $advanced_tabs_data_list . ' class="ult-span-text ult-responsive" style="' . $tabs_nav_style . '">' . $value['title'] . '</span>
						    </span >
						</span>
					</a>
					</li>';
                            /*-------------------accordion left icon------------------*/
                            $acord .= '<dt class="' . $ul_sub_class . '">
        	<a class="ult-tabto-actitle withBorder ult_a"  id="' . $tab_id . '" style="color:' . $tab_title_color . ';' . $style5bgcolor . ';background-color:' . $tab_background_color . ';' . $ult_ac_border . '" href="#' . $tab_id . '">
        		<i class="accordion-icon">+</i>
        			<span class="ult_tab_main ult_ac_main' . $resp_style . '">
					   <div class="aio-icon none " style="' . $tab_icon_style . '" data-iconcolor="' . $icon_color . '" data-iconhover="' . $icon_hover_color . '">
					   <i class="  ' . $tabicon . ' ult_tab_icon"  ></i>
					   </div>
					<span ' . $advanced_tabs_data_list . ' class="ult-span-text ult_acordian-text ult-responsive" style="' . $tabs_nav_style . ';color:inherit " >' . $value['title'] . '</span>
					</span></a></dt>
            		<dd class="ult-tabto-accordionItem ult-tabto-accolapsed">
			            <div class="ult-tabto-acontent" style="' . $contain_bg . '">
			               ' . $accontaint . '
			            </div>
        	</dd>';
                        } else {
                            if ($icon_position == 'Top') {
                                $newtab .= '<li class="ult_tab_li ' . $ult_style . ' ' . $ul_sub_class . '" data-iconcolor="' . $icon_color . '" data-iconhover="' . $icon_hover_color . '" style="' . $link_li_style . '">
					<a href="#' . $tab_id . '" id="' . $tab_id . '"  style="color:' . $tab_title_color . ';' . $bgcolor . ';' . $style5bgcolor . ' ' . $tab_css . '" class="ult_a ' . $icon_top_link . ' ' . $css_class . '">
					    <span class="ult_tab_main ' . $ult_top . ' ' . $resp_style . ' ">
					    <span class="ult_tab_section">
					   <span class="aio-icon none icon-top ult_tab_icon' . $icon_position . '"  style="' . $tab_icon_style . '">
					   <i class="  ' . $tabicon . ' ult_tab_icon" ></i>
					   </span>
					   <span ' . $advanced_tabs_data_list . ' class="ult-span-text ult-responsive" style="' . $tabs_nav_style . '">' . $value['title'] . '</span>
					   </span>
						</span>
					</a>
					</li>';
                                /*-------------------accordion top icon------------------*/
                                $acord .= '<dt class="' . $ul_sub_class . '">
	        	<a class="ult-tabto-actitle withBorder ult_a" id="' . $tab_id . '"  style="color:' . $tab_title_color . ';' . $style5bgcolor . ';background-color:' . $tab_background_color . ';' . $ult_ac_border . '" href="#' . $tab_id . '">
	        		<i class="accordion-icon">+</i>
	        			<span class="ult_tab_main ult_ac_main ult_top ' . $resp_style . '">
						   <span class="aio-icon none icon-top" style="' . $tab_icon_style . '" data-iconcolor="' . $icon_color . '" data-iconhover="' . $icon_hover_color . '">
						   <i class="  ' . $tabicon . ' ult_tab_icon"  ></i>
						   </span>
						<span ' . $advanced_tabs_data_list . ' class="ult-span-text ult_acordian-text ult-responsive" style="' . $tabs_nav_style . ';color:inherit " >' . $value['title'] . '</span>
						</span></a></dt>
	            		<dd class="ult-tabto-accordionItem ult-tabto-accolapsed">
				            <div class="ult-tabto-acontent" style="' . $contain_bg . '">
				               ' . $accontaint . '
				            </div>
	        	</dd>';
                            } else {
                                $icon_position = 'none';
                                $newtab .= '<li class="ult_tab_li ' . $ult_style . ' ' . $ul_sub_class . '" data-iconcolor="' . $icon_color . '" data-iconhover="' . $icon_hover_color . '" style="' . $link_li_style . '">
					<a href="#' . $tab_id . '"  id="' . $tab_id . '"  style="color:' . $tab_title_color . ';' . $bgcolor . ';' . $style5bgcolor . ' ' . $tab_css . ' " class="ult_a ' . $ult_style . ' ' . $css_class . '">
					     <span class="ult_tab_main ' . $resp_style . ' ">
					 		 <span class="ult_tab_section">
					   			<span ' . $advanced_tabs_data_list . ' class="ult-span-text no_icon ult_tab_display_text ult-responsive" style="' . $tabs_nav_style . ';">' . $value['title'] . '</span>
					   		</span>
						</span>
					</a>
					</li>';
                                /*-------------------accordion without icon------------------*/
                                $acord .= '<dt class="' . $ul_sub_class . '">
	        	<a class="ult-tabto-actitle withBorder ult_a " id="' . $tab_id . '" style="color:' . $tab_title_color . ';' . $style5bgcolor . ';background-color:' . $tab_background_color . ';' . $ult_ac_border . '" href="#' . $tab_id . '">
	        		<i class="accordion-icon">+</i>
	        			<span class="ult_tab_main ult_ac_main ult_noacordicn' . $resp_style . '">
 
						<span ' . $advanced_tabs_data_list . ' class="ult-span-text no_icon ult_acordian-text ult-responsive" style="' . $tabs_nav_style . ';color:inherit " >' . $value['title'] . '</span>
						</span></a></dt>
	            		<dd class="ult-tabto-accordionItem ult-tabto-accolapsed">
				            <div class="ult-tabto-acontent" style="' . $contain_bg . '">
				               ' . $accontaint . '
				            </div>
	        			</dd>';
                            }
                        }
                    }
                }
            }
            $newtab .= '</ul>';
            $newtabcontain = '';
            $newtabcontain .= '<div class="ult_tab_min_contain">';
            $newtabcontain .= '<div class="ult_tabitemname" style="color:inherit">';
            $newtabcontain .= wpb_js_remove_wpautop($content);
            $newtabcontain .= '</div>';
            $newtabcontain .= '</div>';
            $op = '';
            $op .= '<div id="' . $advanced_tabs_desc_id . '" class="ult_tabs ' . $el_class . '" style="' . $container_style . ' ' . $wrapper_margin . '" data-tabsstyle="' . $style . '"
 data-titlebg="' . $tab_background_color . '" data-titlecolor="' . $tab_title_color . '" data-fullheight="' . $tab_max . '"
 data-titlehoverbg="' . $tab_hover_background_color . '" data-titlehovercolor="' . $tab_hover_title_color . '"
 data-rotatetabs="' . $interval . '" data-responsivemode="' . $resp_style . '" data-animation="' . $tab_animation . '"
data-activetitle="' . $acttab_title . '" data-activeicon="' . $act_icon_color . '" data-activebg="' . $acttab_background . '"  data-respmode="' . $resp_type . '" data-respwidth="' . $resp_width . '">';
            $op .= $newtab;
            $op .= '<div ' . $advanced_tabs_desc_data_list . 'class="ult_tabcontent ult-responsive ' . $style . '" style="' . $contain_bg . '">';
            $tabanimatclass = "";
            if ($tab_animation == 'Slide-Zoom') {
                $tabanimatclass = "tabanimate";
            }
            $op .= '<div class="ult_tab_min_contain ' . $tabanimatclass . '" >';
            $op .= wpb_js_remove_wpautop($content);
            $op .= '</div>';
            $op .= '</div>';
            $op .= '</div>';
            ob_start();
            //return $op;
            echo $op;
            /*---------------- for acordian -----------------*/
            $actab = '';
            $actab .= '<div class="ult_acord">
   <div class="ult-tabto-accordion " style="width:;"
    data-titlecolor="' . $tab_title_color . '"  data-titlebg="' . $tab_background_color . '"
     data-titlehoverbg="' . $tab_hover_background_color . '" data-titlehovercolor="' . $tab_hover_title_color . '" data-animation="' . $tab_animation . '"
     data-activetitle="' . $acttab_title . '" data-activeicon="' . $act_icon_color . '" data-activebg="' . $acttab_background . '">
     <dl>';
            $actab .= $acord;
            $actab .= '
    	</dl>
    <!--<div class="extraborder" style="background-color:' . $tab_hover_background_color . '"></div>-->
</div>

</div>';
            //return $actab;
            echo $actab;
            return ob_get_clean();
        }
 function info_list_item($atts, $content = null)
 {
     // Do nothing
     $list_title = $list_icon = $animation = $icon_color = $icon_bg_color = $icon_img = $icon_type = $desc_font_line_height = $title_font_line_height = '';
     $title_font = $title_font_style = $title_font_size = $title_font_color = $desc_font = $desc_font_style = $desc_font_size = $desc_font_color = '';
     extract(shortcode_atts(array('list_title' => '', 'animation' => '', 'list_icon' => '', 'icon_img' => '', 'icon_type' => '', 'title_font' => '', 'title_font_style' => '', 'title_font_size' => '16', 'title_font_line_height' => '24', 'title_font_color' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_font_size' => '13', 'desc_font_color' => '', 'desc_font_line_height' => '18', 'info_list_link' => '', 'info_list_link_apply' => ''), $atts));
     //$content =  wpb_js_remove_wpautop($content);
     $css_trans = $style = $ico_col = $connector_trans = $icon_html = $title_style = $desc_style = $info_list_link_html = '';
     //$font_args = array();
     $is_link = false;
     if ($info_list_link != '') {
         $info_list_link_temp = vc_build_link($info_list_link);
         $url = $info_list_link_temp['url'];
         $title = $info_list_link_temp['title'];
         $target = $info_list_link_temp['target'];
         if ($url != '') {
             if ($target != '') {
                 $target = 'target="' . $target . '"';
             }
             $info_list_link_html = '<a href="' . $url . '" class="ulimate-info-list-link" ' . $target . '></a>';
         }
         $is_link = true;
     }
     /* title */
     if ($title_font != '') {
         $font_family = get_ultimate_font_family($title_font);
         $title_style .= 'font-family:\'' . $font_family . '\';';
         //array_push($font_args, $title_font);
     }
     if ($title_font_style != '') {
         $title_style .= get_ultimate_font_style($title_font_style);
     }
     // if($title_font_size != '')
     // 	$title_style .= 'font-size:'.$title_font_size.'px;';
     // if($title_font_line_height != '')
     // 	$title_style .= 'line-height:'.$title_font_line_height.'px;';
     if (is_numeric($title_font_size)) {
         $title_font_size = 'desktop:' . $title_font_size . 'px;';
     }
     if (is_numeric($title_font_line_height)) {
         $title_font_line_height = 'desktop:' . $title_font_line_height . 'px;';
     }
     $info_list_id = 'Info-list-wrap-' . rand(1000, 9999);
     $info_list_args = array('target' => '#' . $info_list_id . ' h3', 'media_sizes' => array('font-size' => $title_font_size, 'line-height' => $title_font_line_height));
     $info_list_data_list = get_ultimate_vc_responsive_media_css($info_list_args);
     if ($title_font_color != '') {
         $title_style .= 'color:' . $title_font_color . ';';
     }
     /* description */
     if ($desc_font != '') {
         $font_family = get_ultimate_font_family($desc_font);
         $desc_style .= 'font-family:\'' . $font_family . '\';';
         //array_push($font_args, $desc_font);
     }
     if ($desc_font_style != '') {
         $desc_style .= get_ultimate_font_style($desc_font_style);
     }
     // if($desc_font_size != '')
     // 	$desc_style .= 'font-size:'.$desc_font_size.'px;';
     // if($desc_font_line_height != '')
     // 	$desc_style .= 'line-height:'.$desc_font_line_height.'px;';
     if (is_numeric($desc_font_size)) {
         $desc_font_size = 'desktop:' . $desc_font_size . 'px;';
     }
     if (is_numeric($desc_font_line_height)) {
         $desc_font_line_height = 'desktop:' . $desc_font_line_height . 'px;';
     }
     $info_list_desc_args = array('target' => '#' . $info_list_id . ' .icon_description_text', 'media_sizes' => array('font-size' => $desc_font_size, 'line-height' => $desc_font_line_height));
     $info_list_desc_data_list = get_ultimate_vc_responsive_media_css($info_list_desc_args);
     if ($desc_font_color != '') {
         $desc_style .= 'color:' . $desc_font_color . ';';
     }
     //enquque_ultimate_google_fonts($font_args);
     if ($animation !== 'none') {
         $css_trans = 'data-animation="' . $animation . '" data-animation-delay="03"';
     }
     if ($this->connector_animate) {
         $connector_trans = 'data-animation="' . $this->connector_animate . '" data-animation-delay="03"';
     }
     if ($icon_color != '') {
         $ico_col = 'style="color:' . $icon_color . '";';
     }
     if ($icon_bg_color != '') {
         $style .= 'background:' . $icon_bg_color . ';  color:' . $icon_bg_color . ';';
     }
     if ($icon_bg_color != '') {
         $style .= 'border-color:' . $this->border_col . ';';
     }
     if ($icon_type == "custom") {
         $img = apply_filters('ult_get_img_single', $icon_img, 'url', 'large');
         $alt = apply_filters('ult_get_img_single', $icon_img, 'alt');
         if ($alt == '') {
             $alt = 'icon';
         }
         //if(!empty($img)){
         $icon_html .= '<div class="icon_list_icon" ' . $css_trans . ' style="' . $this->icon_style . '">';
         $icon_html .= '<img class="list-img-icon" alt="' . $alt . '" src="' . apply_filters('ultimate_images', $img) . '"/>';
         if ($is_link && $info_list_link_apply == 'icon') {
             $icon_html .= $info_list_link_html;
         }
         $icon_html .= '</div>';
         // }
     } else {
         $icon_html .= '<div class="icon_list_icon" ' . $css_trans . ' style="' . $this->icon_style . '">';
         $icon_html .= '<i class="' . $list_icon . '" ' . $ico_col . '></i>';
         if ($is_link && $info_list_link_apply == 'icon') {
             $icon_html .= $info_list_link_html;
         }
         $icon_html .= '</div>';
     }
     $output = '<li class="icon_list_item" style=" ' . $this->icon_font . '">';
     $output .= $icon_html;
     $output .= '<div class="icon_description" id="' . $info_list_id . '">';
     if ($list_title != '') {
         $output .= '<h3 class="ult-responsive" ' . $info_list_data_list . ' style="' . $title_style . '">';
         if ($is_link && $info_list_link_apply == 'title') {
             $output .= '<a href="' . $url . '" target="' . $target . '">' . $list_title . '</a>';
         } else {
             $output .= $list_title;
         }
         $output .= '</h3>';
     }
     $output .= '<div class="icon_description_text ult-responsive" ' . $info_list_desc_data_list . ' style="' . $desc_style . '">' . wpb_js_remove_wpautop($content, true) . '</div>';
     $output .= '</div>';
     $output .= '<div class="icon_list_connector" ' . $connector_trans . ' style="border-color:' . $this->connect_color . ';"></div>';
     if ($is_link && $info_list_link_apply == 'container') {
         $output .= $info_list_link_html;
     }
     $output .= '</li>';
     return $output;
 }
 function ultimate_video_banner_shortcode($atts, $content = null)
 {
     extract(shortcode_atts(array('video_banner_mp4_link' => '', 'video_banner_webm_ogg_link' => '', 'video_banner_effect' => 'ult-vdo-effect-style1', 'video_banner_placeholder' => '', 'video_banner_title' => '', 'video_banner_content' => '', 'title_font_family' => '', 'title_font_style' => '', 'title_font_size' => '', 'title_color' => '', 'title_line_height' => '', 'desc_font_family' => '', 'desc_font_style' => '', 'desc_font_size' => '', 'desc_color' => '', 'desc_line_height' => '', 'video_banner_size' => '', 'video_banner_overlay_color' => '', 'video_banner_overlay_hover_color' => '', 'video_banner_vc_css' => '', 'video_banner_start_time' => '0', 'video_banner_mute' => ''), $atts));
     $output = $placeholder = $placeholder_css = $vc_css_class = '';
     $vc_css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class($video_banner_vc_css, ' '), 'ultimate_video_banner', $atts);
     $video_id = 'ult-video-banner-' . uniqid(rand());
     $args = array('target' => '#' . $video_id, 'media_sizes' => array('width' => $video_banner_size));
     $banner_height_responsive_data = get_ultimate_vc_responsive_media_css($args);
     if (preg_match('/^#[a-f0-9]{6}$/i', $video_banner_overlay_color)) {
         $video_banner_overlay_color = hex2rgbUltParallax($video_banner_overlay_color, $opacity = 0.8);
     }
     if (preg_match('/^#[a-f0-9]{6}$/i', $video_banner_overlay_hover_color)) {
         $video_banner_overlay_hover_color = hex2rgbUltParallax($video_banner_overlay_hover_color, $opacity = 0.4);
     }
     /* ---- main heading styles ---- */
     $title_style_inline = '';
     if ($title_font_family != '') {
         $title_font_family = get_ultimate_font_family($title_font_family);
         if ($title_font_family) {
             $title_style_inline .= 'font-family:\'' . $title_font_family . '\';';
         }
     }
     // main heading font style
     $title_style_inline .= get_ultimate_font_style($title_font_style);
     //attach font size if set
     if ($title_font_size != '') {
         $title_style_inline .= 'font-size:' . $title_font_size . 'px;';
     }
     //attach font color if set
     if ($title_color != '') {
         $title_style_inline .= 'color:' . $title_color . ';';
     }
     //line height
     if ($title_line_height != '') {
         $title_style_inline .= 'line-height:' . $title_line_height . 'px;';
     }
     /* ---- description styles ---- */
     $desc_style_inline = '';
     if ($desc_font_family != '') {
         $desc_font_family = get_ultimate_font_family($desc_font_family);
         if ($desc_font_family) {
             $desc_style_inline .= 'font-family:\'' . $desc_font_family . '\';';
         }
     }
     // desc font style
     $desc_style_inline .= get_ultimate_font_style($desc_font_style);
     //attach font size if set
     if ($desc_font_size != '') {
         $desc_style_inline .= 'font-size:' . $desc_font_size . 'px;';
     }
     //attach font color if set
     if ($desc_color != '') {
         $desc_style_inline .= 'color:' . $desc_color . ';';
     }
     //line height
     if ($desc_line_height != '') {
         $desc_style_inline .= 'line-height:' . $desc_line_height . 'px;';
     }
     if ($video_banner_placeholder != '') {
         $img_info = apply_filters('ult_get_img_single', $video_banner_placeholder, 'url', 'full');
         $placeholder = $img_info;
         $placeholder_css = 'background-image:url(' . $placeholder . ');';
     }
     $output = '<div id="' . $video_id . '" class="' . $vc_css_class . ' ult-video-banner ult-vdo-effect ' . $video_banner_effect . ' utl-video-banner-item ult-responsive" ' . $banner_height_responsive_data . ' data-current-time="' . $video_banner_start_time . '" data-placeholder="' . $placeholder . '" style="' . $placeholder_css . '">';
     if ($video_banner_mp4_link != '' || $video_banner_webm_ogg_link != '') {
         $output .= '<video autoplay loop ' . $video_banner_mute . ' poster="' . $placeholder . '">';
         if ($video_banner_mp4_link != '') {
             $output .= '<source src="' . $video_banner_mp4_link . '" type="video/mp4">';
         }
         if ($video_banner_webm_ogg_link != '') {
             $ext = pathinfo($video_banner_webm_ogg_link);
             if ($ext['extension'] == 'webm') {
                 $type = 'webm';
             } else {
                 $type = 'ogg';
             }
             $output .= '<source src="' . $video_banner_webm_ogg_link . '" type="video/' . $type . '">';
         }
         $output .= __('Your browser does not support the video tag.', 'ultimate_vc');
         $output .= '</video>';
     }
     if ($video_banner_title != '' || $content != '') {
         $output .= '<div class="ult-video-banner-desc">';
         if ($video_banner_title != '') {
             $output .= '<h2 class="ult-video-banner-title" style="' . $title_style_inline . '">' . __($video_banner_title, 'ultimate_vc') . '</h2>';
         }
         if ($video_banner_content != '') {
             $output .= '<div class="ult-video-banner-content" style="' . $desc_style_inline . '">' . __($video_banner_content, 'ultimate_vc') . '</div>';
         }
         $output .= '</div>';
     }
     $output .= '<div class="ult-video-banner-overlay" data-overlay="' . $video_banner_overlay_color . '" data-overlay-hover="' . $video_banner_overlay_hover_color . '"></div>';
     $output .= '</div>';
     return $output;
 }
        function icon_timeline_item($atts, $content = null)
        {
            $icon_type = $icon_img = $img_width = $icon = $icon_color = $icon_color_bg = $icon_size = $icon_style = $icon_border_style = $icon_border_radius = $icon_color_border = $icon_border_size = $icon_border_spacing = $icon_link = $el_class = $icon_animation = $time_title = $time_link = $time_link_apply = $time_read_text = $time_icon = $time_icon_color = $time_icon_bg_color = $time_position = $font_size = $line_color = $animation = $icon_border_style = $icon_border_size = $border_color = $title_style = $desc_style = '';
            //$font_args = array();
            extract(shortcode_atts(array('icon_type' => 'noicon', 'icon' => '', 'icon_img' => '', 'img_width' => '', 'icon_size' => '', 'icon_color' => '', 'icon_style' => 'circle', 'icon_color_bg' => '', 'icon_color_border' => '', 'icon_border_style' => '', 'icon_border_size' => '', 'icon_border_radius' => '', 'icon_border_spacing' => '', 'icon_link' => '', 'icon_animation' => '', 'time_title' => '', 'title_font' => '', 'title_font_style' => '', 'title_font_size' => '', 'title_font_color' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_font_size' => '', 'desc_font_color' => '', 'time_link' => '', 'time_link_apply' => '', 'time_read_text' => 'Read More', 'el_class' => '', 'font_size' => '', 'line_color' => ''), $atts));
            $html = '';
            $line_style = $custom_style = $bg_cls = '';
            $box_icon = do_shortcode('[just_icon icon_type="' . $icon_type . '" icon="' . $icon . '" icon_img="' . $icon_img . '" img_width="' . $img_width . '" icon_size="' . $icon_size . '" icon_color="' . $icon_color . '" icon_style="' . $icon_style . '" icon_color_bg="' . $icon_color_bg . '" icon_color_border="' . $icon_color_border . '"  icon_border_style="' . $icon_border_style . '" icon_border_size="' . $icon_border_size . '" icon_border_radius="' . $icon_border_radius . '" icon_border_spacing="' . $icon_border_spacing . '" icon_link="' . $icon_link . '" icon_animation="' . $icon_animation . '"]');
            if ($icon_color_bg == "") {
                $bg_cls .= 'tl-icon-no-bg';
            }
            if ($line_color != '') {
                $line_style = 'border-right-color:' . $line_color . ';';
            }
            if ($font_size != '') {
                $line_style .= 'top:' . $font_size * 2 . 'px;';
            }
            /* title */
            if ($title_font != '') {
                $font_family = get_ultimate_font_family($title_font);
                $title_style .= 'font-family:\'' . $font_family . '\';';
                //array_push($font_args, $title_font);
            }
            if ($title_font_style != '') {
                $title_style .= get_ultimate_font_style($title_font_style);
            }
            if ($title_font_size != '') {
                $title_style .= 'font-size:' . $title_font_size . 'px;';
            }
            if ($title_font_color != '') {
                $title_style .= 'color:' . $title_font_color . ';';
            }
            /* description */
            if ($desc_font != '') {
                $font_family = get_ultimate_font_family($desc_font);
                $desc_style .= 'font-family:\'' . $font_family . '\';';
                //array_push($font_args, $desc_font);
            }
            if ($desc_font_style != '') {
                $desc_style .= get_ultimate_font_style($desc_font_style);
            }
            if ($desc_font_size != '') {
                $desc_style .= 'font-size:' . $desc_font_size . 'px;';
            }
            if ($desc_font_color != '') {
                $desc_style .= 'color:' . $desc_font_color . ';';
            }
            //enquque_ultimate_google_fonts($font_args);
            $li_prefix = '<div class="timeline-block ' . $el_class . '"><div class="timeline-dot"></div><div class="ult-timeline-arrow"><s></s><l></l></div>';
            $li_suffix = '</div>';
            $style = $time_icon_color !== '' ? ' color:' . $time_icon_color . ';' : ' ';
            $style .= $time_icon_bg_color !== '' ? ' background:' . $time_icon_bg_color . ';' : ' ';
            $style .= $font_size !== '' ? ' font-size:' . $font_size . 'px;' : ' ';
            $icon_pad = '';
            $header_block_style = '';
            $icon = '<div class="timeline-icon-block"><div class="ult-timeline-icon ' . $bg_cls . '" style="' . $style . '">';
            if ($icon_type != 'noicon') {
                $icon .= $box_icon;
            }
            //'<i  style="'.$icon_style.'" class="'.$time_icon.'" ></i>';
            $icon .= '</div> <!-- icon --></div>';
            $link_sufix = $link_prefix = '';
            $vv_link = '';
            if ($time_link != '') {
                $href = vc_build_link($time_link);
                $link_prefix = '<a class="tl-desc-a" href = ' . $href['url'] . '>';
                $vv_link = $href['url'];
                $link_sufix = '</a>';
            }
            $header = $header_link_prefix = $header_link_suffix = '';
            $header .= '<div class="timeline-header-block" ' . $header_block_style . '>
							<div class="timeline-header" style="">';
            if ($time_link_apply != '' && $time_link_apply == 'title') {
                //$header = $link_prefix.$header.$link_sufix;
                $header_link_prefix = '<a href="' . $vv_link . '" class="link-title">';
                $header_link_suffix = '</a>';
            }
            $header .= '<h3 class="ult-timeline-title" style="' . $title_style . '">' . $header_link_prefix . $time_title . $header_link_suffix . '</h3>';
            $header .= '<div style="' . $desc_style . '">' . do_shortcode($content) . '</div>';
            if ($time_link_apply != '' && $time_link_apply == 'more') {
                $header = $header . '<p>' . $link_prefix . $time_read_text . $link_sufix . '</p>';
            }
            $header .= '</div> <!-- header --></div>';
            if ($time_link_apply != '' && $time_link_apply == 'box') {
                $header .= '<a href="' . $vv_link . '" class="link-box ult-link-box"></a>';
                //$li_prefix = $link_prefix.$li_prefix;
                //$li_suffix = $link_sufix.$li_suffix;
            }
            $icon_wrap_preffix = '<div class="timeline-icon-block">';
            $icon_wrap_suffix = '</div>';
            $heading_preffix = '<div class="timeline-header-block">';
            $heading_suffix = '</div>';
            $html = $li_prefix . $icon . $header . $li_suffix;
            return $html;
        }
示例#17
0
    function ult_price_generate_design02($atts, $content = null)
    {
        $package_heading = $package_sub_heading = $package_price = $package_unit = $package_btn_text = $package_link = $package_featured = $color_bg_main = $color_txt_main = $color_bg_highlight = $color_txt_highlight = $color_scheme = $el_class = '';
        extract(shortcode_atts(array("color_scheme" => "black", "package_heading" => "", "package_sub_heading" => "", "package_price" => "", "package_unit" => "", "package_btn_text" => "", "package_link" => "", "package_featured" => "", "color_bg_main" => "", "color_txt_main" => "", "color_bg_highlight" => "", "color_txt_highlight" => "", "package_name_font_family" => "", "package_name_font_style" => "", "package_name_font_size" => "", "package_name_font_color" => "", "package_name_line_height" => "", "subheading_font_family" => "", "subheading_font_style" => "", "subheading_font_size" => "", "subheading_font_color" => "", "subheading_line_height" => "", "price_font_family" => "", "price_font_style" => "", "price_font_size" => "", "price_font_color" => "", "price_line_height" => "", "price_unit_font_family" => "", "price_unit_font_style" => "", "price_unit_font_size" => "", "price_unit_font_color" => "", "price_unit_line_height" => "", "features_font_family" => "", "features_font_style" => "", "features_font_size" => "", "features_font_color" => "", "features_line_height" => "", "button_font_family" => "", "button_font_style" => "", "button_font_size" => "", "button_font_color" => "", "button_line_height" => "", "el_class" => "", "min_ht" => ""), $atts));
        $output = $link = $target = $featured = $featured_style = $normal_style = $dynamic_style = '';
        if ($color_scheme == "custom") {
            if ($color_bg_main !== "") {
                $normal_style .= 'background:' . $color_bg_main . ';';
            }
            if ($color_txt_main !== "") {
                $normal_style .= 'color:' . $color_txt_main . ';';
            }
            if ($color_bg_highlight !== "") {
                $featured_style .= 'background:' . $color_bg_highlight . ';';
            }
            if ($color_txt_highlight !== "") {
                $featured_style .= 'color:' . $color_txt_highlight . ';';
            }
        }
        if ($package_link !== "") {
            $link = vc_build_link($package_link);
            if (isset($link['target'])) {
                $target = 'target="' . $link['target'] . '"';
            } else {
                $target = '';
            }
            $link = $link['url'];
        } else {
            $link = "#";
        }
        if ($package_featured !== "") {
            $featured = "ult_featured";
        }
        /* Typography */
        $package_name_inline = $sub_heading_inline = $price_inline = $price_unit_inline = $features_inline = $button_inline = '';
        // package name/title
        if ($package_name_font_family != '') {
            $pkgfont_family = get_ultimate_font_family($package_name_font_family);
            if ($pkgfont_family !== '') {
                $package_name_inline .= 'font-family:\'' . $pkgfont_family . '\';';
            }
        }
        $package_name_inline .= get_ultimate_font_style($package_name_font_style);
        // if($package_name_font_size != '')
        // 	$package_name_inline .= 'font-size:'.$package_name_font_size.'px;';
        // if($package_name_line_height != '')
        // 	$package_name_inline .= 'line-height:'.$package_name_line_height.'px;';
        if ($package_name_font_color != '') {
            $package_name_inline .= 'color:' . $package_name_font_color . ';';
        }
        if (is_numeric($package_name_font_size)) {
            $package_name_font_size = 'desktop:' . $package_name_font_size . 'px;';
        }
        if (is_numeric($package_name_line_height)) {
            $package_name_line_height = 'desktop:' . $package_name_line_height . 'px;';
        }
        $price_table_id = 'price-table-wrap-' . rand(1000, 9999);
        $price_table_args = array('target' => '#' . $price_table_id . ' .cust-headformat', 'media_sizes' => array('font-size' => $package_name_font_size, 'line-height' => $package_name_line_height));
        $price_table_data_list = get_ultimate_vc_responsive_media_css($price_table_args);
        // sub heading
        if ($subheading_font_family != '') {
            $shfont_family = get_ultimate_font_family($subheading_font_family);
            if ($shfont_family !== '') {
                $sub_heading_inline .= 'font-family:\'' . $shfont_family . '\';';
            }
        }
        $sub_heading_inline .= get_ultimate_font_style($subheading_font_style);
        // if($subheading_font_size != '')
        // 	$sub_heading_inline .= 'font-size:'.$subheading_font_size.'px;';
        // if($subheading_line_height != '')
        // 	$sub_heading_inline .= 'line-height:'.$subheading_line_height.'px;';
        if ($subheading_font_color != '') {
            $sub_heading_inline .= 'color:' . $subheading_font_color . ';';
        }
        if (is_numeric($subheading_font_size)) {
            $subheading_font_size = 'desktop:' . $subheading_font_size . 'px;';
        }
        if (is_numeric($subheading_line_height)) {
            $subheading_line_height = 'desktop:' . $subheading_line_height . 'px;';
        }
        $price_table_subhead_args = array('target' => '#' . $price_table_id . ' .cust-subhead', 'media_sizes' => array('font-size' => $subheading_font_size, 'line-height' => $subheading_line_height));
        $price_table_subhead_data_list = get_ultimate_vc_responsive_media_css($price_table_subhead_args);
        // price
        if ($price_font_family != '') {
            $pricefont_family = get_ultimate_font_family($price_font_family);
            if ($pricefont_family !== '') {
                $price_inline .= 'font-family:\'' . $pricefont_family . '\';';
            }
        }
        $price_inline .= get_ultimate_font_style($price_font_style);
        // if($price_font_size != '')
        // 	$price_inline .= 'font-size:'.$price_font_size.'px;';
        // if($price_line_height != '')
        // 	$price_inline .= 'line-height:'.$price_line_height.'px;';
        if ($price_font_color != '') {
            $price_inline .= 'color:' . $price_font_color . ';';
        }
        //responsive param
        if (is_numeric($price_font_size)) {
            $price_font_size = 'desktop:' . $price_font_size . 'px;';
        }
        if (is_numeric($price_line_height)) {
            $price_line_height = 'desktop:' . $price_line_height . 'px;';
        }
        $price_table_price_id = 'price-table-wrap-' . rand(1000, 9999);
        $price_table_price_args = array('target' => '#' . $price_table_price_id . ' .ult_price_figure', 'media_sizes' => array('font-size' => $price_font_size, 'line-height' => $price_line_height));
        $price_table_price_data_list = get_ultimate_vc_responsive_media_css($price_table_price_args);
        // price unit
        if ($price_unit_font_family != '') {
            $price_unitfont_family = get_ultimate_font_family($price_unit_font_family);
            if ($price_unitfont_family !== '') {
                $price_unit_inline .= 'font-family:\'' . $price_unitfont_family . '\';';
            }
        }
        $price_unit_inline .= get_ultimate_font_style($price_unit_font_style);
        // if($price_unit_font_size != '')
        // 	$price_unit_inline .= 'font-size:'.$price_unit_font_size.'px;';
        // if($price_unit_line_height != '')
        // 	$price_unit_inline .= 'line-height:'.$price_unit_line_height.'px;';
        if ($price_unit_font_color != '') {
            $price_unit_inline .= 'color:' . $price_unit_font_color . ';';
        }
        //responsive param
        if (is_numeric($price_unit_font_size)) {
            $price_unit_font_size = 'desktop:' . $price_unit_font_size . 'px;';
        }
        if (is_numeric($price_unit_line_height)) {
            $price_unit_line_height = 'desktop:' . $price_unit_line_height . 'px;';
        }
        $price_table_price_unit_args = array('target' => '#' . $price_table_price_id . ' .ult_price_term', 'media_sizes' => array('font-size' => $price_unit_font_size, 'line-height' => $price_unit_line_height));
        $price_table_price_unit_data_list = get_ultimate_vc_responsive_media_css($price_table_price_unit_args);
        // features
        if ($features_font_family != '') {
            $featuresfont_family = get_ultimate_font_family($features_font_family);
            if ($featuresfont_family !== '') {
                $features_inline .= 'font-family:\'' . $featuresfont_family . '\';';
            }
        }
        $features_inline .= get_ultimate_font_style($features_font_style);
        // if($features_font_size != '')
        // 	$features_inline .= 'font-size:'.$features_font_size.'px;';
        // if($features_line_height != '')
        // 	$features_inline .= 'line-height:'.$features_line_height.'px;';
        if ($features_font_color != '') {
            $features_inline .= 'color:' . $features_font_color . ';';
        }
        //responsive param
        if (is_numeric($features_font_size)) {
            $features_font_size = 'desktop:' . $features_font_size . 'px;';
        }
        if (is_numeric($features_line_height)) {
            $features_line_height = 'desktop:' . $features_line_height . 'px;';
        }
        $price_table_features_id = 'price-table-features-wrap-' . rand(1000, 9999);
        $price_table_features_args = array('target' => '#' . $price_table_features_id . '', 'media_sizes' => array('font-size' => $features_font_size, 'line-height' => $features_line_height));
        $price_table_features_data_list = get_ultimate_vc_responsive_media_css($price_table_features_args);
        /*-- min height-------*/
        $ult_price_table_ht = '';
        if ($min_ht != '') {
            $ult_price_table_ht .= 'ult_price_table_ht';
            $normal_style .= 'min-height:' . $min_ht . 'px;';
        }
        // button
        if ($button_font_family != '') {
            $buttonfont_family = get_ultimate_font_family($button_font_family);
            if ($buttonfont_family !== '') {
                $button_inline .= 'font-family:\'' . $buttonfont_family . '\';';
            }
        }
        $button_inline .= get_ultimate_font_style($button_font_style);
        // if($button_font_size != '')
        // 	$button_inline .= 'font-size:'.$button_font_size.'px;';
        // if($button_line_height != '')
        // 	$button_inline .= 'line-height:'.$button_line_height.'px;';
        if ($button_font_color != '') {
            $button_inline .= 'color:' . $button_font_color . ';';
        }
        //responsive param
        if (is_numeric($button_font_size)) {
            $button_font_size = 'desktop:' . $button_font_size . 'px;';
        }
        if (is_numeric($button_line_height)) {
            $button_line_height = 'desktop:' . $button_line_height . 'px;';
        }
        $price_table_button_id = 'price-table-button-wrap-' . rand(1000, 9999);
        $price_table_button_args = array('target' => '#' . $price_table_button_id . ' .ult_price_action_button', 'media_sizes' => array('font-size' => $button_font_size, 'line-height' => $button_line_height));
        $price_table_button_data_list = get_ultimate_vc_responsive_media_css($price_table_button_args);
        /*$args = array(
        			$package_name_font_family, $subheading_font_family, $price_font_family, $features_font_family, $button_font_family
        		);
        		enquque_ultimate_google_fonts($args);*/
        /* End Typography */
        $output .= '<div class="ult_pricing_table_wrap ult_design_2 ' . $featured . ' ult-cs-' . $color_scheme . ' ' . $el_class . '">
					<div class="ult_pricing_table ' . $ult_price_table_ht . ' " style="' . $normal_style . '">';
        $output .= '<div id="' . $price_table_id . '" class="ult_pricing_heading" style="' . $featured_style . '">
							<h3 ' . $price_table_data_list . ' class="ult-responsive cust-headformat" style="' . $package_name_inline . '">' . $package_heading . '</h3>';
        if ($package_sub_heading !== '') {
            $output .= '<h5 ' . $price_table_subhead_data_list . ' class="ult-responsive cust-subhead" style="' . $sub_heading_inline . '">' . $package_sub_heading . '</h5>';
        }
        $output .= '</div><!--ult_pricing_heading-->';
        $output .= '<div class="ult_price_body_block">
							<div class="ult_price_body">
								<div id="' . $price_table_price_id . '" class="ult_price">
									<span ' . $price_table_price_data_list . ' class="ult_price_figure ult-responsive" style="' . $price_inline . '">' . $package_price . '</span>
									<span ' . $price_table_price_unit_data_list . ' class="ult_price_term ult-responsive" style="' . $price_unit_inline . '">' . $package_unit . '</span>
								</div>
							</div>
						</div><!--ult_price_body_block-->';
        if ($package_btn_text !== "") {
            $output .= '<div id="' . $price_table_button_id . '" class="ult_price_link">
							<a ' . $price_table_button_data_list . ' href="' . $link . '" ' . $target . ' class="ult_price_action_button ult-responsive" style="' . $featured_style . ' ' . $button_inline . '">' . $package_btn_text . '</a>
						</div><!--ult_price_link-->';
        }
        $output .= '<div id="' . $price_table_features_id . '" class="ult_price_features ult-responsive" ' . $price_table_features_data_list . ' style="' . $features_inline . '">
							' . wpb_js_remove_wpautop(do_shortcode($content), true) . '
						</div><!--ult_price_features-->';
        $output .= '<div class="ult_clr"></div>
			</div><!--pricing_table-->
		</div><!--pricing_table_wrap-->';
        return $output;
    }
 function call_to_action_shortcode($atts, $content)
 {
     //wp_enqueue_script('utl-ctaction-script');
     $output = $el_class = $style = $data = $text_style_inline = $ctaction_link_html = $icon_inline = $effect = '';
     extract(shortcode_atts(array('content_alignment' => 'ctaction-text-center', 'ctaction_background' => '#e74c3c', 'ctaction_background_hover' => '#c0392b', 'text_font_family' => '', 'text_font_style' => '', 'text_font_size' => '32', 'text_color' => '#ffffff', 'text_line_height' => '', 'ctaction_link' => '', 'ctaction_override' => '0', 'ctaction_padding_top' => '20', 'ctaction_padding_bottom' => '20', 'ctaction_padding_left' => '', 'ctaction_padding_right' => '', 'enable_icon' => '', "icon_type" => "selector", "icon" => "", "icon_color" => "", "icon_style" => "none", "icon_color_bg" => "", "icon_border_style" => "", "icon_color_border" => "#333333", "icon_border_size" => "1", "icon_border_radius" => "500", "icon_border_spacing" => "50", "icon_img" => "", "img_width" => "48", "icon_size" => "32", 'effect' => 'right-push', 'el_class' => ''), $atts));
     $el_class .= ' ' . $content_alignment;
     /* typography */
     if ($text_font_family != '') {
         $temp = get_ultimate_font_family($text_font_family);
         $text_style_inline .= 'font-family:' . $temp . ';';
     }
     $text_style_inline .= get_ultimate_font_style($text_font_style);
     if ($text_font_size != '') {
         $text_style_inline .= 'font-size:' . $text_font_size . 'px;';
     }
     if ($text_color != '') {
         $text_style_inline .= 'color:' . $text_color . ';';
     }
     if ($text_line_height != '') {
         $text_style_inline .= 'line-height:' . $text_line_height . 'px;';
     }
     /*$args = array(
     			$text_font_family
     		);
     		enquque_ultimate_google_fonts($args);*/
     /*end typography */
     if ($ctaction_background != '') {
         $data .= ' data-background="' . $ctaction_background . '" ';
         $text_style_inline .= 'background:' . $ctaction_background . ';';
     }
     if ($ctaction_background_hover != '') {
         $data .= ' data-background-hover="' . $ctaction_background_hover . '" ';
     }
     $data .= ' data-override="' . $ctaction_override . '" ';
     if ($ctaction_padding_top != '') {
         $text_style_inline .= 'padding-top:' . $ctaction_padding_top . 'px;';
     }
     if ($ctaction_padding_bottom != '') {
         $text_style_inline .= 'padding-bottom:' . $ctaction_padding_bottom . 'px;';
     }
     if ($ctaction_padding_left != '') {
         $text_style_inline .= 'padding-left:' . $ctaction_padding_left . 'px;';
     }
     if ($ctaction_padding_right != '') {
         $text_style_inline .= 'padding-right:' . $ctaction_padding_right . 'px;';
     }
     if ($ctaction_link != '') {
         $ctaction_link = vc_build_link($ctaction_link);
         $url = $ctaction_link['url'];
         $title = $ctaction_link['title'];
         $target = $ctaction_link['target'];
         if ($url != '') {
             if ($target != '') {
                 $target = 'target="' . $target . '"';
             }
             $ctaction_link_html = '<a href="' . $url . '" class="ulimate-call-to-action-link" ' . $target . '></a>';
         }
     }
     if ($enable_icon == 'enable_icon_value') {
         $icon_inline = do_shortcode('[just_icon icon_align="center" icon_type="' . $icon_type . '" icon="' . $icon . '" icon_img="' . $icon_img . '" img_width="' . $img_width . '" icon_size="' . $icon_size . '" icon_color="' . $icon_color . '" icon_style="' . $icon_style . '" icon_color_bg="' . $icon_color_bg . '" icon_color_border="' . $icon_color_border . '"  icon_border_style="' . $icon_border_style . '" icon_border_size="' . $icon_border_size . '" icon_border_radius="' . $icon_border_radius . '" icon_border_spacing="' . $icon_border_spacing . '"]');
     } else {
         $effect = 'no-effect';
     }
     $output .= '<div class="ultimate-call-to-action ' . $el_class . '" style="' . $text_style_inline . '" ' . $data . '>';
     if ($icon_inline != '') {
         $output .= '<div class="ultimate-ctaction-icon ctaction-icon-' . $effect . '">' . $icon_inline . '</div>';
     }
     $output .= '<div class="uvc-ctaction-data uvc-ctaction-data-' . $effect . '">' . $content . '</div>';
     $output .= $ctaction_link_html . '</div>';
     return $output;
 }
 function banner_shortcode($atts)
 {
     $banner_title = $banner_desc = $banner_image = $banner_link = $banner_style = $el_class = '';
     $banner_title_font_family = $banner_title_style = $banner_title_font_size = $banner_desc_font_family = $banner_desc_style = $banner_desc_font_size = '';
     $banner_title_style_inline = $banner_desc_style_inline = $banner_color_bg = $banner_color_title = $banner_color_desc = $banner_title_bg = '';
     $image_opacity = $image_opacity_on_hover = $enable_responsive = $responsive_min = $responsive_max = '';
     extract(shortcode_atts(array('banner_title' => '', 'banner_desc' => '', 'banner_title_location' => '', 'banner_image' => '', 'image_opacity' => '', 'image_opacity_on_hover' => '', 'banner_height' => '', 'banner_height_val' => '', 'banner_link' => '', 'banner_style' => '', 'banner_title_font_family' => '', 'banner_title_style' => '', 'banner_title_font_size' => '', 'banner_desc_font_family' => '', 'banner_desc_style' => '', 'banner_desc_font_size' => '', 'banner_color_bg' => '', 'banner_color_title' => '', 'banner_color_desc' => '', 'banner_title_bg' => '', 'enable_responsive' => '', 'responsive_min' => '', 'responsive_max' => '', 'el_class' => ''), $atts));
     $output = $style = $target = $link = $banner_style_inline = $title_bg = $img_style = $responsive = $target = '';
     //$banner_style = 'style01';
     if ($enable_responsive == "yes") {
         $responsive .= 'data-min-width="' . $responsive_min . '" data-max-width="' . $responsive_max . '"';
         $el_class .= "ult-ib-resp";
     }
     if ($banner_title_bg !== '' && $banner_style == "style5") {
         $title_bg .= 'background:' . $banner_title_bg . ';';
     }
     $img = wp_get_attachment_image_src($banner_image, 'full');
     if ($banner_link !== '') {
         $href = vc_build_link($banner_link);
         $link = $href['url'];
         $target = isset($href['target']) ? $href['target'] : '';
     } else {
         $link = "#";
     }
     if ($banner_title_font_family != '') {
         $bfamily = get_ultimate_font_family($banner_title_font_family);
         if ($bfamily != '') {
             $banner_title_style_inline = 'font-family:\'' . $bfamily . '\';';
         }
     }
     $banner_title_style_inline .= get_ultimate_font_style($banner_title_style);
     if ($banner_title_font_size != '') {
         $banner_title_style_inline .= 'font-size:' . $banner_title_font_size . 'px;';
     }
     if ($banner_desc_font_family != '') {
         $bdfamily = get_ultimate_font_family($banner_desc_font_family);
         if ($bdfamily != '') {
             $banner_desc_style_inline = 'font-family:\'' . $bdfamily . '\';';
         }
     }
     $banner_desc_style .= get_ultimate_font_style($banner_desc_style);
     if ($banner_desc_font_size != '') {
         $banner_desc_style_inline .= 'font-size:' . $banner_desc_font_size . 'px;';
     }
     if ($banner_color_bg != '') {
         $banner_style_inline .= 'background:' . $banner_color_bg . ';';
     }
     if ($banner_color_title != '') {
         $banner_title_style_inline .= 'color:' . $banner_color_title . ';';
     }
     if ($banner_color_desc != '') {
         $banner_desc_style_inline .= 'color:' . $banner_color_desc . ';';
     }
     //enqueue google font
     /*$args = array(
     			$banner_title_font_family, $banner_desc_font_family
     		);
     		enquque_ultimate_google_fonts($args);*/
     if ($image_opacity !== '') {
         $img_style .= 'opacity:' . $image_opacity . ';';
     }
     if ($link !== "#") {
         $href = 'href="' . $link . '"';
     } else {
         $href = '';
     }
     $output .= '<div class="ult-new-ib ult-ib-effect-' . $banner_style . ' ' . $el_class . '" ' . $responsive . ' style="' . $banner_style_inline . '" data-opacity="' . $image_opacity . '" data-hover-opacity="' . $image_opacity_on_hover . '">';
     $output .= '<img class="ult-new-ib-img" style="' . $img_style . '" alt="' . $banner_title . '" src="' . $img[0] . '"/>';
     $output .= '<div class="ult-new-ib-desc" style="' . $title_bg . '">';
     $output .= '<h2 class="ult-new-ib-title" style="' . $banner_title_style_inline . '">' . $banner_title . '</h2>';
     $output .= '<p class="ult-new-ib-content" style="' . $banner_desc_style_inline . '">' . $banner_desc . '</p>';
     $output .= '</div>';
     if ($target != '') {
         $target = 'target="' . $target . '"';
     }
     $output .= '<a class="ult-new-ib-link" ' . $href . ' ' . $target . '></a>';
     $output .= '</div>';
     return $output;
 }
        function ultimate_dualbtn_shortcode($atts)
        {
            $button1_text = $icon_type = $icon = $icon_img = $img_width = $icon_size = $icon_color = $icon_hover_color = $icon_style = $icon_color_bg = '';
            $icon_border_style = $icon_color_border = $icon_border_size = $icon_border_radius = $icon_border_spacing = $icon_link = $icon_align = $btn1_background_color = $btn1_bghovercolor = $btn2_font_family = $btn2_heading_style = $btn1_text_color = $btn1_text_hovercolor = '';
            $button2_text = $btn_icon_type = $btn_icon = $btn_icon_img = $btn_img_width = $btn_icon_size = $btn_icon_color = $btn_icon_style = $btn_icon_color_bg = $btn_icon_border_style = $btn_icon_color_border = $btn_icon_border_size = $btn_icon_border_radius = $btn_icon_border_spacing = $btn_icon_link = $btn2_icon_align = $btn2_background_color = $btn2_bghovercolor = $btn2_font_family = $btn2_heading_style = $btn2_text_color = $btn2_text_hovercolor = '';
            $divider_style = $divider_text = $divider_text_color = $divider_bg_color = $divider_icon = $divider_icon_img = $btn_border_style = $btn_color_border = $btn_border_size = $btn_border_radius = $btn_hover_style = $title_font_size = $title_line_ht = $el_class = '';
            extract(shortcode_atts(array('button1_text' => '', 'icon_type' => 'selector', 'icon' => '', 'icon_img' => '', 'img_width' => '', 'icon_size' => '32', 'icon_color' => '#333333', 'icon_hover_color' => '#333333', 'icon_style' => 'none', 'icon_color_bg' => '#ffffff', 'icon_border_style' => '', 'icon_color_border' => '#333333', 'icon_border_size' => '1', 'icon_border_radius' => '0', 'icon_border_spacing' => '30', 'icon_link' => '', 'icon_align' => 'left', 'btn1_background_color' => '#ffffff', 'btn1_bghovercolor' => '#bcbcbc', 'btn1_font_family' => '', 'btn1_heading_style' => '', 'btn1_text_color' => '#333333', 'btn1_text_hovercolor' => '#333333', 'icon_color_hoverbg' => '#ecf0f1', 'icon_color_hoverborder' => '#333333', 'btn1_padding' => '', 'button2_text' => '', 'btn_icon_type' => 'selector', 'btn_icon' => '', 'btn_icon_img' => '', 'btn_img_width' => '48', 'btn_icon_size' => '32', 'btn_icon_color' => '#333333', 'btn_iconhover_color' => '#333333', 'btn_icon_style' => 'none', 'btn_icon_color_bg' => '#ffffff', 'icon_color_bg' => '#ffffff', 'btn_icon_border_style' => '', 'btn_icon_color_border' => '#333333', 'btn_icon_border_size' => '1', 'btn_icon_border_radius' => '1', 'btn_icon_border_spacing' => '30', 'btn_icon_link' => '', 'btn2_icon_align' => 'right', 'btn2_background_color' => '#ffffff', 'btn2_bghovercolor' => '#bcbcbc', 'btn2_font_family' => '', 'btn2_heading_style' => '', 'btn2_text_color' => '#333333', 'btn2_text_hovercolor' => '#333333', 'btn_icon_color_hoverbg' => '#ffffff', 'btn_icon_color_hoverborder' => '#333333', 'btn2_padding' => '', 'divider_style' => 'text', 'divider_text' => 'or', 'divider_text_color' => '#ffffff', 'divider_bg_color' => '#333333', 'divider_icon' => '', 'divider_icon_img' => '', 'divider_border_radius' => '', 'divider_border_size' => '1', 'divider_color_border' => '#e7e7e7', 'divider_border_style' => '', 'btn_border_style' => '', 'btn_color_border' => '#333333', 'btn_border_size' => '1', 'btn_border_radius' => '', 'btn_hover_style' => 'Style 1', 'title_font_size' => '15', 'title_line_ht' => '15', 'el_class' => '', 'btn_alignment' => 'center', 'btn_width' => '', 'dual_resp' => 'on'), $atts));
            $extraclass = $el_class;
            $el_class1 = $css_trans = $button2_bstyle = $button1_bstyle = $target1 = $url1 = $btn_color_hoverborder = '';
            $iconoutput = $style = $link_sufix = $link_prefix = $target = $href = $icon_align_style = '';
            $secicon = $style1 = '';
            if ($icon_link !== '') {
                $href = vc_build_link($icon_link);
                $target = isset($href['target']) ? "target='" . $href['target'] . "'" : '';
                $target = str_replace(' ', '', $target);
                $url1 = $href['url'];
                if ($url1 == '') {
                    $url1 = "javascript:void(0);";
                }
                //echo $url1;
            } else {
                $url1 = "javascript:void(0);";
            }
            if ($icon_type == 'custom') {
                if ($icon_img !== '') {
                    $img = apply_filters('ult_get_img_single', $icon_img, 'url');
                    $alt = get_post_meta($icon_img, '_wp_attachment_image_alt', true);
                    if ($icon_style !== 'none') {
                        if ($icon_color_bg !== '') {
                            $style .= 'background:' . $icon_color_bg . ';';
                        }
                        //$style .= 'background:transperent;';
                    }
                    if ($icon_style == 'circle') {
                        $el_class .= ' uavc-circle ';
                    }
                    if ($icon_style == 'square') {
                        $el_class .= ' uavc-square ';
                    }
                    if ($icon_style == 'advanced' && $icon_border_style !== '') {
                        $style .= 'border-style:' . $icon_border_style . ';';
                        $style .= 'border-color:' . $icon_color_border . ';';
                        $style .= 'border-width:' . $icon_border_size . 'px;';
                        $style .= 'padding:' . $icon_border_spacing . 'px;';
                        $style .= 'border-radius:' . $icon_border_radius . 'px;';
                    }
                    if (!empty($img)) {
                        if ($icon_link == '' || $icon_align == 'center') {
                            //$style .= 'display:inline-block;';
                        }
                        $iconoutput .= "\n" . '<span class="aio-icon-img ' . $el_class . ' ' . 'btn1icon " style="font-size:' . $img_width . 'px;' . $style . '" ' . $css_trans . '>';
                        $iconoutput .= "\n\t" . '<img class="img-icon dual_img" alt="' . $alt . '" src="' . $img . '" />';
                        $iconoutput .= "\n" . '</span>';
                    }
                    if (!empty($img)) {
                        $iconoutput = $iconoutput;
                    } else {
                        $iconoutput = '';
                    }
                }
            } else {
                if ($icon !== '') {
                    if ($icon_color !== '') {
                        $style .= 'color:' . $icon_color . ';';
                    }
                    if ($icon_style !== 'none') {
                        if ($icon_color_bg !== '') {
                            $style .= 'background:' . $icon_color_bg . ';';
                        }
                    }
                    if ($icon_style == 'advanced') {
                        $style .= 'border-style:' . $icon_border_style . ';';
                        $style .= 'border-color:' . $icon_color_border . ';';
                        $style .= 'border-width:' . $icon_border_size . 'px;';
                        $style .= 'width:' . $icon_border_spacing . 'px;';
                        $style .= 'height:' . $icon_border_spacing . 'px;';
                        $style .= 'line-height:' . $icon_border_spacing . 'px;';
                        $style .= 'border-radius:' . $icon_border_radius . 'px;';
                    }
                    if ($icon_size !== '') {
                        $style .= 'font-size:' . $icon_size . 'px;';
                    }
                    if ($icon_align !== 'left') {
                        $style .= 'display:inline-block;';
                    }
                    if ($icon !== "") {
                        $iconoutput .= "\n" . '<span class="aio-icon btn1icon ' . $icon_style . ' ' . $el_class . '" ' . $css_trans . ' style="' . $style . '">';
                        $iconoutput .= "\n\t" . '<i class="' . $icon . '" ></i>';
                        $iconoutput .= "\n" . '</span>';
                    }
                    if ($icon !== "" && $icon !== "none") {
                        $iconoutput = $iconoutput;
                    } else {
                        $iconoutput = '';
                    }
                }
            }
            if ($iconoutput !== '') {
                //$iconoutput = '<div class="align-icon" style="'.$icon_align_style.'">'.$iconoutput.'</div>';
            }
            $style2 = $href1 = $target2 = $img2 = $alt1 = $iconoutput2 = $url2 = '';
            /*---- for icon 2--------------*/
            if ($btn_icon_link !== '') {
                $href1 = vc_build_link($btn_icon_link);
                $target1 = isset($href1['target']) ? "target='" . $href1['target'] . "'" : '';
                // $link_prefix .= '<a class="aio-tooltip " href = "'.$href1['url'].'" '.$target1.' data-toggle="tooltip" data-placement="'.$tooltip_disp.'" title="'.$tooltip_text.'">';
                // $link_sufix .= '</a>';
                $target1 = str_replace(' ', '', $target1);
                $url2 = $href1['url'];
                if ($url2 == '') {
                    $url2 = "javascript:void(0);";
                }
            } else {
                $url2 = "javascript:void(0);";
            }
            if ($btn_icon_type == 'custom') {
                $img2 = apply_filters('ult_get_img_single', $btn_icon_img, 'url');
                $alt2 = get_post_meta($btn_icon_img, '_wp_attachment_image_alt', true);
                if ($btn_icon_style !== 'none') {
                    if ($btn_icon_color_bg !== '') {
                        $style2 .= 'background:' . $btn_icon_color_bg . ';';
                    }
                    //$style2 .= 'background:transperent;';
                }
                if ($btn_icon_style == 'square') {
                    $el_class1 .= ' uavc-square ';
                }
                if ($btn_icon_style == 'circle') {
                    $el_class1 .= ' uavc-circle ';
                }
                if ($btn_icon_style == 'advanced' && $btn_icon_border_style !== '') {
                    $style2 .= 'border-style:' . $btn_icon_border_style . ';';
                    $style2 .= 'border-color:' . $btn_icon_color_border . ';';
                    $style2 .= 'border-width:' . $btn_icon_border_size . 'px;';
                    $style2 .= 'padding:' . $btn_icon_border_spacing . 'px;';
                    $style2 .= 'border-radius:' . $btn_icon_border_radius . 'px;';
                }
                if (!empty($img2)) {
                    if ($btn_icon_link == '' || $btn2_icon_align == 'center') {
                        //$style .= 'display:inline-block;';
                    }
                    $iconoutput2 .= "\n" . '<span class="aio-icon-img ' . $el_class1 . ' btn1icon" style="font-size:' . $btn_img_width . 'px;' . $style2 . '" ' . $css_trans . '>';
                    $iconoutput2 .= "\n\t" . '<img class="img-icon dual_img" alt="' . $alt2 . '" src="' . $img2 . '" />';
                    $iconoutput2 .= "\n" . '</span>';
                }
                if (!empty($img2)) {
                    $iconoutput2 = $iconoutput2;
                } else {
                    $iconoutput2 = '';
                }
            } else {
                if ($btn_icon_color !== '') {
                    $style2 .= 'color:' . $btn_icon_color . ';';
                }
                if ($btn_icon_style !== 'none') {
                    if ($btn_icon_color_bg !== '') {
                        $style2 .= 'background:' . $btn_icon_color_bg . ';';
                    }
                }
                if ($btn_icon_style == 'advanced') {
                    $style2 .= 'border-style:' . $btn_icon_border_style . ';';
                    $style2 .= 'border-color:' . $btn_icon_color_border . ';';
                    $style2 .= 'border-width:' . $btn_icon_border_size . 'px;';
                    $style2 .= 'width:' . $btn_icon_border_spacing . 'px;';
                    $style2 .= 'height:' . $btn_icon_border_spacing . 'px;';
                    $style2 .= 'line-height:' . $btn_icon_border_spacing . 'px;';
                    $style2 .= 'border-radius:' . $btn_icon_border_radius . 'px;';
                }
                //echo $btn_icon_size;
                if ($btn_icon_size !== '') {
                    $style2 .= 'font-size:' . $btn_icon_size . 'px;';
                }
                if ($btn2_icon_align !== 'left') {
                    $style2 .= 'display:inline-block;';
                }
                if ($btn_icon !== "") {
                    $iconoutput2 .= "\n" . '<span class="aio-icon btn1icon ' . $btn_icon_style . ' ' . $el_class1 . '" ' . $css_trans . ' style="' . $style2 . '">';
                    $iconoutput2 .= "\n\t" . '<i class="' . $btn_icon . '" ></i>';
                    $iconoutput2 .= "\n" . '</span>';
                }
                if ($btn_icon !== "" && $btn_icon !== "none") {
                    $iconoutput2 = $iconoutput2;
                } else {
                    $iconoutput2 = '';
                }
            }
            if ($icon_align_style !== '') {
                //$iconoutput = '<div class="align-icon" style="'.$icon_align_style.'">'.$iconoutput.'</div>';
            }
            $hstyle = $hoverstyle = '';
            $btn_hover_style;
            if ($btn_hover_style == 'Style 1') {
                $hoverstyle = 'ult-dual-btn';
            }
            if ($btn_hover_style == '') {
                $hoverstyle = 'ult-dual-btn';
            }
            if ($btn_hover_style == 'Style 2') {
                $hoverstyle = 'ult-dual-btn3';
            }
            if ($btn_hover_style == 'Style 3') {
                $hoverstyle = 'ult-dual-btn4';
            }
            /*--------css for title1------------*/
            $btn1_padding;
            $title1_style = '';
            if (function_exists('get_ultimate_font_family')) {
                $mhfont_family = get_ultimate_font_family($btn1_font_family);
                $title1_style .= 'font-family:' . $mhfont_family . ';';
            }
            if (function_exists('get_ultimate_font_style')) {
                $title1_style .= get_ultimate_font_style($btn1_heading_style);
            }
            $title1_style .= 'font-size:' . $title_font_size . 'px;';
            //style
            $title1_style .= 'color:' . $btn1_text_color . ';';
            //color
            if ($title_line_ht != '') {
                $title1_style .= 'line-height:' . $title_line_ht . 'px;';
                //line-height
            }
            /*--------css for title2------------*/
            $title2_style = '';
            if (function_exists('get_ultimate_font_family')) {
                $mhfont_family1 = get_ultimate_font_family($btn2_font_family);
                $title2_style .= 'font-family:' . $mhfont_family1 . ';';
            }
            if (function_exists('get_ultimate_font_style')) {
                $title2_style .= get_ultimate_font_style($btn2_heading_style);
            }
            $title2_style .= 'font-size:' . $title_font_size . 'px;';
            //style
            $title2_style .= 'color:' . $btn2_text_color . ';';
            //color
            if ($title_line_ht != '') {
                $title2_style .= 'line-height:' . $title_line_ht . 'px;';
                //line-height
            }
            /*--------css for button1------------*/
            $btncolor_style = '';
            $btncolor_style .= 'background-color:' . $btn1_background_color . ' !important;';
            /*--------css for button2------------*/
            $btncolor1_style = '';
            $btncolor1_style .= 'background-color:' . $btn2_background_color . ' !important;';
            /*--------css for button------------*/
            $btnmain_style = '';
            $btnmain_style .= 'border-color:' . $btn_color_border . ';';
            $btnmain_style .= 'border-style:' . $btn_border_style . ';';
            if ($btn_border_style != '') {
                $btnmain_style .= 'border-width:' . $btn_border_size . 'px;';
            } else {
                $btnmain_style .= 'border-width:0px;';
            }
            $btnmain_style .= 'border-radius:' . $btn_border_radius . 'px;';
            if ($btn_width != '') {
                $btnmain_style .= 'width:' . $btn_width . 'px;';
            }
            /*--------for divider------------*/
            $text_style = '';
            $text_style .= 'line-height: 1.8em;';
            $text_style .= 'color:' . $divider_text_color . ';';
            $text_style .= 'background-color:' . $divider_bg_color . ';';
            if ($divider_border_style == '') {
                $text_style .= 'border-width:0px;';
            } else {
                $text_style .= 'border-color:' . $divider_color_border . ';';
                $text_style .= 'border-width:' . $divider_border_size . 'px;';
                $text_style .= 'border-style:' . $divider_border_style . ';';
                $text_style .= 'border-radius:' . $divider_border_radius . 'px;';
            }
            if ($divider_style == 'text') {
                $text = $divider_text;
            } else {
                if ($divider_style == 'icon') {
                    $text = '<i class="' . $divider_icon . '"></i>';
                } else {
                    if ($divider_style == 'image') {
                        $text_style = '';
                        $text_style .= 'width: 25px;
height: 25px;
border-radius: 50%;
background-color:' . $divider_bg_color . ';';
                        $img3 = apply_filters('ult_get_img_single', $divider_icon_img, 'url');
                        $alt3 = get_post_meta($divider_icon_img, '_wp_attachment_image_alt', true);
                        $text = '<img class="img-icon" alt="' . $alt3 . '" src="' . $img3 . '" style="' . $text_style . '" />';
                    }
                }
            }
            /*-----------responsive mode --------*/
            //echo $btn_resp_width;
            /*$mainarr='';
            $resp_data='';
            if($btn_resp_width!='')
            $mainarr=explode(";",$btn_resp_width);
            $subarr=array();$sub='';
            //print_r($mainarr);
            if(!empty($mainarr)){
            
            
            foreach ($mainarr as $key => $value) {
            	if($value!='')
            	$sub=explode(":",$value);
            	$sub[1]=str_replace("px","",$sub[1]);
            	$subarr[$sub[0]]=$sub[1];
               
            	}
            
            foreach ($subarr as $key => $value) {
            			$resp_data.='data-'.$key.'="'.$value.'"';
            	}
            }*/
            /*--- generate random no------------*/
            $dual_resp;
            $resp_data = 'data-response="' . $dual_resp . '"';
            $id = '';
            $id = "ult_btn_" . mt_rand();
            /*----------for btn1 hover------------*/
            $btn_hover = '';
            $btn_hover .= 'data-bgcolor="' . $btn1_background_color . '" ';
            $btn_hover .= 'data-bghovercolor="' . $btn1_bghovercolor . '" ';
            $btn_hover .= 'data-icon_color="' . $icon_color . '" ';
            $btn_hover .= 'data-icon_hover_color="' . $icon_hover_color . '" ';
            $btn_hover .= 'data-textcolor="' . $btn1_text_color . '" ';
            $btn_hover .= 'data-texthovercolor="' . $btn1_text_hovercolor . '" ';
            if ($icon_style == 'none') {
                $btn_hover .= 'data-iconbgcolor="transperent" ';
                $btn_hover .= 'data-iconbghovercolor="transperent" ';
                $btn_hover .= 'data-iconborder="transperent" ';
                $btn_hover .= 'data-iconhoverborder="transperent" ';
            } else {
                $btn_hover .= 'data-iconbgcolor="' . $icon_color_bg . '" ';
                $btn_hover .= 'data-iconbghovercolor="' . $icon_color_hoverbg . '" ';
                $btn_hover .= 'data-iconborder="' . $icon_color_border . '" ';
                $btn_hover .= 'data-iconhoverborder="' . $icon_color_hoverborder . '" ';
            }
            /*----------for btn2 hover------------*/
            $btn2_hover = '';
            $btn2_hover .= 'data-bgcolor="' . $btn2_background_color . '" ';
            $btn2_hover .= 'data-bghovercolor="' . $btn2_bghovercolor . '" ';
            $btn2_hover .= 'data-icon_color="' . $btn_icon_color . '" ';
            $btn2_hover .= 'data-icon_hover_color="' . $btn_iconhover_color . '" ';
            $btn2_hover .= 'data-textcolor="' . $btn2_text_color . '" ';
            $btn2_hover .= 'data-texthovercolor="' . $btn2_text_hovercolor . '" ';
            if ($btn_icon_style == 'none') {
                $btn2_hover .= 'data-iconbgcolor="transperent" ';
                $btn2_hover .= 'data-iconbghovercolor="transperent" ';
                $btn2_hover .= 'data-iconborder="transperent" ';
                $btn2_hover .= 'data-iconhoverborder="transperent" ';
            } else {
                $btn2_hover .= 'data-iconbgcolor="' . $btn_icon_color_bg . '" ';
                $btn2_hover .= 'data-iconbghovercolor="' . $btn_icon_color_hoverbg . '" ';
                $btn2_hover .= 'data-iconborder="' . $btn_icon_color_border . '" ';
                $btn2_hover .= 'data-iconhoverborder="' . $btn_icon_color_hoverborder . '" ';
            }
            //echo $btn_hover_style;
            /*--- main button border-----*/
            $mainbtn = '';
            if ($btn_hover_style == '') {
                $mainbtn .= 'data-bcolor="' . $btn_color_border . '"';
                $mainbtn .= 'data-bhcolor="' . $btn_color_border . '"';
            } else {
                $mainbtn .= 'data-bcolor="' . $btn_color_border . '"';
                $mainbtn .= 'data-bhcolor="' . $btn_color_hoverborder . '"';
            }
            $icon_align;
            /*---- for icon line-height----*/
            $size = $icon1_lineht = $icon2_lineht = $iconht1 = '';
            $iconht = $icon2_lineht2 = $iconht2 = $icon1_lineht2 = '';
            $icnsize = '';
            $icnsize1 = '';
            $icnsize2 = '';
            //echo $iconoutput;
            //echo $iconoutput2;
            $emptyicon = '';
            $emptyicon1 = '';
            if ($iconoutput == '') {
                $emptyicon = 'padding-left:0px;';
                $icon_align = 'left';
            }
            if ($iconoutput2 == '') {
                $emptyicon1 = 'padding-left:0px;';
                $btn2_icon_align = 'right';
            }
            /* change class name */
            //return $mainoutput;
            //echo $btn_width;
            $subop = '';
            $subop .= '
			<div class="ult_dual_button to-' . $btn_alignment . '  ' . $extraclass . '"  ' . $resp_data . ' id="' . $id . '">

			<div class="ulitmate_dual_buttons ' . $hoverstyle . ' ult_main_dualbtn " ' . $mainbtn . '>

			<div class="ult_dualbutton-wrapper btn-inline place-template bt1 ">';
            $is_no_icon_first = trim($iconoutput) === '' ? 'ult-dual-btn-no-icon' : '';
            if ($icon_align == 'right') {
                $subop .= '<a href = "' . $url1 . '" ' . $target . ' class="ult_ivan_button   round-square  with-icon icon-after with-text place-template ult_dual1" style=" ' . $icon1_lineht2 . ';margin-right:px;' . $size . ';' . $btncolor_style . $button1_bstyle . '; ' . $btnmain_style . ';">
			<span class="ult-dual-btn-1 ' . $btn_hover_style . '" style=""  ' . $btn_hover . '>
			
			<span class="text-btn ult-dual-button-title title_left" style="' . $title1_style . '">' . $button1_text . '</span>
			<span class="icon-simple icon-right1 ult_btn1span ' . $is_no_icon_first . '"  style="' . $icnsize1 . ';' . $emptyicon . ' ">' . $iconoutput . '</span
			</span>
			</a>';
            } else {
                $subop .= '<a href = "' . $url1 . '" ' . $target . 'class="ult_ivan_button   round-square  with-icon icon-before with-text place-template ult_dual1" style="' . $icon1_lineht2 . ';margin-right:px;' . $size . ';' . $btncolor_style . $button1_bstyle . '; ' . $btnmain_style . ';">
			<span class="ult-dual-btn-1 ' . $btn_hover_style . '" style=""  ' . $btn_hover . '>
			<span class="icon-simple icon-left1 ult_btn1span ' . $is_no_icon_first . '"  style="' . $icnsize1 . ';' . $emptyicon . ' ">' . $iconoutput . '</span>
			<span class="text-btn ult-dual-button-title" style="' . $title1_style . '">' . $button1_text . '</span>
				
			</span>
			</a>';
            }
            $subop .= '<span class="middle-text" style="' . $text_style . '">
			<span class="middle-inner"  >' . $text . '</span>
			</span>

			</div>

			<div class="ult_dualbutton-wrapper btn-inline place-template btn2 ">';
            $is_no_icon = trim($iconoutput2) === '' ? 'ult-dual-btn-no-icon' : '';
            if ($btn2_icon_align == 'right') {
                $subop .= '<a href = "' . $url2 . '" ' . $target1 . ' class="ult_ivan_button   round-square  with-icon icon-after with-text place-template ult_dual2"  style="' . $icon2_lineht2 . ';' . $btncolor1_style . $button2_bstyle . ';margin-left:px;' . $size . ';' . $btnmain_style . '">
			<span class="ult-dual-btn-2 ' . $btn_hover_style . '"  ' . $btn2_hover . '>
			<span class="text-btn ult-dual-button-title" style="' . $title2_style . '">' . $button2_text . '</span>
           
			<span class="icon-simple icon-right2 ult_btn1span ' . $is_no_icon . '"  style="' . $icnsize2 . ';' . $emptyicon1 . ' ">' . $iconoutput2 . '</span>
			</span>
			</a>';
            } else {
                $subop .= '<a href = "' . $url2 . '" ' . $target1 . ' class="ult_ivan_button   round-square  with-icon icon-before with-text place-template ult_dual2"  style="' . $icon2_lineht2 . ';' . $btncolor1_style . $button2_bstyle . ';margin-left:-0px;' . $size . '; ' . $btnmain_style . '">
			<span class="ult-dual-btn-2 ' . $btn_hover_style . '"  ' . $btn2_hover . '>

			<span class="icon-simple icon-left2 ult_btn1span ' . $is_no_icon . '"  style="' . $icnsize2 . ';' . $emptyicon1 . ' ">' . $iconoutput2 . '</span>
			<span class="text-btn ult-dual-button-title title_right" style="' . $title2_style . '">' . $button2_text . '</span>

			
			</span>
			</a>';
            }
            $subop .= '</div>
			</div>
			</div>';
            return $subop;
        }
 function banner_shortcode($atts)
 {
     $banner_title = $banner_title_line_height = $banner_desc = $banner_desc_line_height = $banner_icon = $banner_image = $banner_link = $banner_link_text = $banner_style = $banner_bg_color = $el_class = $animation = $icon_disp = $link_opts = $banner_title_location = $banner_title_style_inline = $banner_desc_style_inline = $banner_overlay_bg_color = $banner_link_text_color = $banner_link_bg_color = '';
     extract(shortcode_atts(array('banner_title' => '', 'banner_desc' => '', 'banner_title_location' => 'center', 'icon_disp' => 'none', 'banner_icon' => '', 'banner_image' => '', 'banner_height' => '', 'banner_height_val' => '', 'link_opts' => 'none', 'banner_link' => '', 'banner_link_text' => '', 'banner_style' => 'style01', 'banner_bg_color' => '#242424', 'banner_overlay_bg_color' => '#242424', 'banner_opacity' => 'opaque', 'el_class' => '', 'animation' => '', 'banner_title_font_family' => '', 'banner_title_style' => '', 'banner_title_font_size' => '', 'banner_title_line_height' => '', 'banner_desc_font_family' => '', 'banner_desc_style' => '', 'banner_desc_font_size' => '', 'banner_desc_line_height' => '', 'banner_link_text_color' => '#ffffff', 'banner_link_bg_color' => '#242424', 'heading_title_color' => '#ffffff', 'desc_color' => '#ffffff', 'icon_color' => '#ffffff'), $atts));
     $vc_version = defined('WPB_VC_VERSION') ? WPB_VC_VERSION : 0;
     $is_vc_49_plus = version_compare(4.9, $vc_version, '<=') ? 'ult-adjust-bottom-margin' : '';
     $output = $icon = $style = $target = '';
     if ($banner_title_font_family != '') {
         $bfamily = get_ultimate_font_family($banner_title_font_family);
         if ($bfamily !== '') {
             $banner_title_style_inline = 'font-family:\'' . $bfamily . '\';';
         }
     }
     $banner_title_style_inline .= get_ultimate_font_style($banner_title_style);
     // if($banner_title_font_size != '')
     // 	$banner_title_style_inline .= 'font-size:'.$banner_title_font_size.'px;';
     //Responsive param
     if (is_numeric($banner_title_font_size)) {
         $banner_title_font_size = 'desktop:' . $banner_title_font_size . 'px;';
     }
     if (is_numeric($banner_title_line_height)) {
         $banner_title_line_height = 'desktop:' . $banner_title_line_height . 'px;';
     }
     $interactive_banner_1_id = 'interactive-banner-1-wrap-' . rand(1000, 9999);
     $interactive_banner_1_args = array('target' => '#' . $interactive_banner_1_id . ' .bb-top-title ', 'media_sizes' => array('font-size' => $banner_title_font_size, 'line-height' => $banner_title_line_height));
     $interactive_banner_1_data_list = get_ultimate_vc_responsive_media_css($interactive_banner_1_args);
     if ($banner_bg_color != '') {
         $banner_title_style_inline .= 'background:' . $banner_bg_color . ';';
     }
     if ($heading_title_color != '') {
         $banner_title_style_inline .= 'color:' . $heading_title_color . ';';
     }
     if ($banner_desc_font_family != '') {
         $bdfamily = get_ultimate_font_family($banner_desc_font_family);
         if ($bdfamily !== '') {
             $banner_desc_style_inline = 'font-family:\'' . $bdfamily . '\';';
         }
     }
     $banner_desc_style_inline .= get_ultimate_font_style($banner_desc_style);
     // if($banner_desc_font_size != '')
     // 	$banner_desc_style_inline .= 'font-size:'.$banner_desc_font_size.'px;';
     //Responsive param
     if (is_numeric($banner_desc_font_size)) {
         $banner_desc_font_size = 'desktop:' . $banner_desc_font_size . 'px;';
     }
     if (is_numeric($banner_desc_line_height)) {
         $banner_desc_line_height = 'desktop:' . $banner_desc_line_height . 'px;';
     }
     $interactive_banner_desc_1_args = array('target' => '#' . $interactive_banner_1_id . ' .bb-description', 'media_sizes' => array('font-size' => $banner_desc_font_size, 'line-height' => $banner_desc_line_height));
     $interactive_banner_desc_1_data_list = get_ultimate_vc_responsive_media_css($interactive_banner_desc_1_args);
     if ($desc_color != '') {
         $banner_desc_style_inline .= 'color:' . $desc_color . ';';
     }
     $icon_style = $css_trans = '';
     if ($icon_color !== '') {
         $icon_style .= 'color:' . $icon_color . ';';
     }
     if ($banner_icon !== '') {
         $icon = '<i class="' . $banner_icon . '"  style= "' . $icon_style . '"></i>';
     }
     $img = apply_filters('ult_get_img_single', $banner_image, 'url');
     $href = vc_build_link($banner_link);
     if (isset($href['target']) && $href['target'] != '') {
         $target = 'target="' . $href['target'] . '"';
     }
     $banner_top_style = '';
     if ($banner_height != '' && $banner_height_val != '') {
         $banner_top_style = 'height:' . $banner_height_val . 'px;';
     }
     $output .= "\n" . '<div id="' . $interactive_banner_1_id . '" class="ult-banner-block ' . $is_vc_49_plus . ' ult-bb-' . $link_opts . ' ' . $banner_height . ' banner-' . $banner_style . ' ' . $el_class . '"  ' . $css_trans . ' style="' . $banner_top_style . '">';
     if ($img !== '') {
         $output .= "\n\t" . '<img src="' . $img . '" alt="' . $banner_title . '">';
     }
     if ($banner_title !== '') {
         $output .= "\n\t" . '<h3 ' . $interactive_banner_1_data_list . ' class="title-' . $banner_title_location . ' bb-top-title ult-responsive" style="' . $banner_title_style_inline . '">' . $banner_title;
         if ($icon_disp == "with_heading" || $icon_disp == "both") {
             $output .= $icon;
         }
         $output .= '</h3>';
     }
     $banner_overlay_bg_color = 'background:' . $banner_overlay_bg_color . ';';
     $output .= "\n\t" . '<div class="mask ' . $banner_opacity . '-background" style="' . $banner_overlay_bg_color . '">';
     if ($icon_disp == "with_description" || $icon_disp == "both") {
         if ($banner_icon !== '') {
             $output .= "\n\t\t" . '<div class="bb-back-icon">' . $icon . '</div>';
             $output .= "\n\t\t" . '<p class="" style="' . $banner_desc_style_inline . '">' . $banner_desc . '</p>';
         }
     } else {
         $output .= "\n\t\t" . '<div ' . $interactive_banner_desc_1_data_list . ' class="bb-description ult-responsive" style="' . $banner_desc_style_inline . '">' . $banner_desc . '</div>';
     }
     if ($link_opts == "more") {
         $button_style = 'background:' . $banner_link_bg_color . ';';
         $button_style .= 'color:' . $banner_link_text_color . ';';
         $output .= "\n\t\t" . '<a class="bb-link" href="' . $href['url'] . '" ' . $target . ' style="' . $button_style . '">' . $banner_link_text . '</a>';
     }
     $output .= "\n\t" . '</div>';
     if ($link_opts == "box") {
         $output .= '<a class="bb-link" href="' . $href['url'] . '" ' . $target . '></a>';
     }
     $output .= "\n" . '</div>';
     //if($link_opts == "box"){
     //$banner_with_link = '<a class="bb-link" href="'.$href['url'].'" '.$target.'>'.$output.'</a>';
     //return $banner_with_link;
     //} else {
     return $output;
     //}
 }
        function modal_shortcode($atts, $content = null)
        {
            $row_setting = '';
            // enqueue js
            $icon = $modal_on = $modal_contain = $btn_size = $btn_bg_color = $btn_txt_color = $btn_text = $read_text = $txt_color = $modal_title = $modal_size = $el_class = $modal_style = $icon_type = $icon_img = $btn_img = $overlay_bg_color = $overlay_bg_opacity = $modal_on_align = $content_bg_color = $content_text_color = $header_bg_color = $header_text_color = $modal_border_style = $modal_border_width = $modal_border_color = $modal_border_radius = '';
            $header_font = $header_font_style = $header_font_size = $header_line_height = $content_font = $content_font_style = $content_font_size = $content_line_height = $trigger_typography = $trigger_text_font = $trigger_text_font_style = $trigger_text_font_size = $trigger_text_line_height = $button_text_font = $button_text_font_style = $button_text_font_size = $button_text_line_height = '';
            extract(shortcode_atts(array('icon_type' => 'none', 'icon' => '', 'icon_img' => '', 'modal_on' => 'ult-button', 'modal_on_selector' => '', 'modal_contain' => 'ult-html', 'onload_delay' => '2', 'init_extra_class' => '', 'btn_size' => 'sm', 'overlay_bg_color' => '#333333', 'overlay_bg_opacity' => '80', 'btn_bg_color' => '#333333', 'btn_txt_color' => '#FFFFFF', 'btn_text' => '', 'read_text' => '', 'txt_color' => '#f60f60', 'btn_img' => '', 'modal_title' => '', 'modal_size' => 'small', 'modal_style' => 'overlay-cornerbottomleft', 'content_bg_color' => '', 'content_text_color' => '', 'header_bg_color' => '', 'header_text_color' => '#333333', 'modal_on_align' => 'center', 'modal_border_style' => 'solid', 'modal_border_width' => '2', 'modal_border_color' => '#333333', 'modal_border_radius' => '0', 'el_class' => '', 'header_typography' => '', 'header_font' => '', 'header_font_style' => '', 'header_font_size' => '', 'header_line_height' => '', 'content_font' => '', 'content_font_style' => '', 'content_font_size' => '', 'content_line_height' => '', 'trigger_text_font' => '', 'trigger_text_font_style' => '', 'trigger_text_font_size' => '', 'trigger_text_line_height' => '', 'button_text_font' => '', 'button_text_font_style' => '', 'button_text_font_size' => '', 'button_text_line_height' => ''), $atts, 'ultimate_modal'));
            $vc_version = defined('WPB_VC_VERSION') ? WPB_VC_VERSION : 0;
            $is_vc_49_plus = version_compare(4.9, $vc_version, '<=') ? 'ult-adjust-bottom-margin' : '';
            $html = $style = $box_icon = $modal_class = $modal_data_class = $uniq = $overlay_bg = $trigger_text_style = $content_style = $header_style = $border_style = $button_text_style = '';
            if ($modal_on == "ult-button") {
                $modal_on = "button";
            }
            // Create style for content background color
            if ($content_bg_color !== '') {
                $content_style .= 'background:' . $content_bg_color . ';';
            }
            // Create style for content text color
            if ($content_text_color !== '') {
                $content_style .= 'color:' . $content_text_color . ';';
            }
            if ($content_font != '') {
                $font_family = get_ultimate_font_family($content_font);
                if ($font_family != '') {
                    $content_style .= 'font-family:\'' . $font_family . '\';';
                }
            }
            if ($content_font_style != '') {
                $content_style .= get_ultimate_font_style($content_font_style);
            }
            // if($content_font_size != '')
            // 	$content_style .= 'font-size:'.$content_font_size.'px;';
            // if($content_line_height != '')
            // 	$content_style .= 'line-height:'.$content_line_height.'px;';
            //Responsive param
            if (is_numeric($content_font_size)) {
                $content_font_size = 'desktop:' . $content_font_size . 'px;';
            }
            if (is_numeric($content_line_height)) {
                $content_line_height = 'desktop:' . $content_line_height . 'px;';
            }
            $modal_uid = 'ult-modal-wrap-' . rand(00, 9999);
            $modal_content_args = array('target' => '#' . $modal_uid . ' .ult_modal-body', 'media_sizes' => array('font-size' => $content_font_size, 'line-height' => $content_line_height));
            $madal_content_data_list = get_ultimate_vc_responsive_media_css($modal_content_args);
            // Create style for header background color
            if ($header_bg_color !== '') {
                $header_style .= 'background:' . $header_bg_color . ';';
            }
            // Create style for header text color
            if ($header_text_color !== '') {
                $header_style .= 'color:' . $header_text_color . ';';
            }
            if ($header_font != '') {
                $font_family = get_ultimate_font_family($header_font);
                if ($font_family != '') {
                    $header_style .= 'font-family:\'' . $font_family . '\';';
                }
            }
            if ($header_font_style != '') {
                $header_style .= get_ultimate_font_style($header_font_style);
            }
            //Responsive param
            if (is_numeric($header_font_size)) {
                $header_font_size = 'desktop:' . $header_font_size . 'px;';
            }
            if (is_numeric($header_line_height)) {
                $header_line_height = 'desktop:' . $header_line_height . 'px;';
            }
            $modal_heading_args = array('target' => '#' . $modal_uid . ' .ult_modal-title', 'media_sizes' => array('font-size' => $header_font_size, 'line-height' => $header_line_height));
            $madal_heading_data_list = get_ultimate_vc_responsive_media_css($modal_heading_args);
            if ($trigger_text_font != '') {
                $font_family = get_ultimate_font_family($trigger_text_font);
                if ($font_family != '') {
                    $trigger_text_style .= 'font-family:\'' . $font_family . '\';';
                }
            }
            if ($trigger_text_font_style != '') {
                $trigger_text_style .= get_ultimate_font_style($trigger_text_font_style);
            }
            // Responsive param
            if (is_numeric($trigger_text_font_size)) {
                $trigger_text_font_size = 'desktop:' . $trigger_text_font_size . 'px;';
            }
            if (is_numeric($trigger_text_line_height)) {
                $trigger_text_line_height = 'desktop:' . $trigger_text_line_height . 'px;';
            }
            $modal_trgs_id = 'modal-trg-txt-wrap-' . rand(1000, 9999);
            $modal_trg_args = array('target' => '#' . $modal_trgs_id . ' .mycust', 'media_sizes' => array('font-size' => $trigger_text_font_size, 'line-height' => $trigger_text_line_height));
            $madal_trg_data_list = get_ultimate_vc_responsive_media_css($modal_trg_args);
            if ($button_text_font != '') {
                $font_family = get_ultimate_font_family($button_text_font);
                if ($font_family != '') {
                    $button_text_style .= 'font-family:\'' . $font_family . '\';';
                }
            }
            if ($button_text_font_style != '') {
                $button_text_style .= get_ultimate_font_style($button_text_font_style);
            }
            //Responsive param
            if (is_numeric($button_text_font_size)) {
                $button_text_font_size = 'desktop:' . $button_text_font_size . 'px;';
            }
            if (is_numeric($button_text_line_height)) {
                $button_text_line_height = 'desktop:' . $button_text_line_height . 'px;';
            }
            $button_trg_args = array('target' => '#' . $modal_trgs_id . ' .btn-modal', 'media_sizes' => array('font-size' => $button_text_font_size, 'line-height' => $button_text_line_height));
            $button_trg_data_list = get_ultimate_vc_responsive_media_css($button_trg_args);
            if ($modal_border_style !== '') {
                $border_style .= 'border-style:' . $modal_border_style . ';';
                $border_style .= 'border-width:' . $modal_border_width . 'px;';
                $border_style .= 'border-radius:' . $modal_border_radius . 'px;';
                $border_style .= 'border-color:' . $modal_border_color . ';';
                $header_style .= 'border-color:' . $modal_border_color . ';';
            }
            $overlay_bg_opacity = $overlay_bg_opacity / 100;
            if ($overlay_bg_color !== '') {
                if (strlen($overlay_bg_color) <= 7) {
                    $overlay_bg = ultimate_hex2rgb($overlay_bg_color, $overlay_bg_opacity);
                } else {
                    $overlay_bg = $overlay_bg_color;
                }
                if ($modal_style != 'overlay-show-cornershape' && $modal_style != 'overlay-show-genie' && $modal_style != 'overlay-show-boxes') {
                    $overlay_bg = 'background:' . $overlay_bg . ';';
                } else {
                    $overlay_bg = 'fill:' . $overlay_bg . ';';
                }
            }
            $uniq = uniqid();
            if ($icon_type == 'custom') {
                //$ico_img = wp_get_attachment_image_src( $icon_img, 'large');
                $ico_img = apply_filters('ult_get_img_single', $icon_img, 'url');
                $box_icon = '<div class="modal-icon"><img src="' . $ico_img . '" class="ult-modal-inside-img"></div>';
            } elseif ($icon_type == 'selector') {
                if ($icon !== '') {
                    $box_icon = '<div class="modal-icon"><i class="' . $icon . '"></i></div>';
                }
            }
            if ($modal_style != 'overlay-show-cornershape' && $modal_style != 'overlay-show-genie' && $modal_style != 'overlay-show-boxes') {
                $modal_class = 'overlay-show';
                $modal_data_class = 'data-overlay-class="' . $modal_style . '"';
            } else {
                $modal_class = $modal_style;
                $modal_data_class = '';
            }
            $html .= '<div id="' . $modal_trgs_id . '" class="ult-modal-input-wrapper ' . $is_vc_49_plus . '">';
            if ($modal_on == "button") {
                if ($btn_bg_color !== '') {
                    $style .= 'background:' . $btn_bg_color . ';';
                    $style .= 'border-color:' . $btn_bg_color . ';';
                }
                if ($btn_txt_color !== '') {
                    $style .= 'color:' . $btn_txt_color . ';';
                }
                if ($el_class != '') {
                    $modal_class .= ' ' . $el_class . '-button ';
                }
                $html .= '<button ' . $button_trg_data_list . ' style="' . $style . ' ' . $button_text_style . '" data-class-id="content-' . $uniq . '" class="btn-modal ult-responsive btn-primary btn-modal-' . $btn_size . ' ' . $modal_class . ' ' . $init_extra_class . ' ult-align-' . $modal_on_align . '" ' . $modal_data_class . '>' . $btn_text . '</button>';
            } elseif ($modal_on == "image") {
                if ($btn_img !== '') {
                    if ($el_class != '') {
                        $modal_class .= ' ' . $el_class . '-image ';
                    }
                    // $img = wp_get_attachment_image_src( $btn_img, 'large');
                    $img = apply_filters('ult_get_img_single', $btn_img, 'url');
                    $html .= '<img src="' . $img . '" data-class-id="content-' . $uniq . '" class="ult-modal-img ' . $init_extra_class . ' ' . $modal_class . ' ult-align-' . $modal_on_align . ' ult-modal-image-' . $el_class . '" ' . $modal_data_class . '/>';
                }
            } elseif ($modal_on == "onload") {
                $html .= '<div data-class-id="content-' . $uniq . '" class="ult-onload ' . $modal_class . ' " ' . $modal_data_class . ' data-onload-delay="' . $onload_delay . '"></div>';
            } elseif ($modal_on == "custom-selector") {
                $html .= '<script type="text/javascript">
				(function($){
					$(document).ready(function(){
						var selector = "' . $modal_on_selector . '";
						$(selector).addClass("custom-ult-modal ' . $modal_class . '");
						$(selector).attr("data-class-id", "content-' . $uniq . '");
						$(selector).attr("data-overlay-class", "' . $modal_style . '");
					});
				})(jQuery);
				</script>';
            } else {
                if ($txt_color !== '') {
                    $style .= 'color:' . $txt_color . ';';
                    $style .= 'cursor:pointer;';
                }
                if ($el_class != '') {
                    $modal_class .= ' ' . $el_class . '-link ';
                }
                $html .= '<span ' . $madal_trg_data_list . ' style="' . $style . ' ' . $trigger_text_style . '" data-class-id="content-' . $uniq . '" class="' . $modal_class . ' ult-responsive mycust ult-align-' . $modal_on_align . '" ' . $modal_data_class . '>' . $read_text . '</span>';
            }
            $html .= '</div>';
            if ($modal_style == 'overlay-show-cornershape') {
                $html .= "\n" . '<div class="ult-overlay overlay-cornershape content-' . $uniq . ' ' . $el_class . '" style="display:none" data-class="content-' . $uniq . '" data-path-to="m 0,0 1439.999975,0 0,805.99999 -1439.999975,0 z">';
                $html .= "\n\t" . '<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 1440 806" preserveAspectRatio="none">
                					<path class="overlay-path" d="m 0,0 1439.999975,0 0,805.99999 0,-805.99999 z" style="' . $overlay_bg . '"/>
            					</svg>';
            } elseif ($modal_style == 'overlay-show-genie') {
                $html .= "\n" . '<div class="ult-overlay overlay-genie content-' . $uniq . ' ' . $el_class . '" style="display:none" data-class="content-' . $uniq . '" data-steps="m 701.56545,809.01175 35.16718,0 0,19.68384 -35.16718,0 z;m 698.9986,728.03569 41.23353,0 -3.41953,77.8735 -34.98557,0 z;m 687.08153,513.78234 53.1506,0 C 738.0505,683.9161 737.86917,503.34193 737.27015,806 l -35.90067,0 c -7.82727,-276.34892 -2.06916,-72.79261 -14.28795,-292.21766 z;m 403.87105,257.94772 566.31246,2.93091 C 923.38284,513.78233 738.73561,372.23931 737.27015,806 l -35.90067,0 C 701.32034,404.49318 455.17312,480.07689 403.87105,257.94772 z;M 51.871052,165.94772 1362.1835,168.87863 C 1171.3828,653.78233 738.73561,372.23931 737.27015,806 l -35.90067,0 C 701.32034,404.49318 31.173122,513.78234 51.871052,165.94772 z;m 52,26 1364,4 c -12.8007,666.9037 -273.2644,483.78234 -322.7299,776 l -633.90062,0 C 359.32034,432.49318 -6.6979288,733.83462 52,26 z;m 0,0 1439.999975,0 0,805.99999 -1439.999975,0 z">';
                $html .= "\n\t" . '<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 1440 806" preserveAspectRatio="none">
							<path class="overlay-path" d="m 701.56545,809.01175 35.16718,0 0,19.68384 -35.16718,0 z" style="' . $overlay_bg . '"/>
						</svg>';
            } elseif ($modal_style == 'overlay-show-boxes') {
                $html .= "\n" . '<div class="ult-overlay overlay-boxes content-' . $uniq . ' ' . $el_class . '" style="display:none" data-class="content-' . $uniq . '">';
                $html .= "\n\t" . '<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="101%" viewBox="0 0 1440 806" preserveAspectRatio="none">';
                $html .= "\n\t\t" . '<path d="m0.005959,200.364029l207.551124,0l0,204.342453l-207.551124,0l0,-204.342453z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m0.005959,400.45401l207.551124,0l0,204.342499l-207.551124,0l0,-204.342499z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m0.005959,600.544067l207.551124,0l0,204.342468l-207.551124,0l0,-204.342468z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m205.752151,-0.36l207.551163,0l0,204.342437l-207.551163,0l0,-204.342437z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m204.744629,200.364029l207.551147,0l0,204.342453l-207.551147,0l0,-204.342453z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m204.744629,400.45401l207.551147,0l0,204.342499l-207.551147,0l0,-204.342499z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m204.744629,600.544067l207.551147,0l0,204.342468l-207.551147,0l0,-204.342468z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m410.416046,-0.36l207.551117,0l0,204.342437l-207.551117,0l0,-204.342437z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m410.416046,200.364029l207.551117,0l0,204.342453l-207.551117,0l0,-204.342453z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m410.416046,400.45401l207.551117,0l0,204.342499l-207.551117,0l0,-204.342499z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m410.416046,600.544067l207.551117,0l0,204.342468l-207.551117,0l0,-204.342468z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m616.087402,-0.36l207.551086,0l0,204.342437l-207.551086,0l0,-204.342437z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m616.087402,200.364029l207.551086,0l0,204.342453l-207.551086,0l0,-204.342453z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m616.087402,400.45401l207.551086,0l0,204.342499l-207.551086,0l0,-204.342499z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m616.087402,600.544067l207.551086,0l0,204.342468l-207.551086,0l0,-204.342468z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m821.748718,-0.36l207.550964,0l0,204.342437l-207.550964,0l0,-204.342437z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m821.748718,200.364029l207.550964,0l0,204.342453l-207.550964,0l0,-204.342453z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m821.748718,400.45401l207.550964,0l0,204.342499l-207.550964,0l0,-204.342499z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m821.748718,600.544067l207.550964,0l0,204.342468l-207.550964,0l0,-204.342468z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m1027.203979,-0.36l207.550903,0l0,204.342437l-207.550903,0l0,-204.342437z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m1027.203979,200.364029l207.550903,0l0,204.342453l-207.550903,0l0,-204.342453z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m1027.203979,400.45401l207.550903,0l0,204.342499l-207.550903,0l0,-204.342499z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m1027.203979,600.544067l207.550903,0l0,204.342468l-207.550903,0l0,-204.342468z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m1232.659302,-0.36l207.551147,0l0,204.342437l-207.551147,0l0,-204.342437z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m1232.659302,200.364029l207.551147,0l0,204.342453l-207.551147,0l0,-204.342453z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m1232.659302,400.45401l207.551147,0l0,204.342499l-207.551147,0l0,-204.342499z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m1232.659302,600.544067l207.551147,0l0,204.342468l-207.551147,0l0,-204.342468z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t\t" . '<path d="m-0.791443,-0.360001l207.551163,0l0,204.342438l-207.551163,0l0,-204.342438z" style="' . $overlay_bg . '"/>';
                $html .= "\n\t" . '</svg>';
            } else {
                $html .= "\n" . '<div class="ult-overlay content-' . $uniq . ' ' . $el_class . '" data-class="content-' . $uniq . '" id="button-click-overlay" style="' . $overlay_bg . ' display:none;">';
            }
            $html .= "\n\t" . '<div class="ult_modal ult-fade ult-' . $modal_size . '">';
            $html .= "\n\t\t" . '<div id="' . $modal_uid . '" class="ult_modal-content ult-hide" style="' . $border_style . '">';
            if ($modal_title !== '') {
                $html .= "\n\t\t\t" . '<div class="ult_modal-header" style="' . $header_style . '">';
                $html .= "\n\t\t\t\t" . $box_icon . '<h3 ' . $madal_heading_data_list . ' class="ult_modal-title ult-responsive">' . $modal_title . '</h3>';
                $html .= "\n\t\t\t" . '</div>';
            }
            $html .= "\n\t\t\t" . '<div ' . $madal_content_data_list . ' class="ult_modal-body ult-responsive ' . $modal_contain . '" style="' . $content_style . '">';
            $html .= "\n\t\t\t" . do_shortcode($content);
            $html .= "\n\t\t\t" . '</div>';
            $html .= "\n\t" . '</div>';
            $html .= "\n\t" . '</div>';
            $html .= "\n\t" . '<div class="ult-overlay-close">Close</div>';
            $html .= "\n" . '</div>';
            return $html;
        }
示例#23
0
 function ult_hotspot_items_callback($atts, $content = null)
 {
     global $hotspot_icon, $hotspot_icon_bg_color, $hotspot_icon_color, $hotspot_icon_size;
     extract(shortcode_atts(array('hotspot_content' => '', 'hotspot_label' => '', 'hotspot_position' => '0,0', 'tooltip_content' => '', 'tooltip_width' => '300', 'tooltip_padding' => '', 'tooltip_position' => '', "icon_type" => '', 'icon' => 'Defaults-map-marker', 'icon_color' => '', 'icon_style' => '', 'icon_color_bg' => '', 'icon_border_style' => '', 'icon_color_border' => '', 'icon_border_size' => '', 'icon_border_radius' => '', 'icon_border_spacing' => '', 'icon_img' => '', 'img_width' => '60', 'link_style' => '', 'icon_link' => '', 'icon_size' => '', "alignment" => "center", 'tooltip_trigger' => '', 'tooltip_animation' => '', 'tooltip_continuous_animation' => '', 'glow_color' => '', 'enable_bubble_arrow' => 'on', 'tooltip_custom_bg_color' => '#fff', 'tooltip_custom_color' => '#4c4c4c', 'tooltip_font' => '', 'tooltip_font_style' => '', 'tooltip_font_size' => '', 'tooltip_font_line_height' => '', 'tooltip_custom_border_size' => '', 'tooltip_align' => ''), $atts));
     //$content = wpb_js_remove_wpautop($content, false); // fix unclosed/unwanted paragraph tags in $content
     //	Animation effects
     $glow = $pulse = '';
     if ($tooltip_continuous_animation != '') {
         switch ($tooltip_continuous_animation) {
             case "on":
                 $pulse = "ult-pulse";
                 break;
             case "glow":
                 if ($glow_color !== '') {
                     $glow_color = 'style="background-color:' . $glow_color . '"';
                 } else {
                     $glow_color = '';
                 }
                 $glow = " <div class='ult-glow' " . $glow_color . "></div>";
                 break;
         }
     }
     if (trim($content) !== '') {
         $hotspot_content = $content;
     }
     /**    Tooltip [Content] Styling
      *--------------------------------------*/
     $font_args = array();
     $tooltip_content_style = '';
     $tooltip_base_style = '';
     if ($tooltip_font != '') {
         $font_family = get_ultimate_font_family($tooltip_font);
         $tooltip_content_style .= 'font-family:' . $font_family . ';';
         array_push($font_args, $tooltip_font);
     }
     if ($tooltip_font_style != '') {
         $tooltip_content_style .= get_ultimate_font_style($tooltip_font_style);
     }
     if ($tooltip_font_size != '') {
         $tooltip_content_style .= 'font-size:' . $tooltip_font_size . 'px;';
     }
     if ($tooltip_font_line_height != '') {
         $tooltip_content_style .= 'line-height:' . $tooltip_font_line_height . 'px;';
     }
     //  Width
     if ($tooltip_width != '') {
         $tooltip_content_style .= 'width:' . $tooltip_width . 'px;';
     }
     //  Padding
     if ($tooltip_padding != '') {
         $tooltip_content_style .= $tooltip_padding;
     }
     /**
      *    Tooltip [Base] Styling options
      *
      */
     //  Background
     if ($tooltip_custom_bg_color != '') {
         $tooltip_base_style .= 'background-color:' . $tooltip_custom_bg_color . ';';
     }
     /*if($tooltip_theme == 'custom' ) {*/
     if ($tooltip_custom_color != '') {
         $tooltip_base_style .= 'color:' . $tooltip_custom_color . ';';
     }
     //  Border Styling
     if ($tooltip_custom_border_size != '') {
         $bstyle = str_replace('|', '', $tooltip_custom_border_size);
         $tooltip_base_style .= $bstyle;
     }
     if ($tooltip_align != '') {
         $tooltip_base_style .= 'text-align:' . $tooltip_align . ';';
     }
     $data = '';
     if ($tooltip_content_style != '') {
         $data .= 'data-tooltip-content-style="' . $tooltip_content_style . '"';
     }
     if ($tooltip_base_style != '') {
         $data .= 'data-tooltip-base-style="' . $tooltip_base_style . '"';
     }
     if ($enable_bubble_arrow != '' && $enable_bubble_arrow == 'on') {
         $data .= ' data-bubble-arrow="true" ';
     } else {
         $data .= ' data-bubble-arrow="false" ';
     }
     $hotspot_position = explode(',', $hotspot_position);
     if ($icon_type == 'custom') {
         $temp_icon_size = $img_width / 2 - 14;
     } else {
         $temp_icon_size = $icon_size / 2 - 14;
     }
     //$temp_icon_size = 0;
     $hotspot_x_position = $hotspot_position[0];
     $hotspot_y_position = isset($hotspot_position[1]) ? $hotspot_position[1] : '0';
     $tooltip_offsetY = '';
     //if($icon_size != '')  {
     //  set offsetY for tooltip
     $tooltip_offsetY = $temp_icon_size;
     //}
     if ($tooltip_animation != '') {
         $data .= 'data-tooltipanimation="' . $tooltip_animation . '"';
     }
     if ($tooltip_trigger != '') {
         $data .= 'data-trigger="' . $tooltip_trigger . '"';
     }
     if ($tooltip_offsetY != '') {
         $data .= 'data-tooltip-offsety="' . $tooltip_offsetY . '"';
     }
     if ($tooltip_position != '') {
         $data .= 'data-arrowposition="' . $tooltip_position . '"';
     }
     $icon_animation = '';
     $icon_inline = do_shortcode('[just_icon icon_align="' . $alignment . '" icon_type="' . $icon_type . '" icon="' . $icon . '" icon_img="' . $icon_img . '" img_width="' . $img_width . '" icon_size="' . $icon_size . '" icon_color="' . $icon_color . '" icon_style="' . $icon_style . '" icon_color_bg="' . $icon_color_bg . '" icon_color_border="' . $icon_color_border . '"  icon_border_style="' . $icon_border_style . '" icon_border_size="' . $icon_border_size . '" icon_border_radius="' . $icon_border_radius . '" icon_border_spacing="' . $icon_border_spacing . '" icon_animation="' . $icon_animation . '"]');
     $url = $link_title = $target = '';
     // Hotspot has simple link
     if ($link_style == 'link' && $icon_link != '') {
         $href = vc_build_link($icon_link);
         $url = $href['url'];
         $link_title = ' title="' . $href['title'] . '" ';
         $target = ' target="' . trim($href['target']) . '" ';
     }
     //$output  = "<div class='ult-hotspot-item ".$pulse."' style='top:-webkit-calc(".$hotspot_x_position."% - ".$temp_icon_size."px);top:-moz-calc(".$hotspot_x_position."% - ".$temp_icon_size."px);top:calc(".$hotspot_x_position."% - ".$temp_icon_size."px);left: -webkit-calc(".$hotspot_y_position."% - ".$temp_icon_size."px);left: -moz-calc(".$hotspot_y_position."% - ".$temp_icon_size."px);left: calc(".$hotspot_y_position."% - ".$temp_icon_size."px);' >";
     $output = "<div class='ult-hotspot-item " . $pulse . "' style='top:-webkit-calc(" . $hotspot_x_position . "% - " . $temp_icon_size . "px);top:-moz-calc(" . $hotspot_x_position . "% - " . $temp_icon_size . "px);top:calc(" . $hotspot_x_position . "% - " . $temp_icon_size . "px);left: -webkit-calc(" . $hotspot_y_position . "% - " . $temp_icon_size . "px);left: -moz-calc(" . $hotspot_y_position . "% - " . $temp_icon_size . "px);left: calc(" . $hotspot_y_position . "% - " . $temp_icon_size . "px);' >";
     $output .= "  <div style='z-index: 39;position: relative;'>";
     if ($link_style == 'link') {
         $output .= "   <a data-link_style='simple' class='ult-tooltip ult-tooltipstered ult-hotspot-tooltip' href='" . $url . "' " . $link_title . " " . $target . " data-status='hide'>";
         $output .= $icon_inline;
         $output .= "  </a>";
     } else {
         $output .= "   <a data-link_style='tootip' " . $data . " class='ult-tooltip ult-tooltipstered ult-hotspot-tooltip' href='#' data-status='show'>";
         $output .= $icon_inline;
         $output .= "<span class='hotspot-tooltip-content'>" . esc_html(str_replace('"', '\'', $hotspot_content)) . "</span>";
         $output .= "  </a>";
     }
     $output .= " </div><!-- ICON WRAP -->";
     $output .= $glow;
     $output .= "</div>";
     return $output;
 }
 function banner_shortcode($atts)
 {
     $banner_title = $banner_desc = $banner_icon = $banner_image = $banner_link = $banner_link_text = $banner_style = $banner_bg_color = $el_class = $animation = $icon_disp = $link_opts = $banner_title_location = $banner_title_style_inline = $banner_desc_style_inline = '';
     extract(shortcode_atts(array('banner_title' => '', 'banner_desc' => '', 'banner_title_location' => '', 'icon_disp' => '', 'banner_icon' => '', 'banner_image' => '', 'banner_height' => '', 'banner_height_val' => '', 'link_opts' => '', 'banner_link' => '', 'banner_link_text' => '', 'banner_style' => '', 'banner_bg_color' => '', 'banner_opacity' => '', 'el_class' => '', 'animation' => '', 'banner_title_font_family' => '', 'banner_title_style' => '', 'banner_title_font_size' => '', 'banner_desc_font_family' => '', 'banner_desc_style' => '', 'banner_desc_font_size' => ''), $atts));
     $output = $icon = $style = $target = '';
     //$banner_style = 'style01';
     if ($banner_title_font_family != '') {
         $bfamily = get_ultimate_font_family($banner_title_font_family);
         $banner_title_style_inline = 'font-family:\'' . $bfamily . '\';';
     }
     $banner_title_style_inline .= get_ultimate_font_style($banner_title_style);
     if ($banner_title_font_size != '') {
         $banner_title_style_inline .= 'font-size:' . $banner_title_font_size . 'px;';
     }
     if ($banner_bg_color != '') {
         $banner_title_style_inline .= 'background:' . $banner_bg_color . ';';
     }
     if ($banner_desc_font_family != '') {
         $bdfamily = get_ultimate_font_family($banner_desc_font_family);
         $banner_desc_style_inline = 'font-family:\'' . $bdfamily . '\';';
     }
     $banner_desc_style .= get_ultimate_font_style($banner_desc_style);
     if ($banner_desc_font_size != '') {
         $banner_desc_style_inline .= 'font-size:' . $banner_desc_font_size . 'px;';
     }
     //enqueue google font
     /*$args = array(
     			$banner_title_font_family, $banner_desc_font_family
     		);
     		enquque_ultimate_google_fonts($args);*/
     if ($animation !== 'none') {
         $css_trans = 'data-animation="' . $animation . '" data-animation-delay="03"';
     }
     if ($banner_icon !== '') {
         $icon = '<i class="' . $banner_icon . '"></i>';
     }
     $img = wp_get_attachment_image_src($banner_image, 'large');
     $href = vc_build_link($banner_link);
     if (isset($href['target']) && $href['target'] != '') {
         $target = 'target="' . $href['target'] . '"';
     }
     $banner_top_style = '';
     if ($banner_height != '' && $banner_height_val != '') {
         $banner_top_style = 'height:' . $banner_height_val . 'px;';
     }
     $output .= "\n" . '<div class="banner-block ' . $banner_height . ' banner-' . $banner_style . ' ' . $el_class . '"  ' . $css_trans . ' style="' . $banner_top_style . '">';
     $output .= "\n\t" . '<img src="' . $img[0] . '" alt="' . $banner_title . '">';
     if ($banner_title !== '') {
         $output .= "\n\t" . '<h3 class="title-' . $banner_title_location . ' bb-top-title" style="' . $banner_title_style_inline . '">' . $banner_title;
         if ($icon_disp == "with_heading" || $icon_disp == "both") {
             $output .= $icon;
         }
         $output .= '</h3>';
     }
     $output .= "\n\t" . '<div class="mask ' . $banner_opacity . '-background">';
     if ($icon_disp == "with_description" || $icon_disp == "both") {
         if ($banner_icon !== '') {
             $output .= "\n\t\t" . '<div class="bb-back-icon">' . $icon . '</div>';
             $output .= "\n\t\t" . '<p>' . $banner_desc . '</p>';
         }
     } else {
         $output .= "\n\t\t" . '<p class="bb-description" style="' . $banner_desc_style_inline . '">' . $banner_desc . '</p>';
     }
     if ($link_opts == "more") {
         $output .= "\n\t\t" . '<a class="bb-link" href="' . $href['url'] . '" ' . $target . '>' . $banner_link_text . '</a>';
     }
     $output .= "\n\t" . '</div>';
     $output .= "\n" . '</div>';
     if ($link_opts == "box") {
         $banner_with_link = '<a class="bb-link" href="' . $href['url'] . '" ' . $target . '>' . $output . '</a>';
         return $banner_with_link;
     } else {
         return $output;
     }
 }
示例#25
0
        function ult_buttons_shortcode($atts)
        {
            $output = $btn_title = $btn_link = $btn_size = $btn_width = $btn_height = $btn_hover = $btn_bg_color = $btn_radius = $btn_shadow = '';
            $btn_shadow_color = $btn_bg_color_hover = $btn_border_style = $btn_color_border = $btn_border_size = $btn_shadow_size = $el_class = '';
            $btn_font_family = $btn_font_style = $btn_title_color = $btn_font_size = $icon = $icon_size = $icon_color = $btn_icon_pos = $btn_anim_effect = '';
            $btn_padding_left = $btn_padding_top = $button_bg_img = $btn_title_color_hover = $btn_align = $btn_color_border_hover = $btn_shadow_color_hover = '';
            $btn_shadow_click = $enable_tooltip = $tooltip_text = $tooltip_pos = $rel = $btn_line_height = '';
            extract(shortcode_atts(array('btn_title' => '', 'btn_link' => '', 'btn_size' => 'ubtn-normal', 'btn_width' => '', 'btn_height' => '', 'btn_padding_left' => '', 'btn_padding_top' => '', 'btn_hover' => 'ubtn-no-hover-bg', 'btn_bg_color' => '#e0e0e0', 'btn_radius' => '', 'btn_shadow' => '', 'btn_shadow_color' => '', 'btn_shadow_size' => '', 'btn_bg_color_hover' => '', 'btn_title_color_hover' => '', 'btn_border_style' => '', 'btn_color_border' => '', 'btn_color_border_hover' => '', 'btn_border_size' => '', 'btn_font_family' => '', 'btn_font_style' => '', 'btn_title_color' => '#000000', 'btn_font_size' => '', 'btn_line_height' => '', 'icon' => '', 'icon_size' => '', 'icon_color' => '', 'btn_icon_pos' => '', 'btn_anim_effect' => 'none', 'button_bg_img' => '', 'btn_align' => 'ubtn-left', 'btn_shadow_color_hover' => '', 'btn_shadow_click' => '', 'enable_tooltip' => '', 'tooltip_text' => '', 'tooltip_pos' => 'left', 'rel' => '', 'el_class' => '', 'css_adv_btn' => ''), $atts));
            $style = $hover_style = $btn_style_inline = $link_sufix = $link_prefix = $img = $shadow_hover = $shadow_click = $shadow_color = $box_shadow = $main_extra_class = '';
            $main_extra_class = $el_class;
            $tooltip = $tooltip_class = $el_class = $css_btn_design = '';
            $el_class .= ' ' . $btn_anim_effect . ' ';
            $uniqid = uniqid();
            $tooltip_class = 'tooltip-' . $uniqid;
            $vc_version = defined('WPB_VC_VERSION') ? WPB_VC_VERSION : 0;
            $is_vc_49_plus = version_compare(4.9, $vc_version, '<=') ? 'ult-adjust-bottom-margin' : '';
            $css_btn_design = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class($css_adv_btn, ' '), "ult_buttons", $atts);
            $css_btn_design = esc_attr($css_btn_design);
            if ($enable_tooltip == "yes") {
                wp_enqueue_script('ultimate-tooltip');
                wp_enqueue_style('ultimate-tooltip');
                $tooltip .= 'data-toggle="tooltip" data-placement="' . $tooltip_pos . '" title="' . $tooltip_text . '"';
                $tooltip_class .= " ubtn-tooltip " . $tooltip_pos;
            }
            if ($btn_shadow_click !== "enable") {
                $shadow_click = 'none';
            }
            if ($btn_shadow_color_hover == "") {
                $shadow_color = $btn_shadow_color;
            } else {
                $shadow_color = $btn_shadow_color_hover;
            }
            $alt = 'icon';
            if ($button_bg_img !== '') {
                $img = apply_filters('ult_get_img_single', $button_bg_img, 'url');
                $alt = apply_filters('ult_get_img_single', $button_bg_img, 'alt');
            }
            if ($btn_link !== '') {
                $href = vc_build_link($btn_link);
                if ($href['url'] !== "") {
                    $target = isset($href['target']) ? "target='" . $href['target'] . "'" : '';
                    if ($btn_size == "ubtn-block") {
                        $tooltip_class .= ' ubtn-block';
                    }
                    if ($rel !== '') {
                        $rel = 'rel="' . $rel . '"';
                    }
                    $link_prefix .= '<a class="ubtn-link ' . $is_vc_49_plus . ' ' . $btn_align . ' ' . $btn_size . ' ' . $main_extra_class . '" href = "' . $href['url'] . '" ' . $target . ' ' . $rel . '>';
                    $link_sufix .= '</a>';
                }
            } else {
                if ($enable_tooltip !== "") {
                    $link_prefix .= '<span class="' . $btn_align . '">';
                    $link_sufix .= '</span>';
                }
            }
            if ($btn_icon_pos !== '' && $icon !== 'none' && $icon !== '') {
                $el_class .= ' ubtn-sep-icon ' . $btn_icon_pos . ' ';
            }
            if ($btn_font_family != '') {
                $mhfont_family = get_ultimate_font_family($btn_font_family);
                $btn_style_inline .= 'font-family:\'' . $mhfont_family . '\';';
                //enqueue google font
                /*$args = array(
                			$mhfont_family
                		);
                		enquque_ultimate_google_fonts($args);*/
            }
            $btn_style_inline .= get_ultimate_font_style($btn_font_style);
            // if($btn_font_size !== ''){
            // 	$btn_style_inline .= 'font-size:'.$btn_font_size.'px;';
            // }
            $adv_btn_id = 'ubtn-' . rand(1000, 9999);
            if (is_numeric($btn_font_size)) {
                $btn_font_size = 'desktop:' . $btn_font_size . 'px;';
            }
            if (is_numeric($btn_line_height)) {
                $btn_line_height = 'desktop:' . $btn_line_height . 'px';
            }
            $advbtnargs = array('target' => '#' . $adv_btn_id, 'media_sizes' => array('font-size' => $btn_font_size, 'line-height' => $btn_line_height));
            $data_list = get_ultimate_vc_responsive_media_css($advbtnargs);
            $style .= $btn_style_inline;
            if ($btn_size == 'ubtn-custom') {
                $style .= 'width:' . $btn_width . 'px;';
                $style .= 'min-height:' . $btn_height . 'px;';
                $style .= 'padding:' . $btn_padding_top . 'px ' . $btn_padding_left . 'px;';
            }
            if ($btn_border_style !== '') {
                $style .= 'border-radius:' . $btn_radius . 'px;';
                $style .= 'border-width:' . $btn_border_size . 'px;';
                $style .= 'border-color:' . $btn_color_border . ';';
                $style .= 'border-style:' . $btn_border_style . ';';
            } else {
                $style .= 'border:none;';
            }
            if ($btn_shadow !== '') {
                switch ($btn_shadow) {
                    case 'shd-top':
                        $style .= 'box-shadow: 0 -' . $btn_shadow_size . 'px ' . $btn_shadow_color . ';';
                        // $style .= 'bottom: '.($btn_shadow_size-3).'px;';
                        $box_shadow .= '0 -' . $btn_shadow_size . 'px ' . $btn_shadow_color . ';';
                        if ($shadow_click !== "none") {
                            $shadow_hover .= '0 -3px ' . $shadow_color . ';';
                        } else {
                            $shadow_hover .= '0 -' . $btn_shadow_size . 'px ' . $shadow_color . ';';
                        }
                        break;
                    case 'shd-bottom':
                        $style .= 'box-shadow: 0 ' . $btn_shadow_size . 'px ' . $btn_shadow_color . ';';
                        // $style .= 'top: '.($btn_shadow_size-3).'px;';
                        $box_shadow .= '0 ' . $btn_shadow_size . 'px ' . $btn_shadow_color . ';';
                        if ($shadow_click !== "none") {
                            $shadow_hover .= '0 3px ' . $shadow_color . ';';
                        } else {
                            $shadow_hover .= '0 ' . $btn_shadow_size . 'px ' . $shadow_color . ';';
                        }
                        break;
                    case 'shd-left':
                        $style .= 'box-shadow: -' . $btn_shadow_size . 'px 0 ' . $btn_shadow_color . ';';
                        // $style .= 'right: '.($btn_shadow_size-3).'px;';
                        $box_shadow .= '-' . $btn_shadow_size . 'px 0 ' . $btn_shadow_color . ';';
                        if ($shadow_click !== "none") {
                            $shadow_hover .= '-3px 0 ' . $shadow_color . ';';
                        } else {
                            $shadow_hover .= '-' . $btn_shadow_size . 'px 0 ' . $shadow_color . ';';
                        }
                        break;
                    case 'shd-right':
                        $style .= 'box-shadow: ' . $btn_shadow_size . 'px 0 ' . $btn_shadow_color . ';';
                        // $style .= 'left: '.($btn_shadow_size-3).'px;';
                        $box_shadow .= $btn_shadow_size . 'px 0 ' . $btn_shadow_color . ';';
                        if ($shadow_click !== "none") {
                            $shadow_hover .= '3px 0 ' . $shadow_color . ';';
                        } else {
                            $shadow_hover .= $btn_shadow_size . 'px 0 ' . $shadow_color . ';';
                        }
                        break;
                }
            }
            if ($btn_bg_color !== '') {
                $style .= 'background: ' . $btn_bg_color . ';';
            }
            if ($btn_title_color !== '') {
                $style .= 'color: ' . $btn_title_color . ';';
            }
            if ($btn_shadow) {
                $el_class .= ' ubtn-shd ';
            }
            if ($btn_align) {
                $el_class .= ' ' . $btn_align . ' ';
            }
            if ($btn_title == "" && $icon !== "") {
                $el_class .= ' ubtn-only-icon ';
            }
            if ($btn_link === '') {
                $el_class .= $main_extra_class;
            }
            $output .= '<button type="button" id="' . $adv_btn_id . '" class="ubtn ' . $is_vc_49_plus . ' ult-responsive ' . $btn_size . ' ' . $btn_hover . ' ' . $el_class . ' ' . $btn_shadow . ' ' . $tooltip_class . '" ' . $tooltip . ' data-hover="' . $btn_title_color_hover . '" data-border-color="' . $btn_color_border . '" data-bg="' . $btn_bg_color . '" data-hover-bg="' . $btn_bg_color_hover . '" data-border-hover="' . $btn_color_border_hover . '" data-shadow-hover="' . $shadow_hover . '" data-shadow-click="' . $shadow_click . '" data-shadow="' . $box_shadow . '" data-shd-shadow="' . $btn_shadow_size . '" ' . $data_list . ' style="' . $style . '">';
            if ($icon !== '') {
                $output .= '<span class="ubtn-data ubtn-icon"><i class="' . $icon . '" style="font-size:' . $icon_size . 'px;color:' . $icon_color . ';"></i></span>';
            }
            $output .= '<span class="ubtn-hover" style="background-color:' . $btn_bg_color_hover . '"></span>';
            $output .= '<span class="ubtn-data ubtn-text " >' . $btn_title . '</span>';
            $output .= '</button>';
            $output = $link_prefix . $output . $link_sufix;
            //	Add a wrapper class to handle bottom margin
            $wrapper_class = '';
            switch ($btn_align) {
                case 'ubtn-center':
                    $wrapper_class = 'ubtn-ctn-center';
                    break;
                case 'ubtn-right':
                    $wrapper_class = 'ubtn-ctn-right';
                    break;
                case 'ubtn-left':
                default:
                    $wrapper_class = 'ubtn-ctn-left';
                    break;
            }
            if ($img !== '') {
                $output = '<div class="' . $wrapper_class . ' ' . $main_extra_class . '">' . $output . '</div>';
            } else {
                $output = '<div class="' . $css_btn_design . ' ' . $wrapper_class . ' ' . $main_extra_class . '">' . $output . '</div>';
            }
            if ($img !== '') {
                $html = '<div class="ubtn-img-container ' . $css_btn_design . '">';
                $html .= '<img src="' . $img . '" alt="' . $alt . '"/>';
                $html .= $output;
                $html .= '</div>';
                $output = $html;
            }
            if ($enable_tooltip !== "") {
                $output .= '<script>
					jQuery(function () {
						jQuery(".tooltip-' . $uniqid . '").bsf_tooltip();
					})
				</script>';
            }
            $is_preset = false;
            if (isset($_GET['preset'])) {
                //It will retrieve settings array
                $is_preset = true;
            }
            if ($is_preset) {
                $text = 'array ( ';
                foreach ($atts as $key => $att) {
                    $text .= '<br/>	\'' . $key . '\' => \'' . $att . '\',';
                }
                if ($content != '') {
                    $text .= '<br/>	\'content\' => \'' . $content . '\',';
                }
                $text .= '<br/>)';
                $output .= '<pre>';
                $output .= $text;
                $output .= '</pre>';
                // remove backslash once copied
            }
            return $output;
        }
        function info_circle($atts, $content = null)
        {
            $ultimate_js = get_option('ultimate_js');
            if ($ultimate_js != 'enable') {
                wp_enqueue_script('ultimate-appear');
            }
            wp_enqueue_script('info-circle');
            wp_enqueue_script('info-circle-ui-effect');
            $edge_radius = $visible_circle = $start_degree = $eg_padding = $circle_type = $icon_position = $eg_br_width = $eg_br_style = $eg_border_color = $cn_br_style = $highlight_style = $responsive_breakpoint = '';
            $icon_size = $cn_br_width = $cn_border_color = $icon_diversion = $icon_show = $content_bg = $content_color = $el_class = '';
            $icon_launch = $icon_launch_duration = $icon_launch_delay = $clipped_circle = '';
            $title_font = $title_font_style = $title_font_size = $title_line_height = $desc_font = $desc_font_style = $desc_font_size = $desc_line_height = '';
            extract(shortcode_atts(array('edge_radius' => '80', 'visible_circle' => '70', 'start_degree' => '90', 'circle_type' => '', 'icon_position' => 'full', 'focus_on' => 'hover', 'eg_br_width' => '1', 'eg_br_style' => 'none', 'eg_border_color' => '', 'cn_br_style' => 'none', 'cn_br_width' => '1', 'cn_border_color' => '', 'highlight_style' => 'info-circle-highlight-style', 'icon_size' => '32', 'eg_padding' => '50', 'icon_diversion' => '', 'icon_show' => 'show', 'content_icon_size' => '32', 'content_color' => '', 'content_bg' => '', 'responsive' => 'on', 'responsive_breakpoint' => '800', 'auto_slide' => 'off', 'auto_slide_duration' => '3', 'icon_launch' => '', 'icon_launch_duration' => '1', 'icon_launch_delay' => '0.2', 'el_class' => '', 'title_font' => '', 'title_font_style' => '', 'title_font_size' => '', 'title_line_height' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_font_size' => '', 'desc_line_height' => ''), $atts));
            $uniq = uniqid();
            global $title_style_inline, $desc_style_inline;
            /* ---- main title styles ---- */
            if ($title_font != '') {
                $title_font_family = get_ultimate_font_family($title_font);
                $title_style_inline = 'font-family:\'' . $title_font_family . '\';';
            }
            // main heading font style
            $title_style_inline .= get_ultimate_font_style($title_font_style);
            //attach font size if set
            if ($title_font_size != '') {
                $title_style_inline .= 'font-size:' . $title_font_size . 'px;';
            }
            //line height
            if ($title_line_height != '') {
                $title_style_inline .= 'line-height:' . $title_line_height . 'px;';
            }
            /* ---- description styles ---- */
            if ($desc_font != '') {
                $desc_font_family = get_ultimate_font_family($desc_font);
                $desc_style_inline = 'font-family:\'' . $desc_font_family . '\';';
            }
            // main heading font style
            $desc_style_inline .= get_ultimate_font_style($desc_font_style);
            //attach font size if set
            if ($desc_font_size != '') {
                $desc_style_inline .= 'font-size:' . $desc_font_size . 'px;';
            }
            //line height
            if ($desc_line_height != '') {
                $desc_style_inline .= 'line-height:' . $desc_line_height . 'px;';
            }
            // enqueue fonts
            /*$args = array(
            			$title_font, $desc_font
            		);
            		enquque_ultimate_google_fonts($args);*/
            $style = $style1 = $style3 = $ex_class = '';
            if ($eg_br_style != 'none' && $eg_br_width != '' && $eg_border_color != '') {
                $style .= 'border:' . $eg_br_width . 'px ' . $eg_br_style . ' ' . $eg_border_color . ';';
            }
            if ($cn_br_style != 'none' && $cn_br_width != '' && $cn_border_color != '') {
                $style1 .= 'border:' . $cn_br_width . 'px ' . $cn_br_style . ' ' . $cn_border_color . ';';
            }
            //$style .='border-style:'.$eg_br_style.';';
            $style1 .= 'background-color:' . $content_bg . ';color:' . $content_color . ';';
            $style1 .= 'width:' . $eg_padding . '%;height:' . $eg_padding . '%;margin:' . (100 - $eg_padding) / 2 . '%;';
            if ($el_class != '') {
                $ex_class = $el_class;
            }
            if ($responsive == 'on') {
                $ex_class .= ' info-circle-responsive';
            }
            if ($icon_show == 'show') {
                $content_icon_size = $content_icon_size;
            } else {
                $content_icon_size = '';
            }
            if ($edge_radius != '') {
                $style .= 'width:' . $edge_radius . '%;';
            }
            $style .= 'opacity:0;';
            if ($circle_type == '') {
                $circle_type = 'info-c-full-br';
            }
            if ($icon_position == 'full') {
                $circle_type_extended = 'full-circle';
            } else {
                if ($icon_position == 90) {
                    $circle_type_extended = 'left-circle';
                } elseif ($icon_position == 270) {
                    $circle_type_extended = 'right-circle';
                } elseif ($icon_position == 180) {
                    $circle_type_extended = 'top-circle';
                } elseif ($icon_position == 0) {
                    $circle_type_extended = 'bottom-circle';
                } else {
                    $circle_type_extended = 'full-circle';
                }
            }
            if ($visible_circle != '' && $visible_circle != 100 && $circle_type_extended != 'full-circle') {
                $clipped_circle = 'clipped-info-circle';
            }
            $output = '<div class="info-wrapper"><div id="info-circle-wrapper-' . $uniq . '" data-uniqid="' . $uniq . '" class="info-circle-wrapper ' . $ex_class . ' ' . $clipped_circle . '" data-half-percentage="' . $visible_circle . '" data-circle-type="' . $circle_type_extended . '">';
            $output .= '<div class="' . $circle_type . '" style=\'' . $style . '\' data-start-degree="' . $start_degree . '" data-divert="' . $icon_diversion . '" data-info-circle-angle="' . $icon_position . '" data-responsive-circle="' . $responsive . '" data-responsive-breakpoint="' . $responsive_breakpoint . '" data-launch="' . $icon_launch . '" data-launch-duration="' . $icon_launch_duration . '" data-launch-delay="' . $icon_launch_delay . '" data-slide-true="' . $auto_slide . '" data-slide-duration="' . $auto_slide_duration . '" data-icon-size="' . $icon_size . '" data-icon-show="' . $icon_show . '" data-icon-show-size="' . $content_icon_size . '" data-highlight-style="' . $highlight_style . '" data-focus-on="' . $focus_on . '">';
            $output .= '<div class="icon-circle-list">';
            //$content = str_replace('[info_circle_item', '[info_circle_item  icon_size="'.$icon_size.'"', $content);
            $output .= do_shortcode($content);
            if ($icon_position != 'full') {
                $output .= '<div class="info-circle-icons suffix-remove"></div>';
            }
            $output .= '</div>';
            $output .= '<div class="info-c-full" style="' . $style1 . '"><div class="info-c-full-wrap"></div>';
            $output .= '</div>';
            $output .= '</div>';
            if ($responsive == 'on') {
                $output .= '<div class="smile_icon_list_wrap " data-content_bg="' . $content_bg . '" data-content_color="' . $content_color . '">
							<ul class="smile_icon_list left circle with_bg">
								<li class="icon_list_item" style="font-size:' . $icon_size * 3 . 'px;">
									<div class="icon_list_icon" style="font-size:' . $icon_size . 'px;">
										<i class="smt-pencil"></i>
									</div>
									<div class="icon_description">
										<h3></h3>
										<p></p>
									</div>
									<div class="icon_list_connector" style="border-style:' . $eg_br_style . ';border-color:' . $eg_border_color . '">
									</div>
								</li>
							</ul>
						</div>';
            }
            $output .= '</div></div>';
            return $output;
        }
        function ult_buttons_shortcode($atts)
        {
            $output = $btn_title = $btn_link = $btn_size = $btn_width = $btn_height = $btn_hover = $btn_bg_color = $btn_radius = $btn_shadow = '';
            $btn_shadow_color = $btn_bg_color_hover = $btn_border_style = $btn_color_border = $btn_border_size = $btn_shadow_size = $el_class = '';
            $btn_font_family = $btn_font_style = $btn_title_color = $btn_font_size = $icon = $icon_size = $icon_color = $btn_icon_pos = $btn_anim_effect = '';
            $btn_padding_left = $btn_padding_top = $button_bg_img = $btn_title_color_hover = $btn_align = $btn_color_border_hover = $btn_shadow_color_hover = '';
            $btn_shadow_click = $enable_tooltip = $tooltip_text = $tooltip_pos = '';
            extract(shortcode_atts(array('btn_title' => '', 'btn_link' => '', 'btn_size' => '', 'btn_width' => '', 'btn_height' => '', 'btn_padding_left' => '', 'btn_padding_top' => '', 'btn_hover' => '', 'btn_bg_color' => '', 'btn_radius' => '', 'btn_shadow' => '', 'btn_shadow_color' => '', 'btn_shadow_size' => '', 'btn_bg_color_hover' => '', 'btn_title_color_hover' => '', 'btn_border_style' => '', 'btn_color_border' => '', 'btn_color_border_hover' => '', 'btn_border_size' => '', 'btn_font_family' => '', 'btn_font_style' => '', 'btn_title_color' => '', 'btn_font_size' => '', 'icon' => '', 'icon_size' => '', 'icon_color' => '', 'btn_icon_pos' => '', 'btn_anim_effect' => '', 'button_bg_img' => '', 'btn_align' => '', 'btn_shadow_color_hover' => '', 'btn_shadow_click' => '', 'enable_tooltip' => '', 'tooltip_text' => '', 'tooltip_pos' => '', 'el_class' => ''), $atts));
            $style = $hover_style = $btn_style_inline = $link_sufix = $link_prefix = $img = $shadow_hover = $shadow_click = $shadow_color = $box_shadow = '';
            $tooltip = $tooltip_class = '';
            $el_class .= ' ' . $btn_anim_effect . ' ';
            $uniqid = uniqid();
            $tooltip_class = 'tooltip-' . $uniqid;
            if ($enable_tooltip == "yes") {
                wp_enqueue_script('aio-tooltip', plugins_url('../assets/min-js/', __FILE__) . 'tooltip.min.js', array('jquery'));
                wp_enqueue_style('aio-tooltip', plugins_url('../assets/min-css/', __FILE__) . 'tooltip.min.css');
                $tooltip .= 'data-toggle="tooltip" data-placement="' . $tooltip_pos . '" title="' . $tooltip_text . '"';
                $tooltip_class .= " ubtn-tooltip " . $tooltip_pos;
            }
            if ($btn_shadow_click !== "enable") {
                $shadow_click = 'none';
            }
            if ($btn_shadow_color_hover == "") {
                $shadow_color = $btn_shadow_color;
            } else {
                $shadow_color = $btn_shadow_color_hover;
            }
            if ($button_bg_img !== '') {
                $img = wp_get_attachment_image_src($button_bg_img, 'large');
                $img = $img[0];
            }
            if ($btn_link !== '') {
                $href = vc_build_link($btn_link);
                if ($href['url'] !== "") {
                    $target = isset($href['target']) ? "target='" . $href['target'] . "'" : '';
                    if ($btn_size == "ubtn-block") {
                        $tooltip_class .= ' ubtn-block';
                    }
                    $link_prefix .= '<a class="ubtn-link ' . $btn_align . ' ' . $tooltip_class . '" ' . $tooltip . ' href = "' . $href['url'] . '" ' . $target . '>';
                    $link_sufix .= '</a>';
                }
            } else {
                if ($enable_tooltip !== "") {
                    $link_prefix .= '<span class="' . $btn_align . ' ' . $tooltip_class . '" ' . $tooltip . '>';
                    $link_sufix .= '</span>';
                }
            }
            if ($btn_icon_pos !== '' && $icon !== 'none' && $icon !== '') {
                $el_class .= ' ubtn-sep-icon ' . $btn_icon_pos . ' ';
            }
            if ($btn_font_family != '') {
                $mhfont_family = get_ultimate_font_family($btn_font_family);
                $btn_style_inline .= 'font-family:\'' . $mhfont_family . '\';';
                //enqueue google font
                $args = array($mhfont_family);
                enquque_ultimate_google_fonts($args);
            }
            $btn_style_inline .= get_ultimate_font_style($btn_font_style);
            if ($btn_font_size !== '') {
                $btn_style_inline .= 'font-size:' . $btn_font_size . 'px;';
            }
            $style .= $btn_style_inline;
            if ($btn_size == 'ubtn-custom') {
                $style .= 'width:' . $btn_width . 'px;';
                $style .= 'min-height:' . $btn_height . 'px;';
                $style .= 'padding:' . $btn_padding_top . 'px ' . $btn_padding_left . 'px;';
            }
            if ($btn_border_style !== '') {
                $style .= 'border-radius:' . $btn_radius . 'px;';
                $style .= 'border-width:' . $btn_border_size . 'px;';
                $style .= 'border-color:' . $btn_color_border . ';';
                $style .= 'border-style:' . $btn_border_style . ';';
            } else {
                $style .= 'border:none;';
            }
            if ($btn_shadow !== '') {
                switch ($btn_shadow) {
                    case 'shd-top':
                        $style .= 'box-shadow: 0 -' . $btn_shadow_size . 'px ' . $btn_shadow_color . ';';
                        // $style .= 'bottom: '.($btn_shadow_size-3).'px;';
                        $box_shadow .= '0 -' . $btn_shadow_size . 'px ' . $btn_shadow_color . ';';
                        if ($shadow_click !== "none") {
                            $shadow_hover .= '0 -3px ' . $shadow_color . ';';
                        } else {
                            $shadow_hover .= '0 -' . $btn_shadow_size . 'px ' . $shadow_color . ';';
                        }
                        break;
                    case 'shd-bottom':
                        $style .= 'box-shadow: 0 ' . $btn_shadow_size . 'px ' . $btn_shadow_color . ';';
                        // $style .= 'top: '.($btn_shadow_size-3).'px;';
                        $box_shadow .= '0 ' . $btn_shadow_size . 'px ' . $btn_shadow_color . ';';
                        if ($shadow_click !== "none") {
                            $shadow_hover .= '0 3px ' . $shadow_color . ';';
                        } else {
                            $shadow_hover .= '0 ' . $btn_shadow_size . 'px ' . $shadow_color . ';';
                        }
                        break;
                    case 'shd-left':
                        $style .= 'box-shadow: -' . $btn_shadow_size . 'px 0 ' . $btn_shadow_color . ';';
                        // $style .= 'right: '.($btn_shadow_size-3).'px;';
                        $box_shadow .= '-' . $btn_shadow_size . 'px 0 ' . $btn_shadow_color . ';';
                        if ($shadow_click !== "none") {
                            $shadow_hover .= '-3px 0 ' . $shadow_color . ';';
                        } else {
                            $shadow_hover .= '-' . $btn_shadow_size . 'px 0 ' . $shadow_color . ';';
                        }
                        break;
                    case 'shd-right':
                        $style .= 'box-shadow: ' . $btn_shadow_size . 'px 0 ' . $btn_shadow_color . ';';
                        // $style .= 'left: '.($btn_shadow_size-3).'px;';
                        $box_shadow .= $btn_shadow_size . 'px 0 ' . $btn_shadow_color . ';';
                        if ($shadow_click !== "none") {
                            $shadow_hover .= '3px 0 ' . $shadow_color . ';';
                        } else {
                            $shadow_hover .= $btn_shadow_size . 'px 0 ' . $shadow_color . ';';
                        }
                        break;
                }
            }
            if ($btn_bg_color !== '') {
                $style .= 'background: ' . $btn_bg_color . ';';
            }
            if ($btn_title_color !== '') {
                $style .= 'color: ' . $btn_title_color . ';';
            }
            if ($btn_shadow) {
                $el_class .= ' ubtn-shd ';
            }
            if ($btn_align) {
                $el_class .= ' ' . $btn_align . ' ';
            }
            if ($btn_title == "" && $icon !== "") {
                $el_class .= ' ubtn-only-icon ';
            }
            $output .= '<button type="button" class="ubtn ' . $btn_size . ' ' . $btn_hover . ' ' . $el_class . ' ' . $btn_shadow . '" data-hover="' . $btn_title_color_hover . '" data-border-color="' . $btn_color_border . '" data-hover-bg="' . $btn_bg_color_hover . '" data-border-hover="' . $btn_color_border_hover . '" data-shadow-hover="' . $shadow_hover . '" data-shadow-click="' . $shadow_click . '" data-shadow="' . $box_shadow . '" data-shd-shadow="' . $btn_shadow_size . '" style="' . $style . '">';
            if ($icon !== '') {
                $output .= '<span class="ubtn-data ubtn-icon"><i class="' . $icon . '" style="font-size:' . $icon_size . 'px;color:' . $icon_color . ';"></i></span>';
            }
            $output .= '<span class="ubtn-hover"></span>';
            $output .= '<span class="ubtn-data ubtn-text">' . $btn_title . '</span>';
            $output .= '</button>';
            $output = $link_prefix . $output . $link_sufix;
            if ($btn_align == "ubtn-center") {
                $output = '<div class="ubtn-ctn-center">' . $output . '</div>';
            }
            if ($img !== '') {
                $html = '<div class="ubtn-img-container">';
                $html .= '<img src="' . $img . '"/>';
                $html .= $output;
                $html .= '</div>';
                $output = $html;
            }
            if ($enable_tooltip !== "") {
                $output .= '<script>
					jQuery(function () {
						jQuery(".tooltip-' . $uniqid . '").bsf_tooltip();
					})
				</script>';
            }
            return $output;
        }
        function swatch_container($atts, $content = null)
        {
            $swatch_style = $swatch_index_center = $swatch_space_degree = $swatch_trans_speed = $swatch_distance_sibling = $swatch_init_closed = $swatch_open_at = $swatch_width = $swatch_height = $swatch_trans_bg_img = $swatch_main_strip_text = $swatch_main_strip_highlight_text = $swatch_main_strip_font_size = $swatch_main_strip_font_style = $swatch_main_strip_color = $swatch_main_strip_highlight_font_size = $swatch_main_strip_highlight_font_weight = $swatch_main_strip_highlight_color = $swatch_main_strip_bg_color = $main_strip_font_family = $main_strip_font_style = '';
            extract(shortcode_atts(array('swatch_style' => 'style-1', 'swatch_index_center' => '1', 'swatch_space_degree' => '1', 'swatch_trans_speed' => '500', 'swatch_distance_sibling' => '1', 'swatch_init_closed' => 'on', 'swatch_open_at' => '1', 'swatch_width' => '130', 'swatch_height' => '400', 'swatch_trans_bg_img' => '', 'swatch_main_strip_text' => '', 'swatch_main_strip_highlight_text' => '', 'swatch_main_strip_font_size' => '16', 'swatch_main_strip_font_style' => 'normal', 'swatch_main_strip_color' => '', 'swatch_main_strip_highlight_font_size' => '16', 'swatch_main_strip_highlight_font_weight' => 'normal', 'swatch_main_strip_highlight_color' => '', 'swatch_main_strip_bg_color' => '', 'main_strip_font_family' => '', 'main_strip_font_style' => ''), $atts));
            $output = $img = $style = $highlight_style = $main_style = '';
            $uid = uniqid();
            if ($swatch_trans_bg_img !== '') {
                // $img = wp_get_attachment_image_src( $swatch_trans_bg_img, 'large');
                // $img = $img[0];
                $img = apply_filters('ult_get_img_single', $swatch_trans_bg_img, 'url');
                $this->swatch_trans_bg_img = $swatch_trans_bg_img;
                $style .= 'background-image: url(' . $img . ');';
            }
            if ($swatch_width !== '') {
                $style .= 'width:' . $swatch_width . 'px;';
                $this->swatch_width = $swatch_width;
            }
            if ($swatch_height !== '') {
                $style .= 'height:' . $swatch_height . 'px;';
                $this->swatch_height = $swatch_height;
            }
            if ($swatch_main_strip_highlight_font_size !== '') {
                $highlight_style .= 'font-size:' . $swatch_main_strip_highlight_font_size . 'px;';
            }
            if ($swatch_main_strip_highlight_font_weight !== '') {
                $highlight_style .= 'font-weight:' . $swatch_main_strip_highlight_font_weight . ';';
            }
            if ($swatch_main_strip_highlight_color !== '') {
                $highlight_style .= 'color:' . $swatch_main_strip_highlight_color . ';';
            }
            if ($main_strip_font_family != '') {
                $mhfont_family = get_ultimate_font_family($main_strip_font_family);
                $main_style .= 'font-family:\'' . $mhfont_family . '\';';
            }
            $main_style .= get_ultimate_font_style($main_strip_font_style);
            if ($swatch_main_strip_font_size !== '') {
                $main_style .= 'font-size:' . $swatch_main_strip_font_size . 'px;';
            }
            if ($swatch_main_strip_font_style !== '') {
                $main_style .= 'font-weight:' . $swatch_main_strip_font_style . ';';
            }
            if ($swatch_main_strip_color !== '') {
                $main_style .= 'color:' . $swatch_main_strip_color . ';';
            }
            if ($swatch_main_strip_bg_color !== '') {
                $main_style .= 'background:' . $swatch_main_strip_bg_color . ';';
            }
            $output .= '<div id="ulsb-container-' . $uid . '" class="ulsb-container ulsb-' . $swatch_style . '" style="width:' . $swatch_width . 'px; height:' . $swatch_height . 'px;">';
            $output .= do_shortcode($content);
            $output .= '<div class="ulsb-strip highlight-strip" style="' . $style . '">';
            $output .= '<h4 class="strip_main_text" style="' . $main_style . '"><span>' . $swatch_main_strip_text . '</span></h4>';
            $output .= '<h5 class="strip_highlight_text" style="' . $highlight_style . '"><span>' . $swatch_main_strip_highlight_text . '</span></h5>';
            $output .= '</div>';
            $output .= '</div>';
            $output .= '<script type="text/javascript">
						jQuery(function() {';
            if ($swatch_style == 'style-1') {
                $output .= 'jQuery( "#ulsb-container-' . $uid . '" ).swatchbook();';
            }
            if ($swatch_style == 'style-2') {
                $output .= 'jQuery( "#ulsb-container-' . $uid . '" ).swatchbook( {
									angleInc : -10,
									proximity : -45,
									neighbor : -4,
									closeIdx : 11
								} );';
            }
            if ($swatch_style == 'style-3') {
                $output .= 'jQuery( "#ulsb-container-' . $uid . '" ).swatchbook( {
									angleInc : 15,
									neighbor : 15,
									initclosed : true,
									closeIdx : 11
								} );';
            }
            if ($swatch_style == 'style-4') {
                $output .= 'jQuery( "#ulsb-container-' . $uid . '" ).swatchbook( {
									speed : 500,
									easing : "ease-out",
									center : 7,
									angleInc : 14,
									proximity : 40,
									neighbor : 2
								} );';
            }
            if ($swatch_style == 'style-5') {
                $output .= 'jQuery( "#ulsb-container-' . $uid . '" ).swatchbook( {	openAt : 0	} );';
            }
            if ($swatch_style == 'custom') {
                $swatch_options = '';
                if ($swatch_trans_speed !== '') {
                    $swatch_options .= 'speed : ' . $swatch_trans_speed . ',';
                }
                if ($swatch_index_center !== '') {
                    $swatch_options .= 'center : ' . $swatch_index_center . ',';
                }
                if ($swatch_space_degree !== '') {
                    $swatch_options .= 'angleInc : ' . $swatch_space_degree . ',';
                }
                if ($swatch_distance_sibling !== '') {
                    $swatch_options .= 'neighbor : ' . $swatch_distance_sibling . ',';
                }
                if ($swatch_open_at !== '') {
                    $swatch_options .= 'openAt : ' . $swatch_open_at . ',';
                }
                if ($swatch_init_closed === 'on') {
                    $swatch_init_closed = 'true';
                } else {
                    $swatch_init_closed = 'false';
                }
                $swatch_options .= 'closeIdx : ' . $swatch_init_closed . ',';
                $output .= 'jQuery( "#ulsb-container-' . $uid . '" ).swatchbook( {
									' . $swatch_options . '
									easing : "ease-out",
									proximity : 40,
								} );';
            }
            $output .= '});';
            $output .= 'jQuery(document).ready(function(e) {
						var ult_strip = jQuery(".highlight-strip");
						ult_strip.each(function(index, element) {
							var strip_main_text = jQuery(this).children(".strip_main_text").outerHeight();
							var height = ' . $swatch_height . '-strip_main_text;
							jQuery(this).children(".strip_highlight_text").css("height",height);
						});
					});';
            $output .= '</script>';
            return $output;
        }
示例#29
0
 function ult_team_shortcode($atts, $content)
 {
     $image = $name = $pos_in_org = $text_align = '';
     $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_tag = '';
     $team_member_name_color = '';
     $team_member_org_color = '';
     $team_member_desc_color = $team_img_bg_color = $team_img_opacity = $team_img_grayscale = $team_img_hover_opacity = $team_img_hover_opacity_style3 = $img_hover_eft = $img_hover_color = $img_border_style = $img_border_width = $img_border_color = $img_border_radius = $staff_link = $link_switch = '';
     /* Declaration for style-1 for team */
     $team_member_style = $divider_effect = $team_member_divider_color = $team_member_divider_width = $team_member_divider_height = $social_links = $selected_team_icon = $social_icon_url = $social_link_title = $social_icon_color = $social_icon_hover_color = $team_member_bg_color = $team_member_align_style = $social_icon_size = $social_icon_space = $social_icon_effect = $custom_team_class = '';
     $title_box_padding = $title_box_margin = $team_css = $team_member_responsive_enable = $team_responsive_width = '';
     /* Declaration closed for style-1 for team */
     extract(shortcode_atts(array("image" => "", "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" => "", "team_member_style" => "", "divider_effect" => "", "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_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 '<div class="ult-team-member-wrap ult-style-3 ' . $custom_team_class . ' ' . $team_css . '">';
         if ($link_switch == 'on') {
             echo '<a href="' . $url . '" target="' . $target . '">';
         }
         echo '<div class="ult-team-member-image ' . $id . '" style="' . esc_attr($team_image_style) . '; background-color:' . $team_img_bg_color . '" data-hover_opacity="' . $team_img_hover_opacity_style3 . '" > <img class="' . $team_img_grayscale_cls . '" src="' . apply_filters('ultimate_images', esc_url($img)) . '" alt="' . $alt . '" >';
         echo '<span class="ult-team-member-image-overlay ' . esc_attr($img_hver_class) . '" ' . $img_hver_data . ' ></span>';
         if ($content) {
             echo '<div class="ult-team-member-description ult-responsive" ' . $team_member_desc_responsive . ' style="' . $team_member_description_font_styling . '; text-align:' . $team_member_align_style . ';' . $title_box_style . '; "><p>' . do_shortcode($content) . '</p></div>';
         }
         if ($link_switch == 'on') {
             echo '</a>';
         }
         echo '</div>';
         //ult-team-member-image
         echo '<div class="ult-team-member-bio-wrap ' . $team_member_style . ' ' . $id . '" style="text-align:' . $team_member_align_style . ';' . $title_box_style . '; ">';
         echo '<div class="ult-team-member-name-wrap">';
         if ($link_switch == 'on') {
             echo '<a href="' . $url . '" target="' . $target . '" style="text-decoration: none;">';
         }
         echo '<' . $team_member_name_tag . ' class="ult-team-member-name ult-responsive" ' . $team_member_name_responsive . ' style="' . $team_member_name_font_styling . '">' . $name . '</' . $team_member_name_tag . '>';
         if ($link_switch == 'on') {
             echo '</a>';
         }
         if ($pos_in_org) {
             echo '<div class="ult-team-member-position ult-responsive" ' . $team_member_position_responsive . ' style="' . $team_member_position_font_styling . '">' . $pos_in_org . '</div>';
         }
         echo '<div style="margin-bottom:15px">';
         if ($divider_effect == 'on') {
             $divider_margin = '';
             if ($team_member_align_style != 'center') {
                 $divider_margin = "margin-" . $team_member_align_style . ":0px";
             }
             echo '<hr align="' . $team_member_align_style . '" class="ult-team-divider" style="padding-top: ' . $team_member_divider_height . 'px; width: ' . $team_member_divider_width . '%; background-color: ' . $team_member_divider_color . '; ' . $divider_margin . '" />';
         }
         echo '</div>';
         $social_icons = json_decode(urldecode($social_links));
         if (count($social_icons) > 0 && $social_icon_effect == 'on') {
             $icon_styling = 'font-size:' . $social_icon_size . ' ; margin-left:' . $social_icon_space . ';margin-right:' . $social_icon_space . ';';
             echo "<div class='ult-social-buttons'>";
             foreach ($social_icons as $social_link) {
                 if (isset($social_link->selected_team_icon) && $social_link->selected_team_icon !== '') {
                     $social_icon_url = isset($social_link->social_icon_url) && $social_link->social_icon_url !== '' ? $social_link->social_icon_url : '#';
                     $social_link_title = isset($social_link->social_link_title) && $social_link->social_link_title !== '' ? $social_link->social_link_title : '';
                     $social_icon_color = isset($social_link->social_icon_color) && $social_link->social_icon_color !== '' ? $social_link->social_icon_color : 'inherit';
                     $default_icon_color = $social_icon_color != 'inherit' ? 'color:' . $social_icon_color . ';' : '';
                     $social_icon_hover_color = isset($social_link->social_icon_hover_color) && $social_link->social_icon_hover_color !== '' ? $social_link->social_icon_hover_color : 'inherit';
                     echo "<a href='" . $social_icon_url . "' target='_blank' title='" . $social_link_title . "' class='ult-team ult-social-icon' style='" . $icon_styling . ";" . $default_icon_color . "'  data-iconcolor='" . $social_icon_color . "' data-iconhover='" . $social_icon_hover_color . "' ><i class='" . $social_link->selected_team_icon . "'></i></a>";
                 }
             }
             echo "</div>";
         }
         echo '</div>';
         //ult-team-member-name-wrap
         echo '</div>';
         //ult-team-member-bio-wrap
         echo '</div>';
         //ult-team-member-wrap
     } elseif ($team_member_style == 'style-2') {
         echo '<div class="ult-team-member-wrap ult-style-2 ' . $custom_team_class . ' ' . $team_css . '" data-responsive_width="' . $team_responsive_width . '" style="background-color:' . $team_img_bg_color . '">';
         if ($link_switch == 'on') {
             echo '<a href="' . $url . '" target="' . $target . '" style="text-decoration: none;">';
         }
         echo '<div class="ult-team-member-image" style="' . esc_attr($team_image_style) . '" data-opacity="' . $team_img_opacity . '" data-hover_opacity="' . $team_img_hover_opacity . '" > <img src="' . apply_filters('ultimate_images', esc_url($img)) . '" alt="' . $alt . '"  style="opacity:' . $team_img_opacity . '">';
         echo '</div>';
         //ult-team-member-image
         echo '<div class="ult-team-member-bio-wrap ' . $id . '">';
         echo '<div class="ult-team-member-name-wrap"  style="text-align:' . $team_member_align_style . ';' . $title_box_style . ' ">';
         echo '<' . $team_member_name_tag . ' class="ult-team-member-name ult-responsive" ' . $team_member_name_responsive . ' style="' . $team_member_name_font_styling . '">' . $name . '</' . $team_member_name_tag . '>';
         if ($pos_in_org) {
             echo '<div class="ult-team-member-position ult-responsive" ' . $team_member_position_responsive . ' style="' . $team_member_position_font_styling . '">' . $pos_in_org . '</div>';
         }
         echo '</div>';
         //ult-team-member-name-wrap
         echo '<div class="ult-team_description_slide"  style="text-align:' . $team_member_align_style . ';' . $title_box_style . ' ">';
         if ($content) {
             echo '<div class="ult-team-member-description ult-responsive" ' . $team_member_desc_responsive . ' style="' . $team_member_description_font_styling . '"><p>' . do_shortcode($content) . '</p></div>';
         }
         echo '<div style="margin-bottom:15px">';
         if ($divider_effect == 'on') {
             $divider_margin = '';
             if ($team_member_align_style != 'center') {
                 $divider_margin = "margin-" . $team_member_align_style . ":0px";
             }
             echo '<hr align="' . $team_member_align_style . '" class="ult-team-divider" style="padding-top: ' . $team_member_divider_height . 'px; width: ' . $team_member_divider_width . '%; background-color: ' . $team_member_divider_color . '; ' . $divider_margin . '" />';
         }
         echo '</div>';
         $social_icons = json_decode(urldecode($social_links));
         if (count($social_icons) > 0 && $social_icon_effect == 'on') {
             $icon_styling = ' font-size:' . $social_icon_size . ' ; margin-left:' . $social_icon_space . ';margin-right:' . $social_icon_space . ';';
             echo "<div class='ult-social-buttons'>";
             foreach ($social_icons as $social_link) {
                 if (isset($social_link->selected_team_icon) && $social_link->selected_team_icon !== '') {
                     $social_icon_url = isset($social_link->social_icon_url) && $social_link->social_icon_url !== '' ? $social_link->social_icon_url : '#';
                     $social_link_title = isset($social_link->social_link_title) && $social_link->social_link_title !== '' ? $social_link->social_link_title : '';
                     $social_icon_color = isset($social_link->social_icon_color) && $social_link->social_icon_color !== '' ? $social_link->social_icon_color : 'inherit';
                     $default_icon_color = $social_icon_color != 'inherit' ? 'color:' . $social_icon_color . ';' : '';
                     $social_icon_hover_color = isset($social_link->social_icon_hover_color) && $social_link->social_icon_hover_color !== '' ? $social_link->social_icon_hover_color : 'inherit';
                     echo "<a href='" . $social_icon_url . "' target='_blank' title='" . $social_link_title . "' class='ult-team ult-social-icon' style='" . $icon_styling . "; " . $default_icon_color . "'  data-iconcolor='" . $social_icon_color . "' data-iconhover='" . $social_icon_hover_color . "' ><i class='" . $social_link->selected_team_icon . "'></i></a>";
                 }
             }
             echo "</div>";
         }
         echo '</div>';
         //Description Slide
         echo '</div>';
         //ult-team-member-bio-wrap
         if ($link_switch == 'on') {
             echo '</a>';
         }
         echo '</div>';
         //ult-team-member-wrap
     } elseif ($team_member_style == 'style-1') {
         echo '<div class="ult-team-member-wrap ult-style-1 ' . $custom_team_class . ' ' . $team_css . '">';
         if ($link_switch == 'on') {
             echo '<a href="' . $url . '" target="' . $target . '">';
         }
         echo '<div class="ult-team-member-image" style="' . esc_attr($team_image_style) . '"> <img class="' . $team_img_grayscale_cls . '" src="' . apply_filters('ultimate_images', esc_url($img)) . '" alt="' . $alt . '"  style="">';
         echo '<span class="ult-team-member-image-overlay ' . esc_attr($img_hver_class) . '" ' . $img_hver_data . ' ></span>';
         if ($link_switch == 'on') {
             echo '</a>';
         }
         echo '</div>';
         //ult-team-member-image
         echo '<div class="ult-team-member-bio-wrap ' . $team_member_style . ' ' . $id . '" style="text-align:' . $team_member_align_style . ';' . $title_box_style . '; ">';
         echo '<div class="ult-team-member-name-wrap">';
         if ($link_switch == 'on') {
             echo '<a href="' . $url . '" target="' . $target . '" style="text-decoration: none;">';
         }
         echo '<' . $team_member_name_tag . ' class="ult-team-member-name ult-responsive" ' . $team_member_name_responsive . ' style="' . $team_member_name_font_styling . '">' . $name . '</' . $team_member_name_tag . '>';
         if ($link_switch == 'on') {
             echo '</a>';
         }
         if ($pos_in_org) {
             echo '<div class="ult-team-member-position ult-responsive" ' . $team_member_position_responsive . ' style="' . $team_member_position_font_styling . '">' . $pos_in_org . '</div>';
         }
         if ($content) {
             echo '<div class="ult-team-member-description ult-responsive" ' . $team_member_desc_responsive . ' style="' . $team_member_description_font_styling . '"><p>' . do_shortcode($content) . '</p></div>';
         }
         echo '<div style="margin-bottom:15px">';
         if ($divider_effect == 'on') {
             $divider_margin = '';
             if ($team_member_align_style != 'center') {
                 $divider_margin = "margin-" . $team_member_align_style . ":0px";
             }
             echo '<hr align="' . $team_member_align_style . '" class="ult-team-divider" style="padding-top: ' . $team_member_divider_height . 'px; width: ' . $team_member_divider_width . '%; background-color: ' . $team_member_divider_color . '; ' . $divider_margin . '" />';
         }
         echo '</div>';
         $social_icons = json_decode(urldecode($social_links));
         if (count($social_icons) > 0 && $social_icon_effect == 'on') {
             $icon_styling = 'font-size:' . $social_icon_size . ' ; margin-left:' . $social_icon_space . ';margin-right:' . $social_icon_space . ';';
             echo "<div class='ult-social-buttons'>";
             foreach ($social_icons as $social_link) {
                 if (isset($social_link->selected_team_icon) && $social_link->selected_team_icon !== '') {
                     $social_icon_url = isset($social_link->social_icon_url) && $social_link->social_icon_url !== '' ? $social_link->social_icon_url : '#';
                     $social_link_title = isset($social_link->social_link_title) && $social_link->social_link_title !== '' ? $social_link->social_link_title : '';
                     $social_icon_color = isset($social_link->social_icon_color) && $social_link->social_icon_color !== '' ? $social_link->social_icon_color : 'inherit';
                     $default_icon_color = $social_icon_color != 'inherit' ? 'color:' . $social_icon_color . ';' : '';
                     $social_icon_hover_color = isset($social_link->social_icon_hover_color) && $social_link->social_icon_hover_color !== '' ? $social_link->social_icon_hover_color : 'inherit';
                     echo "<a href='" . $social_icon_url . "' target='_blank' title='" . $social_link_title . "' class='ult-team ult-social-icon' style='" . $icon_styling . ";" . $default_icon_color . "'  data-iconcolor='" . $social_icon_color . "' data-iconhover='" . $social_icon_hover_color . "' ><i class='" . $social_link->selected_team_icon . "'></i></a>";
                 }
             }
             echo "</div>";
         }
         echo '</div>';
         //ult-team-member-name-wrap
         echo '</div>';
         //ult-team-member-bio-wrap
         echo '</div>';
         //ult-team-member-wrap
     }
     $is_preset = false;
     //Display settings for Preset
     $output = '';
     if (isset($_GET['preset'])) {
         $is_preset = true;
     }
     if ($is_preset) {
         $text = 'array ( ';
         foreach ($atts as $key => $att) {
             $text .= '<br/>	\'' . $key . '\' => \'' . $att . '\',';
         }
         if ($content != '') {
             $text .= '<br/>	\'content\' => \'' . $content . '\',';
         }
         $text .= '<br/>)';
         $output = '<pre>';
         $output .= $text;
         $output .= '</pre>';
     }
     echo $output;
     return ob_get_clean();
 }
        public static function generate_design($atts, $content = null)
        {
            $package_heading = $package_sub_heading = $package_price = $package_unit = $package_btn_text = $package_link = $package_featured = $color_bg_main = $color_txt_main = $color_bg_highlight = $color_txt_highlight = $color_scheme = $el_class = '';
            extract(shortcode_atts(array("color_scheme" => "", "package_heading" => "", "package_sub_heading" => "", "package_price" => "", "package_unit" => "", "package_btn_text" => "", "package_link" => "", "package_featured" => "", "color_bg_main" => "", "color_txt_main" => "", "color_bg_highlight" => "", "color_txt_highlight" => "", "package_name_font_family" => "", "package_name_font_style" => "", "package_name_font_size" => "", "package_name_font_color" => "", "package_name_line_height" => "", "subheading_font_family" => "", "subheading_font_style" => "", "subheading_font_size" => "", "subheading_font_color" => "", "subheading_line_height" => "", "price_font_family" => "", "price_font_style" => "", "price_font_size" => "", "price_font_color" => "", "price_line_height" => "", "price_unit_font_family" => "", "price_unit_font_style" => "", "price_unit_font_size" => "", "price_unit_font_color" => "", "price_unit_line_height" => "", "features_font_family" => "", "features_font_style" => "", "features_font_size" => "", "features_font_color" => "", "features_line_height" => "", "button_font_family" => "", "button_font_style" => "", "button_font_size" => "", "button_font_color" => "", "button_line_height" => "", "el_class" => ""), $atts));
            $output = $link = $target = $featured = $featured_style = $normal_style = $dynamic_style = '';
            if ($color_scheme == "custom") {
                if ($color_bg_main !== "") {
                    $normal_style .= 'background:' . $color_bg_main . ';';
                }
                if ($color_txt_main !== "") {
                    $normal_style .= 'color:' . $color_txt_main . ';';
                }
                if ($color_bg_highlight !== "") {
                    $featured_style .= 'background:' . $color_bg_highlight . ';';
                }
                if ($color_txt_highlight !== "") {
                    $featured_style .= 'color:' . $color_txt_highlight . ';';
                }
            }
            if ($package_link !== "") {
                $link = vc_build_link($package_link);
                if (isset($link['target'])) {
                    $target = 'target="' . $link['target'] . '"';
                } else {
                    $target = '';
                }
                $link = $link['url'];
            } else {
                $link = "#";
            }
            if ($package_featured !== "") {
                $featured = "ult_featured";
                $dynamic_style = $featured_style;
            } else {
                $dynamic_style = $normal_style;
            }
            /* Typography */
            $package_name_inline = $sub_heading_inline = $price_inline = $price_unit_inline = $features_inline = $button_inline = '';
            // package name/title
            if ($package_name_font_family != '') {
                $pkgfont_family = get_ultimate_font_family($package_name_font_family);
                $package_name_inline .= 'font-family:\'' . $pkgfont_family . '\';';
            }
            $package_name_inline .= get_ultimate_font_style($package_name_font_style);
            if ($package_name_font_size != '') {
                $package_name_inline .= 'font-size:' . $package_name_font_size . 'px;';
            }
            if ($package_name_font_color != '') {
                $package_name_inline .= 'color:' . $package_name_font_color . ';';
            }
            if ($package_name_line_height != '') {
                $package_name_inline .= 'line-height:' . $package_name_line_height . 'px;';
            }
            // sub heading
            if ($subheading_font_family != '') {
                $shfont_family = get_ultimate_font_family($subheading_font_family);
                $sub_heading_inline .= 'font-family:\'' . $shfont_family . '\';';
            }
            $sub_heading_inline .= get_ultimate_font_style($subheading_font_style);
            if ($subheading_font_size != '') {
                $sub_heading_inline .= 'font-size:' . $subheading_font_size . 'px;';
            }
            if ($subheading_font_color != '') {
                $sub_heading_inline .= 'color:' . $subheading_font_color . ';';
            }
            if ($subheading_line_height != '') {
                $sub_heading_inline .= 'line-height:' . $subheading_line_height . 'px;';
            }
            // price
            if ($price_font_family != '') {
                $pricefont_family = get_ultimate_font_family($price_font_family);
                $price_inline .= 'font-family:\'' . $pricefont_family . '\';';
            }
            $price_inline .= get_ultimate_font_style($price_font_style);
            if ($price_font_size != '') {
                $price_inline .= 'font-size:' . $price_font_size . 'px;';
            }
            if ($price_font_color != '') {
                $price_inline .= 'color:' . $price_font_color . ';';
            }
            if ($price_line_height != '') {
                $price_inline .= 'line-height:' . $price_line_height . 'px;';
            }
            // price unit
            if ($price_unit_font_family != '') {
                $price_unitfont_family = get_ultimate_font_family($price_unit_font_family);
                $price_unit_inline .= 'font-family:\'' . $price_unitfont_family . '\';';
            }
            $price_unit_inline .= get_ultimate_font_style($price_unit_font_style);
            if ($price_unit_font_size != '') {
                $price_unit_inline .= 'font-size:' . $price_unit_font_size . 'px;';
            }
            if ($price_unit_font_color != '') {
                $price_unit_inline .= 'color:' . $price_unit_font_color . ';';
            }
            if ($price_unit_line_height != '') {
                $price_unit_inline .= 'line-height:' . $price_unit_line_height . 'px;';
            }
            // features
            if ($features_font_family != '') {
                $featuresfont_family = get_ultimate_font_family($features_font_family);
                $features_inline .= 'font-family:\'' . $featuresfont_family . '\';';
            }
            $features_inline .= get_ultimate_font_style($features_font_style);
            if ($features_font_size != '') {
                $features_inline .= 'font-size:' . $features_font_size . 'px;';
            }
            if ($features_font_color != '') {
                $features_inline .= 'color:' . $features_font_color . ';';
            }
            if ($features_line_height != '') {
                $features_inline .= 'line-height:' . $features_line_height . 'px;';
            }
            // button
            if ($button_font_family != '') {
                $buttonfont_family = get_ultimate_font_family($button_font_family);
                $button_inline .= 'font-family:\'' . $buttonfont_family . '\';';
            }
            $button_inline .= get_ultimate_font_style($button_font_style);
            if ($button_font_size != '') {
                $button_inline .= 'font-size:' . $button_font_size . 'px;';
            }
            if ($button_font_color != '') {
                $button_inline .= 'color:' . $button_font_color . ';';
            }
            if ($button_line_height != '') {
                $button_inline .= 'line-height:' . $button_line_height . 'px;';
            }
            $args = array($package_name_font_family, $subheading_font_family, $price_font_family, $features_font_family, $button_font_family);
            enquque_ultimate_google_fonts($args);
            /* End Typography */
            $output .= '<div class="ult_pricing_table_wrap ult_design_1 ' . $featured . ' ult-cs-' . $color_scheme . ' ' . $el_class . '">
						<div class="ult_pricing_table" style="' . $featured_style . '">';
            $output .= '<div class="ult_pricing_heading">
								<h3 style="' . $package_name_inline . '">' . $package_heading . '</h3>';
            if ($package_sub_heading !== '') {
                $output .= '<h5 style="' . $sub_heading_inline . '">' . $package_sub_heading . '</h5>';
            }
            $output .= '</div><!--ult_pricing_heading-->';
            $output .= '<div class="ult_price_body_block">
								<div class="ult_price_body">
									<div class="ult_price">
										<span class="ult_price_figure" style="' . $price_inline . '">' . $package_price . '</span>
										<span class="ult_price_term" style="' . $price_unit_inline . '">' . $package_unit . '</span>
									</div>
								</div>
							</div><!--ult_price_body_block-->';
            $output .= '<div class="ult_price_features" style="' . $features_inline . '">
								' . wpb_js_remove_wpautop(do_shortcode($content), true) . '
							</div><!--ult_price_features-->';
            if ($package_btn_text !== "") {
                $output .= '<div class="ult_price_link" style="' . $normal_style . '">
								<a href="' . $link . '" ' . $target . ' class="ult_price_action_button" style="' . $featured_style . ' ' . $button_inline . '">' . $package_btn_text . '</a>
							</div><!--ult_price_link-->';
            }
            $output .= '<div class="ult_clr"></div>
				</div><!--pricing_table-->
			</div><!--pricing_table_wrap-->';
            return $output;
        }