Exemplo n.º 1
0
 public function content($atts, $content = null)
 {
     $el_class = '';
     $output = '';
     extract(shortcode_atts(array('el_class' => '', 'top_margin' => 'none'), $atts));
     wp_enqueue_style('js_composer_front');
     wp_enqueue_script('wpb_composer_front_js');
     $output .= '<div class="wpb_row ' . get_row_css_class() . ' ' . $el_class . ($top_margin != "none" ? ' ' . $top_margin : '') . '">';
     $output .= wpb_js_remove_wpautop($content);
     $output .= '</div>' . $this->endBlockComment('row');
     return $output;
 }
Exemplo n.º 2
0
<?php

$output = $el_class = $bg_image = $bg_color = $bg_image_repeat = $font_color = $padding = $margin_bottom = $css = '';
extract(shortcode_atts(array('el_class' => '', 'bg_image' => '', 'bg_color' => '', 'bg_image_repeat' => '', 'font_color' => '', 'padding' => '', 'centered' => '', 'margin_bottom' => '', 'css' => ''), $atts));
wp_enqueue_style('js_composer_front');
wp_enqueue_script('wpb_composer_front_js');
wp_enqueue_style('js_composer_custom_css');
$el_class = $this->getExtraClass($el_class);
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_row clearfix ' . get_row_css_class() . $el_class . vc_shortcode_custom_css_class($css, ' '), $this->settings['base'], $atts);
$style = $this->buildStyle($bg_image, $bg_color, $bg_image_repeat, $font_color, $padding, $margin_bottom);
$output .= '<div class="' . $css_class . '"' . $style . '>';
if ($centered == 'yes') {
    $output .= '<div class="container"><div class="sd-centered-wrapper">';
}
$output .= wpb_js_remove_wpautop($content);
if ($centered == 'yes') {
    $output .= '</div></div>';
}
$output .= '</div>' . $this->endBlockComment('row');
echo $output;
Exemplo n.º 3
0
<?php

$output = $el_class = '';
extract(shortcode_atts(array('fullwidth' => 'false', 'id' => '', 'padding' => 0, 'attached' => 'false', 'visibility' => '', 'css' => '', 'animation' => '', 'el_class' => ''), $atts));
wp_enqueue_script('wpb_composer_front_js');
$fullwidth_start = $output = $fullwidth_end = '';
$id = !empty($id) ? ' id="' . $id . '"' : '';
$padding_css = $attached == 'true' ? 'add-padding-' . $padding : '';
$animation_css = $animation != '' ? ' mk-animate-element ' . $animation . ' ' : '';
if ($fullwidth == 'true') {
    global $post;
    $page_layout = get_post_meta($post->ID, '_layout', true);
    $fullwidth_start = '</div></div></div>';
    /* Fixes page section for blog single page */
    if (is_singular('post')) {
        $fullwidth_start .= '</div>';
    }
    $fullwidth_end = '<div class="mk-main-wrapper-holder"><div class="theme-page-wrapper ' . $page_layout . '-layout mk-grid vc_row-fluid no-padding"><div class="theme-content no-padding">';
    /* Fixes page section for blog single post */
    if (is_singular('post')) {
        $fullwidth_end .= '<div class="single-content">';
    }
}
$output .= $fullwidth_start . '<div' . $id . ' class="wpb_row vc_row ' . $el_class . ' vc_row-fluid ' . $visibility . ' mk-fullwidth-' . $fullwidth . ' ' . $padding_css . ' attched-' . $attached . ' ' . get_row_css_class() . vc_shortcode_custom_css_class($css, ' ') . $animation_css . '">';
$output .= wpb_js_remove_wpautop($content);
$output .= '</div>' . $fullwidth_end . $this->endBlockComment('row');
echo $output;
 /**
  * Columns shortcode
  *
  * @param array $atts
  * @param string $content
  * @return string
  */
 function wolf_row_shortcode($atts, $content = null)
 {
     $output = $el_class = $custom_class = $style = '';
     extract(shortcode_atts(array('el_class' => '', 'font_type' => 'dark', 'background_color' => '', 'background_type' => '', 'background_image' => '', 'background_position' => '', 'background_attachment' => '', 'background_repeat' => '', 'background_size' => '', 'video_bg_type' => '', 'video_bg_youtube_url' => '', 'video_bg_mp4' => '', 'video_bg_webm' => '', 'video_bg_ogv' => '', 'video_opacity' => '100', 'video_bg_img' => '', 'content_type' => 'standard', 'no_padding' => '', 'padding_top' => '', 'padding_bottom' => '', 'parallax' => '', 'full_screen' => '', 'anchor' => '', 'overlay' => '', 'overlay_image' => '', 'overlay_color' => '', 'overlay_opacity' => '100', 'inline_style' => '', 'hide_class' => ''), $atts));
     $style = '';
     $overlay_style = '';
     $video_opacity = 100;
     $overlay_opacity = $overlay_opacity ? absint($overlay_opacity) / 100 : 0.4;
     $custom_class .= 'wolf-row clearfix content-' . $font_type . '-font' . ' wolf-row-' . $content_type . '-width';
     if ($hide_class) {
         $custom_class .= ' ' . $hide_class;
     }
     if ($video_bg_mp4 || $video_bg_youtube_url) {
         $custom_class .= ' wolf-row-video-bg';
     }
     if ($no_padding) {
         $custom_class .= ' wolf-row-no-padding';
     }
     if ($full_screen) {
         $custom_class .= ' section-full-screen';
     }
     wp_enqueue_script('wpb_composer_front_js');
     $el_class = $this->getExtraClass($el_class);
     $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_row section ' . $custom_class . ' ' . get_row_css_class() . $el_class, $this->settings['base']);
     $_image = '';
     if ($background_image != ' ') {
         $_image = wolf_get_url_from_attachment_id($background_image, 'extra-large');
     }
     if ($parallax && 'image' == $background_type && $_image) {
         $css_class .= ' section-parallax';
     }
     if ($background_color) {
         $style .= "background-color:{$background_color};";
     }
     if ('image' == $background_type) {
         if ($background_image) {
             $style .= "background-image:url({$_image});";
         }
         if ($background_position) {
             $style .= "background-position:{$background_position};";
         }
         if ($background_repeat) {
             $style .= "background-repeat:{$background_repeat};";
         }
         if ($background_size == 'cover') {
             $style .= "-webkit-background-size: 100%; -o-background-size: 100%; -moz-background-size: 100%; background-size: 100%;-webkit-background-size: cover; -o-background-size: cover; background-size: cover;";
         }
         if ($background_size == 'resize') {
             $style .= "-webkit-background-size: 100%; -o-background-size: 100%;-moz-background-size: 100%; background-size: 100%;";
         }
     }
     // endif image background
     if ($overlay && ('image' == $background_type && $_image || 'video' == $background_type && ($video_bg_mp4 || $video_bg_youtube_url))) {
         $_overlay_image = '';
         if ($overlay_image != '') {
             $_overlay_image = wolf_get_url_from_attachment_id($overlay_image, 'extra-large');
         }
         if ($overlay_color) {
             $overlay_style .= "background-color:{$overlay_color};";
         }
         if ($overlay_image) {
             $overlay_style .= "background-image:url({$_overlay_image});";
         }
         $overlay_style .= "opacity:{$overlay_opacity};";
     }
     $_style = $style ? ' style="' . wolf_compact_css($style) . '"' : '';
     $_overlay_style = $overlay_style ? ' style="' . wolf_compact_css($overlay_style) . '"' : '';
     $section_id = $anchor ? ' id="' . $anchor . '"' : '';
     $output .= '<div' . $_style . $section_id . ' class="' . $css_class . '">';
     $inner_style = '';
     if ('' != $padding_top) {
         $padding_top = is_numeric($padding_top) ? $padding_top . 'px' : $padding_top;
         $inner_style .= "padding-top:{$padding_top};";
     }
     if ('' != $padding_bottom) {
         $padding_bottom = is_numeric($padding_bottom) ? $padding_bottom . 'px' : $padding_bottom;
         $inner_style .= "padding-bottom:{$padding_bottom};";
     }
     if ($video_bg_mp4 && 'video' == $background_type && 'selhosted' == $video_bg_type) {
         $video_bg_img = $video_bg_img ? wolf_get_url_from_attachment_id(absint($video_bg_img), 'extra-large') : null;
         $output .= wolf_video_bg($video_bg_mp4, $video_bg_webm, $video_bg_ogv, $video_opacity, $video_bg_img, $parallax);
     }
     //elseif( $video_bg_youtube_url && 'video' == $background_type && 'youtube' == $video_bg_type ) {
     $output .= wolf_youtube_video_bg($video_bg_youtube_url);
     //}
     if ($overlay) {
         $output .= '<div class="row-overlay"' . $_overlay_style . '></div>';
     }
     $output .= "<div class='wolf-row-inner' style='{$inner_style}'>";
     $output .= '<div class="wrap">';
     $output .= wpb_js_remove_wpautop($content);
     $output .= '</div><!--.wrap-->';
     $output .= "\n";
     $output .= '</div><!--.wolf-row-inner-->';
     $output .= "\n";
     // end row inner
     $output .= '</div><!--.wolf-row-->';
     return $output;
 }
