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_img_separator_shortcode($atts, $content) { $output = $wrapper_class = $custom_position = $opacity_start_effect_data = $animation_style = $animation_el_class = $animation_data = ''; $is_animation = false; extract(shortcode_atts(array('img_separator' => '', 'animation' => '', 'img_separator_width' => '', 'img_separator_position' => 'ult-top-easy-separator', 'img_separator_gutter' => '', 'opacity' => 'set', 'opacity_start_effect' => '', 'animation_duration' => '', 'animation_delay' => '', 'animation_iteration_count' => ''), $atts)); $ultimate_custom_vc_row = get_option('ultimate_custom_vc_row'); if ($ultimate_custom_vc_row == '') { $ultimate_custom_vc_row = 'wpb_row'; } $img = apply_filters('ult_get_img_single', $img_separator, 'url'); $alt = get_post_meta($img_separator, '_wp_attachment_image_alt', true); $id = 'ult-easy-separator-' . uniqid(rand()); $args = array('target' => '#' . $id, 'media_sizes' => array('width' => $img_separator_width)); $data_list = get_ultimate_vc_responsive_media_css($args); if ($img_separator_gutter != '') { $wrapper_class = 'ult-easy-separator-no-default'; if ($img_separator_position == 'ult-top-easy-separator') { $img_separator_gutter = '-' . $img_separator_gutter; //$custom_position = 'top:'.$img_separator_gutter.'%;'; $custom_position .= 'transform: translate(-50%,' . $img_separator_gutter . '%)!important;'; $custom_position .= '-ms-transform: translate(-50%,' . $img_separator_gutter . '%)!important;'; $custom_position .= '-webkit-transform: translate(-50%,' . $img_separator_gutter . '%)!important;'; } else { if ($img_separator_position == 'ult-bottom-easy-separator') { //$custom_position = 'bottom:'.$img_separator_gutter.'%;'; $custom_position .= 'transform: translate(-50%,' . $img_separator_gutter . '%)!important;'; $custom_position .= '-ms-transform: translate(-50%,' . $img_separator_gutter . '%)!important;'; $custom_position .= '-webkit-transform: translate(-50%,' . $img_separator_gutter . '%)!important;'; } } } $animation_style .= 'opacity:0;'; if (strtolower($animation) !== strtolower('No Animation')) { $is_animation = true; $inifinite_arr = array("InfiniteRotate", "InfiniteDangle", "InfiniteSwing", "InfinitePulse", "InfiniteHorizontalShake", "InfiniteBounce", "InfiniteFlash", "InfiniteTADA"); if ($animation_iteration_count == 0 || in_array($animation, $inifinite_arr)) { $animation_iteration_count = 'infinite'; $animation = 'infinite ' . $animation; } if ($opacity == "set") { $animation_el_class .= ' ult-animation ult-animate-viewport '; $opacity_start_effect_data = 'data-opacity_start_effect="' . $opacity_start_effect . '"'; } $animation_data .= ' data-animate="' . $animation . '" '; $animation_data .= ' data-animation-delay="' . $animation_delay . '" '; $animation_data .= ' data-animation-duration="' . $animation_duration . '" '; $animation_data .= ' data-animation-iteration="' . $animation_iteration_count . '" '; } else { $animation_el_class .= 'ult-no-animation'; } $output = '<div id="' . $id . '" class="ult-easy-separator-wrapper ult-responsive ' . $img_separator_position . ' ' . $wrapper_class . '" style="' . $custom_position . '" data-vc-row="' . $ultimate_custom_vc_row . '" ' . $data_list . '>'; $output .= '<div class="ult-easy-separator-inner-wrapper">'; $output .= '<div class="' . $animation_el_class . '" style="' . $animation_style . '" ' . $animation_data . ' ' . $opacity_start_effect_data . '>'; $output .= '<img class="ult-easy-separator-img" alt="' . $alt . '" src="' . $img . '" />'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; return $output; }
function banner_shortcode($atts) { $banner_title = $banner_desc = $banner_image = $banner_link = $banner_style = $el_class = $heading_tag = ''; $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_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 = $banner_min = $banner_min_height_op = $responsive_max = ''; extract(shortcode_atts(array('banner_title' => '', 'banner_desc' => '', 'banner_title_location' => '', 'banner_image' => '', 'image_opacity' => '1', 'image_opacity_on_hover' => '1', 'banner_height' => '', 'banner_height_val' => '', 'banner_link' => '', 'banner_style' => '', '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_color_bg' => '', 'banner_color_title' => '', 'banner_color_desc' => '', 'banner_title_bg' => 'banner_style', 'enable_responsive' => 'yes', 'responsive_min' => '768', 'responsive_max' => '900', 'banner_min' => '', 'banner_min_height_op' => 'default', 'el_class' => '', 'heading_tag' => '', 'css_ib2' => ''), $atts)); $css_ib2_styles = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class($css_ib2, ' '), "interactive_banner_2", $atts); $css_ib2_styles = esc_attr($css_ib2_styles); $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'); $img = apply_filters('ult_get_img_single', $banner_image, 'url'); $alt = apply_filters('ult_get_img_single', $banner_image, 'alt'); 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 (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_id = 'interactive-banner-wrap-' . rand(1000, 9999); $interactive_banner_args = array('target' => '#' . $interactive_banner_id . ' .ult-new-ib-title', 'media_sizes' => array('font-size' => $banner_title_font_size, 'line-height' => $banner_title_line_height)); $interactive_banner_data_list = get_ultimate_vc_responsive_media_css($interactive_banner_args); 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;'; 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_args = array('target' => '#' . $interactive_banner_id . ' .ult-new-ib-content', 'media_sizes' => array('font-size' => $banner_desc_font_size, 'line-height' => $banner_desc_line_height)); $interactive_banner_desc_data_list = get_ultimate_vc_responsive_media_css($interactive_banner_desc_args); if ($banner_color_bg != '') { $banner_style_inline .= 'background:' . $banner_color_bg . ';'; } $banner_min_height = $img_min_height = $img_max_height = $min_height_class = ''; if ($banner_min_height_op != '' && $banner_min_height_op == 'custom') { if ($banner_min != '') { $banner_min_height = ' data-min-height="' . $banner_min . '" '; $img_min_height = ' data-min-height="' . $banner_min . '" '; //$img_max_height = ' data-max-width="none" '; $min_height_class = 'ult-ib2-min-height'; $banner_style_inline .= ' opacity:0; '; } } 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 = ''; } $heading_tag = isset($heading_tag) && trim($heading_tag) != "" ? $heading_tag : 'h2'; $output .= '<div class="ult-new-ib ult-ib-effect-' . $banner_style . ' ' . $el_class . ' ' . $min_height_class . ' ' . $css_ib2_styles . '" ' . $responsive . ' style="' . $banner_style_inline . '" data-opacity="' . $image_opacity . '" data-hover-opacity="' . $image_opacity_on_hover . '" ' . $banner_min_height . '>'; if ($img !== '') { $output .= '<img class="ult-new-ib-img" style="' . $img_style . '" alt="' . $alt . '" src="' . apply_filters('ultimate_images', $img) . '" ' . $img_min_height . ' ' . $img_max_height . ' />'; } $output .= '<div id="' . $interactive_banner_id . '" class="ult-new-ib-desc" style="' . $title_bg . '">'; $output .= '<' . $heading_tag . ' class="ult-new-ib-title ult-responsive" ' . $interactive_banner_data_list . ' style="' . $banner_title_style_inline . '">' . $banner_title . '</' . $heading_tag . '>'; $output .= '<div class="ult-new-ib-content ult-responsive" ' . $interactive_banner_desc_data_list . ' style="' . $banner_desc_style_inline . '"><p>' . $banner_desc . '</p></div>'; $output .= '</div>'; if ($target != '') { $target = 'target="' . $target . '"'; } $output .= '<a class="ult-new-ib-link" ' . $href . ' ' . $target . '></a>'; $output .= '</div>'; $is_preset = false; //Display settings for Preset 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>'; } $output .= '<script type="text/javascript"> (function($){ $(document).ready(function(){ $(".ult-new-ib").css("opacity","1"); }); })(jQuery); </script>'; return $output; }
function banner_shortcode($atts) { $banner_title = $banner_desc = $banner_image = $banner_link = $banner_style = $el_class = $heading_tag = ''; $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_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 = $banner_min = $banner_min_height_op = $responsive_max = ''; extract(shortcode_atts(array('banner_title' => '', 'banner_desc' => '', 'banner_title_location' => '', 'banner_image' => '', 'image_opacity' => '1', 'image_opacity_on_hover' => '1', 'banner_height' => '', 'banner_height_val' => '', 'banner_link' => '', 'banner_style' => '', '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_color_bg' => '', 'banner_color_title' => '', 'banner_color_desc' => '', 'banner_title_bg' => 'banner_style', 'enable_responsive' => 'yes', 'responsive_min' => '768', 'responsive_max' => '900', 'banner_min' => '', 'banner_min_height_op' => 'default', 'el_class' => '', 'heading_tag' => ''), $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'); $img = apply_filters('ult_get_img_single', $banner_image, 'url'); 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 (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_id = 'interactive-banner-wrap-' . rand(1000, 9999); $interactive_banner_args = array('target' => '#' . $interactive_banner_id . ' .ult-new-ib-title', 'media_sizes' => array('font-size' => $banner_title_font_size, 'line-height' => $banner_title_line_height)); $interactive_banner_data_list = get_ultimate_vc_responsive_media_css($interactive_banner_args); 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;'; 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_args = array('target' => '#' . $interactive_banner_id . ' .ult-new-ib-content', 'media_sizes' => array('font-size' => $banner_desc_font_size, 'line-height' => $banner_desc_line_height)); $interactive_banner_desc_data_list = get_ultimate_vc_responsive_media_css($interactive_banner_desc_args); if ($banner_color_bg != '') { $banner_style_inline .= 'background:' . $banner_color_bg . ';'; } $banner_min_height = $img_min_height = $img_max_height = $min_height_class = ''; if ($banner_min_height_op != '' && $banner_min_height_op == 'custom') { if ($banner_min != '') { $banner_min_height = ' data-min-height="' . $banner_min . '" '; $img_min_height = ' data-min-height="' . $banner_min . '" '; //$img_max_height = ' data-max-width="none" '; $min_height_class = 'ult-ib2-min-height'; } } 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 = ''; } $heading_tag = isset($heading_tag) && trim($heading_tag) != "" ? $heading_tag : 'h2'; $output .= '<div class="ult-new-ib ult-ib-effect-' . $banner_style . ' ' . $el_class . ' ' . $min_height_class . '" ' . $responsive . ' style="' . $banner_style_inline . '" data-opacity="' . $image_opacity . '" data-hover-opacity="' . $image_opacity_on_hover . '" ' . $banner_min_height . '>'; if ($img !== '') { $output .= '<img class="ult-new-ib-img" style="' . $img_style . '" alt="' . $banner_title . '" src="' . $img . '" ' . $img_min_height . ' ' . $img_max_height . ' />'; } $output .= '<div id="' . $interactive_banner_id . '" class="ult-new-ib-desc" style="' . $title_bg . '">'; $output .= '<' . $heading_tag . ' class="ult-new-ib-title ult-responsive" ' . $interactive_banner_data_list . ' style="' . $banner_title_style_inline . '">' . $banner_title . '</' . $heading_tag . '>'; $output .= '<div class="ult-new-ib-content ult-responsive" ' . $interactive_banner_desc_data_list . ' style="' . $banner_desc_style_inline . '"><p>' . $banner_desc . '</p></div>'; $output .= '</div>'; if ($target != '') { $target = 'target="' . $target . '"'; } $output .= '<a class="ult-new-ib-link" ' . $href . ' ' . $target . '></a>'; $output .= '</div>'; 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 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; }
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 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 (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 countdown_shortcode($atts) { $count_style = $datetime = $ult_tz = $countdown_opts = $tick_col = $tick_size = $tick_line_height = $tick_style = $tick_sep_col = $tick_sep_size = $tick_sep_line_height = ''; $tick_sep_style = $br_color = $br_style = $br_size = $timer_bg_color = $br_radius = $br_time_space = $el_class = ''; $string_days = $string_weeks = $string_months = $string_years = $string_hours = $string_minutes = $string_seconds = ''; $string_days2 = $string_weeks2 = $string_months2 = $string_years2 = $string_hours2 = $string_minutes2 = $string_seconds2 = ''; extract(shortcode_atts(array('count_style' => 'ult-cd-s1', 'datetime' => '', 'ult_tz' => 'ult-wptz', 'countdown_opts' => '', 'tick_col' => '', 'tick_size' => '36', 'tick_line_height' => '', 'tick_style' => '', 'tick_sep_col' => '', 'tick_sep_size' => '13', 'tick_sep_line_height' => '', 'tick_sep_style' => '', 'br_color' => '', 'br_style' => '', 'br_size' => '', 'timer_bg_color' => '', 'br_radius' => '', 'br_time_space' => '0', 'el_class' => '', 'string_days' => 'Day', 'string_days2' => 'Days', 'string_weeks' => 'Week', 'string_weeks2' => 'Weeks', 'string_months' => 'Month', 'string_months2' => 'Months', 'string_years' => 'Year', 'string_years2' => 'Years', 'string_hours' => 'Hour', 'string_hours2' => 'Hours', 'string_minutes' => 'Minute', 'string_minutes2' => 'Minutes', 'string_seconds' => 'Second', 'string_seconds2' => 'Seconds', 'css_countdown' => ''), $atts)); $count_frmt = $labels = $countdown_design_style = ''; $labels = $string_years2 . ',' . $string_months2 . ',' . $string_weeks2 . ',' . $string_days2 . ',' . $string_hours2 . ',' . $string_minutes2 . ',' . $string_seconds2; $labels2 = $string_years . ',' . $string_months . ',' . $string_weeks . ',' . $string_days . ',' . $string_hours . ',' . $string_minutes . ',' . $string_seconds; $countdown_opt = explode(",", $countdown_opts); if (is_array($countdown_opt)) { foreach ($countdown_opt as $opt) { if ($opt == "syear") { $count_frmt .= 'Y'; } if ($opt == "smonth") { $count_frmt .= 'O'; } if ($opt == "sweek") { $count_frmt .= 'W'; } if ($opt == "sday") { $count_frmt .= 'D'; } if ($opt == "shr") { $count_frmt .= 'H'; } if ($opt == "smin") { $count_frmt .= 'M'; } if ($opt == "ssec") { $count_frmt .= 'S'; } } } if (is_numeric($tick_size)) { $tick_size = 'desktop:' . $tick_size . 'px;'; } $countdown_design_style = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class($css_countdown, ' '), "ult_countdown", $atts); $countdown_design_style = esc_attr($countdown_design_style); $countdown_id = 'countdown-wrap-' . rand(1000, 9999); $ult_countdown_args = array('target' => '#' . $countdown_id . ' .ult_countdown_amount', 'media_sizes' => array('font-size' => $tick_size)); $data_list = get_ultimate_vc_responsive_media_css($ult_countdown_args); $data_attr = ''; if ($count_frmt == '') { $count_frmt = 'DHMS'; } if ($br_size == '' || $br_color == '' || $br_style == '') { if ($timer_bg_color == '') { $el_class .= ' ult-cd-no-border'; } } else { $data_attr .= 'data-br-color="' . $br_color . '" data-br-style="' . $br_style . '" data-br-size="' . $br_size . '" '; } // Responsive param if (is_numeric($tick_sep_size)) { $tick_sep_size = 'desktop:' . $tick_sep_size . 'px;'; } if (is_numeric($tick_sep_line_height)) { $tick_sep_line_height = 'desktop:' . $tick_sep_line_height . 'px;'; } $count_down_id = "count-down-wrap-" . rand(1000, 9999); $count_down_sep_args = array('target' => '#' . $count_down_id . ' .ult_countdown-period', 'media_sizes' => array('font-size' => $tick_sep_size, 'line-height' => $tick_sep_line_height)); $count_down_sep_data_list = get_ultimate_vc_responsive_media_css($count_down_sep_args); $data_attr .= ' data-tick-style="' . $tick_style . '" '; $data_attr .= ' data-tick-p-style="' . $tick_sep_style . '" '; $data_attr .= ' data-bg-color="' . $timer_bg_color . '" data-br-radius="' . $br_radius . '" data-padd="' . $br_time_space . '" '; $output = '<div "' . $count_down_sep_data_list . '" class="ult_countdown ' . $countdown_design_style . ' ' . $el_class . ' ' . $count_style . '">'; //Responsive param if (is_numeric($tick_size)) { $tick_size = 'desktop:' . $tick_size . 'px;'; } if (is_numeric($tick_line_height)) { $tick_line_height = 'desktop:' . $tick_line_height . 'px;'; } $count_down_args = array('target' => '#' . $count_down_id . ' .ult_countdown-amount', 'media_sizes' => array('font-size' => $tick_size, 'line-height' => $tick_line_height)); $count_down_data_list = get_ultimate_vc_responsive_media_css($count_down_args); if ($datetime != '') { $output .= '<div id="' . $count_down_id . '" class="ult_countdown-div ult_countdown-dateAndTime ' . $ult_tz . '" data-labels="' . $labels . '" data-labels2="' . $labels2 . '" data-terminal-date="' . $datetime . '" data-countformat="' . $count_frmt . '" data-time-zone="' . get_option('gmt_offset') . '" data-time-now="' . str_replace('-', '/', current_time('mysql')) . '" data-tick-col="' . $tick_col . '" ' . $count_down_data_list . ' data-tick-p-col="' . $tick_sep_col . '" ' . $data_attr . '>' . $datetime . '</div>'; } $output .= '</div>'; $is_preset = false; 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>'; // remove backslash once copied } 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-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 = ''; $hotspot_tooltip_id = ''; 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;'; } if (is_numeric($tooltip_font_size)) { $tooltip_font_size = 'desktop:' . $tooltip_font_size . 'px;'; } if (is_numeric($tooltip_font_line_height)) { $tooltip_font_line_height = 'desktop:' . $tooltip_font_line_height . 'px;'; } $hotspot_tooltip_id = 'hotspot-tooltip-' . rand(1000, 9999); $hotspot_tooltip_args = array('target' => '#' . $hotspot_tooltip_id . ' .ult-tooltipster-content', 'media_sizes' => array('font-size' => $tooltip_font_size, 'line-height' => $tooltip_font_line_height)); $hotspot_tooltip_data_list = get_ultimate_vc_responsive_media_css($hotspot_tooltip_args); // 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 ($hotspot_tooltip_id != '') { $data .= 'data-mycust-id="' . $hotspot_tooltip_id . '" '; } if ($hotspot_tooltip_data_list != '') { $data .= $hotspot_tooltip_data_list; } 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 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', 'css_dualbtn_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' : ''; $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 = $dual_design_style_css = ''; $dual_design_style_css = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class($css_dualbtn_design, ' '), "ult_dualbutton", $atts); $dual_design_style_css = esc_attr($dual_design_style_css); 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 = apply_filters('ult_get_img_single', $icon_img, 'alt'); 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="' . apply_filters('ultimate_images', $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 = apply_filters('ult_get_img_single', $btn_icon_img, 'alt'); 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="' . apply_filters('ultimate_images', $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; $dual_btn_id = 'dualbtn-' . rand(1000, 9999); $title1_style = ''; if (function_exists('get_ultimate_font_family')) { $mhfont_family = get_ultimate_font_family($btn1_font_family); if ($mhfont_family !== '') { $title1_style .= 'font-family:' . $mhfont_family . ';'; } } if (function_exists('get_ultimate_font_style')) { $title1_style .= get_ultimate_font_style($btn1_heading_style); } 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;'; } // $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 // } $dualbtn_args = array('target' => '#' . $dual_btn_id . ' .ult-dual-button-title', 'media_sizes' => array('font-size' => $title_font_size, 'line-height' => $title_line_ht)); $data_list1 = get_ultimate_vc_responsive_media_css($dualbtn_args); /*--------css for title2------------*/ $title2_style = ''; if (function_exists('get_ultimate_font_family')) { $mhfont_family1 = get_ultimate_font_family($btn2_font_family); if ($mhfont_family1 !== '') { $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 = apply_filters('ult_get_img_single', $divider_icon_img, 'alt'); $text = '<img class="img-icon" alt="' . $alt3 . '" src="' . apply_filters('ultimate_images', $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 ' . $dual_design_style_css . ' ' . $is_vc_49_plus . ' to-' . $btn_alignment . ' ' . $extraclass . '" ' . $resp_data . ' id="' . $id . '"> <div id="' . $dual_btn_id . '" 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 ult-responsive" ' . $data_list1 . ' 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>'; $is_preset = false; //Retrieve preset Code 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/>)'; $subop .= '<pre>'; $subop .= $text; $subop .= '</pre>'; // remove backslash once copied } return $subop; }
function ultimate_exp_section_shortcode($atts, $content) { $title = $heading_style = $font_family = $title_font_size = $title_line_ht = $text_color = $text_hovercolor = $icon_type = $icon = $icon_img = $img_width = $icon_size = $icon_size = $icon_color = $icon_hover_color = $icon_style = $icon_color_bg = $icon_color_hoverbg = $icon_border_style = $icon_color_border = $icon_color_hoverborder = $icon_border_size = $icon_border_radius = $icon_border_spacing = $map_override = $icon_align = $el_class = $css_editor = ''; extract(shortcode_atts(array('title' => ' ', 'heading_style' => ' ', 'font_family' => ' ', 'title_font_size' => '20', 'title_line_ht' => '20', 'text_color' => '#333333', 'text_hovercolor' => '#333333', 'icon_type' => 'selector', 'icon' => '', 'icon_img' => '', 'img_width' => '48', 'icon_size' => '32', 'icon_color' => '#333333', 'icon_hover_color' => '#333333', 'icon_style' => 'none', 'icon_color_bg' => '#ffffff', 'icon_color_hoverbg' => '#ecf0f1', 'icon_border_style' => 'solid', 'icon_color_border' => '#333333', 'icon_color_hoverborder' => '#333333', 'icon_border_size' => '1', 'icon_border_radius' => '0', 'icon_border_spacing' => '30', 'icon_align' => 'center', 'extra_class' => ' ', 'css' => ' ', 'background_color' => '#dbdbdb', 'bghovercolor' => '#e5e5e5', 'cnt_bg_color' => '#dbdbdb', 'cnt_hover_bg_color' => ' ', 'exp_icon' => ' ', 'exp_effect' => 'slideToggle', 'cont_css' => ' ', 'section_width' => ' ', 'map_override' => '0', 'new_title' => ' ', 'new_icon' => ' ', 'new_icon_img' => ' ', 'title_active' => '#333333', 'title_active_bg' => '#dbdbdb', 'icon_active_color' => '#333333', 'icon_active_color_bg' => '#ffffff', 'title_margin' => ' ', 'iconmargin_css' => ' ', 'icon_color_activeborder' => '#333333', 'title_margin' => ' ', 'title_padding' => ' ', 'desc_padding' => ' ', 'desc_margin' => ' ', 'icon_margin' => ' ', 'section_height' => '0'), $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' : ''; /*---------- data attribute-----------------------------*/ //echo $title_margin.$title_padding; $data = ''; $data .= 'data-textcolor="' . $text_color . '"'; if ($text_hovercolor == ' ') { $text_hovercolor = $text_color; } $data .= 'data-texthover="' . $text_hovercolor . '"'; $data .= 'data-icncolor="' . $icon_color . '"'; $data .= 'data-ihover="' . $icon_hover_color . '"'; $data .= 'data-height="' . $section_height . '"'; $data .= 'data-cntbg="' . $background_color . '"'; $data .= 'data-cnthvrbg="' . $bghovercolor . '"'; $data .= 'data-headerbg="' . $background_color . '"'; if ($bghovercolor == ' ') { $bghovercolor = $background_color; } $data .= 'data-headerhover="' . $bghovercolor . '"'; $data .= 'data-title="' . $title . '"'; if ($new_title == ' ') { $new_title = $title; } $data .= 'data-newtitle="' . $new_title . '"'; //echo $new_icon; $data .= 'data-icon="' . $icon . '"'; //echo $new_icon; if ($new_icon == ' ') { $new_icon = $icon; } if ($new_icon == 'none') { $new_icon = $icon; } $data .= 'data-newicon="' . $new_icon . '"'; /*----active icon --------*/ if ($icon_active_color == '') { $icon_active_color = $icon_hover_color; } $data .= 'data-activeicon="' . $icon_active_color . '"'; if ($icon_style != 'none') { $data .= 'data-icnbg="' . $icon_color_bg . '"'; $data .= 'data-icnhvrbg="' . $icon_color_hoverbg . '"'; if ($icon_active_color_bg == ' ') { $icon_active_color_bg = $icon_color_hoverbg; } $data .= 'data-activeiconbg="' . $icon_active_color_bg . '"'; } if ($icon_style == 'advanced') { $data .= 'data-icnbg="' . $icon_color_bg . '"'; $data .= 'data-icnhvrbg="' . $icon_color_hoverbg . '"'; $data .= 'data-icnborder="' . $icon_color_border . '"'; if ($icon_color_hoverborder == ' ') { $icon_color_hoverborder = $icon_color_border; } $data .= 'data-icnhvrborder="' . $icon_color_hoverborder . '"'; if ($icon_active_color_bg == ' ') { $icon_active_color_bg = $bghovercolor; } $data .= 'data-activeiconbg="' . $icon_active_color_bg . '"'; if ($icon_color_activeborder == ' ') { $icon_color_activeborder = $icnhvrborder; } $data .= 'data-activeborder="' . $icon_color_activeborder . '"'; } $data .= 'data-effect="' . $exp_effect . '"'; $data .= 'data-override="' . $map_override . '"'; /*---active color ----------*/ if ($title_active == '') { $title_active = $text_hovercolor; } $data .= 'data-activetitle="' . $title_active . '"'; if ($title_active_bg == ' ') { $title_active_bg = $bghovercolor; } $data .= 'data-activebg="' . $title_active_bg . '"'; /*----active icon --------*/ /*if($icon_active_color==''){ $icon_active_color=$bghovercolor; } $data.='data-activeicon="'.$icon_active_color.'"'; if($icon_active_color_bg==''){ $icon_active_color_bg=$bghovercolor; } $data.='data-activeicon="'.$icon_active_color_bg.'"';*/ /*------------icon style---------*/ $iconoutput = $newsrc = $src1 = $img_ext = ''; $style = $css_trans = $iconbgstyle = ''; if ($icon_type == 'custom') { if ($icon_img !== '') { $img = apply_filters('ult_get_img_single', $icon_img, 'url', 'large'); $newimg = apply_filters('ult_get_img_single', $new_icon_img, 'url', 'large'); $newsrc = $newimg; $src1 = $img; $alt = apply_filters('ult_get_img_single', $icon_img, 'alt'); if ($icon_style !== 'none') { if ($icon_color_bg !== '') { $style .= 'background:' . $icon_color_bg . ';'; } //$style .= 'background:transperent;'; } if ($icon_style == 'circle') { $el_class .= ' uavc-circle '; $img_ext .= 'ult_circle '; } if ($icon_style == 'square') { $el_class .= ' uavc-square '; $img_ext .= 'ult_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_align == 'center') { $style .= 'display:inline-block;'; } $iconoutput .= "\n" . '<span class="aio-icon-img ' . $el_class . ' ' . 'ult_expsection_icon " style="font-size:' . $img_width . 'px;' . $style . '" ' . $css_trans . '>'; $iconoutput .= "\n\t" . '<img class="img-icon ult_exp_img ' . $img_ext . '" alt="' . $alt . '" src="' . apply_filters('ultimate_images', $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 ' . $icon_style . ' ' . $el_class . ' ult_expsection_icon " ' . $css_trans . ' style="' . $style . '">'; $iconoutput .= "\n\t" . '<i class="' . $icon . ' ult_ex_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>'; } /*----------- image replace ----------------*/ $data .= 'data-img="' . $src1 . '"'; if ($newsrc == '') { $newsrc = $src1; } $data .= 'data-newimg="' . $newsrc . '"'; /*------------header bg style---------*/ $headerstyle = ''; if ($text_color != '') { $headerstyle .= 'color:' . $text_color . ';'; } if ($background_color != '') { $headerstyle .= 'background-color:' . $background_color . ';'; } if (function_exists('get_ultimate_font_family')) { $mhfont_family = get_ultimate_font_family($font_family); if ($mhfont_family != '') { $headerstyle .= 'font-family:' . $mhfont_family . ';'; } } if (function_exists('get_ultimate_font_style')) { $headerstyle .= get_ultimate_font_style($heading_style); } // if($title_font_size!=''){ // $headerstyle.='font-size:'.$title_font_size.'px;'; // } // if($title_line_ht!=''){ // $headerstyle.='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;'; } $ult_expandable_id = 'uvc-exp-wrap-' . rand(1000, 9999); $ult_expandable_args = array('target' => '#' . $ult_expandable_id . '', 'media_sizes' => array('font-size' => $title_font_size, 'line-height' => $title_line_ht)); $data_list = get_ultimate_vc_responsive_media_css($ult_expandable_args); $headerstyle .= $title_margin; $headerstyle .= $title_padding; /*---------------title padding---------------------*/ $css_class = ''; $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class($css, ' '), "ultimate_exp_section", $atts); $css_class = esc_attr($css_class); /*---------------desc padding---------------------*/ $desc_css_class = ''; $desc_css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class($cont_css, ' '), "ultimate_exp_section", $atts); $desc_css_class = esc_attr($desc_css_class); /*---------------desc padding---------------------*/ $icon_css_class = ''; $icon_css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class($iconmargin_css, ' '), "ultimate_exp_section", $atts); $icon_css_class = esc_attr($icon_css_class); /*--------------------- full width row settings---------------------*/ //echo $map_override; /*------------content style--------------------------*/ $cnt_style = ''; if ($cnt_bg_color != '') { $cnt_style .= 'background-color:' . $cnt_bg_color . ';'; } //$cnt_style .= 'background-color:'.$bghovercolor.';'; $cnt_style .= $desc_padding; $cnt_style .= $desc_margin; $position = ''; if ($icon_align == 'left') { $position = 'ult_expleft_icon'; } if ($icon_align == 'right') { $position = 'ult_expright_icon'; } $top = ''; $output = ''; $icon_output = ''; $text_align = ''; if ($icon_align == 'top') { if ($icon_type == 'custom') { $text_align .= 'text-align:-webkit-center;'; } else { $text_align .= 'text-align:center;'; } //text_align .='text-align:center'; } $text_align .= $icon_margin; if ($iconoutput != '') { $icon_output = ' <div class="ult-just-icon-wrapper ult_exp_icon"> <div class="align-icon ' . $icon_css_class . '" style="text-align:' . $icon_align . ';' . $text_align . '"> ' . $iconoutput . ' </div> </div>'; } //echo $icon; if (empty($iconoutput) || $iconoutput == ' ') { //echo"dhgfhj"; $icon_output = ''; } $section_style = ' '; if ($section_width !== ' ') { $section_style = 'max-width:' . $section_width . 'px;'; } $output .= '<div class="ult_exp_section_layer ' . $is_vc_49_plus . ' ' . $extra_class . '" > <div id="' . $ult_expandable_id . '" ' . $data_list . ' class="ult_exp_section ult-responsive ' . $css_class . '" style="' . $headerstyle . '" ' . $data . '>'; if ($icon_align == 'left') { $output .= '<div class="ult_exp_section-main ' . $position . '">' . $icon_output . ' <div class="ult_expheader" align="' . $icon_align . '" >' . $title . ' </div> </div> </div>'; } else { if ($icon_align == 'top') { $output .= '<div class="ult_exp_section-main ' . $position . '"> ' . $icon_output . ' <div class="ult_expheader" align="center" >' . $title . ' </div></div> </div>'; } else { $output .= '<div class="ult_exp_section-main ' . $position . '"> <div class="ult_expheader" align="' . $icon_align . '" >' . $title . ' </div>' . $icon_output . '</div> </div>'; } } if ($content != '') { $output .= '<div class="ult_exp_content ' . $desc_css_class . '" style="' . $cnt_style . '">'; $output .= '<div class="ult_ecpsub_cont" style="' . $section_style . '" >'; $output .= do_shortcode($content); $output .= '</div>'; } //<!--end of ult_ecpsub_cont--> $output .= '</div> </div>'; //<!--end of exp_content--> if ($title != ' ' || $new_title != ' ') { return $output; } }
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)); $vc_version = defined('WPB_VC_VERSION') ? WPB_VC_VERSION : 0; $is_vc_49_plus = version_compare(4.9, $vc_version, '<=') ? 'ult-adjust-bottom-margin' : ''; $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 . '"'; } } $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;'; // } // if($title_line_ht!=''){ // $colorstyle .= 'line-height:'.$title_line_ht.'px;'; // //$colorstyle .='color:'.$text_color.';'; // } //Responsive param 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;'; } $creative_link_id = 'creative-link-wrap-' . rand(1000, 9999); $creative_link_args = array('target' => '#' . $creative_link_id . ' .ult_colorlink', 'media_sizes' => array('font-size' => $title_font_size, 'line-height' => $title_line_ht)); $creative_link_data_list = get_ultimate_vc_responsive_media_css($creative_link_args); //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 // } /*-- 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 id="' . $creative_link_id . '" class="ult_main_cl ' . $is_vc_49_plus . ' ' . $el_class . ' ' . $style11_css_class . '" > <span class="' . $class . ' ult_crlink" > <a ' . $creative_link_data_list . ' href = "' . esc_attr($url) . '" ' . $target . ' class="ult_colorlink ult-responsive ' . $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 id="' . $creative_link_id . '" class=" ult_main_cl ' . $el_class . '" > <span class="' . $class . ' ult_crlink" id="' . $id . '"> <a ' . $creative_link_data_list . ' href = "' . esc_attr($url) . '" ' . $target . ' class="ult_colorlink ult-responsive " 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 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; }
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 = ''; $title_line_height = $desc_line_height = ''; //$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_line_height' => '', 'title_font_color' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_font_size' => '', 'desc_line_height' => '', '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 (is_numeric($title_font_size)) { $title_font_size = 'desktop:' . $title_font_size . 'px;'; } if (is_numeric($title_line_height)) { $title_line_height = 'desktop:' . $title_line_height . 'px;'; } $timeline_item_id = 'timeline-item-' . rand(1000, 9999); $timeline_item_args = array('target' => '#' . $timeline_item_id . ' .ult-timeline-title', 'media_sizes' => array('font-size' => $title_font_size, 'line-height' => $title_line_height)); $Item_data_list = get_ultimate_vc_responsive_media_css($timeline_item_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 (is_numeric($desc_font_size)) { $desc_font_size = 'desktop:' . $desc_font_size . 'px;'; } if (is_numeric($desc_line_height)) { $desc_line_height = 'desktop:' . $desc_line_height . 'px;'; } $timeline_item_args_desc = array('target' => '#' . $timeline_item_id . ' .timeline-item-spt', 'media_sizes' => array('font-size' => $desc_font_size, 'line-height' => $desc_line_height)); $Item_desc_data_list = get_ultimate_vc_responsive_media_css($timeline_item_args_desc); 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 id="' . $timeline_item_id . '" 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 ult-responsive" ' . $Item_data_list . ' style="' . $title_style . '">' . $header_link_prefix . $time_title . $header_link_suffix . '</h3>'; $header .= '<div class="ult-responsive timeline-item-spt" ' . $Item_desc_data_list . ' 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; }
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_boxes($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 = $icon_animation = $title = $link = $hover_effect = $pos = $read_more = $read_text = $box_border_style = $box_border_width = $box_border_color = $box_bg_color = $pos = $css_class = $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 = $box_min_height = ''; extract(shortcode_atts(array('icon_type' => 'selector', 'icon' => 'none', 'icon_img' => '', 'img_width' => '48', 'icon_size' => '32', 'icon_color' => '#333', '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_animation' => '', 'title' => '', 'link' => '', 'hover_effect' => 'style_1', 'pos' => 'default', 'box_min_height' => '', 'box_border_style' => '', 'box_border_width' => '', 'box_border_color' => '', 'box_bg_color' => "", 'read_more' => 'none', 'read_text' => 'Read More', 'title_font' => '', 'title_font_style' => '', 'title_font_size' => '', 'title_font_line_height' => '', 'title_font_color' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_font_size' => '', 'desc_font_color' => '', 'desc_font_line_height' => '', 'el_class' => ''), $atts, 'bsf-info-box')); $html = $target = $suffix = $prefix = $title_style = $desc_style = ''; //$font_args = array(); //echo $pos; die(); $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_animation="' . $icon_animation . '"]'); $prefix .= '<div class="aio-icon-component ' . $css_class . ' ' . $el_class . ' ' . $hover_effect . '">'; $suffix .= '</div> <!-- aio-icon-component -->'; $ex_class = $ic_class = ''; if ($pos != '') { $ex_class .= $pos . '-icon'; $ic_class = 'aio-icon-' . $pos; } /* title */ if ($title_font != '') { $font_family = get_ultimate_font_family($title_font); if ($font_family != '') { $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_box_id = 'Info-box-wrap-' . rand(1000, 9999); $info_box_args = array('target' => '#' . $info_box_id . ' .aio-icon-title', 'media_sizes' => array('font-size' => $title_font_size, 'line-height' => $title_font_line_height)); $info_box_data_list = get_ultimate_vc_responsive_media_css($info_box_args); if ($title_font_color != '') { $title_style .= 'color:' . $title_font_color . ';'; } /* description */ if ($desc_font != '') { $font_family = get_ultimate_font_family($desc_font); if ($font_family !== '') { $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_box_desc_args = array('target' => '#' . $info_box_id . ' .aio-icon-description', 'media_sizes' => array('font-size' => $desc_font_size, 'line-height' => $desc_font_line_height)); $info_box_desc_data_list = get_ultimate_vc_responsive_media_css($info_box_desc_args); if ($desc_font_color != '') { $desc_style .= 'color:' . $desc_font_color . ';'; } //enquque_ultimate_google_fonts($font_args); $box_style = $box_style_data = ''; if ($pos == 'square_box') { if ($box_min_height != '') { $box_style_data .= "data-min-height='" . $box_min_height . "px'"; } if ($box_border_color != '') { $box_style .= "border-color:" . $box_border_color . ";"; } if ($box_border_style != '') { $box_style .= "border-style:" . $box_border_style . ";"; } if ($box_border_width != '') { $box_style .= "border-width:" . $box_border_width . "px;"; } if ($box_bg_color != '') { $box_style .= "background-color:" . $box_bg_color . ";"; } } $html .= '<div id="' . $info_box_id . '" class="aio-icon-box ' . $ex_class . '" style="' . $box_style . '" ' . $box_style_data . ' >'; if ($pos == "heading-right" || $pos == "right") { if ($pos == "right") { $html .= '<div class="aio-ibd-block" >'; } if ($title !== '') { $html .= '<div class="aio-icon-header" >'; $link_prefix = $link_sufix = ''; if ($link !== 'none') { if ($read_more == 'title') { $href = vc_build_link($link); if (isset($href['target'])) { $target = 'target="' . $href['target'] . '"'; } $link_prefix = '<a class="aio-icon-box-link" href="' . $href['url'] . '" ' . $target . '>'; $link_sufix = '</a>'; } } $html .= $link_prefix . '<h3 class="aio-icon-title ult-responsive" ' . $info_box_data_list . ' style="' . $title_style . '">' . $title . '</h3>' . $link_sufix; $html .= '</div> <!-- header -->'; } if ($pos !== "right") { if ($icon !== 'none' || $icon_img !== '') { $html .= '<div class="' . $ic_class . '" >' . $box_icon . '</div>'; } } if ($content !== '') { $html .= '<div class="aio-icon-description ult-responsive" ' . $info_box_desc_data_list . ' style="' . $desc_style . '">'; $html .= do_shortcode($content); if ($link !== 'none') { if ($read_more == 'more') { $href = vc_build_link($link); if (isset($href['target'])) { $target = 'target="' . $href['target'] . '"'; } $more_link = '<a class="aio-icon-read" href="' . $href['url'] . '" ' . $target . '>'; $more_link .= $read_text; $more_link .= ' »'; $more_link .= '</a>'; $html .= $more_link; } } $html .= '</div> <!-- description -->'; } if ($pos == "right") { $html .= '</div> <!-- aio-ibd-block -->'; if ($icon !== 'none' || $icon_img !== '') { $html .= '<div class="' . $ic_class . '">' . $box_icon . '</div>'; } } } else { //echo $icon_img; die(); if ($icon !== 'none' || $icon_img != '') { $html .= '<div class="' . $ic_class . '">' . $box_icon . '</div>'; } if ($pos == "left") { $html .= '<div class="aio-ibd-block">'; } if ($title !== '') { $html .= '<div class="aio-icon-header" >'; $link_prefix = $link_sufix = ''; if ($link !== 'none') { if ($read_more == 'title') { $href = vc_build_link($link); if (isset($href['target'])) { $target = 'target="' . $href['target'] . '"'; } $link_prefix = '<a class="aio-icon-box-link" href="' . $href['url'] . '" ' . $target . '>'; $link_sufix = '</a>'; } } $html .= $link_prefix . '<h3 class="aio-icon-title ult-responsive" ' . $info_box_data_list . ' style="' . $title_style . '">' . $title . '</h3>' . $link_sufix; $html .= '</div> <!-- header -->'; } if ($content !== '') { $html .= '<div class="aio-icon-description ult-responsive" ' . $info_box_desc_data_list . ' style="' . $desc_style . '">'; $html .= do_shortcode($content); if ($link !== 'none') { if ($read_more == 'more') { $href = vc_build_link($link); if (isset($href['target'])) { $target = 'target="' . $href['target'] . '"'; } $more_link = '<a class="aio-icon-read" href="' . $href['url'] . '" ' . $target . '>'; $more_link .= $read_text; $more_link .= ' »'; $more_link .= '</a>'; $html .= $more_link; } } $html .= '</div> <!-- description -->'; } if ($pos == "left") { $html .= '</div> <!-- aio-ibd-block -->'; } } $html .= '</div> <!-- aio-icon-box -->'; if ($link !== 'none') { if ($read_more == 'box') { $href = vc_build_link($link); if (isset($href['target'])) { $target = 'target="' . $href['target'] . '"'; } $output = $prefix . '<a class="aio-icon-box-link" href="' . $href['url'] . '" ' . $target . '>' . $html . '</a>' . $suffix; } else { $output = $prefix . $html . $suffix; } } else { $output = $prefix . $html . $suffix; } return $output; }
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_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)); $vc_version = defined('WPB_VC_VERSION') ? WPB_VC_VERSION : 0; $is_vc_49_plus = version_compare(4.9, $vc_version, '<=') ? 'ult-adjust-bottom-margin' : ''; $uniq = uniqid(); global $title_style_inline, $desc_style_inline, $info_circle_id, $info_circle_data_list; /* ---- main title styles ---- */ if ($title_font != '') { $title_font_family = get_ultimate_font_family($title_font); 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;'; // //line height // if($title_line_height != '') // $title_style_inline .= 'line-height:'.$title_line_height.'px;'; //responsive param for title if (is_numeric($title_font_size)) { $title_font_size = 'desktop:' . $title_font_size . 'px;'; } if (is_numeric($title_line_height)) { $title_line_height = 'desktop:' . $title_line_height . 'px;'; } $info_circle_id = 'info-cirlce-wrap-' . rand(1000, 9999); $info_circle_args = array('target' => '#' . $info_circle_id . ' .new-cust-responsive-class', 'media_sizes' => array('font-size' => $title_font_size, 'line-height' => $title_line_height)); $info_circle_data_list = get_ultimate_vc_responsive_media_css($info_circle_args); /* ---- description styles ---- */ if ($desc_font != '') { $desc_font_family = get_ultimate_font_family($desc_font); if ($desc_font_family != '') { $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;'; //Responsive param for Description if (is_numeric($desc_font_size)) { $desc_font_size = 'desktop:' . $desc_font_size . 'px;'; } if (is_numeric($desc_line_height)) { $desc_line_height = 'desktop:' . $desc_line_height . 'px;'; } $info_circle_desc_args = array('target' => '#' . $info_circle_id . ' .new-cust-responsive-desc-class', 'media_sizes' => array('font-size' => $desc_font_size, 'line-height' => $desc_line_height)); $info_circle_desc_data_list = get_ultimate_vc_responsive_media_css($info_circle_desc_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 ' . $is_vc_49_plus . ' ' . $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 id="' . $info_circle_id . '" 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 id="' . $info_circle_id . '" 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 ' . $info_circle_data_list . ' class="ult-responsive new-cust-responsive-class"></h3> <p ' . $info_circle_desc_data_list . ' class="ult-responsive new-cust-responsive-desc-class"></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 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; }
function banner_shortcode($atts) { $output = $el_class = $style = $img_style = ''; extract(shortcode_atts(array('banner_title' => '', 'banner_desc' => '', 'info_alignment' => 'ib3-info-center', 'banner_image' => '', 'banner_size' => '50', 'ib3_alignment' => 'ultb3-img-left', 'button_text' => '', 'button_link' => '', 'info_effect' => '', 'ib3_effect' => '', 'ib3_background' => '', 'ib3_border' => 'no-border', 'ib3_border_width' => '1', 'ib3_border_color' => '', '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' => '', 'button_font_family' => '', 'button_font_style' => '', 'button_font_size' => '', 'button_color' => '#1e73be', 'button_line_height' => '', 'button_border_radius' => '50', 'button_border_width' => '2', 'button_text_color' => '#898989', 'button_text_hover_color' => '#ffffff', 'banner_img_height_large_screen' => '', 'banner_img_height' => '', 'banner_img_height_tablet' => '', 'banner_img_height_tablet_portrait' => '', 'banner_img_height_mobile' => '', 'banner_img_height_mobile_landscape' => '', 'overlay_color' => '', 'el_class' => ''), $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' : ''; /* typography */ $title_style_inline = $desc_style_inline = $button_style_inline = ''; if ($title_font_family != '') { $temp = get_ultimate_font_family($title_font_family); if ($temp != '') { $title_style_inline .= 'font-family:' . $temp . ';'; } } $title_style_inline .= get_ultimate_font_style($title_font_style); // if($title_font_size != '') // $title_style_inline .= 'font-size:'.$title_font_size.'px;'; // if($title_line_height != '') // $title_style_inline .= 'line-height:'.$title_line_height.'px;'; if (is_numeric($title_font_size)) { $title_font_size = 'desktop:' . $title_font_size . 'px;'; } if (is_numeric($title_line_height)) { $title_line_height = 'desktop:' . $title_line_height . 'px;'; } $info_banner_id = 'Info-banner-wrap' . rand(1000, 9999); $info_banner_args = array('target' => '#' . $info_banner_id . ' .ultb3-title', 'media_sizes' => array('font-size' => $title_font_size, 'line-height' => $title_line_height)); $info_banner_data_list = get_ultimate_vc_responsive_media_css($info_banner_args); if ($title_color != '') { $title_style_inline .= 'color:' . $title_color . ';'; } if ($desc_font_family != '') { $temp = get_ultimate_font_family($desc_font_family); if ($temp != '') { $desc_style_inline .= 'font-family:' . $temp . ';'; } } $desc_style_inline .= get_ultimate_font_style($desc_font_style); // if($desc_font_size != '') // $desc_style_inline .= 'font-size:'.$desc_font_size.'px;'; // if($desc_line_height != '') // $desc_style_inline .= 'line-height:'.$desc_line_height.'px;'; if (is_numeric($desc_font_size)) { $desc_font_size = 'desktop:' . $desc_font_size . 'px;'; } if (is_numeric($desc_line_height)) { $desc_line_height = 'desktop:' . $desc_line_height . 'px;'; } $info_banner_desc_args = array('target' => '#' . $info_banner_id . ' .ultb3-desc', 'media_sizes' => array('font-size' => $desc_font_size, 'line-height' => $desc_line_height)); $info_banner_desc_data_list = get_ultimate_vc_responsive_media_css($info_banner_desc_args); if ($desc_color != '') { $desc_style_inline .= 'color:' . $desc_color . ';'; } if ($button_font_family != '') { $temp = get_ultimate_font_family($button_font_family); if ($temp != '') { $button_style_inline .= 'font-family:' . $temp . ';'; } } $button_style_inline .= get_ultimate_font_style($button_font_style); // if($button_font_size != '') // $button_style_inline .= 'font-size:'.$button_font_size.'px;'; // if($button_line_height != '') // $button_style_inline .= 'line-height:'.$button_line_height.'px;'; 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_banner_btn_args = array('target' => '#' . $info_banner_id . ' .ultb3-btn', 'media_sizes' => array('font-size' => $button_font_size, 'line-height' => $button_line_height)); $info_banner_btn_data_list = get_ultimate_vc_responsive_media_css($info_banner_btn_args); $banner_src = apply_filters('ult_get_img_single', $banner_image, 'url', 'full'); $banner_img_meta = wp_get_attachment_metadata($banner_image); if (isset($banner_img_meta['image_meta']['caption']) && $banner_img_meta['image_meta']['caption'] != '') { $caption = $banner_img_meta['image_meta']['caption']; } else { if (isset($banner_img_meta['image_meta']['title']) && $banner_img_meta['image_meta']['title'] != '') { $caption = $banner_img_meta['image_meta']['title']; } else { $caption = 'ib3 image'; } } if ($ib3_background != '') { $style .= 'background-color: ' . $ib3_background . ';'; } if ($ib3_border != 'no-border') { $style .= 'border:' . $ib3_border_width . 'px ' . $ib3_border . ' ' . $ib3_border_color . ';'; } $id = uniqid(rand()); $button_link_main = $title = $target = ''; if ($button_link != '') { $button_link_temp = vc_build_link($button_link); $button_link_main = $button_link_temp['url']; $title = $button_link_temp['title']; $target = $button_link_temp['target']; } if ($button_link_main == '') { $button_link_main = 'javascript:void(0);'; } $output .= '<div id="ultib3-' . $id . '" class="ultb3-box ' . $is_vc_49_plus . ' ' . $el_class . ' ' . $ib3_effect . '" style="' . $style . '">'; if ($overlay_color != '') { $output .= '<div class="ultb3-box-overlay" style="background:' . $overlay_color . ';"></div>'; } if (isset($banner_src) && $banner_src != '') { $output .= '<img src="' . $banner_src . '" style="' . $img_style . '" class="ultb3-img ' . $ib3_alignment . '" alt="' . $caption . '"/>'; } $output .= '<div id="' . $info_banner_id . '" class="ultb3-info ' . $info_alignment . '" data-animation="' . $info_effect . '" data-animation-delay="03">'; if ($banner_title != '') { $output .= '<div class="ultb3-title ult-responsive" ' . $info_banner_data_list . ' style="' . $title_style_inline . '">' . $banner_title . '</div>'; } if ($banner_desc != '') { $output .= '<div class="ultb3-desc ult-responsive" ' . $info_banner_desc_data_list . ' style="' . $desc_style_inline . '">' . $banner_desc . '</div>'; } if ($button_text != '') { if ($target != '') { $target = 'target="' . $target . '"'; } $output .= '<a href="' . $button_link_main . '" ' . $target . ' class="ultb3-btn ult-responsive" ' . $info_banner_btn_data_list . ' style="' . $button_style_inline . '">' . $button_text . '<i class="Defaults-angle-right"></i></a>'; } $output .= '</div>'; $output .= '</div>'; $global_button_style = $global_button_hover_style = ''; $is_css = false; if ($button_color != '') { $global_button_style .= 'border:' . $button_border_width . 'px solid ' . $button_color . ';'; $global_button_hover_style .= 'background:' . $button_color . ';'; $is_css = true; } if ($button_border_radius != '') { $global_button_style .= 'border-radius:' . $button_border_radius . 'px;'; $is_css = true; } if ($button_text_color != '') { $global_button_style .= 'color:' . $button_text_color . ';'; $is_css = true; } if ($button_text_hover_color != '') { $global_button_hover_style .= 'color:' . $button_text_hover_color . ';'; $is_css = true; } if ($is_css) { $output .= '<style> #ultib3-' . $id . ' { min-height:' . $banner_size . 'px; } #ultib3-' . $id . ' img.ultb3-img { height: ' . $banner_img_height . 'px; } #ultib3-' . $id . ' .ultb3-btn { ' . $global_button_style . ' } #ultib3-' . $id . ' .ultb3-btn:hover { ' . $global_button_hover_style . ' } </style>'; if ($banner_img_height_large_screen != '') { $output .= '<style> @media (min-width: 1824px) { #ultib3-' . $id . ' img.ultb3-img { height:' . $banner_img_height_large_screen . 'px; } } </style>'; } if ($banner_img_height_tablet != '') { $output .= '<style> @media (max-width: 1199px) { #ultib3-' . $id . ' img.ultb3-img { height:' . $banner_img_height_tablet . 'px; } } </style>'; } if ($banner_img_height_tablet_portrait != '') { $output .= '<style> @media (max-width: 991px) { #ultib3-' . $id . ' img.ultb3-img { height:' . $banner_img_height_tablet_portrait . 'px; } } </style>'; } if ($banner_img_height_mobile_landscape != '') { $output .= '<style> @media (max-width: 767px) { #ultib3-' . $id . ' img.ultb3-img { height:' . $banner_img_height_mobile_landscape . 'px; } } </style>'; } if ($banner_img_height_mobile != '') { $output .= '<style> @media (max-width: 479px) { #ultib3-' . $id . ' img.ultb3-img { height:' . $banner_img_height_mobile . 'px; } } </style>'; } } return $output; }
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 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)); $vc_version = defined('WPB_VC_VERSION') ? WPB_VC_VERSION : 0; $is_vc_49_plus = version_compare(4.9, $vc_version, '<=') ? 'ult-adjust-bottom-margin' : ''; $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_line_height != '') // $text_style_inline .= 'line-height:'.$text_line_height.'px;'; // responsive param if (is_numeric($text_font_size)) { $text_font_size = 'desktop:' . $text_font_size . 'px;'; } if (is_numeric($text_line_height)) { $text_line_height = 'desktop:' . $text_line_height . 'px;'; } $highlight_box_id = 'highlight-box-wrap-' . rand(1000, 9999); $highlight_box_args = array('target' => '#' . $highlight_box_id . '', 'media_sizes' => array('font-size' => $text_font_size, 'line-height' => $text_line_height)); $data_list = get_ultimate_vc_responsive_media_css($highlight_box_args); if ($text_color != '') { $text_style_inline .= 'color:' . $text_color . ';'; } /*$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 id="' . $highlight_box_id . '" ' . $data_list . ' class="ultimate-call-to-action ' . $is_vc_49_plus . ' ' . $el_class . ' ult-responsive" 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 . ' ult-responsive">' . $content . '</div>'; $output .= $ctaction_link_html . '</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 = $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 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 = $box_border_color_advanced = ''; $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' => 'selector', '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' => 'solid', 'icon_border_size' => '1', 'icon_border_radius' => '500', 'icon_border_spacing' => '50', 'icon_link' => '', 'icon_animation' => '', 'block_title_front' => '', 'block_desc_front' => '', 'block_title_back' => '', 'block_desc_back' => '', 'custom_link' => '', 'button_text' => '', 'button_link' => '', 'button_bg' => '#333333', 'button_txt' => '#FFFFFF', 'flip_type' => 'horizontal_flip_left', 'text_color' => '#333333', 'bg_color' => '#efefef', 'block_text_color' => '#333333', 'block_front_color' => '#efefef', 'block_back_color' => '#efefef', 'el_class' => '', 'block_back_text_color' => '#333333', 'border_size' => '2', 'border_color' => '#A4A4A4', 'box_border_style' => 'none', 'box_border_size' => '2', 'box_border_color' => '#A4A4A4', 'box_border_color_back' => '#A4A4A4', 'height_type' => 'ifb-jq-height', 'box_height' => '300', 'flip_box_style' => 'simple', 'title_font' => '', 'title_font_style' => '', 'title_font_size' => '', 'title_font_line_height' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_font_size' => '', 'desc_font_line_height' => '', 'cont_align' => ''), $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;'; 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;'; } $flip_box_id = 'flip-box-wrap-' . rand(1000, 9999); $ult_flip_box_args = array('target' => '#' . $flip_box_id . ' h3.ult-responsive', 'media_sizes' => array('font-size' => $title_font_size, 'line-height' => $title_font_line_height)); $data_list = get_ultimate_vc_responsive_media_css($ult_flip_box_args); /* 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;'; } $ult_flip_box_args_desc = array('target' => '#' . $flip_box_id . ' .ult-responsive', 'media_sizes' => array('font-size' => $desc_font_size, 'line-height' => $desc_font_line_height)); $data_list_desc = get_ultimate_vc_responsive_media_css($ult_flip_box_args_desc); //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 . ';'; //$desc_style .= '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 . ';'; $desc_style .= 'color:' . $block_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;'; } } if ($cont_align == '') { $cont_align = 'off'; } $verticalcont = ''; if ($cont_align == 'on') { $verticalcont .= 'ifb-flip-box-section-vertical-middle'; } $output .= '<div class="flip-box-wrap">'; $output .= '<div class="flip-box ' . $height_type . ' ' . $el_class . ' ' . $flip_type . ' flip-' . $height_type . '" ' . $css_trans . ' style="' . $height . '" ' . $box_style_data . '>'; $output .= '<div class="ifb-flip-box" id="' . $flip_box_id . '">'; $output .= '<div class="ifb-face ifb-front " style="' . $f_style . ' ' . $box_border . ' ' . $border_front . '"> <div class="ifb-flip-box-section ' . $verticalcont . '"> '; if ($icon !== '' || $icon_img !== '') { $output .= '<div class="flip-box-icon">' . $flip_icon . '</div>'; } if ($block_title_front != '') { $output .= '<h3 class="ult-responsive" ' . $data_list . ' style="' . $front_text . ' ' . $title_style . '">' . $block_title_front . '</h3>'; } if ($block_desc_front != '') { $output .= '<div class="ifb-flip-box-section-content ult-responsive" ' . $data_list_desc . ' style="' . $desc_style . $front_text . '"><p>' . $block_desc_front . '</p></div>'; } $output .= '</div></div><!-- END .front --> <div class="ifb-face ifb-back" style="' . $b_style . ' ' . $box_border . ' ' . $border_back . '"> <div class="ifb-flip-box-section ' . $verticalcont . '">'; if ($block_title_back != '') { $output .= '<h3 class="ult-responsive" ' . $data_list . ' style="' . $back_text . ' ' . $title_style . '">' . $block_title_back . '</h3>'; } if ($block_desc_back != '') { if ($button_link !== '') { $output .= '<div class="ifb-desc-back">'; } $output .= '<div class="ifb-flip-box-section-content ult-responsive" ' . $data_list_desc . ' style="' . $desc_style . $back_text . '"><p>' . $block_desc_back . '</p></div>'; 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></div><!-- END .back -->'; $output .= '</div> <!-- ifb-flip-box -->'; $output .= '</div> <!-- flip-box -->'; $output .= '</div><!-- End icon block -->'; return $output; }
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(); }
function counter_shortcode($atts) { // enqueue js //wp_enqueue_script('ultimate-appear'); //wp_enqueue_script('ultimate-custom'); //wp_enqueue_script('front-js',plugins_url('../assets/min-js/countUp.min.js',__FILE__)); $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 = $counter_title = $counter_value = $icon_position = $counter_style = $font_size_title = $font_size_counter = $counter_font = $title_font = $speed = $counter_sep = $counter_suffix = $counter_prefix = $counter_decimal = $counter_color_txt = $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 = $suf_pref_typography = $suf_pref_font = $suf_pref_font_style = $suf_pref_font_color = $suf_pref_font_size = $suf_pref_line_height = ''; extract(shortcode_atts(array('icon_type' => 'selector', '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', 'icon_link' => '', 'icon_animation' => '', 'counter_title' => '', 'counter_value' => '1250', 'counter_sep' => ',', 'counter_suffix' => '', 'counter_prefix' => '', 'counter_decimal' => '.', 'icon_position' => 'top', 'counter_style' => '', 'speed' => '3', 'font_size_title' => '18', 'font_size_counter' => '28', 'counter_color_txt' => '', 'title_font' => '', 'title_font_style' => '', 'title_font_size' => '', 'title_font_line_height' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_font_size' => '', 'desc_font_color' => '', 'desc_font_line_height' => '', 'el_class' => '', 'suf_pref_font' => '', 'suf_pref_font_color' => '', 'suf_pref_font_size' => '', 'suf_pref_line_height' => '', 'suf_pref_font_style' => '', 'css_stat_counter' => ''), $atts)); $css_stat_counter = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class($css_stat_counter, ' '), "stat_counter", $atts); $css_stat_counter = esc_attr($css_stat_counter); $class = $style = $title_style = $desc_style = $suf_pref_style = ''; //$font_args = array(); $stats_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 . '"]'); /* 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;'; //Responsive param if ($title_font_size != '') { $font_size_title = ''; } 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;'; } $counter_resp_id = "counter-responsv-wrap-" . rand(1000, 9999); $stats_counter_args = array('target' => '#' . $counter_resp_id . ' .stats-text', 'media_sizes' => array('font-size' => $title_font_size, 'line-height' => $title_font_line_height)); $stats_counter_data_list = get_ultimate_vc_responsive_media_css($stats_counter_args); /* 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;'; //Responsive param if ($desc_font_size != '' || $suf_pref_font_size != '') { $font_size_counter = ''; } 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;'; } $stats_counter_val_args = array('target' => '#' . $counter_resp_id . ' .stats-number', 'media_sizes' => array('font-size' => $desc_font_size, 'line-height' => $desc_font_line_height)); $stats_counter_val_data_list = get_ultimate_vc_responsive_media_css($stats_counter_val_args); if ($desc_font_color != '') { $desc_style .= 'color:' . $desc_font_color . ';'; } //enquque_ultimate_google_fonts($font_args); if ($counter_color_txt !== '') { $counter_color = 'color:' . $counter_color_txt . ';'; } else { $counter_color = ''; } if ($icon_color != '') { $style .= 'color:' . $icon_color . ';'; } if ($icon_animation !== 'none') { $css_trans = 'data-animation="' . $icon_animation . '" data-animation-delay="03"'; } if ($font_size_counter !== '') { $counter_font = 'font-size:' . $font_size_counter . 'px;'; } $title_font = 'font-size:' . $font_size_title . 'px;'; // Responsive param if ($suf_pref_font != '') { $font_family = get_ultimate_font_family($suf_pref_font); $suf_pref_style .= 'font-family:\'' . $font_family . '\';'; //array_push($font_args, $title_font); } if ($suf_pref_font_style != '') { $suf_pref_style .= get_ultimate_font_style($suf_pref_font_style); } // $suf_pref_style .= 'font-size:'.$suf_pref_font_size.'px;'; // $suf_pref_style .='line-height:'.$suf_pref_line_height.'px;'; // Responsive param if (is_numeric($suf_pref_font_size)) { $suf_pref_font_size = 'desktop:' . $suf_pref_font_size . 'px;'; } if (is_numeric($suf_pref_line_height)) { $suf_pref_line_height = 'desktop:' . $suf_pref_line_height . 'px;'; } $stats_counter_sufpref_args = array('target' => '#' . $counter_resp_id . ' .mycust', 'media_sizes' => array('font-size' => $suf_pref_font_size, 'line-height' => $suf_pref_line_height)); $stats_counter_sufpref_data_list = get_ultimate_vc_responsive_media_css($stats_counter_sufpref_args); $suf_pref_style .= 'color:' . $suf_pref_font_color; if ($counter_style != '') { $class = $counter_style; if (strpos($counter_style, 'no_bg')) { $style .= "border:2px solid " . $counter_icon_bg_color . ';'; } elseif (strpos($counter_style, 'with_bg')) { if ($counter_icon_bg_color != '') { $style .= 'background:' . $counter_icon_bg_color . ';'; } } } if ($el_class != '') { $class .= ' ' . $el_class; } $ic_position = 'stats-' . $icon_position; $ic_class = 'aio-icon-' . $icon_position; $output = '<div class="stats-block ' . $ic_position . ' ' . $class . ' ' . $css_stat_counter . '">'; //$output .= '<div class="stats-icon" style="'.$style.'"> // <i class="'.$stats_icon.'"></i> // </div>'; $id = 'counter_' . uniqid(rand()); if ($counter_sep == "") { $counter_sep = 'none'; } if ($counter_decimal == "") { $counter_decimal = 'none'; } if ($icon_position !== "right") { $output .= '<div class="' . $ic_class . '">' . $stats_icon . '</div>'; } $output .= '<div class="stats-desc" id="' . $counter_resp_id . '">'; if ($counter_prefix !== '') { $output .= '<div class="counter_prefix mycust ult-responsive" ' . $stats_counter_sufpref_data_list . ' style="' . $counter_font . ' ' . $suf_pref_style . '">' . $counter_prefix . '</div>'; } $output .= '<div id="' . $id . '" data-id="' . $id . '" ' . $stats_counter_val_data_list . ' class="stats-number ult-responsive" style="' . $counter_font . ' ' . $counter_color . ' ' . $desc_style . '" data-speed="' . $speed . '" data-counter-value="' . $counter_value . '" data-separator="' . $counter_sep . '" data-decimal="' . $counter_decimal . '">0</div>'; if ($counter_suffix !== '') { $output .= '<div class="counter_suffix mycust ult-responsive" ' . $stats_counter_sufpref_data_list . ' style="' . $counter_font . ' ' . $suf_pref_style . '">' . $counter_suffix . '</div>'; } $output .= '<div ' . $counter_resp_id . ' ' . $stats_counter_data_list . ' class="stats-text ult-responsive" style="' . $title_font . ' ' . $counter_color . ' ' . $title_style . '">' . $counter_title . '</div>'; $output .= '</div>'; if ($icon_position == "right") { $output .= '<div class="' . $ic_class . '">' . $stats_icon . '</div>'; } $output .= '</div>'; $is_preset = false; //Display settings for Preset 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>'; } return $output; }