function ult_buttons_shortcode($atts) { $output = $btn_title = $btn_link = $btn_size = $btn_width = $btn_height = $btn_hover = $btn_bg_color = $btn_radius = $btn_shadow = ''; $btn_shadow_color = $btn_bg_color_hover = $btn_border_style = $btn_color_border = $btn_border_size = $btn_shadow_size = $el_class = ''; $btn_font_family = $btn_font_style = $btn_title_color = $btn_font_size = $icon = $icon_size = $icon_color = $btn_icon_pos = $btn_anim_effect = ''; $btn_padding_left = $btn_padding_top = $button_bg_img = $btn_title_color_hover = $btn_align = $btn_color_border_hover = $btn_shadow_color_hover = ''; $btn_shadow_click = $enable_tooltip = $tooltip_text = $tooltip_pos = ''; extract(shortcode_atts(array('btn_title' => '', 'btn_link' => '', 'btn_size' => '', 'btn_width' => '', 'btn_height' => '', 'btn_padding_left' => '', 'btn_padding_top' => '', 'btn_hover' => '', 'btn_bg_color' => '', 'btn_radius' => '', 'btn_shadow' => '', 'btn_shadow_color' => '', 'btn_shadow_size' => '', 'btn_bg_color_hover' => '', 'btn_title_color_hover' => '', 'btn_border_style' => '', 'btn_color_border' => '', 'btn_color_border_hover' => '', 'btn_border_size' => '', 'btn_font_family' => '', 'btn_font_style' => '', 'btn_title_color' => '', 'btn_font_size' => '', 'icon' => '', 'icon_size' => '', 'icon_color' => '', 'btn_icon_pos' => '', 'btn_anim_effect' => '', 'button_bg_img' => '', 'btn_align' => '', 'btn_shadow_color_hover' => '', 'btn_shadow_click' => '', 'enable_tooltip' => '', 'tooltip_text' => '', 'tooltip_pos' => '', 'el_class' => ''), $atts)); $style = $hover_style = $btn_style_inline = $link_sufix = $link_prefix = $img = $shadow_hover = $shadow_click = $shadow_color = $box_shadow = ''; $tooltip = $tooltip_class = ''; $el_class .= ' ' . $btn_anim_effect . ' '; $uniqid = uniqid(); $tooltip_class = 'tooltip-' . $uniqid; if ($enable_tooltip == "yes") { wp_enqueue_script('aio-tooltip', plugins_url('../assets/min-js/', __FILE__) . 'tooltip.min.js', array('jquery')); wp_enqueue_style('aio-tooltip', plugins_url('../assets/min-css/', __FILE__) . 'tooltip.min.css'); $tooltip .= 'data-toggle="tooltip" data-placement="' . $tooltip_pos . '" title="' . $tooltip_text . '"'; $tooltip_class .= " ubtn-tooltip " . $tooltip_pos; } if ($btn_shadow_click !== "enable") { $shadow_click = 'none'; } if ($btn_shadow_color_hover == "") { $shadow_color = $btn_shadow_color; } else { $shadow_color = $btn_shadow_color_hover; } if ($button_bg_img !== '') { $img = wp_get_attachment_image_src($button_bg_img, 'large'); $img = $img[0]; } if ($btn_link !== '') { $href = vc_build_link($btn_link); if ($href['url'] !== "") { $target = isset($href['target']) ? "target='" . $href['target'] . "'" : ''; if ($btn_size == "ubtn-block") { $tooltip_class .= ' ubtn-block'; } $link_prefix .= '<a class="ubtn-link ' . $btn_align . ' ' . $tooltip_class . '" ' . $tooltip . ' href = "' . $href['url'] . '" ' . $target . '>'; $link_sufix .= '</a>'; } } else { if ($enable_tooltip !== "") { $link_prefix .= '<span class="' . $btn_align . ' ' . $tooltip_class . '" ' . $tooltip . '>'; $link_sufix .= '</span>'; } } if ($btn_icon_pos !== '' && $icon !== 'none' && $icon !== '') { $el_class .= ' ubtn-sep-icon ' . $btn_icon_pos . ' '; } if ($btn_font_family != '') { $mhfont_family = get_ultimate_font_family($btn_font_family); $btn_style_inline .= 'font-family:\'' . $mhfont_family . '\';'; //enqueue google font $args = array($mhfont_family); enquque_ultimate_google_fonts($args); } $btn_style_inline .= get_ultimate_font_style($btn_font_style); if ($btn_font_size !== '') { $btn_style_inline .= 'font-size:' . $btn_font_size . 'px;'; } $style .= $btn_style_inline; if ($btn_size == 'ubtn-custom') { $style .= 'width:' . $btn_width . 'px;'; $style .= 'min-height:' . $btn_height . 'px;'; $style .= 'padding:' . $btn_padding_top . 'px ' . $btn_padding_left . 'px;'; } if ($btn_border_style !== '') { $style .= 'border-radius:' . $btn_radius . 'px;'; $style .= 'border-width:' . $btn_border_size . 'px;'; $style .= 'border-color:' . $btn_color_border . ';'; $style .= 'border-style:' . $btn_border_style . ';'; } else { $style .= 'border:none;'; } if ($btn_shadow !== '') { switch ($btn_shadow) { case 'shd-top': $style .= 'box-shadow: 0 -' . $btn_shadow_size . 'px ' . $btn_shadow_color . ';'; // $style .= 'bottom: '.($btn_shadow_size-3).'px;'; $box_shadow .= '0 -' . $btn_shadow_size . 'px ' . $btn_shadow_color . ';'; if ($shadow_click !== "none") { $shadow_hover .= '0 -3px ' . $shadow_color . ';'; } else { $shadow_hover .= '0 -' . $btn_shadow_size . 'px ' . $shadow_color . ';'; } break; case 'shd-bottom': $style .= 'box-shadow: 0 ' . $btn_shadow_size . 'px ' . $btn_shadow_color . ';'; // $style .= 'top: '.($btn_shadow_size-3).'px;'; $box_shadow .= '0 ' . $btn_shadow_size . 'px ' . $btn_shadow_color . ';'; if ($shadow_click !== "none") { $shadow_hover .= '0 3px ' . $shadow_color . ';'; } else { $shadow_hover .= '0 ' . $btn_shadow_size . 'px ' . $shadow_color . ';'; } break; case 'shd-left': $style .= 'box-shadow: -' . $btn_shadow_size . 'px 0 ' . $btn_shadow_color . ';'; // $style .= 'right: '.($btn_shadow_size-3).'px;'; $box_shadow .= '-' . $btn_shadow_size . 'px 0 ' . $btn_shadow_color . ';'; if ($shadow_click !== "none") { $shadow_hover .= '-3px 0 ' . $shadow_color . ';'; } else { $shadow_hover .= '-' . $btn_shadow_size . 'px 0 ' . $shadow_color . ';'; } break; case 'shd-right': $style .= 'box-shadow: ' . $btn_shadow_size . 'px 0 ' . $btn_shadow_color . ';'; // $style .= 'left: '.($btn_shadow_size-3).'px;'; $box_shadow .= $btn_shadow_size . 'px 0 ' . $btn_shadow_color . ';'; if ($shadow_click !== "none") { $shadow_hover .= '3px 0 ' . $shadow_color . ';'; } else { $shadow_hover .= $btn_shadow_size . 'px 0 ' . $shadow_color . ';'; } break; } } if ($btn_bg_color !== '') { $style .= 'background: ' . $btn_bg_color . ';'; } if ($btn_title_color !== '') { $style .= 'color: ' . $btn_title_color . ';'; } if ($btn_shadow) { $el_class .= ' ubtn-shd '; } if ($btn_align) { $el_class .= ' ' . $btn_align . ' '; } if ($btn_title == "" && $icon !== "") { $el_class .= ' ubtn-only-icon '; } $output .= '<button type="button" class="ubtn ' . $btn_size . ' ' . $btn_hover . ' ' . $el_class . ' ' . $btn_shadow . '" data-hover="' . $btn_title_color_hover . '" data-border-color="' . $btn_color_border . '" data-hover-bg="' . $btn_bg_color_hover . '" data-border-hover="' . $btn_color_border_hover . '" data-shadow-hover="' . $shadow_hover . '" data-shadow-click="' . $shadow_click . '" data-shadow="' . $box_shadow . '" data-shd-shadow="' . $btn_shadow_size . '" style="' . $style . '">'; if ($icon !== '') { $output .= '<span class="ubtn-data ubtn-icon"><i class="' . $icon . '" style="font-size:' . $icon_size . 'px;color:' . $icon_color . ';"></i></span>'; } $output .= '<span class="ubtn-hover"></span>'; $output .= '<span class="ubtn-data ubtn-text">' . $btn_title . '</span>'; $output .= '</button>'; $output = $link_prefix . $output . $link_sufix; if ($btn_align == "ubtn-center") { $output = '<div class="ubtn-ctn-center">' . $output . '</div>'; } if ($img !== '') { $html = '<div class="ubtn-img-container">'; $html .= '<img src="' . $img . '"/>'; $html .= $output; $html .= '</div>'; $output = $html; } if ($enable_tooltip !== "") { $output .= '<script> jQuery(function () { jQuery(".tooltip-' . $uniqid . '").bsf_tooltip(); }) </script>'; } return $output; }
function block_shortcode($atts) { $icon_type = $icon_img = $img_width = $icon = $icon_color = $icon_color_bg = $icon_size = $icon_style = $icon_border_style = $icon_border_radius = $icon_color_border = $icon_border_size = $icon_border_spacing = $icon_link = $el_class = $icon_animation = $block_title_front = $block_desc_front = $block_title_back = $block_desc_back = $button_text = $button_link = $block_text_color = $block_front_color = $block_back_color = $block_back_text_color = $animation = $font_size_icon = $box_border_style = $box_border_size = $box_border_color = $border_size = $border_color = $box_border_color_back = $custom_link = $button_bg = $button_txt = $height_type = $box_height = $flip_type = $flip_box_style = $text_color = $bg_color = $front_text = $back_text = ''; $desc_font_line_height = $title_font_line_height = $title_font = $title_font_style = $title_font_size = $desc_font = $desc_font_style = $desc_font_size = ''; extract(shortcode_atts(array('icon_type' => '', 'icon' => '', 'icon_img' => '', 'img_width' => '', 'icon_size' => '', 'icon_color' => '', 'icon_style' => '', 'icon_color_bg' => '', 'icon_color_border' => '', 'icon_border_style' => '', 'icon_border_size' => '', 'icon_border_radius' => '', 'icon_border_spacing' => '', 'icon_link' => '', 'icon_animation' => '', 'block_title_front' => '', 'block_desc_front' => '', 'block_title_back' => '', 'block_desc_back' => '', 'custom_link' => '', 'button_text' => '', 'button_link' => '', 'button_bg' => '', 'button_txt' => '', 'flip_type' => '', 'text_color' => '', 'bg_color' => '', 'block_text_color' => '', 'block_front_color' => '', 'block_back_color' => '', 'el_class' => '', 'block_back_text_color' => '', 'border_size' => '', 'border_color' => '', 'box_border_style' => '', 'box_border_size' => '', 'box_border_color' => '', 'box_border_color_back' => '', 'height_type' => '', 'box_height' => '', 'flip_box_style' => '', 'title_font' => '', 'title_font_style' => '', 'title_font_size' => '', 'title_font_line_height' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_font_size' => '', 'desc_font_line_height' => ''), $atts)); $output = $f_style = $b_style = $ico_color = $box_border = $icon_border = $link_style = $height = $link_sufix = $link_prefix = $link_style = ''; $title_style = $desc_style = ''; $font_args = array(); if ($icon_type == 'custom') { $icon_style = 'none'; } $flip_icon = do_shortcode('[just_icon icon_type="' . $icon_type . '" icon="' . $icon . '" icon_img="' . $icon_img . '" img_width="' . $img_width . '" icon_size="' . $icon_size . '" icon_color="' . $icon_color . '" icon_style="' . $icon_style . '" icon_color_bg="' . $icon_color_bg . '" icon_color_border="' . $icon_color_border . '" icon_border_style="' . $icon_border_style . '" icon_border_size="' . $icon_border_size . '" icon_border_radius="' . $icon_border_radius . '" icon_border_spacing="' . $icon_border_spacing . '" icon_link="' . $icon_link . '" icon_animation="' . $icon_animation . '"]'); $css_trans = $icon_border = $box_border = ''; $height = $target = ''; /* title */ if ($title_font != '') { $font_family = get_ultimate_font_family($title_font); $title_style .= 'font-family:' . $font_family . ';'; array_push($font_args, $title_font); } if ($title_font_style != '') { $title_style .= get_ultimate_font_style($title_font_style); } if ($title_font_size != '') { $title_style .= 'font-size:' . $title_font_size . 'px;'; } if ($title_font_line_height != '') { $title_style .= 'line-height:' . $title_font_line_height . 'px;'; } /* description */ if ($desc_font != '') { $font_family = get_ultimate_font_family($desc_font); $desc_style .= 'font-family:' . $font_family . ';'; array_push($font_args, $desc_font); } if ($desc_font_style != '') { $desc_style .= get_ultimate_font_style($desc_font_style); } if ($desc_font_size != '') { $desc_style .= 'font-size:' . $desc_font_size . 'px;'; } if ($desc_font_line_height != '') { $desc_style .= 'line-height:' . $desc_font_line_height . 'px;'; } enquque_ultimate_google_fonts($font_args); if ($icon_border_style !== 'none') { $icon_border .= 'border-style: ' . $icon_border_style . ';'; $icon_border .= 'border-width: ' . $icon_border_size . 'px;'; } if ($height_type == "ifb-custom-height") { $height = 'height:' . $box_height . 'px;'; $flip_type .= ' flip-box-custom-height'; } if ($flip_box_style !== 'simple') { $border_front = 'border-color:' . $box_border_color . ';'; $border_back = 'border-color:' . $box_border_color_back . ';'; if ($box_border_style !== 'none') { $box_border .= 'border-style: ' . $box_border_style . ';'; $box_border .= 'border-width: ' . $box_border_size . 'px;'; } if ($animation !== 'none') { $css_trans = 'data-animation="' . $animation . '" data-animation-delay="03"'; } if ($block_text_color != '') { $f_style .= 'color:' . $block_text_color . ';'; $front_text .= 'color:' . $block_text_color . ';'; } if ($block_front_color != '') { $f_style .= 'background:' . $block_front_color . ';'; } if ($block_back_text_color != '') { $b_style .= 'color:' . $block_back_text_color . ';'; $back_text .= 'color:' . $block_back_text_color . ';'; } if ($block_back_color != '') { $b_style .= 'background:' . $block_back_color . ';'; } } else { if ($text_color != '') { $f_style .= 'color:' . $text_color . ';'; $b_style .= 'color:' . $text_color . ';'; $front_text = $back_text = 'color:' . $text_color . ';'; } if ($bg_color != '') { $f_style .= 'background:' . $bg_color . ';'; $b_style .= 'background:' . $bg_color . ';'; } if ($border_color != '') { $border_front = 'border-color:' . $border_color . ';'; $border_back = 'border-color:' . $border_color . ';'; $box_border = 'border-width: ' . $border_size . 'px;'; $box_border .= 'border-style: solid;'; } } $output .= '<div class="flip-box-wrap">'; $output .= '<div class="flip-box ' . $height_type . ' ' . $el_class . ' ' . $flip_type . '" ' . $css_trans . ' style="' . $height . '">'; $output .= '<div class="ifb-flip-box">'; $output .= '<div class="ifb-face ifb-front" style="' . $f_style . ' ' . $box_border . ' ' . $border_front . '">'; if ($icon !== '' || $icon_img !== '') { $output .= '<div class="flip-box-icon">' . $flip_icon . '</div>'; } if ($block_title_front != '') { $output .= '<h3 style="' . $front_text . ' ' . $title_style . '">' . $block_title_front . '</h3>'; } if ($block_desc_front != '') { $output .= '<p style="' . $desc_style . '">' . $block_desc_front . '</p>'; } $output .= '</div><!-- END .front --> <div class="ifb-face ifb-back" style="' . $b_style . ' ' . $box_border . ' ' . $border_back . '">'; if ($block_title_back != '') { $output .= '<h3 style="' . $back_text . ' ' . $title_style . '">' . $block_title_back . '</h3>'; } if ($block_desc_back != '') { if ($button_link !== '') { $output .= '<div class="ifb-desc-back">'; } $output .= '<p style="' . $desc_style . '" >' . $block_desc_back . '</p>'; if ($button_link !== '') { $output .= '</div>'; } } if ($button_text !== '' && $custom_link) { $link_prefix = '<div class="flip_link">'; if ($button_bg !== '' && $button_txt !== '') { $link_style = 'style="background:' . $button_bg . '; color:' . $button_txt . ';"'; } if ($button_link !== '') { $href = vc_build_link($button_link); if (isset($href['target']) && $href['target'] != '') { $target = 'target="' . $href['target'] . '"'; } $link_prefix .= '<a href = "' . $href['url'] . '" ' . $target . ' ' . $link_style . '>'; $link_sufix .= '</a>'; } $link_sufix .= '</div>'; $output .= $link_prefix . $button_text . $link_sufix; } $output .= '</div><!-- END .back -->'; $output .= '</div> <!-- ifb-flip-box -->'; $output .= '</div> <!-- flip-box -->'; $output .= '</div><!-- End icon block -->'; return $output; }
public static function generate_design($atts, $content = null) { $package_heading = $package_sub_heading = $package_price = $package_unit = $package_btn_text = $package_link = $package_featured = $color_bg_main = $color_txt_main = $color_bg_highlight = $color_txt_highlight = $color_scheme = $el_class = ''; extract(shortcode_atts(array("color_scheme" => "", "package_heading" => "", "package_sub_heading" => "", "package_price" => "", "package_unit" => "", "package_btn_text" => "", "package_link" => "", "package_featured" => "", "color_bg_main" => "", "color_txt_main" => "", "color_bg_highlight" => "", "color_txt_highlight" => "", "package_name_font_family" => "", "package_name_font_style" => "", "package_name_font_size" => "", "package_name_font_color" => "", "package_name_line_height" => "", "subheading_font_family" => "", "subheading_font_style" => "", "subheading_font_size" => "", "subheading_font_color" => "", "subheading_line_height" => "", "price_font_family" => "", "price_font_style" => "", "price_font_size" => "", "price_font_color" => "", "price_line_height" => "", "price_unit_font_family" => "", "price_unit_font_style" => "", "price_unit_font_size" => "", "price_unit_font_color" => "", "price_unit_line_height" => "", "features_font_family" => "", "features_font_style" => "", "features_font_size" => "", "features_font_color" => "", "features_line_height" => "", "button_font_family" => "", "button_font_style" => "", "button_font_size" => "", "button_font_color" => "", "button_line_height" => "", "el_class" => ""), $atts)); $output = $link = $target = $featured = $featured_style = $normal_style = $dynamic_style = ''; if ($color_scheme == "custom") { if ($color_bg_main !== "") { $normal_style .= 'background:' . $color_bg_main . ';'; } if ($color_txt_main !== "") { $normal_style .= 'color:' . $color_txt_main . ';'; } if ($color_bg_highlight !== "") { $featured_style .= 'background:' . $color_bg_highlight . ';'; } if ($color_txt_highlight !== "") { $featured_style .= 'color:' . $color_txt_highlight . ';'; } } if ($package_link !== "") { $link = vc_build_link($package_link); if (isset($link['target'])) { $target = 'target="' . $link['target'] . '"'; } else { $target = ''; } $link = $link['url']; } else { $link = "#"; } if ($package_featured !== "") { $featured = "ult_featured"; $dynamic_style = $featured_style; } else { $dynamic_style = $normal_style; } /* Typography */ $package_name_inline = $sub_heading_inline = $price_inline = $price_unit_inline = $features_inline = $button_inline = ''; // package name/title if ($package_name_font_family != '') { $pkgfont_family = get_ultimate_font_family($package_name_font_family); $package_name_inline .= 'font-family:\'' . $pkgfont_family . '\';'; } $package_name_inline .= get_ultimate_font_style($package_name_font_style); if ($package_name_font_size != '') { $package_name_inline .= 'font-size:' . $package_name_font_size . 'px;'; } if ($package_name_font_color != '') { $package_name_inline .= 'color:' . $package_name_font_color . ';'; } if ($package_name_line_height != '') { $package_name_inline .= 'line-height:' . $package_name_line_height . 'px;'; } // sub heading if ($subheading_font_family != '') { $shfont_family = get_ultimate_font_family($subheading_font_family); $sub_heading_inline .= 'font-family:\'' . $shfont_family . '\';'; } $sub_heading_inline .= get_ultimate_font_style($subheading_font_style); if ($subheading_font_size != '') { $sub_heading_inline .= 'font-size:' . $subheading_font_size . 'px;'; } if ($subheading_font_color != '') { $sub_heading_inline .= 'color:' . $subheading_font_color . ';'; } if ($subheading_line_height != '') { $sub_heading_inline .= 'line-height:' . $subheading_line_height . 'px;'; } // price if ($price_font_family != '') { $pricefont_family = get_ultimate_font_family($price_font_family); $price_inline .= 'font-family:\'' . $pricefont_family . '\';'; } $price_inline .= get_ultimate_font_style($price_font_style); if ($price_font_size != '') { $price_inline .= 'font-size:' . $price_font_size . 'px;'; } if ($price_font_color != '') { $price_inline .= 'color:' . $price_font_color . ';'; } if ($price_line_height != '') { $price_inline .= 'line-height:' . $price_line_height . 'px;'; } // price unit if ($price_unit_font_family != '') { $price_unitfont_family = get_ultimate_font_family($price_unit_font_family); $price_unit_inline .= 'font-family:\'' . $price_unitfont_family . '\';'; } $price_unit_inline .= get_ultimate_font_style($price_unit_font_style); if ($price_unit_font_size != '') { $price_unit_inline .= 'font-size:' . $price_unit_font_size . 'px;'; } if ($price_unit_font_color != '') { $price_unit_inline .= 'color:' . $price_unit_font_color . ';'; } if ($price_unit_line_height != '') { $price_unit_inline .= 'line-height:' . $price_unit_line_height . 'px;'; } // features if ($features_font_family != '') { $featuresfont_family = get_ultimate_font_family($features_font_family); $features_inline .= 'font-family:\'' . $featuresfont_family . '\';'; } $features_inline .= get_ultimate_font_style($features_font_style); if ($features_font_size != '') { $features_inline .= 'font-size:' . $features_font_size . 'px;'; } if ($features_font_color != '') { $features_inline .= 'color:' . $features_font_color . ';'; } if ($features_line_height != '') { $features_inline .= 'line-height:' . $features_line_height . 'px;'; } // button if ($button_font_family != '') { $buttonfont_family = get_ultimate_font_family($button_font_family); $button_inline .= 'font-family:\'' . $buttonfont_family . '\';'; } $button_inline .= get_ultimate_font_style($button_font_style); if ($button_font_size != '') { $button_inline .= 'font-size:' . $button_font_size . 'px;'; } if ($button_font_color != '') { $button_inline .= 'color:' . $button_font_color . ';'; } if ($button_line_height != '') { $button_inline .= 'line-height:' . $button_line_height . 'px;'; } $args = array($package_name_font_family, $subheading_font_family, $price_font_family, $features_font_family, $button_font_family); enquque_ultimate_google_fonts($args); /* End Typography */ $output .= '<div class="ult_pricing_table_wrap ult_design_1 ' . $featured . ' ult-cs-' . $color_scheme . ' ' . $el_class . '"> <div class="ult_pricing_table" style="' . $featured_style . '">'; $output .= '<div class="ult_pricing_heading"> <h3 style="' . $package_name_inline . '">' . $package_heading . '</h3>'; if ($package_sub_heading !== '') { $output .= '<h5 style="' . $sub_heading_inline . '">' . $package_sub_heading . '</h5>'; } $output .= '</div><!--ult_pricing_heading-->'; $output .= '<div class="ult_price_body_block"> <div class="ult_price_body"> <div class="ult_price"> <span class="ult_price_figure" style="' . $price_inline . '">' . $package_price . '</span> <span class="ult_price_term" style="' . $price_unit_inline . '">' . $package_unit . '</span> </div> </div> </div><!--ult_price_body_block-->'; $output .= '<div class="ult_price_features" style="' . $features_inline . '"> ' . wpb_js_remove_wpautop(do_shortcode($content), true) . ' </div><!--ult_price_features-->'; if ($package_btn_text !== "") { $output .= '<div class="ult_price_link" style="' . $normal_style . '"> <a href="' . $link . '" ' . $target . ' class="ult_price_action_button" style="' . $featured_style . ' ' . $button_inline . '">' . $package_btn_text . '</a> </div><!--ult_price_link-->'; } $output .= '<div class="ult_clr"></div> </div><!--pricing_table--> </div><!--pricing_table_wrap-->'; return $output; }
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' => '', 'ctaction_background_hover' => '', 'text_font_family' => '', 'text_font_style' => '', 'text_font_size' => '', 'text_color' => '', 'text_line_height' => '', 'ctaction_link' => '', 'ctaction_override' => '0', 'ctaction_padding_top' => '', 'ctaction_padding_bottom' => '', 'enable_icon' => '', "icon_type" => "", "icon" => "", "icon_color" => "", "icon_style" => "", "icon_color_bg" => "", "icon_border_style" => "", "icon_color_border" => "", "icon_border_size" => "", "icon_border_radius" => "", "icon_border_spacing" => "", "icon_img" => "", "img_width" => "60", "icon_size" => "", 'effect' => 'no-effect', 'el_class' => ''), $atts)); $el_class .= ' ' . $content_alignment; /* typography */ if ($text_font_family != '') { $temp = get_ultimate_font_family($text_font_family); $text_style_inline .= 'font-family:' . $temp . ';'; } $text_style_inline .= get_ultimate_font_style($text_font_style); if ($text_font_size != '') { $text_style_inline .= 'font-size:' . $text_font_size . 'px;'; } if ($text_color != '') { $text_style_inline .= 'color:' . $text_color . ';'; } if ($text_line_height != '') { $text_style_inline .= 'line-height:' . $text_line_height . 'px;'; } $args = array($text_font_family); enquque_ultimate_google_fonts($args); /*end typography */ if ($ctaction_background != '') { $data .= ' data-background="' . $ctaction_background . '" '; $text_style_inline .= 'background:' . $ctaction_background . ';'; } if ($ctaction_background_hover != '') { $data .= ' data-background-hover="' . $ctaction_background_hover . '" '; } $data .= ' data-override="' . $ctaction_override . '" '; if ($ctaction_padding_top != '') { $text_style_inline .= 'padding-top:' . $ctaction_padding_top . 'px;'; } if ($ctaction_padding_bottom != '') { $text_style_inline .= 'padding-bottom:' . $ctaction_padding_bottom . 'px;'; } if ($ctaction_link != '') { $ctaction_link = vc_build_link($ctaction_link); $url = $ctaction_link['url']; $title = $ctaction_link['title']; $target = $ctaction_link['target']; if ($url != '') { if ($target != '') { $target = 'target="' . $target . '"'; } $ctaction_link_html = '<a href="' . $url . '" class="ulimate-call-to-action-link" ' . $target . '></a>'; } } if ($enable_icon == 'enable_icon_value') { $icon_inline = do_shortcode('[just_icon icon_align="center" icon_type="' . $icon_type . '" icon="' . $icon . '" icon_img="' . $icon_img . '" img_width="' . $img_width . '" icon_size="' . $icon_size . '" icon_color="' . $icon_color . '" icon_style="' . $icon_style . '" icon_color_bg="' . $icon_color_bg . '" icon_color_border="' . $icon_color_border . '" icon_border_style="' . $icon_border_style . '" icon_border_size="' . $icon_border_size . '" icon_border_radius="' . $icon_border_radius . '" icon_border_spacing="' . $icon_border_spacing . '"]'); } else { $effect = 'no-effect'; } $output .= '<div class="ultimate-call-to-action ' . $el_class . '" style="' . $text_style_inline . '" ' . $data . '>'; if ($icon_inline != '') { $output .= '<span class="ultimate-ctaction-icon ctaction-icon-' . $effect . '">' . $icon_inline . '</span>'; } $output .= '<span class="uvc-ctaction-data uvc-ctaction-data-' . $effect . '">' . $content . '</span>'; $output .= $ctaction_link_html . '</div>'; return $output; }
function info_list_item($atts, $content = null) { // Do nothing $list_title = $list_icon = $animation = $icon_color = $icon_bg_color = $icon_img = $icon_type = $desc_font_line_height = $title_font_line_height = ''; $title_font = $title_font_style = $title_font_size = $title_font_color = $desc_font = $desc_font_style = $desc_font_size = $desc_font_color = ''; extract(shortcode_atts(array('list_title' => '', 'animation' => '', 'list_icon' => '', 'icon_img' => '', 'icon_type' => '', 'title_font' => '', 'title_font_style' => '', 'title_font_size' => '16', 'title_font_line_height' => '24', 'title_font_color' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_font_size' => '13', 'desc_font_color' => '', 'desc_font_line_height' => '18', 'info_list_link' => '', 'info_list_link_apply' => ''), $atts)); //$content = wpb_js_remove_wpautop($content); $css_trans = $style = $ico_col = $connector_trans = $icon_html = $title_style = $desc_style = $info_list_link_html = ''; $font_args = array(); $is_link = false; if ($info_list_link != '') { $info_list_link_temp = vc_build_link($info_list_link); $url = $info_list_link_temp['url']; $title = $info_list_link_temp['title']; $target = $info_list_link_temp['target']; if ($url != '') { if ($target != '') { $target = 'target="' . $target . '"'; } $info_list_link_html = '<a href="' . $url . '" class="ulimate-info-list-link" ' . $target . '></a>'; } $is_link = true; } /* title */ if ($title_font != '') { $font_family = get_ultimate_font_family($title_font); $title_style .= 'font-family:' . $font_family . ';'; array_push($font_args, $title_font); } if ($title_font_style != '') { $title_style .= get_ultimate_font_style($title_font_style); } if ($title_font_size != '') { $title_style .= 'font-size:' . $title_font_size . 'px;'; } if ($title_font_line_height != '') { $title_style .= 'line-height:' . $title_font_line_height . 'px;'; } if ($title_font_color != '') { $title_style .= 'color:' . $title_font_color . ';'; } /* description */ if ($desc_font != '') { $font_family = get_ultimate_font_family($desc_font); $desc_style .= 'font-family:' . $font_family . ';'; array_push($font_args, $desc_font); } if ($desc_font_style != '') { $desc_style .= get_ultimate_font_style($desc_font_style); } if ($desc_font_size != '') { $desc_style .= 'font-size:' . $desc_font_size . 'px;'; } if ($desc_font_line_height != '') { $desc_style .= 'line-height:' . $desc_font_line_height . 'px;'; } if ($desc_font_color != '') { $desc_style .= 'color:' . $desc_font_color . ';'; } enquque_ultimate_google_fonts($font_args); if ($animation !== 'none') { $css_trans = 'data-animation="' . $animation . '" data-animation-delay="03"'; } if ($this->connector_animate) { $connector_trans = 'data-animation="' . $this->connector_animate . '" data-animation-delay="02"'; } if ($icon_color != '') { $ico_col = 'style="color:' . $icon_color . '";'; } if ($icon_bg_color != '') { $style .= 'background:' . $icon_bg_color . '; color:' . $icon_bg_color . ';'; } if ($icon_bg_color != '') { $style .= 'border-color:' . $this->border_col . ';'; } if ($icon_type == "selector") { $icon_html .= '<div class="icon_list_icon" ' . $css_trans . ' style="' . $this->icon_style . '">'; $icon_html .= '<i class="' . $list_icon . '" ' . $ico_col . '></i>'; if ($is_link && $info_list_link_apply == 'icon') { $icon_html .= $info_list_link_html; } $icon_html .= '</div>'; } else { $img = wp_get_attachment_image_src($icon_img, 'large'); $icon_html .= '<div class="icon_list_icon" ' . $css_trans . ' style="' . $this->icon_style . '">'; $icon_html .= '<img class="list-img-icon" alt="icon" src="' . $img[0] . '"/>'; if ($is_link && $info_list_link_apply == 'icon') { $icon_html .= $info_list_link_html; } $icon_html .= '</div>'; } $output = '<li class="icon_list_item" style=" ' . $this->icon_font . '">'; $output .= $icon_html; $output .= '<div class="icon_description">'; if ($list_title != '') { $output .= '<h3 style="' . $title_style . '">'; if ($is_link && $info_list_link_apply == 'title') { $output .= '<a href="' . $url . '" target="' . $target . '">' . $list_title . '</a>'; } else { $output .= $list_title; } $output .= '</h3>'; } $output .= '<div class="icon_description_text" style="' . $desc_style . '">' . wpb_js_remove_wpautop($content, true) . '</div>'; $output .= '</div>'; $output .= '<div class="icon_list_connector" ' . $connector_trans . ' style="border-color:' . $this->connect_color . ';"></div>'; if ($is_link && $info_list_link_apply == 'container') { $output .= $info_list_link_html; } $output .= '</li>'; return $output; }
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_font_size = $title_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_font_size' => '', 'title_font_line_height' => '', 'title_font_color' => '', 'desc_text_typography' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_font_size' => '', 'desc_font_line_height' => '', 'desc_font_color' => '', 'info_color_bg' => '', 'hover_effect' => '', 'effect_direction' => '', 'spacer_border' => '', 'spacer_border_color' => '', 'spacer_width' => '', 'spacer_border_width' => '', 'block_click' => '', 'block_link' => '', 'thumbnail_border_styling' => '', 'block_border_color' => '', 'block_border_size' => '', 'effect_scale' => '', 'effect_top_bottom' => '', 'effect_left_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_size != '') { $title_style .= 'font-size:' . $title_font_size . 'px;'; } if ($title_font_line_height != '') { $title_style .= 'line-height:' . $title_font_line_height . 'px;'; } if ($title_font_color != '') { $title_style .= 'color:' . $title_font_color . ';'; } if ($desc_font != '') { $font_family = get_ultimate_font_family($desc_font); $desc_style .= 'font-family:' . $font_family . ';'; array_push($font_args, $desc_font); } if ($desc_font_style != '') { $desc_style .= get_ultimate_font_style($desc_font_style); } if ($desc_font_size != '') { $desc_style .= 'font-size:' . $desc_font_size . 'px;'; } if ($desc_font_line_height != '') { $desc_style .= 'line-height:' . $desc_font_line_height . 'px;'; } if ($desc_font_color != '') { $desc_style .= 'color:' . $desc_font_color . ';'; } enquque_ultimate_google_fonts($font_args); $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 = wp_get_attachment_image_src($thumb_img, 'large'); $thumb_url = $img[0]; } if ($thumbnail_border_styling != '') { $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="' . $href['target'] . '" '; } $itemOutput .= '<li 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($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($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($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 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 = ''; extract(shortcode_atts(array('icon_type' => '', 'icon' => '', 'icon_img' => '', 'img_width' => '', 'icon_size' => '', 'icon_color' => '', 'icon_style' => '', 'icon_color_bg' => '', 'icon_color_border' => '', 'icon_border_style' => '', 'icon_border_size' => '', 'icon_border_radius' => '', 'icon_border_spacing' => '', 'icon_animation' => '', 'title' => '', 'link' => '', 'hover_effect' => '', 'pos' => '', 'box_border_style' => '', 'box_border_width' => '', 'box_border_color' => '', 'box_bg_color' => "", 'read_more' => '', 'read_text' => '', '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(); $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); $title_style .= 'font-family:' . $font_family . ';'; array_push($font_args, $title_font); } if ($title_font_style != '') { $title_style .= get_ultimate_font_style($title_font_style); } if ($title_font_size != '') { $title_style .= 'font-size:' . $title_font_size . 'px;'; } if ($title_font_line_height != '') { $title_style .= 'line-height:' . $title_font_line_height . 'px;'; } if ($title_font_color != '') { $title_style .= 'color:' . $title_font_color . ';'; } /* description */ if ($desc_font != '') { $font_family = get_ultimate_font_family($desc_font); $desc_style .= 'font-family:' . $font_family . ';'; array_push($font_args, $desc_font); } if ($desc_font_style != '') { $desc_style .= get_ultimate_font_style($desc_font_style); } if ($desc_font_size != '') { $desc_style .= 'font-size:' . $desc_font_size . 'px;'; } if ($desc_font_line_height != '') { $desc_style .= 'line-height:' . $desc_font_line_height . 'px;'; } if ($desc_font_color != '') { $desc_style .= 'color:' . $desc_font_color . ';'; } enquque_ultimate_google_fonts($font_args); $box_style = ''; if ($pos == 'square_box') { 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 class="aio-icon-box ' . $ex_class . '" style="' . $box_style . '">'; 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" style="' . $title_style . '">' . $title . '</h3>' . $link_sufix; $html .= '</div> <!-- header -->'; } if ($pos !== "right") { if ($icon !== 'none') { $html .= '<div class="' . $ic_class . '">' . $box_icon . '</div>'; } } if ($content !== '') { $html .= '<div class="aio-icon-description" 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') { $html .= '<div class="' . $ic_class . '">' . $box_icon . '</div>'; } } } else { if ($icon !== 'none') { $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" style="' . $title_style . '">' . $title . '</h3>' . $link_sufix; $html .= '</div> <!-- header -->'; } if ($content !== '') { $html .= '<div class="aio-icon-description" 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 banner_shortcode($atts) { $banner_title = $banner_desc = $banner_image = $banner_link = $banner_style = $el_class = ''; $banner_title_font_family = $banner_title_style = $banner_title_font_size = $banner_desc_font_family = $banner_desc_style = $banner_desc_font_size = ''; $banner_title_style_inline = $banner_desc_style_inline = $banner_color_bg = $banner_color_title = $banner_color_desc = $banner_title_bg = ''; $image_opacity = $image_opacity_on_hover = $enable_responsive = $responsive_min = $responsive_max = ''; extract(shortcode_atts(array('banner_title' => '', 'banner_desc' => '', 'banner_title_location' => '', 'banner_image' => '', 'image_opacity' => '', 'image_opacity_on_hover' => '', 'banner_height' => '', 'banner_height_val' => '', 'banner_link' => '', 'banner_style' => '', 'banner_title_font_family' => '', 'banner_title_style' => '', 'banner_title_font_size' => '', 'banner_desc_font_family' => '', 'banner_desc_style' => '', 'banner_desc_font_size' => '', 'banner_color_bg' => '', 'banner_color_title' => '', 'banner_color_desc' => '', 'banner_title_bg' => '', 'enable_responsive' => '', 'responsive_min' => '', 'responsive_max' => '', 'el_class' => ''), $atts)); $output = $style = $target = $link = $banner_style_inline = $title_bg = $img_style = $responsive = $target = ''; //$banner_style = 'style01'; if ($enable_responsive == "yes") { $responsive .= 'data-min-width="' . $responsive_min . '" data-max-width="' . $responsive_max . '"'; $el_class .= "ult-ib-resp"; } if ($banner_title_bg !== '' && $banner_style == "style5") { $title_bg .= 'background:' . $banner_title_bg . ';'; } $img = wp_get_attachment_image_src($banner_image, 'full'); if ($banner_link !== '') { $href = vc_build_link($banner_link); $link = $href['url']; $target = isset($href['target']) ? $href['target'] : ''; } else { $link = "#"; } if ($banner_title_font_family != '') { $bfamily = get_ultimate_font_family($banner_title_font_family); if ($bfamily != '') { $banner_title_style_inline = 'font-family:\'' . $bfamily . '\';'; } } $banner_title_style_inline .= get_ultimate_font_style($banner_title_style); if ($banner_title_font_size != '') { $banner_title_style_inline .= 'font-size:' . $banner_title_font_size . 'px;'; } if ($banner_desc_font_family != '') { $bdfamily = get_ultimate_font_family($banner_desc_font_family); if ($bdfamily != '') { $banner_desc_style_inline = 'font-family:\'' . $bdfamily . '\';'; } } $banner_desc_style .= get_ultimate_font_style($banner_desc_style); if ($banner_desc_font_size != '') { $banner_desc_style_inline .= 'font-size:' . $banner_desc_font_size . 'px;'; } if ($banner_color_bg != '') { $banner_style_inline .= 'background:' . $banner_color_bg . ';'; } if ($banner_color_title != '') { $banner_title_style_inline .= 'color:' . $banner_color_title . ';'; } if ($banner_color_desc != '') { $banner_desc_style_inline .= 'color:' . $banner_color_desc . ';'; } //enqueue google font $args = array($banner_title_font_family, $banner_desc_font_family); enquque_ultimate_google_fonts($args); if ($image_opacity !== '') { $img_style .= 'opacity:' . $image_opacity . ';'; } if ($link !== "#") { $href = 'href="' . $link . '"'; } else { $href = ''; } $output .= '<div class="ult-new-ib ult-ib-effect-' . $banner_style . ' ' . $el_class . '" ' . $responsive . ' style="' . $banner_style_inline . '" data-opacity="' . $image_opacity . '" data-hover-opacity="' . $image_opacity_on_hover . '">'; $output .= '<img class="ult-new-ib-img" style="' . $img_style . '" alt="' . $banner_title . '" src="' . $img[0] . '"/>'; $output .= '<div class="ult-new-ib-desc" style="' . $title_bg . '">'; $output .= '<h2 class="ult-new-ib-title" style="' . $banner_title_style_inline . '">' . $banner_title . '</h2>'; $output .= '<p class="ult-new-ib-content" style="' . $banner_desc_style_inline . '">' . $banner_desc . '</p>'; $output .= '</div>'; if ($target != '') { $target = 'target="' . $target . '"'; } $output .= '<a class="ult-new-ib-link" ' . $href . ' ' . $target . '></a>'; $output .= '</div>'; return $output; }
public static function generate_design($atts, $content = null) { $icon_type = $icon_img = $img_width = $icon = $icon_color = $icon_color_bg = $icon_size = $icon_style = $icon_border_style = $icon_border_radius = $icon_color_border = $icon_border_size = $icon_border_spacing = $el_class = $package_heading = $package_sub_heading = $package_price = $package_unit = $package_btn_text = $package_link = $package_featured = $color_bg_main = $color_txt_main = $color_bg_highlight = $color_txt_highlight = $color_scheme = $use_cta_btn = ''; extract(shortcode_atts(array('color_scheme' => '', 'package_heading' => '', 'package_sub_heading' => '', 'icon_type' => '', 'icon' => '', 'icon_img' => '', 'img_width' => '', 'icon_size' => '', 'icon_color' => '', 'icon_style' => '', 'icon_color_bg' => '', 'icon_color_border' => '', 'icon_border_style' => '', 'icon_border_size' => '', 'icon_border_radius' => '', 'icon_border_spacing' => '', 'use_cta_btn' => '', 'package_btn_text' => '', 'package_link' => '', 'package_featured' => '', 'color_bg_main' => '', 'color_txt_main' => '', 'color_bg_highlight' => '', 'color_txt_highlight' => '', 'heading_font_family' => '', 'heading_font_style' => '', 'heading_font_size' => '', 'heading_font_color' => '', 'heading_line_height' => '', 'subheading_font_family' => '', 'subheading_font_style' => '', 'subheading_font_size' => '', 'subheading_font_color' => '', 'subheading_line_height' => '', 'features_font_family' => '', 'features_font_style' => '', 'features_font_size' => '', 'features_font_color' => '', 'features_line_height' => '', 'button_font_family' => '', 'button_font_style' => '', 'button_font_size' => '', 'button_font_color' => '', 'button_line_height' => '', 'el_class' => ''), $atts)); $output = $link = $target = $featured = $featured_style = $normal_style = $dynamic_style = $box_icon = ''; if ($icon_type !== "none") { $box_icon = do_shortcode('[just_icon icon_type="' . $icon_type . '" icon="' . $icon . '" icon_img="' . $icon_img . '" img_width="' . $img_width . '" icon_size="' . $icon_size . '" icon_color="' . $icon_color . '" icon_style="' . $icon_style . '" icon_color_bg="' . $icon_color_bg . '" icon_color_border="' . $icon_color_border . '" icon_border_style="' . $icon_border_style . '" icon_border_size="' . $icon_border_size . '" icon_border_radius="' . $icon_border_radius . '" icon_border_spacing="' . $icon_border_spacing . '"]'); } if ($color_scheme == "custom") { if ($color_bg_main !== "") { $normal_style .= 'background:' . $color_bg_main . ';'; } if ($color_txt_main !== "") { $normal_style .= 'color:' . $color_txt_main . ';'; } if ($color_bg_highlight !== "") { $featured_style .= 'background:' . $color_bg_highlight . ';'; } if ($color_txt_highlight !== "") { $featured_style .= 'color:' . $color_txt_highlight . ';'; } } if ($package_link !== "") { $link = vc_build_link($package_link); if (isset($link['target'])) { $target = 'target="' . $link['target'] . '"'; } else { $target = ''; } $link = $link['url']; } else { $link = "#"; } if ($package_featured !== "") { $featured = "ult_featured"; } if ($use_cta_btn == "box") { $output .= '<a href="' . $link . '" ' . $target . ' class="ult_price_action_button">' . $package_btn_text; } /* typography */ $heading_style_inline = $sub_heading_inline = $features_inline = $button_inline = ''; // heading if ($heading_font_family != '') { $hdfont_family = get_ultimate_font_family($heading_font_family); $heading_style_inline .= 'font-family:\'' . $hdfont_family . '\';'; } $heading_style_inline .= get_ultimate_font_style($heading_font_style); if ($heading_font_size != '') { $heading_style_inline .= 'font-size:' . $heading_font_size . 'px;'; } if ($heading_font_color != '') { $heading_style_inline .= 'color:' . $heading_font_color . ';'; } if ($heading_line_height != '') { $heading_style_inline .= 'line-height:' . $heading_line_height . 'px;'; } // sub heading if ($subheading_font_family != '') { $shfont_family = get_ultimate_font_family($subheading_font_family); $sub_heading_inline .= 'font-family:\'' . $shfont_family . '\';'; } $sub_heading_inline .= get_ultimate_font_style($subheading_font_style); if ($subheading_font_size != '') { $sub_heading_inline .= 'font-size:' . $subheading_font_size . 'px;'; } if ($subheading_font_color != '') { $sub_heading_inline .= 'color:' . $subheading_font_color . ';'; } if ($subheading_line_height != '') { $sub_heading_inline .= 'line-height:' . $subheading_line_height . 'px;'; } // features if ($features_font_family != '') { $featuresfont_family = get_ultimate_font_family($features_font_family); $features_inline .= 'font-family:\'' . $featuresfont_family . '\';'; } $features_inline .= get_ultimate_font_style($features_font_style); if ($features_font_size != '') { $features_inline .= 'font-size:' . $features_font_size . 'px;'; } if ($features_font_color != '') { $features_inline .= 'color:' . $features_font_color . ';'; } if ($features_line_height != '') { $features_inline .= 'line-height:' . $features_line_height . 'px;'; } // button if ($button_font_family != '') { $buttonfont_family = get_ultimate_font_family($button_font_family); $button_inline .= 'font-family:\'' . $buttonfont_family . '\';'; } $button_inline .= get_ultimate_font_style($button_font_style); if ($button_font_size != '') { $button_inline .= 'font-size:' . $button_font_size . 'px;'; } if ($button_font_color != '') { $button_inline .= 'color:' . $button_font_color . ';'; } if ($button_line_height != '') { $button_inline .= 'line-height:' . $button_line_height . 'px;'; } $args = array($heading_font_family, $subheading_font_family, $features_font_family, $button_font_family); enquque_ultimate_google_fonts($args); /* end typgoraphy */ $output .= '<div class="ult_pricing_table_wrap ult_info_table ult_design_6 ' . $featured . ' ult-cs-' . $color_scheme . ' ' . $el_class . '"> <div class="ult_pricing_table" style="' . $normal_style . '">'; $output .= '<div class="ult_pricing_heading" style="' . $featured_style . '"> <h3 style="' . $heading_style_inline . '">' . $package_heading . '</h3>'; if ($package_sub_heading !== '') { $output .= '<h5 style="' . $sub_heading_inline . '">' . $package_sub_heading . '</h5>'; } $output .= '</div><!--ult_pricing_heading-->'; if (isset($box_icon) && $box_icon != '') { $output .= '<div class="ult_price_body_block" style="' . $featured_style . '"> <div class="ult_price_body"> <div class="ult_price"> ' . $box_icon . ' </div> </div> </div><!--ult_price_body_block-->'; } $output .= '<div class="ult_price_features" style="' . $features_inline . '"> ' . wpb_js_remove_wpautop(do_shortcode($content), true) . ' </div><!--ult_price_features-->'; if ($use_cta_btn == "true") { $output .= '<div class="ult_price_link" style="' . $normal_style . '"> <a href="' . $link . '" ' . $target . ' class="ult_price_action_button" style="' . $featured_style . ' ' . $button_inline . '">' . $package_btn_text . '</a> </div><!--ult_price_link-->'; } $output .= '<div class="ult_clr"></div> </div><!--pricing_table--> </div><!--pricing_table_wrap-->'; if ($use_cta_btn == "box") { $output .= '</a>'; } return $output; }
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 = ''; extract(shortcode_atts(array('icon_type' => '', 'icon' => '', 'icon_img' => '', 'img_width' => '', 'icon_size' => '', 'icon_color' => '', 'icon_style' => '', 'icon_color_bg' => '', 'icon_color_border' => '', 'icon_border_style' => '', 'icon_border_size' => '', 'icon_border_radius' => '', 'icon_border_spacing' => '', 'icon_link' => '', 'icon_animation' => '', 'counter_title' => '', 'counter_value' => '', 'counter_sep' => '', 'counter_suffix' => '', 'counter_prefix' => '', 'counter_decimal' => '', 'icon_position' => '', 'counter_style' => '', 'speed' => '', 'font_size_title' => '', 'font_size_counter' => '', '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' => ''), $atts)); $class = $style = $title_style = $desc_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;'; } /* description */ if ($desc_font != '') { $font_family = get_ultimate_font_family($desc_font); $desc_style .= 'font-family:' . $font_family . ';'; array_push($font_args, $desc_font); } if ($desc_font_style != '') { $desc_style .= get_ultimate_font_style($desc_font_style); } if ($desc_font_size != '') { $desc_style .= 'font-size:' . $desc_font_size . 'px;'; } if ($desc_font_line_height != '') { $desc_style .= 'line-height:' . $desc_font_line_height . 'px;'; } if ($desc_font_color != '') { $desc_style .= 'color:' . $desc_font_color . ';'; } enquque_ultimate_google_fonts($font_args); if ($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"'; } $counter_font = 'font-size:' . $font_size_counter . 'px;'; $title_font = 'font-size:' . $font_size_title . 'px;'; 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 . '">'; //$output .= '<div class="stats-icon" style="'.$style.'"> // <i class="'.$stats_icon.'"></i> // </div>'; $id = 'counter_' . uniqid(); 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">'; if ($counter_prefix !== '') { $output .= '<div class="counter_prefix" style="' . $counter_font . '">' . $counter_prefix . '</div>'; } $output .= '<div id="' . $id . '" data-id="' . $id . '" class="stats-number" 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" style="' . $counter_font . ' ' . $counter_color . '">' . $counter_suffix . '</div>'; } $output .= '<div class="stats-text" 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>'; return $output; }
function ultimate_headings_shortcode($atts, $content = null) { wp_enqueue_style("ultimate-headings-style"); wp_enqueue_script("ultimate-headings-script"); $wrapper_style = $main_heading_style_inline = $sub_heading_style_inline = $line_style_inline = $icon_inline = $output = ''; extract(shortcode_atts(array('main_heading' => '', "main_heading_font_size" => "", "main_heading_font_family" => "", "main_heading_style" => "", "main_heading_color" => "", "main_heading_margin" => "", "sub_heading" => "", "sub_heading_font_size" => "", "sub_heading_font_family" => "", "sub_heading_style" => "", "sub_heading_color" => "", "sub_heading_margin" => "", "spacer" => "", "spacer_position" => "", "spacer_img" => "", "spacer_img_width" => "", "line_style" => "solid", "line_width" => "auto", "line_height" => "1", "line_color" => "#ccc", "icon_type" => "", "icon" => "", "icon_color" => "", "icon_style" => "", "icon_color_bg" => "", "icon_border_style" => "", "icon_color_border" => "", "icon_border_size" => "", "icon_border_radius" => "", "icon_border_spacing" => "", "icon_img" => "", "img_width" => "60", "icon_size" => "", "alignment" => "center", "spacer_margin" => "", "line_icon_fixer" => ""), $atts)); $wrapper_class = $spacer; /* ---- main heading styles ---- */ if ($main_heading_font_family != '') { $mhfont_family = get_ultimate_font_family($main_heading_font_family); $main_heading_style_inline .= 'font-family:\'' . $mhfont_family . '\';'; } // main heading font style $main_heading_style_inline .= get_ultimate_font_style($main_heading_style); //attach font size if set if ($main_heading_font_size != '') { $main_heading_style_inline .= 'font-size:' . $main_heading_font_size . 'px;'; } //attach font color if set if ($main_heading_color != '') { $main_heading_style_inline .= 'color:' . $main_heading_color . ';'; } //attach margins for main heading if ($main_heading_margin != '') { $main_heading_style_inline .= $main_heading_margin; } /* ----- sub heading styles ----- */ if ($sub_heading_font_family != '') { $shfont_family = get_ultimate_font_family($sub_heading_font_family); $sub_heading_style_inline .= 'font-family:\'' . $shfont_family . '\';'; } //sub heaing font style $sub_heading_style_inline .= get_ultimate_font_style($sub_heading_style); //attach font size if set if ($sub_heading_font_size != '') { $sub_heading_style_inline .= 'font-size:' . $sub_heading_font_size . 'px;'; } //attach font color if set if ($sub_heading_color != '') { $sub_heading_style_inline .= 'color:' . $sub_heading_color . ';'; } //attach margins for sub heading if ($sub_heading_margin != '') { $sub_heading_style_inline .= $sub_heading_margin; } if ($spacer != '') { $wrapper_style .= $spacer_margin; } if ($spacer == 'line_with_icon') { if ($line_width < $icon_size) { $wrap_width = $icon_size; } else { $wrap_width = $line_width; } if ($icon_type == 'selector') { if ($icon_style == 'advanced') { //if($icon_border_spacing != '') //$wrapper_style .= 'padding:'.$icon_border_spacing.'px 0;'; } else { $wrapper_style .= 'height:' . $icon_size . 'px;'; } } $icon_style_inline = 'font-size:' . $icon_size . 'px;'; } else { if ($spacer == 'line_only') { $wrap_width = $line_width; $line_style_inline = 'border-style:' . $line_style . ';'; $line_style_inline .= 'border-bottom-width:' . $line_height . 'px;'; $line_style_inline .= 'border-color:' . $line_color . ';'; $line_style_inline .= 'width:' . $wrap_width . 'px;'; $wrapper_style .= 'height:' . $line_height . 'px;'; $line = '<span class="uvc-headings-line" style="' . $line_style_inline . '"></span>'; $icon_inline = $line; } else { if ($spacer == 'icon_only') { $icon_style_inline = 'font-size:' . $icon_size . 'px;'; } else { if ($spacer == 'image_only') { if (!empty($spacer_img_width)) { $siwidth = array($spacer_img_width, $spacer_img_width); } else { $siwidth = 'full'; } $icon_inline = wp_get_attachment_image($spacer_img, $siwidth, false, array("class" => "ultimate-headings-icon-image")); } } } } //if spacer type is line with icon or only icon show icon or image respectively if ($spacer == 'line_with_icon' || $spacer == 'icon_only') { $icon_animation = ''; $icon_inline = do_shortcode('[just_icon icon_align="' . $alignment . '" icon_type="' . $icon_type . '" icon="' . $icon . '" icon_img="' . $icon_img . '" img_width="' . $img_width . '" icon_size="' . $icon_size . '" icon_color="' . $icon_color . '" icon_style="' . $icon_style . '" icon_color_bg="' . $icon_color_bg . '" icon_color_border="' . $icon_color_border . '" icon_border_style="' . $icon_border_style . '" icon_border_size="' . $icon_border_size . '" icon_border_radius="' . $icon_border_radius . '" icon_border_spacing="' . $icon_border_spacing . '" icon_animation="' . $icon_animation . '"]'); } if ($spacer == 'line_with_icon') { $data = 'data-hline_width="' . $wrap_width . '" data-hicon_type="' . $icon_type . '" data-hborder_style="' . $line_style . '" data-hborder_height="' . $line_height . '" data-hborder_color="' . $line_color . '"'; if ($icon_type == 'selector') { $data .= ' data-icon_width="' . $icon_size . '"'; } else { $data .= ' data-icon_width="' . $img_width . '"'; } if ($line_icon_fixer != '') { $data .= ' data-hfixer="' . $line_icon_fixer . '" '; } } else { $data = ''; } $id = uniqid('ultimate-heading'); $output = '<div id="' . $id . '" class="uvc-heading" 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); } $output .= '<div class="uvc-main-heading"><h2 style="' . $main_heading_style_inline . '">' . $main_heading . '</h2></div>'; if ($spacer_position == 'middle') { $output .= $this->ultimate_heading_spacer($wrapper_class, $wrapper_style, $icon_inline); } if ($content != '') { $output .= '<div class="uvc-sub-heading" style="' . $sub_heading_style_inline . '">' . do_shortcode($content) . '</div>'; } if ($spacer_position == 'bottom') { $output .= $this->ultimate_heading_spacer($wrapper_class, $wrapper_style, $icon_inline); } $output .= '</div>'; //enqueue google font $args = array($main_heading_font_family, $sub_heading_font_family); enquque_ultimate_google_fonts($args); return $output; }
function banner_shortcode($atts) { // enqueue js wp_enqueue_script('ultimate-appear'); if (get_option('ultimate_row') == "enable") { wp_enqueue_script('ultimate-row-bg', plugins_url('../assets/js/', __FILE__) . 'ultimate_bg.js'); } wp_enqueue_script('ultimate-custom'); // enqueue css wp_enqueue_style('ultimate-animate'); wp_enqueue_style('ultimate-style'); wp_enqueue_style('aio-interactive-styles', plugins_url('../assets/css/interactive-styles.css', __FILE__)); $banner_title = $banner_desc = $banner_icon = $banner_image = $banner_link = $banner_link_text = $banner_style = $banner_bg_color = $el_class = $animation = $icon_disp = $link_opts = $banner_title_location = $banner_title_style_inline = $banner_desc_style_inline = ''; extract(shortcode_atts(array('banner_title' => '', 'banner_desc' => '', 'banner_title_location' => '', 'icon_disp' => '', 'banner_icon' => '', 'banner_image' => '', 'banner_height' => '', 'banner_height_val' => '', 'link_opts' => '', 'banner_link' => '', 'banner_link_text' => '', 'banner_style' => '', 'banner_bg_color' => '', 'banner_opacity' => '', 'el_class' => '', 'animation' => '', 'banner_title_font_family' => '', 'banner_title_style' => '', 'banner_title_font_size' => '', 'banner_desc_font_family' => '', 'banner_desc_style' => '', 'banner_desc_font_size' => ''), $atts)); $output = $icon = $style = $target = ''; //$banner_style = 'style01'; if ($banner_title_font_family != '') { $bfamily = get_ultimate_font_family($banner_title_font_family); $banner_title_style_inline = 'font-family:\'' . $bfamily . '\';'; } $banner_title_style_inline .= get_ultimate_font_style($banner_title_style); if ($banner_title_font_size != '') { $banner_title_style_inline .= 'font-size:' . $banner_title_font_size . 'px;'; } if ($banner_bg_color != '') { $banner_title_style_inline .= 'background:' . $banner_bg_color . ';"'; } if ($banner_desc_font_family != '') { $bdfamily = get_ultimate_font_family($banner_desc_font_family); $banner_desc_style_inline = 'font-family:\'' . $bdfamily . '\';'; } $banner_desc_style .= get_ultimate_font_style($banner_desc_style); if ($banner_desc_font_size != '') { $banner_desc_style_inline .= 'font-size:' . $banner_desc_font_size . 'px;'; } //enqueue google font $args = array($banner_title_font_family, $banner_desc_font_family); enquque_ultimate_google_fonts($args); if ($animation !== 'none') { $css_trans = 'data-animation="' . $animation . '" data-animation-delay="03"'; } if ($banner_icon !== '') { $icon = '<i class="' . $banner_icon . '"></i>'; } $img = wp_get_attachment_image_src($banner_image, 'large'); $href = vc_build_link($banner_link); if (isset($href['target'])) { $target = 'target="' . $href['target'] . '"'; } $banner_top_style = ''; if ($banner_height != '' && $banner_height_val != '') { $banner_top_style = 'height:' . $banner_height_val . 'px;'; } $output .= "\n" . '<div class="banner-block ' . $banner_height . ' banner-' . $banner_style . ' ' . $el_class . '" ' . $css_trans . ' style="' . $banner_top_style . '">'; $output .= "\n\t" . '<img src="' . $img[0] . '" alt="' . $banner_title . '">'; if ($banner_title !== '') { $output .= "\n\t" . '<h3 class="title-' . $banner_title_location . ' bb-top-title" style="' . $banner_title_style_inline . '">' . $banner_title; if ($icon_disp == "with_heading" || $icon_disp == "both") { $output .= $icon; } $output .= '</h3>'; } $output .= "\n\t" . '<div class="mask ' . $banner_opacity . '-background">'; if ($icon_disp == "with_description" || $icon_disp == "both") { if ($banner_icon !== '') { $output .= "\n\t\t" . '<div class="bb-back-icon">' . $icon . '</div>'; $output .= "\n\t\t" . '<p>' . $banner_desc . '</p>'; } } else { $output .= "\n\t\t" . '<p class="bb-description" style="' . $banner_desc_style_inline . '">' . $banner_desc . '</p>'; } if ($link_opts == "more") { $output .= "\n\t\t" . '<a class="bb-link" href="' . $href['url'] . '" ' . $target . '>' . $banner_link_text . '</a>'; } $output .= "\n\t" . '</div>'; $output .= "\n" . '</div>'; if ($link_opts == "box") { $banner_with_link = '<a class="bb-link" href="' . $href['url'] . '" ' . $target . '>' . $output . '</a>'; return $banner_with_link; } else { return $output; } }
return $feat_spl; } 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 = $el_class = $time_position = $font_size = $line_color = $animation = $icon_border_style = $icon_border_size = $border_color = $title_style = $desc_style = ''; $font_args = array(); extract(shortcode_atts(array('icon_type' => '', 'icon' => '', 'icon_img' => '', 'img_width' => '', 'icon_size' => '', 'icon_color' => '', 'icon_style' => '', 'icon_color_bg' => '', 'icon_color_border' => '', 'icon_border_style' => '', 'icon_border_size' => '', 'icon_border_radius' => '', 'icon_border_spacing' => '', 'icon_link' => '', 'icon_animation' => '', 'time_title' => '', 'title_font' => '', 'title_font_style' => '', 'title_font_size' => '', 'title_font_color' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_font_size' => '', 'desc_font_color' => '', 'time_link' => '', 'time_link_apply' => '', 'time_read_text' => '', 'el_class' => '', 'font_size' => '', 'line_color' => ''), $atts)); $html = ''; $line_style = $custom_style = $bg_cls = ''; $box_icon = do_shortcode('[just_icon icon_type="' . $icon_type . '" icon="' . $icon . '" icon_img="' . $icon_img . '" img_width="' . $img_width . '" icon_size="' . $icon_size . '" icon_color="' . $icon_color . '" icon_style="' . $icon_style . '" icon_color_bg="' . $icon_color_bg . '" icon_color_border="' . $icon_color_border . '" icon_border_style="' . $icon_border_style . '" icon_border_size="' . $icon_border_size . '" icon_border_radius="' . $icon_border_radius . '" icon_border_spacing="' . $icon_border_spacing . '" icon_link="' . $icon_link . '" icon_animation="' . $icon_animation . '"]'); if ($icon_color_bg == "") { $bg_cls .= 'tl-icon-no-bg'; } if ($line_color != '') { $line_style = 'border-right-color:' . $line_color . ';'; } if ($font_size != '') { $line_style .= 'top:' . $font_size * 2 . 'px;'; } /* title */ if ($title_font != '') { $font_family = get_ultimate_font_family($title_font); $title_style .= 'font-family:' . $font_family . ';'; array_push($font_args, $title_font); } if ($title_font_style != '') { $title_style .= get_ultimate_font_style($title_font_style); } if ($title_font_size != '') { $title_style .= 'font-size:' . $title_font_size . 'px;'; } if ($title_font_color != '') { $title_style .= 'color:' . $title_font_color . ';'; } /* description */ if ($desc_font != '') { $font_family = get_ultimate_font_family($desc_font); $desc_style .= 'font-family:' . $font_family . ';'; array_push($font_args, $desc_font); } if ($desc_font_style != '') { $desc_style .= get_ultimate_font_style($desc_font_style); } if ($desc_font_size != '') { $desc_style .= 'font-size:' . $desc_font_size . 'px;'; } if ($desc_font_color != '') { $desc_style .= 'color:' . $desc_font_color . ';'; } enquque_ultimate_google_fonts($font_args); $li_prefix = '<div class="timeline-block ' . $el_class . '"><div class="timeline-dot"></div><div class="ult-timeline-arrow"><s></s><l></l></div>'; $li_suffix = '</div>'; $style = $time_icon_color !== '' ? ' color:' . $time_icon_color . ';' : ' '; $style .= $time_icon_bg_color !== '' ? ' background:' . $time_icon_bg_color . ';' : ' '; $style .= $font_size !== '' ? ' font-size:' . $font_size . 'px;' : ' '; $icon_pad = ''; $header_block_style = ''; $icon = '<div class="timeline-icon-block"><div class="ult-timeline-icon ' . $bg_cls . '" style="' . $style . '">'; if ($icon_type != 'noicon') { $icon .= $box_icon; } //'<i style="'.$icon_style.'" class="'.$time_icon.'" ></i>'; $icon .= '</div> <!-- icon --></div>'; $link_sufix = $link_prefix = ''; $vv_link = ''; if ($time_link != '') { $href = vc_build_link($time_link); $link_prefix = '<a class="tl-desc-a" href = ' . $href['url'] . '>'; $vv_link = $href['url']; $link_sufix = '</a>'; } $header = ''; $header .= '<div class="timeline-header-block" ' . $header_block_style . '> <div class="timeline-header" style="">'; $header .= '<h3 class="ult-timeline-title" style="' . $title_style . '">' . $time_title . '</h3>'; if ($time_link_apply != '' && $time_link_apply == 'title') { //$header = $link_prefix.$header.$link_sufix; $header .= '<a href="' . $vv_link . '" class="link-title"></a>'; } $header .= '<p style="' . $desc_style . '">' . do_shortcode($content) . '</p>'; 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"></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>';
public function render($atts, $content = null) { extract(shortcode_atts(array('price' => '', 'subprice' => '', 'height' => '300px', 'text' => '', 'link' => '', 'el_class' => '', 'price_font_family' => '', 'price_font_style' => '', 'price_font_size' => '24', 'price_font_color' => '#000'), $atts)); // $content = wpb_js_remove_wpautop($content); // fix unclosed/unwanted paragraph tags in $content ob_start(); $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'dntp-pricing-plan ' . $el_class, $this->namespace, $atts); $uid = uniqid('pricing-plan-widget-'); $link = vc_build_link($link); ?> <div id="<?php echo $uid; ?> " class="<?php echo $css_class; ?> "> <div class="price"> <?php echo $price; ?> </div> <div class="sub-price"> <?php echo $subprice; ?> </div> <div class="text"> <?php echo $text; ?> </div> <?php if ($link['url'] && $link['title']) { ?> <a class="button" href="<?php echo $link['url']; ?> "><?php echo $link['title']; ?> </a> <?php } ?> </div> <?php $css = ''; // #uid $css .= '#' . $uid . ' {'; $css .= 'height:' . (int) $height . 'px;'; $css .= '}'; // #uid .price $css .= '#' . $uid . ' .price {'; $css .= 'font-size:' . (int) $price_font_size . 'px;'; $css .= 'color:' . $price_font_color . ';'; if ($price_font_family != '') { $price_font_family = get_ultimate_font_family($price_font_family); $css .= 'font-family:' . $price_font_family . ';'; } $css .= '}'; echo '<style>' . $css . '</style>'; $args = array($price_font_family); enquque_ultimate_google_fonts($args); $content = ob_get_clean(); return $content; }
function info_circle($atts, $content = null) { 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' => '', 'visible_circle' => '', 'start_degree' => '', 'circle_type' => '', 'icon_position' => '', 'focus_on' => '', 'eg_br_width' => '', 'eg_br_style' => '', 'eg_border_color' => '', 'cn_br_style' => '', 'cn_br_width' => '', 'cn_border_color' => '', 'highlight_style' => '', 'icon_size' => '', 'eg_padding' => '', 'icon_diversion' => '', 'icon_show' => '', 'content_icon_size' => '', 'content_color' => '', 'content_bg' => '', 'responsive' => '', 'responsive_breakpoint' => '800', 'auto_slide' => '', 'auto_slide_duration' => '', 'icon_launch' => '', 'icon_launch_duration' => '', 'icon_launch_delay' => '', 'el_class' => '', 'title_font' => '', 'title_font_style' => '', 'title_font_size' => '', 'title_line_height' => '', 'desc_font' => '', 'desc_font_style' => '', 'desc_font_size' => '', 'desc_line_height' => ''), $atts)); $uniq = uniqid(); global $title_style_inline, $desc_style_inline; /* ---- main title styles ---- */ if ($title_font != '') { $title_font_family = get_ultimate_font_family($title_font); $title_style_inline = 'font-family:\'' . $title_font_family . '\';'; } // main heading font style $title_style_inline .= get_ultimate_font_style($title_font_style); //attach font size if set if ($title_font_size != '') { $title_style_inline .= 'font-size:' . $title_font_size . 'px;'; } //line height if ($title_line_height != '') { $title_style_inline .= 'line-height:' . $title_line_height . 'px;'; } /* ---- description styles ---- */ if ($desc_font != '') { $desc_font_family = get_ultimate_font_family($desc_font); $desc_style_inline = 'font-family:\'' . $desc_font_family . '\';'; } // main heading font style $desc_style_inline .= get_ultimate_font_style($desc_font_style); //attach font size if set if ($desc_font_size != '') { $desc_style_inline .= 'font-size:' . $desc_font_size . 'px;'; } //line height if ($desc_line_height != '') { $desc_style_inline .= 'line-height:' . $desc_line_height . 'px;'; } // enqueue fonts $args = array($title_font, $desc_font); enquque_ultimate_google_fonts($args); $style = $style1 = $style3 = $ex_class = ''; if ($eg_br_style != 'none' && $eg_br_width != '' && $eg_border_color != '') { $style .= 'border:' . $eg_br_width . 'px ' . $eg_br_style . ' ' . $eg_border_color . ';'; } if ($cn_br_style != 'none' && $cn_br_width != '' && $cn_border_color != '') { $style1 .= 'border:' . $cn_br_width . 'px ' . $cn_br_style . ' ' . $cn_border_color . ';'; } //$style .='border-style:'.$eg_br_style.';'; $style1 .= 'background-color:' . $content_bg . ';color:' . $content_color . ';'; $style1 .= 'width:' . $eg_padding . '%;height:' . $eg_padding . '%;margin:' . (100 - $eg_padding) / 2 . '%;'; if ($el_class != '') { $ex_class = $el_class; } if ($responsive == 'on') { $ex_class .= ' info-circle-responsive'; } if ($icon_show == 'show') { $content_icon_size = $content_icon_size; } else { $content_icon_size = ''; } if ($edge_radius != '') { $style .= 'width:' . $edge_radius . '%;'; } $style .= 'opacity:0;'; if ($circle_type == '') { $circle_type = 'info-c-full-br'; } if ($icon_position == 'full') { $circle_type_extended = 'full-circle'; } else { if ($icon_position == 90) { $circle_type_extended = 'left-circle'; } elseif ($icon_position == 270) { $circle_type_extended = 'right-circle'; } elseif ($icon_position == 180) { $circle_type_extended = 'top-circle'; } elseif ($icon_position == 0) { $circle_type_extended = 'bottom-circle'; } else { $circle_type_extended = 'full-circle'; } } if ($visible_circle != '' && $visible_circle != 100 && $circle_type_extended != 'full-circle') { $clipped_circle = 'clipped-info-circle'; } $output = '<div class="info-wrapper"><div id="info-circle-wrapper-' . $uniq . '" data-uniqid="' . $uniq . '" class="info-circle-wrapper ' . $ex_class . ' ' . $clipped_circle . '" data-half-percentage="' . $visible_circle . '" data-circle-type="' . $circle_type_extended . '">'; $output .= '<div class="' . $circle_type . '" style=\'' . $style . '\' data-start-degree="' . $start_degree . '" data-divert="' . $icon_diversion . '" data-info-circle-angle="' . $icon_position . '" data-responsive-circle="' . $responsive . '" data-responsive-breakpoint="' . $responsive_breakpoint . '" data-launch="' . $icon_launch . '" data-launch-duration="' . $icon_launch_duration . '" data-launch-delay="' . $icon_launch_delay . '" data-slide-true="' . $auto_slide . '" data-slide-duration="' . $auto_slide_duration . '" data-icon-size="' . $icon_size . '" data-icon-show="' . $icon_show . '" data-icon-show-size="' . $content_icon_size . '" data-highlight-style="' . $highlight_style . '" data-focus-on="' . $focus_on . '">'; $output .= '<div class="icon-circle-list">'; //$content = str_replace('[info_circle_item', '[info_circle_item icon_size="'.$icon_size.'"', $content); $output .= do_shortcode($content); if ($icon_position != 'full') { $output .= '<div class="info-circle-icons suffix-remove"></div>'; } $output .= '</div>'; $output .= '<div class="info-c-full" style="' . $style1 . '"><div class="info-c-full-wrap"></div>'; $output .= '</div>'; $output .= '</div>'; if ($responsive == 'on') { $output .= '<div class="smile_icon_list_wrap " data-content_bg="' . $content_bg . '" data-content_color="' . $content_color . '"> <ul class="smile_icon_list left circle with_bg"> <li class="icon_list_item" style="font-size:' . $icon_size * 3 . 'px;"> <div class="icon_list_icon" style="font-size:' . $icon_size . 'px;"> <i class="smt-pencil"></i> </div> <div class="icon_description"> <h3></h3> <p></p> </div> <div class="icon_list_connector" style="border-style:' . $eg_br_style . ';border-color:' . $eg_border_color . '"> </div> </li> </ul> </div>'; } $output .= '</div></div>'; return $output; }
function 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' => '', 'ib3_border_width' => '', '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' => '', 'button_line_height' => '', 'button_border_radius' => '', 'button_border_width' => '2', 'button_text_color' => '', 'button_text_hover_color' => '', '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)); /* typography */ $title_style_inline = $desc_style_inline = $button_style_inline = ''; if ($title_font_family != '') { $temp = get_ultimate_font_family($title_font_family); $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_color != '') { $title_style_inline .= 'color:' . $title_color . ';'; } if ($title_line_height != '') { $title_style_inline .= 'line-height:' . $title_line_height . 'px;'; } if ($desc_font_family != '') { $temp = get_ultimate_font_family($desc_font_family); $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_color != '') { $desc_style_inline .= 'color:' . $desc_color . ';'; } if ($desc_line_height != '') { $desc_style_inline .= 'line-height:' . $desc_line_height . 'px;'; } if ($button_font_family != '') { $temp = get_ultimate_font_family($button_font_family); $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;'; } $args = array($title_font_family, $desc_font_family, $button_font_family); enquque_ultimate_google_fonts($args); /*end typography */ $banner_src = wp_get_attachment_image_src($banner_image, '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 ' . $el_class . ' ' . $ib3_effect . '" style="' . $style . '">'; if ($overlay_color != '') { $output .= '<div class="ultb3-box-overlay" style="background:' . $overlay_color . ';"></div>'; } if (isset($banner_src[0]) && $banner_src[0] != '') { $output .= '<img src="' . $banner_src[0] . '" style="' . $img_style . '" class="ultb3-img ' . $ib3_alignment . '" alt="' . $caption . '"/>'; } $output .= '<div class="ultb3-info ' . $info_alignment . '" data-animation="' . $info_effect . '" data-animation-delay="03">'; if ($banner_title != '') { $output .= '<div class="ultb3-title" style="' . $title_style_inline . '">' . $banner_title . '</div>'; } if ($banner_desc != '') { $output .= '<div class="ultb3-desc" 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" style="' . $button_style_inline . '">' . $button_text . '<i class="dashicons dashicons-arrow-right-alt2"></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; }