Exemplo n.º 5
0
}
if (!empty($dt_padding_bottom)) {
    $padding .= 'padding-bottom: ' . $dt_padding_bottom . 'px;';
}
// Data Img:original or src for lazyload
$dataimg = '';
$lazyclass = '';
if (!empty($image_url)) {
    if (isset($smof_data['lazyload']) && $smof_data['lazyload'] == '1') {
        $dataimg = 'data-original="' . $image_url . '"';
        $lazyclass = 'lazy';
    } else {
        $dataimg = 'src="' . $image_url . '"';
    }
}
// ID
$output_id = '';
if (!empty($dt_id)) {
    $output_id = 'id="' . $dt_id . '"';
}
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_row ' . get_row_css_class() . $dt_class . ' ' . $dt_no_mb . ' ' . $dt_row_type, $this->settings['base']);
$output .= '<div ' . $output_id . ' ' . $video_bg . ' class="' . $lazyclass . ' ' . $bgv_class . ' ' . $parallax_bg . ' ' . $css_class . '" ' . $dataimg . ' style="' . $style . '"  data-token="' . $token . '">';
if (!empty($bg_image) || !empty($bg_color) || !empty($dt_padding_top) || !empty($dt_padding_bottom)) {
    $output .= '<div class="' . $dt_text_scheme . '" style="' . $padding . ' background-color: rgba(' . $rgbcolor . ', ' . $cop . ');">';
}
$output .= wpb_js_remove_wpautop($content);
if (!empty($bg_image) || !empty($bg_color) || !empty($dt_padding_top) || !empty($dt_padding_bottom)) {
    $output .= '<div class="clear"></div></div>';
}
$output .= '</div>' . $this->endBlockComment('row');
echo $output;
Exemplo n.º 6
0
<?php

