//$parallax_image = $video_bg_url; $youtube_class = ' vc_video-bg-container'; $youtube_attribute = 'data-vc-video-bg="' . esc_attr($video_bg_url) . '"'; wp_enqueue_script('vc_youtube_iframe_api_js'); } $video_placeholder = $video_placeholder != '' ? wp_get_attachment_image_src($video_placeholder, 'full') : ''; if ($video_bg == 'yes') { if (!empty($mp4) && !empty($webm)) { $video_bg_render .= '<div class="video-bg">'; $video_bg_render .= '<video poster="' . $video_placeholder[0] . '" preload="auto" loop autoplay muted>'; $video_bg_render .= '<source src="' . $mp4 . '" type="video/mp4" />'; $video_bg_render .= '<source src="' . $webm . '" type="video/webm" />'; $video_bg_render .= '</video>'; $video_bg_render .= '<div class="video-overlay" style="background-color: ' . $video_overlay . ';"></div>'; $video_bg_render .= '</div>'; } elseif (empty($mp4) && empty($webm) && !empty($video_bg_url) && vc_extract_youtube_id($video_bg_url)) { $video_bg_render .= '<div class="video-bg ">'; $video_bg_render .= '<video poster="' . $video_placeholder[0] . '" class="youtube-bg">'; $video_bg_render .= '</video>'; $video_bg_render .= '<div class="video-overlay" style="background-color: ' . $video_overlay . ';"></div>'; $video_bg_render .= '</div>'; } } $margin_div_start = $margin_div_end = ''; if ($layout == 'normal' || $layout == 'normal_no_spaces') { $class = 'inner_wrap'; } //$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'vc_row wpb_row ' . ( $this->settings( 'base' ) === 'vc_row_inner' ? 'vc_inner ' : '' ) . get_row_css_class() . $el_class . vc_shortcode_custom_css_class( $css, ' ' ), $this->settings['base'], $atts ); $css_class = preg_replace('/\\s+/', ' ', apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, implode(' ', array_filter($css_classes)), $this->settings['base'], $atts)); //$style = $this->buildStyle( $bg_image, $bg_color, $bg_image_repeat, $font_color, $padding, $margin_bottom, $paddingtop, $paddingbottom, $margintop, $marginbottom ); $extra = '';
//================================================ if ($columns_height == "adjust_cols_height") { $flex_row = true; $css_classes[] = ' vc_row-o-equal-height'; } //================================================ // /Get Bowtied Mod //================================================ if (!empty($content_placement)) { $flex_row = true; $css_classes[] = ' vc_row-o-content-' . $content_placement; } if (!empty($flex_row)) { $css_classes[] = ' vc_row-flex'; } $has_video_bg = !empty($video_bg) && !empty($video_bg_url) && vc_extract_youtube_id($video_bg_url); if ($has_video_bg) { $parallax = $video_bg_parallax; $parallax_image = $video_bg_url; $css_classes[] = ' vc_video-bg-container'; wp_enqueue_script('vc_youtube_iframe_api_js'); } if (!empty($parallax)) { wp_enqueue_script('vc_jquery_skrollr_js'); $wrapper_attributes[] = 'data-vc-parallax="1.5"'; // parallax speed $css_classes[] = 'vc_general vc_parallax vc_parallax-' . $parallax; if (false !== strpos($parallax, 'fade')) { $css_classes[] = 'js-vc_parallax-o-fade'; $wrapper_attributes[] = 'data-vc-parallax-o-fade="on"'; } elseif (false !== strpos($parallax, 'fixed')) {
$css_classes[] = 'vc_row-no-padding'; } } // Full height row if (!empty($full_height)) { $css_classes[] = ' vc_row-o-full-height'; if (!empty($content_placement)) { $css_classes[] = ' vc_row-o-content-' . $content_placement; } } // Use default video if user checked video, but didn't chose url if ('self_hosted' != $video_bg) { if (!empty($video_bg) && empty($video_bg_url)) { $video_bg_url = 'https://www.youtube.com/watch?v=lMJXxhRFO1k'; } elseif (!empty($video_bg) && !empty($video_bg_url) && function_exists('vc_extract_youtube_id')) { $has_video_bg = vc_extract_youtube_id($video_bg_url); } } if ($has_video_bg) { $parallax = $video_bg_parallax; $parallax_image = $video_bg_url; $css_classes[] = ' vc_video-bg-container'; wp_enqueue_script('vc_youtube_iframe_api_js'); } // Parallax bg if (!empty($parallax)) { wp_enqueue_script('vc_jquery_skrollr_js'); $wrapper_attributes[] = 'data-vc-parallax="1.5"'; // parallax speed $css_classes[] = 'vc_general vc_parallax vc_parallax-' . $parallax; if (strpos($parallax, 'fade') !== false) {