public static function parallax_shortcode($atts, $content) { $bg_type = $bg_image = $bg_image_new = $bsf_img_repeat = $parallax_style = $video_opts = $video_url = $video_url_2 = $video_poster = $bg_image_size = $bg_image_posiiton = $u_video_url = $parallax_sense = $bg_cstm_size = $bg_override = $bg_img_attach = $u_start_time = $u_stop_time = $layer_image = $css = $animation_type = $horizontal_animation = $vertical_animation = $animation_speed = $animated_bg_color = $fadeout_row = $fadeout_start_effect = $parallax_content = $parallax_content_sense = $disable_on_mobile = $disable_on_mobile_img_parallax = $animation_repeat = $animation_direction = $enable_overlay = $overlay_color = $overlay_pattern = $overlay_pattern_opacity = $overlay_pattern_size = $multi_color_overlay = $overlay = ""; $seperator_html = $seperator_bottom_html = $seperator_top_html = $seperator_css = $seperator_enable = $seperator_type = $seperator_position = $seperator_shape_size = $seperator_shape_background = $seperator_shape_border = $seperator_shape_border_color = $seperator_shape_border_width = ''; $ult_hide_row = $ult_hide_row_large_screen = $ult_hide_row_desktop = $ult_hide_row_tablet = $ult_hide_row_tablet_small = $ult_hide_row_mobile = $ult_hide_row_mobile_large = ''; extract(shortcode_atts(array("bg_type" => "", "bg_image" => "", "bg_image_new" => "", "bg_image_repeat" => "", 'bg_image_size' => "", "parallax_style" => "", "parallax_sense" => "30", "video_opts" => "", "bg_image_posiiton" => "", "video_url" => "", "video_url_2" => "", "video_poster" => "", "u_video_url" => "", "bg_cstm_size" => "", "bg_override" => "0", "bg_img_attach" => "", "u_start_time" => "", "u_stop_time" => "", "layer_image" => "", "bg_grad" => "", "bg_color_value" => "", "bg_fade" => "", "css" => "", "viewport_vdo" => "", "enable_controls" => "", "controls_color" => "", "animation_direction" => "left-animation", "animation_type" => "false", "horizontal_animation" => "", "vertical_animation" => "", "animation_speed" => "", "animation_repeat" => "repeat", "animated_bg_color" => "", "fadeout_row" => "", "fadeout_start_effect" => "30", "parallax_content" => "", "parallax_content_sense" => "30", "disable_on_mobile" => "", "disable_on_mobile_img_parallax" => "", "enable_overlay" => "", "overlay_color" => "", "overlay_pattern" => "", "overlay_pattern_opacity" => "80", "overlay_pattern_size" => "", "overlay_pattern_attachment" => "scroll", "multi_color_overlay" => "", "multi_color_overlay_opacity" => "60", "seperator_enable" => "", "seperator_type" => "none_seperator", "seperator_position" => "top_seperator", "seperator_shape_size" => "40", "seperator_shape_background" => "#fff", "seperator_shape_border" => "none", "seperator_shape_border_color" => "", "seperator_shape_border_width" => "1", "seperator_svg_height" => "60", "icon_type" => "no_icon", "icon" => "", "icon_color" => "", "icon_style" => "none", "icon_color_bg" => "", "icon_border_style" => "", "icon_color_border" => "#333333", "icon_border_size" => "1", "icon_border_radius" => "500", "icon_border_spacing" => "50", "icon_img" => "", "img_width" => "48", "icon_size" => "32", "ult_hide_row" => "", "ult_hide_row_large_screen" => "", "ult_hide_row_desktop" => "", "ult_hide_row_tablet" => "", "ult_hide_row_tablet_small" => "", "ult_hide_row_mobile" => "", "ult_hide_row_mobile_large" => "", "video_fixer" => "true"), $atts)); if ($bg_type === '') { $bg_type = 'no_bg'; } if ($parallax_style === '') { $parallax_style = 'vcpb-default'; } if ($bg_image_repeat === '') { $bg_image_repeat = 'repeat'; } if ($bg_image_size === '') { $bg_image_size = 'cover'; } if ($bg_img_attach === '') { $bg_img_attach = 'scroll'; } $bsf_dev_mode = bsf_get_option('dev_mode'); if ($bsf_dev_mode === 'enable') { $js_path = '../assets/js/'; $css_path = '../assets/css/'; $ext = ''; } else { $js_path = '../assets/min-js/'; $css_path = '../assets/min-css/'; $ext = '.min'; } /* enqueue scripts */ if (get_option('ultimate_row') == "enable" && $bg_type !== "" || $parallax_content != '' || $fadeout_row != '') { $ultimate_js = get_option('ultimate_js'); if ($ultimate_js != 'enable') { if ($bg_type == 'no_bg' && ($parallax_content != '' || $fadeout_row != '')) { //wp_enqueue_script('ultimate-row-bg',plugins_url('../assets/min-js/',__FILE__).'ultimate_bg.min.js'); //wp_enqueue_script('ultimate-custom'); } else { if ($bg_type != 'no_bg' && ($parallax_content != '' || $fadeout_row != '')) { wp_enqueue_script('ultimate-appear'); wp_enqueue_script('ultimate-row-bg', plugins_url($js_path, __FILE__) . 'ultimate_bg' . $ext . '.js'); wp_enqueue_script('ultimate-custom'); } else { if ($bg_type != 'no_bg' && ($parallax_content == '' || $fadeout_row == '')) { wp_enqueue_script('ultimate-appear'); wp_enqueue_script('ultimate-row-bg', plugins_url($js_path, __FILE__) . 'ultimate_bg' . $ext . '.js'); wp_enqueue_script('ultimate-custom'); } } } } $html = $autoplay = $muted = $loop = $pos_suffix = $bg_img = $bg_img_id = $icon_inline = $commom_data_attributes = $vc_version = ''; $ultimate_custom_vc_row = get_option('ultimate_custom_vc_row'); $ultimate_theme_support = get_option('ultimate_theme_support'); if (defined('WPB_VC_VERSION')) { $vc_version = WPB_VC_VERSION; } $commom_data_attributes .= ' data-custom-vc-row="' . $ultimate_custom_vc_row . '" '; $commom_data_attributes .= ' data-vc="' . $vc_version . '" '; $commom_data_attributes .= ' data-theme-support="' . $ultimate_theme_support . '" '; //if($disable_on_mobile != '') //{ // if($disable_on_mobile == 'enable_on_mobile_value') // $disable_on_mobile = 'false'; // else // $disable_on_mobile = 'true'; //} //else $disable_on_mobile = 'true'; if ($disable_on_mobile_img_parallax == '') { $disable_on_mobile_img_parallax = 'true'; } else { $disable_on_mobile_img_parallax = 'false'; } // for overlay if ($enable_overlay == 'enable_overlay_value') { if ($overlay_pattern != 'transperant' && $overlay_pattern != '') { $pattern_url = plugins_url('../assets/images/patterns/', __FILE__) . $overlay_pattern; } else { $pattern_url = ''; } if (preg_match('/^#[a-f0-9]{6}$/i', $overlay_color)) { $overlay_color = hex2rgbUltParallax($overlay_color, $opacity = 0.2); } if (strpos($overlay_pattern_opacity, '.') === false) { $overlay_pattern_opacity = $overlay_pattern_opacity / 100; } $overlay = ' data-overlay="true" data-overlay-color="' . $overlay_color . '" data-overlay-pattern="' . $pattern_url . '" data-overlay-pattern-opacity="' . $overlay_pattern_opacity . '" data-overlay-pattern-size="' . $overlay_pattern_size . '" data-overlay-pattern-attachment="' . $overlay_pattern_attachment . '" '; if ($multi_color_overlay == 'uvc-multi-color-bg') { $multi_color_overlay_opacity = $multi_color_overlay_opacity / 100; $overlay .= ' data-multi-color-overlay="' . $multi_color_overlay . '" data-multi-color-overlay-opacity="' . $multi_color_overlay_opacity . '" '; } } else { $overlay = ' data-overlay="false" data-overlay-color="" data-overlay-pattern="" data-overlay-pattern-opacity="" data-overlay-pattern-size="" '; } // for seperator if ($seperator_enable == 'seperator_enable_value') { $seperator_bottom_html = ' data-seperator="true" '; $seperator_bottom_html .= ' data-seperator-type="' . $seperator_type . '" '; $seperator_bottom_html .= ' data-seperator-shape-size="' . $seperator_shape_size . '" '; $seperator_bottom_html .= ' data-seperator-svg-height="' . $seperator_svg_height . '" '; $seperator_bottom_html .= ' data-seperator-full-width="true"'; $seperator_bottom_html .= ' data-seperator-position="' . $seperator_position . '" '; if ($seperator_shape_background != '') { $seperator_bottom_html .= ' data-seperator-background-color="' . $seperator_shape_background . '" '; } if ($seperator_shape_border != 'none') { $seperator_bottom_html .= ' data-seperator-border="' . $seperator_shape_border . '" '; $bwidth = $seperator_shape_border_width == '' ? '1' : $seperator_shape_border_width; $seperator_bottom_html .= ' data-seperator-border-width="' . $bwidth . '" '; $seperator_bottom_html .= ' data-seperator-border-color="' . $seperator_shape_border_color . '" '; } if ($icon_type != 'no_icon') { $icon_animation = ''; $alignment = 'center'; $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 . '"]'); } $seperator_bottom_html .= ' data-icon="' . htmlentities($icon_inline) . '" '; } $seperator_html = $seperator_top_html . ' ' . $seperator_bottom_html; // for hide row $device_message = $ult_hide_row_data = ''; if ($ult_hide_row == 'ult_hide_row_value') { if ($ult_hide_row_large_screen == 'large_screen') { $ult_hide_row_data .= ' uvc_hidden-lg '; } if ($ult_hide_row_desktop == 'desktop') { $ult_hide_row_data .= ' uvc_hidden-ml '; } if ($ult_hide_row_tablet == 'tablet') { $ult_hide_row_data .= ' uvc_hidden-md '; } if ($ult_hide_row_tablet_small == 'xs_tablet') { $ult_hide_row_data .= ' uvc_hidden-sm '; } if ($ult_hide_row_mobile == 'mobile') { $ult_hide_row_data .= ' uvc_hidden-xs '; } if ($ult_hide_row_mobile_large == 'xl_mobile') { $ult_hide_row_data .= ' uvc_hidden-xsl '; } if ($ult_hide_row_data != '') { $ult_hide_row_data = ' data-hide-row="' . $ult_hide_row_data . '" '; } } // RTL $rtl = 'false'; if (is_rtl()) { $rtl = 'true'; } if ($rtl === 'false' || $rtl === false) { $ultimate_rtl_support = get_option('ultimate_rtl_support'); if ($ultimate_rtl_support == 'enable') { $rtl = 'true'; } } $output = '<!-- Row Backgrounds -->'; if ($bg_image_new != "") { $bg_img_id = $bg_image_new; } elseif ($bg_image != "") { $bg_img_id = $bg_image; } else { if ($css !== "") { $arr = explode('?id=', $css); if (isset($arr[1])) { $arr = explode(')', $arr[1]); $bg_img_id = $arr[0]; } } } if ($bg_image_posiiton != '') { if (strpos($bg_image_posiiton, 'px')) { $pos_suffix = 'px'; } elseif (strpos($bg_image_posiiton, 'em')) { $pos_suffix = 'em'; } else { $pos_suffix = '%'; } } if ($bg_type == "no_bg") { /*$html .= '<div class="upb_no_bg" data-fadeout="'.$fadeout_row.'" data-fadeout-percentage="'.$fadeout_start_effect.'" data-parallax-content="'.$parallax_content.'" data-parallax-content-sense="'.$parallax_content_sense.'" data-row-effect-mobile-disable="'.$disable_on_mobile.'" data-img-parallax-mobile-disable="'.$disable_on_mobile_img_parallax.'" data-rtl="'.$rtl.'" '.$commom_data_attributes.' '.$seperator_html.' '.$ult_hide_row_data.'></div>';*/ } elseif ($bg_type == "image") { if ($bg_image_size == 'cstm') { if ($bg_cstm_size != '') { $bg_image_size = $bg_cstm_size; } } if ($parallax_style == 'vcpb-fs-jquery' || $parallax_style == "vcpb-mlvp-jquery") { if ($parallax_style == 'vcpb-fs-jquery') { wp_enqueue_script('jquery.shake', plugins_url($js_path . 'jparallax' . $ext . '.js', __FILE__)); } if ($parallax_style == "vcpb-mlvp-jquery") { wp_enqueue_script('jquery.vhparallax', plugins_url($js_path . 'vhparallax' . $ext . '.js', __FILE__)); } $imgs = explode(',', $layer_image); $layer_image = array(); foreach ($imgs as $value) { $layer_image[] = wp_get_attachment_image_src($value, 'full'); } foreach ($layer_image as $key => $value) { $bg_imgs[] = $layer_image[$key][0]; } $html .= '<div class="upb_bg_img" data-ultimate-bg="' . implode(',', $bg_imgs) . '" data-ultimate-bg-style="' . $parallax_style . '" data-bg-img-repeat="' . $bg_image_repeat . '" data-bg-img-size="' . $bg_image_size . '" data-bg-img-position="' . $bg_image_posiiton . '" data-parallx_sense="' . $parallax_sense . '" data-bg-override="' . $bg_override . '" data-bg_img_attach="' . $bg_img_attach . '" data-upb-overlay-color="' . $overlay_color . '" data-upb-bg-animation="' . $bg_fade . '" data-fadeout="' . $fadeout_row . '" data-fadeout-percentage="' . $fadeout_start_effect . '" data-parallax-content="' . $parallax_content . '" data-parallax-content-sense="' . $parallax_content_sense . '" data-row-effect-mobile-disable="' . $disable_on_mobile . '" data-img-parallax-mobile-disable="' . $disable_on_mobile_img_parallax . '" data-rtl="' . $rtl . '" ' . $commom_data_attributes . ' ' . $overlay . ' ' . $seperator_html . ' ' . $ult_hide_row_data . '></div>'; } else { if ($parallax_style == 'vcpb-vz-jquery' || $parallax_style == "vcpb-hz-jquery") { wp_enqueue_script('jquery.vhparallax', plugins_url($js_path . 'vhparallax' . $ext . '.js', __FILE__)); } if ($bg_img_id) { if ($animation_direction == '' && $animation_type != 'false') { if ($animation_type == 'h') { $animation = $horizontal_animation; } else { $animation = $vertical_animation; } } else { if ($animation_direction == 'top-animation' || $animation_direction == 'bottom-animation') { $animation_type = 'v'; } else { $animation_type = 'h'; } $animation = $animation_direction; if ($animation == '') { $animation = 'left-animation'; } } $bg_img = apply_filters('ult_get_img_single', $bg_img_id, 'url'); $html .= '<div class="upb_bg_img" data-ultimate-bg="url(' . $bg_img . ')" data-image-id="' . $bg_img_id . '" data-ultimate-bg-style="' . $parallax_style . '" data-bg-img-repeat="' . $bg_image_repeat . '" data-bg-img-size="' . $bg_image_size . '" data-bg-img-position="' . $bg_image_posiiton . '" data-parallx_sense="' . $parallax_sense . '" data-bg-override="' . $bg_override . '" data-bg_img_attach="' . $bg_img_attach . '" data-upb-overlay-color="' . $overlay_color . '" data-upb-bg-animation="' . $bg_fade . '" data-fadeout="' . $fadeout_row . '" data-bg-animation="' . $animation . '" data-bg-animation-type="' . $animation_type . '" data-animation-repeat="' . $animation_repeat . '" data-fadeout-percentage="' . $fadeout_start_effect . '" data-parallax-content="' . $parallax_content . '" data-parallax-content-sense="' . $parallax_content_sense . '" data-row-effect-mobile-disable="' . $disable_on_mobile . '" data-img-parallax-mobile-disable="' . $disable_on_mobile_img_parallax . '" data-rtl="' . $rtl . '" ' . $commom_data_attributes . ' ' . $overlay . ' ' . $seperator_html . ' ' . $ult_hide_row_data . '></div>'; } } } elseif ($bg_type == "video") { $v_opts = explode(",", $video_opts); if (is_array($v_opts)) { foreach ($v_opts as $opt) { if ($opt == "muted") { $muted .= $opt; } if ($opt == "autoplay") { $autoplay .= $opt; } if ($opt == "loop") { $loop .= $opt; } } } if ($viewport_vdo == 'viewport_play') { $enable_viewport_vdo = 'true'; } else { $enable_viewport_vdo = 'false'; } $video_fixer_option = get_option('ultimate_video_fixer'); if ($video_fixer_option) { if ($video_fixer_option == 'enable') { $video_fixer = 'false'; } } $u_stop_time = $u_stop_time != '' ? $u_stop_time : 0; $u_start_time = $u_stop_time != '' ? $u_start_time : 0; $v_img = apply_filters('ult_get_img_single', $video_poster, 'url'); $html .= '<div class="upb_content_video" data-controls-color="' . $controls_color . '" data-controls="' . $enable_controls . '" data-viewport-video="' . $enable_viewport_vdo . '" data-ultimate-video="' . $video_url . '" data-ultimate-video2="' . $video_url_2 . '" data-ultimate-video-muted="' . $muted . '" data-ultimate-video-loop="' . $loop . '" data-ultimate-video-poster="' . $v_img . '" data-ultimate-video-autoplay="autoplay" data-bg-override="' . $bg_override . '" data-upb-overlay-color="' . $overlay_color . '" data-upb-bg-animation="' . $bg_fade . '" data-fadeout="' . $fadeout_row . '" data-fadeout-percentage="' . $fadeout_start_effect . '" data-parallax-content="' . $parallax_content . '" data-parallax-content-sense="' . $parallax_content_sense . '" data-row-effect-mobile-disable="' . $disable_on_mobile . '" data-rtl="' . $rtl . '" data-img-parallax-mobile-disable="' . $disable_on_mobile_img_parallax . '" ' . $commom_data_attributes . ' ' . $overlay . ' ' . $seperator_html . ' ' . $ult_hide_row_data . ' data-video_fixer="' . $video_fixer . '"></div>'; if ($enable_controls == 'display_control') { wp_enqueue_style('ultimate-vidcons', plugins_url('../assets/fonts/vidcons.css', __FILE__)); } } elseif ($bg_type == 'u_iframe') { //wp_enqueue_script('jquery.tublar',plugins_url('../assets/js/tubular.js',__FILE__)); wp_enqueue_script('jquery.ytplayer', plugins_url($js_path . 'mb-YTPlayer' . $ext . '.js', __FILE__)); $v_opts = explode(",", $video_opts); $v_img = apply_filters('ult_get_img_single', $video_poster, 'url'); if (is_array($v_opts)) { foreach ($v_opts as $opt) { if ($opt == "muted") { $muted .= $opt; } if ($opt == "autoplay") { $autoplay .= $opt; } if ($opt == "loop") { $loop .= $opt; } } } if ($viewport_vdo === 'viewport_play') { $enable_viewport_vdo = 'true'; } else { $enable_viewport_vdo = 'false'; } $video_fixer_option = get_option('ultimate_video_fixer'); if ($video_fixer_option) { if ($video_fixer_option == 'enable') { $video_fixer = 'false'; } } $html .= '<div class="upb_content_iframe" data-controls="' . $enable_controls . '" data-viewport-video="' . $enable_viewport_vdo . '" data-ultimate-video="' . $u_video_url . '" data-bg-override="' . $bg_override . '" data-start-time="' . $u_start_time . '" data-stop-time="' . $u_stop_time . '" data-ultimate-video-muted="' . $muted . '" data-ultimate-video-loop="' . $loop . '" data-ultimate-video-poster="' . $v_img . '" data-upb-overlay-color="' . $overlay_color . '" data-upb-bg-animation="' . $bg_fade . '" data-fadeout="' . $fadeout_row . '" data-fadeout-percentage="' . $fadeout_start_effect . '" data-parallax-content="' . $parallax_content . '" data-parallax-content-sense="' . $parallax_content_sense . '" data-row-effect-mobile-disable="' . $disable_on_mobile . '" data-img-parallax-mobile-disable="' . $disable_on_mobile_img_parallax . '" data-rtl="' . $rtl . '" ' . $commom_data_attributes . ' ' . $overlay . ' ' . $seperator_html . ' ' . $ult_hide_row_data . ' data-video_fixer="' . $video_fixer . '"></div>'; } elseif ($bg_type == 'grad') { $html .= '<div class="upb_grad" data-grad="' . $bg_grad . '" data-bg-override="' . $bg_override . '" data-upb-overlay-color="' . $overlay_color . '" data-upb-bg-animation="' . $bg_fade . '" data-fadeout="' . $fadeout_row . '" data-fadeout-percentage="' . $fadeout_start_effect . '" data-parallax-content="' . $parallax_content . '" data-parallax-content-sense="' . $parallax_content_sense . '" data-row-effect-mobile-disable="' . $disable_on_mobile . '" data-img-parallax-mobile-disable="' . $disable_on_mobile_img_parallax . '" data-rtl="' . $rtl . '" ' . $commom_data_attributes . ' ' . $overlay . ' ' . $seperator_html . ' ' . $ult_hide_row_data . '></div>'; } elseif ($bg_type == 'bg_color') { $html .= '<div class="upb_color" data-bg-override="' . $bg_override . '" data-bg-color="' . $bg_color_value . '" data-fadeout="' . $fadeout_row . '" data-fadeout-percentage="' . $fadeout_start_effect . '" data-parallax-content="' . $parallax_content . '" data-parallax-content-sense="' . $parallax_content_sense . '" data-row-effect-mobile-disable="' . $disable_on_mobile . '" data-img-parallax-mobile-disable="' . $disable_on_mobile_img_parallax . '" data-rtl="' . $rtl . '" ' . $commom_data_attributes . ' ' . $overlay . ' ' . $seperator_html . ' ' . $ult_hide_row_data . '></div>'; } $output .= $html; if ($bg_type == 'no_bg') { return ''; } else { self::front_scripts(); return $output; } } }
function ultimate_video_banner_shortcode($atts, $content = null) { extract(shortcode_atts(array('video_banner_mp4_link' => '', 'video_banner_webm_ogg_link' => '', 'video_banner_effect' => 'ult-vdo-effect-style1', 'video_banner_placeholder' => '', 'video_banner_title' => '', 'video_banner_content' => '', 'title_font_family' => '', 'title_font_style' => '', 'title_font_size' => '', 'title_color' => '', 'title_line_height' => '', 'desc_font_family' => '', 'desc_font_style' => '', 'desc_font_size' => '', 'desc_color' => '', 'desc_line_height' => '', 'video_banner_size' => '', 'video_banner_overlay_color' => '', 'video_banner_overlay_hover_color' => '', 'video_banner_vc_css' => '', 'video_banner_start_time' => '0', 'video_banner_mute' => ''), $atts)); $output = $placeholder = $placeholder_css = $vc_css_class = ''; $vc_css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class($video_banner_vc_css, ' '), 'ultimate_video_banner', $atts); $video_id = 'ult-video-banner-' . uniqid(rand()); $args = array('target' => '#' . $video_id, 'media_sizes' => array('width' => $video_banner_size)); $banner_height_responsive_data = get_ultimate_vc_responsive_media_css($args); if (preg_match('/^#[a-f0-9]{6}$/i', $video_banner_overlay_color)) { $video_banner_overlay_color = hex2rgbUltParallax($video_banner_overlay_color, $opacity = 0.8); } if (preg_match('/^#[a-f0-9]{6}$/i', $video_banner_overlay_hover_color)) { $video_banner_overlay_hover_color = hex2rgbUltParallax($video_banner_overlay_hover_color, $opacity = 0.4); } /* ---- main heading styles ---- */ $title_style_inline = ''; if ($title_font_family != '') { $title_font_family = get_ultimate_font_family($title_font_family); if ($title_font_family) { $title_style_inline .= 'font-family:\'' . $title_font_family . '\';'; } } // main heading font style $title_style_inline .= get_ultimate_font_style($title_font_style); //attach font size if set if ($title_font_size != '') { $title_style_inline .= 'font-size:' . $title_font_size . 'px;'; } //attach font color if set if ($title_color != '') { $title_style_inline .= 'color:' . $title_color . ';'; } //line height if ($title_line_height != '') { $title_style_inline .= 'line-height:' . $title_line_height . 'px;'; } /* ---- description styles ---- */ $desc_style_inline = ''; if ($desc_font_family != '') { $desc_font_family = get_ultimate_font_family($desc_font_family); if ($desc_font_family) { $desc_style_inline .= 'font-family:\'' . $desc_font_family . '\';'; } } // desc font style $desc_style_inline .= get_ultimate_font_style($desc_font_style); //attach font size if set if ($desc_font_size != '') { $desc_style_inline .= 'font-size:' . $desc_font_size . 'px;'; } //attach font color if set if ($desc_color != '') { $desc_style_inline .= 'color:' . $desc_color . ';'; } //line height if ($desc_line_height != '') { $desc_style_inline .= 'line-height:' . $desc_line_height . 'px;'; } if ($video_banner_placeholder != '') { $img_info = apply_filters('ult_get_img_single', $video_banner_placeholder, 'url', 'full'); $placeholder = $img_info; $placeholder_css = 'background-image:url(' . $placeholder . ');'; } $output = '<div id="' . $video_id . '" class="' . $vc_css_class . ' ult-video-banner ult-vdo-effect ' . $video_banner_effect . ' utl-video-banner-item ult-responsive" ' . $banner_height_responsive_data . ' data-current-time="' . $video_banner_start_time . '" data-placeholder="' . $placeholder . '" style="' . $placeholder_css . '">'; if ($video_banner_mp4_link != '' || $video_banner_webm_ogg_link != '') { $output .= '<video autoplay loop ' . $video_banner_mute . ' poster="' . $placeholder . '">'; if ($video_banner_mp4_link != '') { $output .= '<source src="' . $video_banner_mp4_link . '" type="video/mp4">'; } if ($video_banner_webm_ogg_link != '') { $ext = pathinfo($video_banner_webm_ogg_link); if ($ext['extension'] == 'webm') { $type = 'webm'; } else { $type = 'ogg'; } $output .= '<source src="' . $video_banner_webm_ogg_link . '" type="video/' . $type . '">'; } $output .= __('Your browser does not support the video tag.', 'ultimate_vc'); $output .= '</video>'; } if ($video_banner_title != '' || $content != '') { $output .= '<div class="ult-video-banner-desc">'; if ($video_banner_title != '') { $output .= '<h2 class="ult-video-banner-title" style="' . $title_style_inline . '">' . __($video_banner_title, 'ultimate_vc') . '</h2>'; } if ($video_banner_content != '') { $output .= '<div class="ult-video-banner-content" style="' . $desc_style_inline . '">' . __($video_banner_content, 'ultimate_vc') . '</div>'; } $output .= '</div>'; } $output .= '<div class="ult-video-banner-overlay" data-overlay="' . $video_banner_overlay_color . '" data-overlay-hover="' . $video_banner_overlay_hover_color . '"></div>'; $output .= '</div>'; return $output; }