$output = $el_class = '';
extract(shortcode_atts(array('el_class' => '', 'row_type' => 'row', 'type' => '', 'anchor' => '', 'video' => '', 'video_overlay' => '', 'video_webm' => '', 'video_mp4' => '', 'video_ogv' => '', 'video_image' => '', 'background_color' => '', 'border_color' => '', 'padding_top' => '', 'padding_bottom' => '', 'padding' => '', 'text_align' => 'left', 'more_button_label' => 'More Facts', 'less_button_label' => 'Less Facts', 'button_position' => 'left', 'color' => '', 'css_animation' => '', 'transition_delay' => ''), $atts));
wp_enqueue_style('js_composer_front');
wp_enqueue_script('wpb_composer_front_js');
wp_enqueue_style('js_composer_custom_css');
$el_class = $this->getExtraClass($el_class);
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_row ' . get_row_css_class() . $el_class, $this->settings['base']);
if ($type == "grid") {
    $css_class_type = " grid_section";
} else {
    $css_class_type = "";
}
if ($css_animation != "") {
    $clsss_css_animation = "  " . $css_animation;
} else {
    $clsss_css_animation = "";
}
$delay = "";
if ($transition_delay != "") {
    $delay = " style='transition-delay:" . $transition_delay . "s'";
}
$box_class = "";
if ($row_type == "box") {
    $box_class = " use_as_box";
}
$anchor_id = "";
if ($anchor != "") {
    $anchor_id = ' data-id="#' . $anchor . '"';
}
Exemplo n.º 7
0
$output = $el_class = $bg_image = $bg_color = $bg_image_repeat = $font_color = $padding = $margin_bottom = $css = '';
extract(shortcode_atts(array('el_class' => '', 'dt_id' => '', 'type' => 'pr-default', 'bg_image' => '', 'bg_color' => '', 'bg_image_repeat' => '', 'font_color' => '', 'padding' => '', 'margin_bottom' => '', 'full_width' => 0, 'enable_parallax' => '', 'css' => ''), $atts));
wp_enqueue_style('js_composer_front');
wp_enqueue_script('wpb_composer_front_js');
wp_enqueue_style('js_composer_custom_css');
//Set array elemtet class
$pr_id = $dt_id ? "id=" . $dt_id . "" : "";
$pr_class_extras = array();
if ((int) $full_width == true) {
    $pr_full_width = "";
    $class_full_width = "pr-full-width";
} else {
    $pr_full_width = "pr-container";
}
$el_class = $this->getExtraClass($el_class);
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_row  ' . $class_full_width . '   ' . ($this->settings('base') === 'pr_row_inner' ? 'pr_inner ' : '') . get_row_css_class() . $animation . $el_class . vc_shortcode_custom_css_class($css, ' '), $this->settings['base'], $atts);
$style = $this->buildStyle($bg_image, $bg_color, $bg_image_repeat, $font_color, $padding, $margin_bottom);
if ($enable_parallax) {
    $pr_class_extras[] = $type == 'pr-default' ? 'pr-parallax-bg' : 'pr-parallax-video';
    $pr_class_extras[] = "parallax";
    $output .= '<div ' . $pr_id . ' class="' . $css_class . ' ' . esc_attr(implode(' ', $pr_class_extras)) . '"' . $data_attr . '>';
    $output .= "<div class='overlay'>";
} else {
    $output .= '<div ' . $pr_id . ' class="' . $css_class . ' ' . esc_attr(implode(' ', $pr_class_extras)) . ' ' . $style . '"' . $data_attr . '>';
}
//$output .= '<div class="'.$css_class.'">';
if ($pr_full_width == 'pr-container') {
    $output .= '<div class="container">';
    $output .= '<div class="row">';
}
$output .= wpb_js_remove_wpautop($content);
Exemplo n.º 8
0
extract(shortcode_atts(array('el_class' => '', 'bg_image' => '', 'bg_color' => '', 'bg_image_repeat' => '', 'font_color' => '', 'full_width' => false, 'padding' => '', 'margin_bottom' => '', 'custom_background' => '', 'parallax' => '', 'anchor_link' => '', 'css' => '', 'row_height' => '', 'min_height' => ''), $atts));
wp_enqueue_script('wpb_composer_front_js');
$el_class = $this->getExtraClass($el_class);
// Scrape Background CSS
if (preg_match('/\\bbackground\\b/i', $css)) {
    $background_css = 'yes';
}
// Parallax
if (!empty($parallax)) {
    preg_match_all('/background(-image)??\\s*?:.*?url\\(["|\']??(.+)["|\']??\\)/', $css, $matches, PREG_SET_ORDER);
    if (!empty($matches)) {
        $parallax_image_src = $matches[0][2];
        $css = str_replace($matches[0][0] . ' !important;', '', $css);
    }
}
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_row ' . get_row_css_class() . $el_class . (!empty($full_width) ? ' ' . $full_width : '') . (!empty($anchor_link) ? ' link_anchor anchor-' . $anchor_link : '') . (!empty($background_image) && !empty($parallax) ? ' parallax' : '') . ($row_height == 'full_height' ? ' full-row-height' : '') . (!empty($parallax) || !empty($row_height) || !empty($background_css) || !empty($inherit_shaded_color) ? ' custom-row' : '') . vc_shortcode_custom_css_class($css, ' '), $this->settings['base'], $atts);
// Parallax
if (!empty($parallax)) {
    if ($parallax == 'yes') {
        $parallax = 'content-moving';
    }
    wp_enqueue_script('vc_jquery_skrollr_js');
    $css_class .= ' custom-row parallax vc_general vc_parallax vc_parallax-' . $parallax;
    if (strpos($parallax, 'fade')) {
        $css_class .= ' js-vc_parallax-o-fade';
    }
}
// Anchor Links
if (!empty($anchor_link)) {
    wp_register_script('waypoints', get_template_directory_uri() . '/js/waypoints.min.js', array('jquery'), true);
    wp_enqueue_script('waypoints');
}
if (!empty($center_row) && 'yes' == $center_row) {
    $total_wrap_classes[] = 'wpex-vc-row-centered';
}
if (!empty($column_spacing)) {
    $total_wrap_classes[] = 'wpex-vc-has-custom-column-spacing';
    $total_wrap_classes[] = 'wpex-vc-column-spacing-' . $column_spacing;
}
$total_wrap_classes[] = vcex_offset_vc($atts);
$total_wrap_classes = implode(' ', $total_wrap_classes);
// Declare some vars
$wrapper_attributes = array();
$has_video_bg = false;
// Inner classes
$css_classes = array('vc_row', 'wpb_row', 'clr');
$css_classes[] = get_row_css_class();
$css_classes[] = vc_shortcode_custom_css_class($css, ' ');
if (!empty($el_class)) {
    $css_classes[] = $this->getExtraClass($el_class);
}
// Custom ID
if (!empty($el_id)) {
    $wrapper_attributes[] = 'id="' . esc_attr($el_id) . '"';
}
// Full width row
if (!empty($full_width)) {
    $wrapper_attributes[] = 'data-vc-full-width="true"';
    $wrapper_attributes[] = 'data-vc-full-width-init="false"';
    if ('stretch_row_content' === $full_width) {
        $wrapper_attributes[] = 'data-vc-stretch-content="true"';
    } elseif ('stretch_row_content_no_spaces' === $full_width) {
Exemplo n.º 10
0
        $style .= 'background-repeat: repeat;';
    }
}
// Padding
$padding = '';
if (!empty($king_padding_top)) {
    $padding .= 'padding-top: ' . $king_padding_top . 'px;';
}
if (!empty($king_padding_bottom)) {
    $padding .= 'padding-bottom: ' . $king_padding_bottom . 'px;';
}
if ($king_id == '') {
    $king_id_rand = rand(100000, 900000);
    $king_id = 'king-' . $king_id_rand;
}
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_row ' . get_row_css_class() . $king_class . ' ' . ($king_row_type != 'container' ? ' ' . $king_row_type : ''), $this->settings['base']);
if ($this->settings('base') === 'vc_row_inner') {
    $css_class .= 'king-innerRow-container';
}
$output .= '<div id="' . $king_id . '" class="' . $css_class . '"';
if (!empty($style)) {
    $output .= ' style="' . $style . '"';
}
$output .= '>';
if ($this->settings('base') !== 'vc_row_inner') {
    $output .= '<div class="' . ($king_row_type != 'container_full' ? 'container' : '') . ' ' . $king_class_container . '" style="' . $padding . '">';
    $output .= wpb_js_remove_wpautop($content);
    $output .= '<div class="clear"></div></div>';
} else {
    $output .= wpb_js_remove_wpautop($content);
}
<?php

