Example #1
0
        for ($i = 0; $i < count($styles); $i++) {
            if (strrpos($styles[$i], 'url') !== false) {
                unset($styles[$i]);
            }
        }
        $attrs['style'] = implode(';', $styles);
        $background .= sprintf('<div class="bg-image" style="background-image:url(%s);"></div>', $matches['image'][0]);
    } else {
        $classes[] = vc_shortcode_custom_css_class($css, '');
    }
}
$attrs['class'] = implode(' ', $classes);
$overlay = '';
if ($background_overlay) {
    if ($background_overlay == 'pattern') {
        $background .= '<div class="section-overlay pattern-overlay"></div>';
    } else {
        $background .= sprintf('<div class="section-overlay"%s></div>', !empty($overlay_color) ? ' style="background-color:' . esc_attr($overlay_color) . ';"' : '');
    }
}
if ($background) {
    $background = '<div class="bg-wrapper">' . $background . '</div>';
}
$mask_shape = '';
if (!empty($mask)) {
    $mask_left = intval($mask_style);
    $mask_right = 100 - $mask_left;
    $mask_shape = sprintf('<span class="mask mask-%s" style="border-color:%s;border-left-width:%svw;border-right-width:%svw;"></span>', esc_attr($mask), esc_attr($mask_color), esc_attr($mask_left), esc_attr($mask_right));
}
$output = sprintf('<div%s>%s%s%s</div>', wyde_get_attributes($attrs), $background, wpb_js_remove_wpautop($content), $mask_shape);
echo $output;
Example #2
0
    $paged = get_query_var('paged') ? get_query_var('paged') : 1;
}
if ($count != '' && !is_numeric($count)) {
    $count = -1;
}
list($query_args, $loop) = vc_build_loop_query($posts_query);
$query_args['paged'] = intval($paged);
$query_args['has_password'] = false;
$query_args['ignore_sticky_posts'] = 1;
$query_args['posts_per_page'] = intval($count);
$blog_posts = new WP_Query($query_args);
$col_class = 'col-md-' . absint(floor(12 / intval($columns)));
?>

<div<?php 
echo wyde_get_attributes($attrs);
?>
>
    <?php 
if ($title || $content) {
    ?>
      
    <div class="content-header">
        <?php 
    if (!empty($title)) {
        ?>

        <h2><?php 
        echo esc_html($title);
        ?>
</h2>
Example #3
0
?>

                <?php 
$slider = get_post_meta($wyde_page_id, '_meta_slider_show', true) == 'on';
if ($slider == true) {
    ?>

                <div id="slider">
                <?php 
    wyde_get_slider(get_post_meta($wyde_page_id, '_meta_slider_item', true));
    ?>

                </div>
                <?php 
}
if (get_post_meta($wyde_page_id, '_meta_page_header', true) != 'hide' && $wyde_options['header_position'] == '2') {
    wyde_get_header($slider == false);
}
$content_attrs = array();
$content_attrs['id'] = 'content';
if (!$header_transparent) {
    $content_attrs['class'] = 'header-space';
}
?>

                <div<?php 
echo wyde_get_attributes($content_attrs);
?>
>
                <?php 
get_template_part('page', 'title');
Example #4
0
        <div class="post-desc"><?php 
        echo wpb_js_remove_wpautop($content, true);
        ?>
</div>
        <?php 
    }
    ?>

    </div>
    <?php 
}
?>

    <div<?php 
echo wyde_get_attributes($slider_attrs);
?>
>
        <ul class="slides">
            <?php 
while ($blog_posts->have_posts()) {
    $blog_posts->the_post();
    ?>

            <li>
                <div class="testimonial">
                    <div class="testimonial-content">
                        <i class="post-format-icon fa fa-quote-right"></i>
                        <div><?php 
    echo wp_kses_post(get_the_content());
    ?>
Example #5
0
    <div class="price-button">
    <?php 
if (!empty($button_text)) {
    ?>
 
    <?php 
    $link = $link == '||' ? '' : $link;
    $link = vc_build_link($link);
    $link_attrs = array();
    $link_attrs['href'] = empty($link['url']) ? '#' : $link['url'];
    if (!empty($link['title'])) {
        $link_attrs['title'] = $link['title'];
    }
    if (!empty($link['target'])) {
        $link_attrs['target'] = trim($link['target']);
    }
    ?>

        <a<?php 
    echo wyde_get_attributes($link_attrs);
    ?>
><?php 
    echo esc_html($button_text);
    ?>
</a>
    <?php 
}
?>

    </div>
</div>
Example #6
0
        $classes[] = vc_shortcode_custom_css_class($css, '');
    }
}
$attrs['class'] = implode(' ', $classes);
$overlay = '';
if ($background_overlay) {
    if ($background_overlay == 'pattern') {
        $background .= '<div class="section-overlay pattern-overlay"></div>';
    } else {
        $background .= sprintf('<div class="section-overlay"%s></div>', !empty($overlay_color) ? ' style="background-color:' . esc_attr($overlay_color) . ';"' : '');
    }
}
if ($background) {
    $background = '<div class="bg-wrapper">' . $background . '</div>';
}
$mask_shape = '';
if (!empty($mask)) {
    $mask_left = intval($mask_style);
    $mask_right = 100 - $mask_left;
    $mask_shape = sprintf('<span class="mask mask-%s" style="border-color:%s;border-left-width:%svw;border-right-width:%svw;"></span>', esc_attr($mask), esc_attr($mask_color), esc_attr($mask_left), esc_attr($mask_right));
}
if (is_single() || $wyde_sidebar_position && $wyde_sidebar_position != '0') {
    $output = sprintf('<div%s>%s%s%s</div>', wyde_get_attributes($attrs), $background, wpb_js_remove_wpautop($content), $mask_shape);
} else {
    if ($full_screen) {
        $output = sprintf('<section%s>%s<div class="container"><div class="row"><div class="row-inner">%s</div></div></div>%s</section>', wyde_get_attributes($attrs), $background, wpb_js_remove_wpautop($content), $mask_shape);
    } else {
        $output = sprintf('<section%s>%s<div class="container"><div class="row">%s</div></div>%s</section>', wyde_get_attributes($attrs), $background, wpb_js_remove_wpautop($content), $mask_shape);
    }
}
echo $output;