$output = $el_class = '';
extract(shortcode_atts(array('id' => '', 'padding' => 0, 'attached' => 'false', 'visibility' => '', 'css' => '', 'animation' => '', 'el_class' => ''), $atts));
wp_enqueue_script('wpb_composer_front_js');
$fullwidth_start = $output = $fullwidth_end = '';
$id = !empty($id) ? ' id="' . $id . '"' : '';
$padding_css = $attached == 'true' ? 'add-padding-' . $padding : '';
$animation_css = $animation != '' ? ' mk-animate-element ' . $animation . ' ' : '';
$output .= '<div' . $id . ' class="wpb_row vc_inner vc_row ' . $el_class . ' vc_row-fluid ' . $visibility . ' ' . $padding_css . ' attched-' . $attached . ' ' . get_row_css_class() . vc_shortcode_custom_css_class($css, ' ') . $animation_css . '">';
$output .= wpb_js_remove_wpautop($content);
$output .= '</div>';
echo $output;
Exemplo n.º 12
0
$section_container_class .= $padding !== 'none' ? $padding : '';
//Parallex Classes
$parallex_section_classes = 'parallex_wrapper zee_para_container';
$parallex_inner_classes = 'parallex_folio';
$el_class = $this->getExtraClass($el_class);
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'section_holder ' . get_row_css_class() . ' ' . $gray_background . $el_class . vc_shortcode_custom_css_class($css, ' '), $this->settings['base'], $atts);
//Curve Classes
$curve_position;
$curve_colors_classes;
$t_c_color_type;
$t_c_bg_color_type;
$b_c_color_type;
$b_c_bg_color_type;
$curve_colors_classes = ' ' . $t_c_color_type . ' ' . $t_c_bg_color_type . ' ' . $b_c_color_type . ' ' . $b_c_bg_color_type;
$curve_container_class = $curve_position != 'zee_d_curve_container' ? 'section_container section_curve_container' : '';
$css_curve_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'zee_curve_container ' . get_row_css_class() . ' ' . $gray_background . ' ' . $curve_position . $curve_colors_classes . ' ' . $el_class . vc_shortcode_custom_css_class($css, ' '), $this->settings['base'], $atts);
//echo $content;
$style = $this->buildStyle($bg_image, $bg_color);
/* Headers RegExp Matching */
if (!is_array(folio_match_expression('folio_header', $content, 'shortcode'))) {
    $slider = folio_match_expression('folio_header', $content, 'shortcode');
}
/* Carousel RegExp Matching */
if (!is_array(folio_match_expression('carousel_view', $content, 'attr'))) {
    $view = folio_match_expression('carousel_view', $content, 'attr');
}
/* Map RegExp Matching */
if (!is_array(folio_match_expression('map_layout', $content, 'attr'))) {
    $map = folio_match_expression('map_layout', $content, 'attr');
}
/* Checking is google map is CURVE or not RegExp Matching */
Exemplo n.º 13
0
        $classes .= ' parallax_hor';
        wp_enqueue_script('us-hor-parallax');
    }
}
$bg_overlay_html = '';
if (!empty($atts['us_bg_overlay_color'])) {
    $classes .= ' with_overlay';
    $bg_overlay_html = '<div class="l-section-overlay" style="background-color: ' . $atts['us_bg_overlay_color'] . '"></div>';
}
// Additional class set by a user in a shortcode attributes
if (!empty($atts['el_class'])) {
    $classes .= ' ' . sanitize_html_class($atts['el_class']);
}
// Special VC hooks
if (function_exists('get_row_css_class')) {
    $classes .= ' ' . get_row_css_class();
}
if (!empty($atts['css']) and preg_match('~\\{([^\\}]+?)\\;?\\}~', $atts['css'], $matches)) {
    // We cannot use VC's method directly for rows: as it uses !important values, so we're moving the defined css
    // that don't duplicate the theme's features to inline style attribute.
    $vc_css_rules = array_map('trim', explode(';', $matches[1]));
    $overloaded_params = array('background', 'background-position', 'background-repeat', 'background-size');
    foreach ($vc_css_rules as $vc_css_rule) {
        $vc_css_rule = explode(':', $vc_css_rule);
        if (count($vc_css_rule) == 2 and !in_array($vc_css_rule[0], $overloaded_params)) {
            $inner_css .= $vc_css_rule[0] . ':' . $vc_css_rule[1] . ';';
        }
    }
}
$classes = apply_filters('vc_shortcodes_css_class', $classes, $shortcode_base, $atts);
// Preparing html output
Exemplo n.º 14
0
        }
        break;
    case 'img_fixed':
        $row_style .= "background-attachment:fixed;background-repeat: no-repeat;";
        break;
    case 'hvideo':
        $el_class .= "row-bg-video";
        $video_style = '<div class="zo-bg-video">' . do_shortcode('[video autoplay="on" loop="on" preload="none" height="0" width="0" mp4="' . $bg_video_mp4 . '" webm="' . $bg_video_webm . '"]') . '</div>';
        break;
}
$class_img_fixed = '';
if ($bg_style == 'img_fixed') {
    $class_img_fixed = 'background-image-fixed';
}
$el_class = $this->getExtraClass($el_class);
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_row zo_' . $uqid . ' ' . $class_full_width . ' ' . $bg_effect . ' ' . $class_img_fixed . ' ' . $class_row_arrow . ' ' . $class_custom_bg_color . ' ' . $class_overlay_row . ' ' . ($this->settings('base') === 'zo_row_inner' ? 'zo_inner ' : '') . get_row_css_class() . $animation . $el_class . vc_shortcode_custom_css_class($css, ' '), $this->settings['base'], $atts);
$style = ' style ="' . $row_style . '"';
//$this->buildStyle();
?>
<div <?php 
echo esc_attr($row_id);
?>
 class="<?php 
echo esc_attr($css_class);
?>
"<?php 
echo esc_attr($row_data);
echo do_shortcode($style);
?>
>
    <?php 
Exemplo n.º 15
0
 * @var $content {String} Shortcode's inner content
 */
$atts = shortcode_atts(array('columns_type' => 'medium', 'el_id' => '', 'el_class' => '', 'css' => ''), $atts);
$class_name = '';
// Offset modificator
$class_name .= ' offset_' . $atts['columns_type'];
// Preserving additional class for inner VC rows
if ($shortcode_base == 'vc_row_inner') {
    $class_name .= ' vc_inner';
}
// Additional class set by a user in a shortcode attributes
if (!empty($atts['el_class'])) {
    $class_name .= ' ' . sanitize_html_class($atts['el_class']);
}
// Special VC hooks
if (function_exists('get_row_css_class')) {
    $class_name .= ' ' . get_row_css_class();
}
if (function_exists('vc_shortcode_custom_css_class')) {
    $class_name .= ' ' . vc_shortcode_custom_css_class($atts['css'], ' ');
}
$class_name = apply_filters('vc_shortcodes_css_class', $class_name, $shortcode_base, $atts);
$row_id_param = '';
$output = '<div class="g-cols wpb_row' . $class_name . '"';
if (!empty($atts['el_id'])) {
    $output .= ' id="' . $atts['el_id'] . '"';
}
$output .= '>';
$output .= do_shortcode($content);
$output .= '</div>';
echo $output;
Exemplo n.º 16
0
<?php

$output = $el_class = '';
extract(shortcode_atts(array('el_class' => '', 'type' => '', 'full_width' => 'false', 'bg_color' => '', 'bg_image' => '', 'bg_position' => '', 'bg_repeat' => '', 'bg_cover' => '0', 'bg_attachment' => 'false', 'padding_left' => '', 'padding_right' => '', 'bg_video_src_mp4' => '', 'bg_video_src_ogv' => '', 'bg_video_src_webm' => '', 'padding_top' => '', 'padding_bottom' => '', 'margin_top' => '', 'margin_bottom' => '', 'animation' => '', 'parallax_speed' => '', 'enable_parallax' => '', 'anchor' => '', 'min_height' => ''), $atts));
// wp_enqueue_style( 'js_composer_front' );
wp_enqueue_script('wpb_composer_front_js');
// wp_enqueue_style('js_composer_custom_css');
$full_width = apply_filters('dt_sanitize_flag', $full_width);
$el_class = $this->getExtraClass($el_class);
$row_classes = get_row_css_class();
if (false === strpos($row_classes, 'vc_row-fluid')) {
    $row_classes .= ' vc_row-fluid';
}
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_row ' . $row_classes . $el_class, $this->settings['base']);
$container_style = array();
$container_data_attr = array();
$anchor = str_replace('#', '', $anchor);
$anchor = $anchor ? $anchor : '';
if ($full_width) {
    $css_class .= ' full-width-wrap';
    $container_style[] = 'padding-left: ' . intval($padding_left) . 'px';
    $container_style[] = 'padding-right: ' . intval($padding_right) . 'px';
}
if ($type) {
    $bg_cover = apply_filters('dt_sanitize_flag', $bg_cover);
    $bg_attachment = in_array($bg_attachment, array('false', 'fixed', 'true')) ? $bg_attachment : 'false';
    $style = array();
    if ($bg_color) {
        $style[] = 'background-color: ' . $bg_color;
    }
    if ($bg_image && !in_array($bg_image, array('none'))) {
Exemplo n.º 17
0
 function vc_theme_vc_row_inner($atts, $content = null)
 {
     $output = $section_class = $el_class = $video = $bg_image = $bg_color = $full_width = $bg_image_repeat = $font_color = $padding = $margin_bottom = $css = '';
     extract(shortcode_atts(array('el_class' => '', 'full_width' => 0, 'bg_image' => '', 'bg_color' => '', 'bg_image_repeat' => '', 'font_color' => '', 'padding' => '', 'margin_bottom' => '', 'parallax' => 0, 'video_poster' => '', 'video_mp4' => '', 'video_webm' => '', 'video_ogv' => '', 'css' => '', 'css_outer' => ''), $atts));
     wp_enqueue_style('js_composer_front');
     wp_enqueue_script('wpb_composer_front_js');
     wp_enqueue_style('js_composer_custom_css');
     $el_class = ' ' . $el_class;
     $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'row-fluid ' . get_row_css_class() . $el_class . vc_shortcode_custom_css_class($css, ' '));
     $style = buildStyle($bg_image, $bg_color, $bg_image_repeat, $font_color, $padding, $margin_bottom);
     $output .= '<div class="' . $css_class . '"' . $style . '>';
     $output .= wpb_js_remove_wpautop($content);
     $output .= '</div>';
     return $output;
 }
Exemplo n.º 18
0
<?php

$output = $el_class = $bg_image = $bg_color = $bg_image_repeat = $margin_bottom = $container_class = $mar_bottom = $mar_top = $style_check = $section_style = $row_style = '';
extract(shortcode_atts(array('el_class' => '', 'el_id' => '', 'fullwidth' => '', 'bg_color' => '', 'bg_image' => '', 'bg_image_size' => '', 'bg_image_repeat' => '', 'bg_image_attachment' => '', 'bg_parallax' => '', 'bg_image_parallax_start' => '', 'bg_image_parallax_end' => '', 'remove_border' => '', 'no_margin' => '', 'margin_top' => '', 'margin_bottom' => ''), $atts));
// wp_enqueue_style( 'js_composer_front' );
wp_enqueue_script('wpb_composer_front_js');
// wp_enqueue_style('js_composer_custom_css');
$el_class = $this->getExtraClass($el_class);
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'row ' . ($this->settings('base') === 'vc_row_inner' ? 'row_inner ' : ' ') . get_row_css_class(), $this->settings['base'], $atts);
$style_bg_color = !empty($bg_color) ? 'background-color:' . $bg_color . '; ' : '';
$style_bg_image = !empty($bg_image) ? 'background-image:url(' . wp_get_attachment_url($bg_image) . '); ' : '';
$style_bg_image_repeat = !empty($bg_image_repeat) ? 'background-repeat:' . $bg_image_repeat . '; ' : '';
$style_bg_image_attachment = !empty($bg_image_attachment) ? 'background-attachment:' . $bg_image_attachment . '; ' : '';
$style_bg_image_size = !empty($bg_image_size) ? 'background-size:' . $bg_image_size . '; ' : '';
$style_check = $style_bg_color . $style_bg_image . $style_bg_image_repeat . $style_bg_image_attachment . $style_bg_image_size;
if ($style_check != '') {
    $section_style = 'style="' . $style_bg_color . $style_bg_image . $style_bg_image_repeat . $style_bg_image_attachment . $style_bg_image_size . '"';
}
if ($fullwidth == 'yes') {
    $container_class = '-fluid';
}
if (!empty($margin_bottom)) {
    $mar_bottom = 'margin-bottom: ' . (preg_match('/(px|em|\\%|pt|cm)$/', $margin_bottom) ? $margin_bottom : $margin_bottom . 'px') . '; ';
}
if (!empty($margin_top)) {
    $mar_top = 'margin-top: ' . (preg_match('/(px|em|\\%|pt|cm)$/', $margin_top) ? $margin_top : $margin_top . 'px') . '; ';
}
if (!empty($margin_bottom) || !empty($margin_top)) {
    $row_style = 'style="' . $mar_top . $mar_bottom . '"';
}
if ($this->settings('base') != 'vc_row_inner') {
Exemplo n.º 19
0
if ($post_full_width != 'boxed') {
    if ($full_width == 'true') {
        $cl_full_width = 'no-container';
    } else {
        $enable_container = $cl_full_width = 'container';
    }
}
if ($full_width == 'true') {
    $cl_full_width .= ' cs-row-fullwidth';
    $main_full_width = ' cs-row-fullwidth-wrap';
} else {
    $cl_full_width .= ' cs-row-container';
    $main_full_width = ' cs-row-container-wrap';
}
/* row class */
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_row clearfix ' . get_row_css_class() . $el_class . $responsive . $row_effect_backgound_class . $main_full_width . vc_shortcode_custom_css_class($css, ' '), $this->settings['base'], $atts);
/* Link Color */
$link_style = "";
$class_link = vc_shortcode_custom_css_class($css, '.');
if ($row_link_color || $row_link_color_hover || $row_head_color) {
    $link_style .= '<style type="text/css">';
    if ($row_head_color) {
        $link_style .= "" . $class_link . " h1," . $class_link . " h2," . $class_link . " h3," . $class_link . " h4," . $class_link . " h5," . $class_link . " h6 {color: {$row_head_color}}";
    }
    if ($row_link_color) {
        $link_style .= "" . $class_link . " a{color: {$row_link_color}}";
    }
    if ($row_link_color_hover) {
        $link_style .= "" . $class_link . " a:hover{color: {$row_link_color_hover}}";
    }
    $link_style .= '</style>';
Exemplo n.º 20
0
    }
    if ('' !== $badge_fs) {
        $badge_style_rules['font-size'] = "{$badge_fs}px";
    }
    $badge_style = sprintf('style="%s"', appica_generate_css($badge_style_rules));
    $badge_classes = appica_get_class_set(array('badge', 'right' === $badge_align ? 'badge-reverse' : '', '' === $badge_cc && 'default' === $badge_pc ? '' : $badge_pc, $badge_class));
    $badge_icon = '' === $badge_cc ? sprintf('<span class="icon"><i class="%s"></i></span>', $badge_icon) : sprintf('<span class="icon" style="background: %1$s !important;"><i class="%2$s"></i></span>', $badge_cc, $badge_icon);
    // 1 - title, 2 - icon, 3 - class set, 4 - inline css
    $badge_tpl = 'right' === $badge_align ? '<div class="%3$s" %4$s>%1$s%2$s</div>' : '<div class="%3$s" %4$s>%2$s%1$s</div>';
    $badge_html = sprintf($badge_tpl, $badge_title, $badge_icon, $badge_classes, $badge_style);
    unset($badge, $badge_align, $badge_title, $badge_cc, $badge_pc, $badge_class, $badge_classes, $badge_style, $badge_icon, $badge_tpl, $badge_btc, $badge_tc, $badge_style_rules);
}
/*
 * Prepare ROW class set
 */
$row_classes = appica_get_class_set(array('fw-bg', 'vc_row', get_row_css_class(), $is_inner ? 'vc_inner ' : '', $row_custom_css_class, $this->getExtraClass($el_class), 'light' === $content_color ? 'light-color' : '', $overlay ? 'overlay' : '', $is_overlay_part ? 'partial-overlay' : ''));
$row_classes = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $row_classes, $this->settings['base'], $atts);
/*
 * Start output .vc_row
 * 1 - ID, 2 - classes, 3 - overlay css, 4 - badge
 */
$output .= sprintf('<div id="%1$s" class="%2$s" data-vc-full-width="true" data-vc-stretch-content="true" data-overlay="%3$s">', esc_attr($uniq_id), $row_classes, $overlay_style);
// wrap to .container, if need
if (false === $is_inner && $is_container) {
    $output .= sprintf('<div class="container">%s<div class="row">', $badge_html);
}
$output .= wpb_js_remove_wpautop($content);
if (false === $is_inner && $is_container) {
    $output .= '</div></div>';
}
$output .= '</div><div class="vc_row-full-width"></div>';
Exemplo n.º 21
0
 function cupid_vc_row_inner_shortcode($atts, $content = null)
 {
     $video_link = $css_animation = $duration = $delay = $output = $style_css = $layout = $parallax_style = $parallax_scroll_effect = $parallax_speed = $overlay_set = $overlay_color = $overlay_image = $overlay_opacity = $el_id = $el_class = $bg_image = $bg_color = $bg_image_repeat = $pos = $font_color = $padding = $margin_bottom = $css = '';
     extract(shortcode_atts(array('el_class' => '', 'el_id' => '', 'bg_image' => '', 'bg_color' => '', 'bg_image_repeat' => '', 'font_color' => '', 'padding' => '', 'margin_bottom' => '', 'css' => '', 'layout' => '', 'parallax_style' => 'none', 'video_link' => '', 'parallax_scroll_effect' => '', 'parallax_speed' => '', 'overlay_set' => 'hide_overlay', 'overlay_color' => '', 'overlay_image' => '', 'overlay_opacity' => '', 'css_animation' => '', 'duration' => '', 'delay' => ''), $atts));
     //wp_enqueue_style( 'js_composer_front' );
     wp_enqueue_script('wpb_composer_front_js');
     //wp_enqueue_style( 'js_composer_custom_css' );
     $el_class = g5plus_vc_getExtraClass($el_class);
     $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'vc_row wpb_row vc_inner ' . get_row_css_class() . $el_class . vc_shortcode_custom_css_class($css, ' '), $atts);
     #
     $style = g5plus_vc_buildStyle($bg_image, $bg_color, $bg_image_repeat, $font_color, $padding, $margin_bottom);
     /*************edit**************/
     $str_el_id = '';
     $css_overlay_video = '';
     if ($el_id != '') {
         $str_el_id = 'id="' . esc_attr($el_id) . '"';
     }
     if ($layout == 'boxed') {
         $style_css = 'container';
     } elseif ($layout == 'container-fluid') {
         $style_css = 'container-fluid';
     } else {
         $style_css = 'fullwidth';
     }
     $output .= '<div ' . $str_el_id . ' class="' . $style_css . g5plus_getCSSAnimation($css_animation) . '" ' . g5plus_getStyleAnimation($duration, $delay) . '>';
     if ($parallax_style != 'none' && $parallax_style != 'video-background') {
         if ($overlay_set != 'hide_overlay') {
             $css_overlay_video = ' overlay-wapper';
         }
         $output .= '<div data-parallax_speed="' . esc_attr($parallax_speed) / 100 . '" data-scroll_effect="' . esc_attr($parallax_scroll_effect) . '" class="' . esc_attr($css_class) . ' ' . esc_attr($parallax_style) . $css_overlay_video . '"' . $style . '>';
     } else {
         if ($overlay_set != 'hide_overlay') {
             $css_overlay_video = ' overlay-wapper';
         }
         if ($parallax_style == 'video-background') {
             $css_overlay_video .= ' video-background-wapper';
         }
         $output .= '<div class="' . esc_attr($css_class) . $css_overlay_video . '"' . $style . '>';
     }
     if ($parallax_style == 'video-background') {
         $output .= '<video data-top-default="0" muted="muted" loop="loop" autoplay="true" preload="auto">
                 <source src="' . esc_url($video_link) . '">
             </video>';
     }
     if ($overlay_set != 'hide_overlay') {
         $overlay_id = 'overlay-' . uniqid();
         if ($overlay_set == 'show_overlay_color') {
             $overlay_color = g5plus_hex_to_rgba(esc_attr($overlay_color), esc_attr($overlay_opacity) / 100);
             $style_css = ' data-overlay_color= ' . esc_attr($overlay_color);
         } else {
             if ($overlay_set == 'show_overlay_image') {
                 $image_attributes = wp_get_attachment_image_src($overlay_image, 'full');
                 $style_css = ' data-overlay_image= ' . $image_attributes[0] . ' data-overlay_opacity=' . esc_attr($overlay_opacity) / 100;
             }
         }
         $output .= '<div id="' . $overlay_id . '" class="overlay" ' . $style_css . '></div>';
     }
     $output .= wpb_js_remove_wpautop($content);
     $output .= '</div></div>';
     return $output;
 }
<?php

$output = $el_class = $bg_image = $bg_color = $bg_image_repeat = $idsection = $filter = $imgparallax = $srcparallax = $idparallax = $font_color = $padding = $margin_bottom = $css = '';
extract(shortcode_atts(array('el_class' => '', 'bg_image' => '', 'bg_color' => '', 'imgparallax' => '', 'idsection' => '', 'idparallax' => '', 'srcparallax' => '', 'filter' => '', 'bg_image_repeat' => '', 'font_color' => '', 'padding' => '', 'margin_bottom' => '', 'row_style' => 'container', 'css' => ''), $atts));
// wp_enqueue_style( 'js_composer_front' );
wp_enqueue_script('wpb_composer_front_js');
// wp_enqueue_style('js_composer_custom_css');
$el_class = $this->getExtraClass($el_class);
//if parallax
$outputimgparallax = $imgparallax == 'yes' ? ' nicdark_imgparallax ' : '';
$imgsrc = wp_get_attachment_image_src($srcparallax, 'full');
$outputidparallax = $idparallax != '' ? 'style="background:url(' . $imgsrc[0] . ') 50% 0 fixed; background-size:cover;" id="' . $idparallax . '" ' : '';
$outputidsection = $idparallax == '' ? ' id="' . $idsection . '" ' : '';
$script = $imgparallax == 'yes' ? ' <script type="text/javascript">(function($) { "use strict"; jQuery(window).load(function() { $("#' . $idparallax . '").parallax("50%", 0.3); }) })(jQuery);</script> ' : '';
$startfilter = $imgparallax == 'yes' ? '<div class="nicdark_filter ' . $filter . '">' : '';
$endfilter = $imgparallax == 'yes' ? '</div>' : '';
$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);
$style = $this->buildStyle($bg_image, $bg_color, $bg_image_repeat, $font_color, $padding, $margin_bottom);
if ($row_style == 'container') {
    $output .= '<div ' . $outputidsection . ' ' . $outputidparallax . ' class="nicdark_section ' . $outputimgparallax . ' ' . $css_class . '"' . $style . '>' . $startfilter . '<div class="nicdark_container nicdark_vc nicdark_clearfix">';
    $output .= wpb_js_remove_wpautop($content);
    $output .= '</div>' . $endfilter . '</div> ' . $script . ' ' . $this->endBlockComment('row');
} else {
    $output .= '<div ' . $outputidsection . ' ' . $outputidparallax . ' class="nicdark_section ' . $outputimgparallax . ' ' . $css_class . '"' . $style . '>' . $startfilter . '';
    $output .= wpb_js_remove_wpautop($content);
    $output .= '' . $endfilter . '</div> ' . $script . ' ' . $this->endBlockComment('row');
}
echo $output;
Exemplo n.º 23
0
        $cl_full_width = 'no-container';
    } else {
        $enable_container = $cl_full_width = 'container';
    }
}
if ($full_width == 'true') {
    $cl_full_width .= ' cs-row-fullwidth';
    $main_full_width = ' cs-row-fullwidth-wrap';
} else {
    $cl_full_width .= ' cs-row-container';
    $main_full_width = ' cs-row-container-wrap';
}
/* row class */
$lax_class = $lax_layer1 ? 'lax-active' : '';
$row_sc_class = $enable_row_sc ? 'header-wrapper' : '';
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_row clearfix ' . $engle_position . ' ' . $engle_position_style2 . ' ' . $lax_class . ' ' . get_row_css_class() . $el_class . $responsive . $main_full_width . vc_shortcode_custom_css_class($css, ' '), $this->settings['base'], $atts);
/* Link Color */
global $link_style;
$uqid = uniqid();
$class_link = vc_shortcode_custom_css_class($css, '.') . ' .cshero_' . $uqid;
if ($row_link_color || $row_link_color_hover || $row_head_color) {
    if ($row_head_color) {
        $link_style .= "" . $class_link . " h1," . $class_link . " h2," . $class_link . " h3," . $class_link . " h4," . $class_link . " h5," . $class_link . " h6 {color: {$row_head_color}!important}";
        $link_style .= "" . $class_link . " .cs-header.dotted-bottom2:after, " . $class_link . " .cs-header.dotted-bottom cs-title:after {background-color: {$row_head_color}!important}";
    }
    if ($row_link_color) {
        $link_style .= "" . $class_link . " a{color: {$row_link_color}!important}";
    }
    if ($row_link_color_hover) {
        $link_style .= "" . $class_link . " a:hover{color: {$row_link_color_hover}!important}";
    }