function images_content($atts, $content = null)
{
    $title = $description = $content_img = $img_size = $more = $align = $link = $css_animation = $animated = $animated_data = '';
    $atts = vc_map_get_attributes('images_content', $atts);
    extract($atts);
    $animated = $animated_data = '';
    if ($css_animation != '') {
        $animated = ' animated ';
        $animated_data = ' data-gen="' . $css_animation . '"';
    }
    $out = '';
    $out .= '<div class="content-image wpb_content_element ' . $align . $animated . '"' . $animated_data . '>';
    if ($img_size == '') {
        $img_size = 'full';
    }
    if (!empty($content_img) && $content_img != '') {
        $img_id = preg_replace('/[^\\d]/', '', $content_img);
        $img = wpb_getImageBySize(array('attach_id' => $img_id, 'thumb_size' => $img_size));
        $out .= '<div class="s_image">' . $img['thumbnail'] . '</div>';
    }
    $out .= '<div class="s_info">';
    if ($title != '') {
        $out .= '<h3>' . $title . '</h3>';
    }
    if ($description != '') {
        $out .= '<div class="desc">' . do_shortcode('[vc_column_text title=""]' . $description . '[/vc_column_text]') . '</div>';
    }
    if ($more != '') {
        $out .= '<div class="folio-more"><a href="' . $link . '"><span>' . $more . '</span></a></div>';
    }
    $out .= '</div>';
    $out .= '</div>';
    return $out;
}
Example #2
0
    protected function content($atts, $content = null)
    {
        $atts = function_exists('vc_map_get_attributes') ? vc_map_get_attributes('edo_vertical_menu', $atts) : $atts;
        $atts = shortcode_atts(array('title' => 'Categories', 'theme' => '', 'el_class' => '', 'css' => ''), $atts);
        extract($atts);
        $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, ' ', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '));
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        ob_start();
        ?>
         <!-- Block vertical-menu -->
        <div class="<?php 
        echo esc_attr($theme);
        ?>
">
            <div class="block block-vertical-menu <?php 
        echo esc_attr($elementClass);
        ?>
 ">
                <div class="vertical-head">
                    <h5 class="vertical-title"><?php 
        echo $title;
        ?>
</h5>
                </div>
                <div class="vertical-menu-content">
                    <?php 
        wp_nav_menu(array('menu' => 'vertical-menu', 'theme_location' => 'vertical-menu', 'depth' => 2, 'container' => '', 'container_class' => '', 'container_id' => 'vertial-menu', 'menu_class' => 'vertical-menu-list', 'fallback_cb' => 'wp_bootstrap_navwalker::fallback', 'walker' => new wp_bootstrap_navwalker()));
        ?>
                </div>
            </div>
        </div>
        <!-- ./Block vertical-menu -->
        <?php 
        return ob_get_clean();
    }
Example #3
0
 /**
  * Parses shortcode attributes and set defaults based on vc_map function relative to shortcode and fields names
  *
  * @param $atts
  *
  * @since 4.3
  * @return array
  */
 public function getAttributes($atts)
 {
     /**
      * Shortcode attributes
      * @var $text
      * @var $google_fonts
      * @var $font_container
      * @var $el_class
      * @var $link
      * @var $css
      */
     $atts = vc_map_get_attributes($this->getShortcode(), $atts);
     extract($atts);
     /**
      * Get default values from VC_MAP.
      **/
     $google_fonts_field = $this->getParamData('google_fonts');
     $font_container_field = $this->getParamData('font_container');
     $el_class = $this->getExtraClass($el_class);
     $font_container_obj = new Vc_Font_Container();
     $google_fonts_obj = new Vc_Google_Fonts();
     $font_container_field_settings = isset($font_container_field['settings'], $font_container_field['settings']['fields']) ? $font_container_field['settings']['fields'] : array();
     $google_fonts_field_settings = isset($google_fonts_field['settings'], $google_fonts_field['settings']['fields']) ? $google_fonts_field['settings']['fields'] : array();
     $font_container_data = $font_container_obj->_vc_font_container_parse_attributes($font_container_field_settings, $font_container);
     $google_fonts_data = strlen($google_fonts) > 0 ? $google_fonts_obj->_vc_google_fonts_parse_attributes($google_fonts_field_settings, $google_fonts) : '';
     return array('text' => isset($text) ? $text : '', 'google_fonts' => $google_fonts, 'font_container' => $font_container, 'el_class' => $el_class, 'css' => $css, 'link' => 0 === strpos($link, '|') ? false : $link, 'font_container_data' => $font_container_data, 'google_fonts_data' => $google_fonts_data);
 }
Example #4
0
function gmap($atts, $content = null)
{
    $atts = vc_map_get_attributes('gmap', $atts);
    extract($atts);
    if ($latitude == '') {
        $latitude = '-7.796873';
    }
    if ($longitude == '') {
        $longitude = '110.369180';
    }
    if ($size == '') {
        $size = 200;
    }
    if ($zoom == '') {
        $zoom = 14;
    }
    $out = '';
    wp_enqueue_script('gmap3');
    wp_enqueue_script('googleapis');
    $size = str_replace(array('px', ' '), array('', ''), $size);
    $out .= '<div class="gmaps_widget wpb_content_element">';
    $out .= '<div class="wpb_wrapper">';
    $out .= wpb_widget_title(array('title' => $title));
    $out .= '<div id="map" data-latitude="' . $latitude . '" data-longitude="' . $longitude . '" data-zoom="' . $zoom . '" data-height="' . $size . '"></div>';
    $out .= '</div>';
    $out .= '</div>';
    return $out;
}
 function cq_vc_fullscreenintro_func($atts, $content = null, $tag)
 {
     if (version_compare(WPB_VC_VERSION, "4.6") >= 0) {
         $atts = vc_map_get_attributes($tag, $atts);
         extract($atts);
     } else {
         extract(shortcode_atts(array('backgroundtype' => '', 'backgroundcolor' => '', 'image' => '', 'imagerepeat' => '', 'introtext' => '', 'texticon' => 'fa-chevron-down', 'textposition' => '', 'textcolor' => '', 'textsize' => '', 'textfamily' => '', 'textclickable' => '', 'scrollto' => '', 'scrolloffset' => '', 'scrollspeed' => '', 'containerheight' => '', 'extraclass' => ''), $atts));
     }
     wp_register_style('font-awesome', plugins_url('../faanimation/css/font-awesome.min.css', __FILE__));
     wp_enqueue_style('font-awesome');
     wp_register_style('vc-extensions-fullscreenintro-style', plugins_url('css/style.css', __FILE__));
     wp_enqueue_style('vc-extensions-fullscreenintro-style');
     wp_register_script('smooth-scroll', plugins_url('js/jquery.smooth-scroll.min.js', __FILE__), array("jquery"));
     wp_enqueue_script('smooth-scroll');
     wp_register_script('vc-extensions-fullscreenintro-script', plugins_url('js/init.min.js', __FILE__), array("jquery", "smooth-scroll"));
     wp_enqueue_script('vc-extensions-fullscreenintro-script');
     $i = -1;
     $content = wpb_js_remove_wpautop($content);
     // fix unclosed/unwanted paragraph tags in $content
     $image = wp_get_attachment_image_src(trim($image), 'full');
     $output = '';
     $output .= '<div class="cq-fullscreen-intro ' . $extraclass . '" data-backgroundtype="' . $backgroundtype . '" data-image="' . $image[0] . '" data-textcolor="' . $textcolor . '" data-textsize="' . $textsize . '" data-textfamily="' . $textfamily . '" data-backgroundcolor="' . $backgroundcolor . '" data-textposition="' . $textposition . '" data-textclickable="' . $textclickable . '" data-imagerepeat="' . $imagerepeat . '" data-containerheight="' . $containerheight . '" data-scrollto="' . htmlspecialchars($scrollto) . '" data-scrolloffset="' . $scrolloffset . '" data-scrollspeed="' . $scrollspeed . '">';
     // $output .= do_shortcode($content);
     $output .= '<span class="cq-intro-text"><span class="intro-text">' . $introtext . '</span><i class="fa ' . $texticon . '"></i></span>';
     $output .= '</div>';
     return $output;
 }
Example #6
0
function counter($atts, $content = null)
{
    $atts = vc_map_get_attributes('counter', $atts);
    extract($atts);
    $out = $color = '';
    wp_enqueue_script('countTO');
    if ($colored == 'yes') {
        $color = 'colored';
    } else {
        $color = '';
    }
    $out .= '<div class="counter wpb_content_element">';
    $out .= '<div class="counter-value ' . $color . '">';
    if ($units_before != '') {
        $out .= '<span>' . $units_before . '</span>';
    }
    $out .= '<span class="display-value" data-to="' . $value . '"></span>';
    if ($units_after != '') {
        $out .= '<span>' . $units_after . '</span>';
    }
    $out .= '</div>';
    if ($title != '') {
        $out .= '<h5 class="counter-title">' . $title . '</h5>';
    }
    $out .= '</div>';
    return $out;
}
function list_icon($atts, $content = null)
{
    $atts = vc_map_get_attributes('list_icon', $atts);
    extract($atts);
    $animated = $animated_data = $icon_list_color = '';
    if ($icon_color) {
        $icon_list_color = ' style="color:' . $icon_color . ';"';
    }
    if ($css_animation != '') {
        $animated = ' animated ';
        $animated_data = ' data-gen="' . $css_animation . '"';
    }
    $out = $li_icon = '';
    if ($icon == 'metrize') {
        $li_icon = 'icons-' . $icon_metrize;
        $icon_class = 'metrize';
    } else {
        $li_icon = 'fa-' . $icon_awesome;
        $icon_class = 'awesome';
    }
    $list_text_array = explode(",", $list_text);
    $out .= '<div class="list-icon wpb_content_element' . $animated . '"' . $animated_data . '>';
    $out .= '<ul>';
    foreach ($list_text_array as $text) {
        $out .= '<li><i class="' . $li_icon . '"' . $icon_list_color . '></i><span>' . $text . '</span></li>';
    }
    $out .= '</ul>';
    $out .= '</div>';
    return $out;
}
 /**
  * Gallery shortcode
  *
  * Will overwrite the default gallery shortcode
  *
  * @param array $atts
  * @param string $content
  * @return string
  */
 function wolf_shortcode_images_gallery($atts, $content = null)
 {
     if (class_exists('Vc_Manager') && function_exists('vc_map_get_attributes')) {
         $atts = vc_map_get_attributes('wolf_images_gallery', $atts);
     }
     extract(shortcode_atts(array('ids' => '', 'layout' => 'simple', 'columns' => '3', 'size' => 'classic-thumb', 'link' => 'attachment', 'padding' => 'no', 'hover_effect' => 'default', 'orderby' => '', 'inline_style' => '', 'class' => ''), $atts));
     $images = explode(',', $ids);
     $size = 'thumbnail' == $size ? 'classic-thumb' : $size;
     $size = wolf_get_image_size($size);
     if (wolf_is_blog() || wolf_is_portfolio()) {
         $output = wolf_flexslider_gallery($images, $orderby);
     } else {
         if ('carousel_mosaic' == $layout || 'mosaic' == $layout) {
             $carousel = $layout == 'carousel_mosaic' ? true : false;
             $output = wolf_mosaic_gallery($images, $link, $hover_effect, $orderby, $carousel, $inline_style, $class);
         } elseif ('carousel_simple' == $layout) {
             $output = wolf_simple_carousel_gallery($images, $link, $size, $padding, $hover_effect, $orderby, $inline_style, $class);
         } elseif ('simple' == $layout) {
             $output = wolf_simple_gallery($images, $link, $size, $padding, $columns, $hover_effect, $orderby, $inline_style, $class);
         } elseif ('masonry' == $layout) {
             $output = wolf_albums_gallery($images, $orderby, $inline_style, $class);
         }
     }
     return $output;
 }
 /**
  * Highlight text shortcode
  *
  * @param array $atts
  * @param array $content
  * @return string
  */
 function wolf_highlight_shortcode_text($atts, $content = null)
 {
     if (class_exists('Vc_Manager') && function_exists('vc_map_get_attributes')) {
         $atts = vc_map_get_attributes('wolf_highlight_text', $atts);
     }
     return '<span class="wolf-highlight-' . $atts['color'] . '">' . $content . '</span>';
 }
 function cq_vc_pagetransition_func($atts, $content = null, $tag)
 {
     if (version_compare(WPB_VC_VERSION, "4.6") >= 0) {
         $atts = vc_map_get_attributes($tag, $atts);
         extract($atts);
     } else {
         extract(shortcode_atts(array('animationmode' => 'normal', 'pagein' => 'fade-in', 'pageout' => 'fade-out', 'overlayin' => 'overlay-slide-in-top', 'overlayout' => 'overlay-slide-out-top', 'pageinspeed' => '1500', 'pageoutspeed' => '800', 'linkelement' => '', 'isdisplay' => 'yes', 'sitewrapper' => '', 'overlaycolor' => ''), $atts));
     }
     $i = -1;
     $content = wpb_js_remove_wpautop($content);
     // fix unclosed/unwanted paragraph tags in $content
     // if($animationmode=="normal"&&$pagein!="zoom-in"){
     //   $pagein_arr = Array("fade-in", "fade-in-up-sm", "fade-in-up", "fade-in-up-lg", "fade-in-down-sm", "fade-in-down", "fade-in-down-lg", "fade-in-left-sm", "fade-in-left", "fade-in-left-lg", "fade-in-right-sm", "fade-in-right", "fade-in-right-lg", "rotate-in-sm", "rotate-in", "rotate-in-lg", "flip-in-x-fr", "flip-in-x", "flip-in-x-nr", "flip-in-y-fr", "flip-in-y", "flip-in-y-nr", "zoom-in-sm", "zoom-in", "zoom-in-lg");
     //   $pagein = $pagein_arr[array_rand($pagein_arr)];
     // }
     $output = '';
     if ($isdisplay != "no") {
         // wp_register_style('vc-extensions-pagetransition-style', plugins_url('css/style.css', __FILE__));
         // wp_enqueue_style('vc-extensions-pagetransition-style');
         wp_register_style('animsition', plugins_url('css/animsition.min.css', __FILE__));
         wp_enqueue_style('animsition');
         wp_register_script('animsition', plugins_url('js/jquery.animsition.min.js', __FILE__), array("jquery"));
         wp_enqueue_script('animsition');
         wp_register_script('vc-extensions-pagetransition-script', plugins_url('js/init.min.js', __FILE__), array("jquery"));
         wp_enqueue_script('vc-extensions-pagetransition-script');
         $output .= '<div class="cq-animsition" data-animationmode="' . $animationmode . '" data-pagein="' . $pagein . '" data-pageout="' . $pageout . '" data-overlayin="' . $overlayin . '" data-overlayout="' . $overlayout . '" data-pageinspeed="' . $pageinspeed . '" data-pageoutspeed="' . $pageoutspeed . '" data-linkelement="' . $linkelement . '" data-overlaycolor="' . $overlaycolor . '" data-sitewrapper="' . $sitewrapper . '">';
         $output .= '</div>';
     }
     return $output;
 }
 function cq_vc_cqbutton_func($atts, $content = null, $tag)
 {
     if (version_compare(WPB_VC_VERSION, "4.6") >= 0) {
         $atts = vc_map_get_attributes($tag, $atts);
         extract($atts);
     } else {
         extract(shortcode_atts(array('buttonlabel' => '', 'link' => '', 'buttoncolor' => '', 'buttonbackground' => '', 'containerwidth' => '', 'animationstyle' => 'animatetype-1', 'iconbuttoncolor' => 'cqbtn-1', 'iconposition' => '', 'icon' => '', 'icontop' => '', 'iconleft' => '', 'mobilewidth' => '', 'onclick' => '', 'extra_class' => ''), $atts));
     }
     wp_register_style('vc_cqbutton_cq_style', plugins_url('css/style.min.css', __FILE__));
     wp_enqueue_style('vc_cqbutton_cq_style');
     wp_register_style('font-awesome', plugins_url('../faanimation/css/font-awesome.min.css', __FILE__));
     wp_enqueue_style('font-awesome');
     $content = wpb_js_remove_wpautop($content);
     // fix unclosed/unwanted paragraph tags in $content
     $output = '';
     $link = vc_build_link($link);
     $output .= '<div class="cq-buttoncontainer ' . $iconposition . ' ' . $extra_class . '">';
     $output .= '<div class="' . $animationstyle . '">';
     $output .= '<div>';
     $output .= '<a href="' . $link['url'] . '" title="' . $link['title'] . '" target="' . $link['target'] . '" style="color:' . $buttoncolor . ';background-color:' . $buttonbackground . ';" class="btn ' . $iconbuttoncolor . '">';
     $output .= '<span class="txt">' . $buttonlabel . '</span>';
     $output .= '<span class="round"><i style="margin-top:' . $icontop . ';margin-left:' . $iconleft . ';" class="fa fa-' . $icon . '"></i></span>';
     $output .= '</a>';
     $output .= '</div>';
     $output .= '</div>';
     $output .= '</div>';
     return $output;
 }
    /**
     * Testimonial shortcode
     *
     * @param array $atts
     * @param array $content
     * @return string
     */
    function wolf_shortcode_testimonial($atts, $content = null)
    {
        if (class_exists('Vc_Manager') && function_exists('vc_map_get_attributes')) {
            $atts = vc_map_get_attributes('wolf_testimonial', $atts);
        }
        extract(shortcode_atts(array('name' => '', 'avatar' => '', 'link' => ''), $atts));
        $cite = '<cite class="testimonial-cite">';
        if ($avatar) {
            $avatar = wolf_get_url_from_attachment_id(absint($avatar), 'avatar');
        }
        if ($name) {
            $cite .= $name;
        }
        if ($link) {
            $link = esc_url($link);
            $cite .= " | <a href='{$link}' target='_blank'>{$link}</a>";
        }
        $cite .= '</cite>';
        $output = "<div class='slide'><div class='testimonal-container'>";
        if ($avatar) {
            $output .= "<span class='testimonial-avatar'><img src='{$avatar}' alt='testimonial-avatar'></span>";
        }
        $output .= "<blockquote class='testimonial-content'>";
        $output .= sanitize_text_field($content);
        $output .= $cite;
        $output .= '</blockquote>';
        $output .= '</div>
		</div>';
        return $output;
    }
Example #13
0
function icon_font($atts, $content = null)
{
    $atts = vc_map_get_attributes('icon_font', $atts);
    extract($atts);
    $out = $font_icon = $icon_class = $animated = $animated_data = '';
    if ($icon == 'metrize') {
        $font_icon = 'icons-' . $icon_metrize;
        $icon_class = 'metrize';
    } else {
        $font_icon = 'fa-' . $icon_awesome;
        $icon_class = 'awesome';
    }
    if ($css_animation != '') {
        $animated = ' animated ';
        $animated_data = ' data-gen="' . $css_animation . '"';
    }
    $out .= '<div class="icon_font ' . $align . $animated . '"' . $animated_data . '>';
    if ($link != '') {
        $out .= '<a href="' . $link . '" target="blank">';
    }
    $out .= '<i class="' . $font_icon . '" style="color:' . $icon_color . '; font-size:' . $size . 'px; line-height:' . $size . 'px;"></i>';
    if ($link != '') {
        $out .= '</a>';
    }
    $out .= '</div>';
    return $out;
}
function service_one($atts, $content = null)
{
    $title = $description = $icon = $icon_awesome = $icon_metrize = $more = $link = '';
    $atts = vc_map_get_attributes('service_one', $atts);
    extract($atts);
    $out = $service_icon = $icon_class = '';
    if ($icon == 'metrize') {
        $service_icon = 'icons-' . $icon_metrize;
        $icon_class = 'metrize';
    } else {
        $service_icon = 'fa-' . $icon_awesome;
        $icon_class = 'awesome';
    }
    $out .= '<div class="service service-one">';
    $out .= '<div class="s_icon ' . $icon_class . '"><i class="' . $service_icon . '"></i></div>';
    $out .= '<div class="s_info">';
    if ($title != '') {
        $out .= '<h3>' . $title . '</h3>';
    }
    if ($more != '') {
        $out .= '<a class="tbutton small" href="' . $link . '"><span>' . $more . '</span></a>';
    }
    if ($description != '') {
        $out .= '<p>' . $description . '</p>';
    }
    $out .= '</div>';
    $out .= '</div>';
    return $out;
}
Example #15
0
    protected function content($atts, $content = null)
    {
        $atts = function_exists('vc_map_get_attributes') ? vc_map_get_attributes('lastest_deals_sidebar', $atts) : $atts;
        $atts = shortcode_atts(array('title' => '', 'taxonomy' => '', 'number' => 12, 'autoplay' => "false", 'navigation' => "false", 'slidespeed' => 250, 'loop' => "false", 'items' => 1, 'css_animation' => '', 'el_class' => '', 'css' => ''), $atts);
        extract($atts);
        $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'latest-deals ', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'css_animation' => $this->getCSSAnimation($css_animation), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '));
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        $elementClass = apply_filters('kt_lastest_deals_sidebar_class_container', $elementClass);
        // Get products on sale
        $product_ids_on_sale = wc_get_product_ids_on_sale();
        $meta_query = WC()->query->get_meta_query();
        $args = array('posts_per_page' => $number, 'post_type' => 'product', 'orderby' => 'meta_value_num', 'meta_key' => '_sale_price_dates_to', 'order' => 'DESC', 'no_found_rows' => 1, 'post_status' => 'publish', 'meta_query' => $meta_query, 'post__in' => array_merge(array(0), $product_ids_on_sale));
        if ($taxonomy) {
            $args['tax_query'] = array(array('taxonomy' => 'product_cat', 'field' => 'id', 'terms' => explode(",", $taxonomy)));
        }
        $q = apply_filters('woocommerce_shortcode_products_query', $args, $atts);
        $query = new WP_Query($q);
        global $woocommerce_loop;
        ob_start();
        if ($query->have_posts()) {
            $data_carousel = array("autoplay" => $autoplay, "navigation" => $navigation, "slidespeed" => $slidespeed, "autoheight" => "false", "loop" => $loop, "dots" => "false", 'nav' => "true", "autoplayTimeout" => 1000, "autoplayHoverPause" => "true", 'items' => 1);
            add_filter("woocommerce_get_price_html_from_to", "kt_get_price_html_from_to", 10, 4);
            add_filter('woocommerce_sale_price_html', 'woocommerce_custom_sales_price', 10, 2);
            ?>
            <div class="<?php 
            echo esc_attr($elementClass);
            ?>
">
                <h2 class="latest-deal-title"><?php 
            echo esc_html($title);
            ?>
</h2>
                <div class="latest-deal-content">
                    <ul class="product-list owl-carousel" <?php 
            echo _data_carousel($data_carousel);
            ?>
>
                        <?php 
            add_filter("woocommerce_get_price_html_from_to", "kt_get_price_html_from_to", 10, 4);
            while ($query->have_posts()) {
                $query->the_post();
                wc_get_template_part('content', 'product-sidebar');
            }
            // end of the loop.
            remove_filter("woocommerce_get_price_html_from_to", "kt_get_price_html_from_to", 10, 4);
            ?>
                    </ul>
                </div>
            </div>
            <?php 
            remove_filter("woocommerce_get_price_html_from_to", "kt_get_price_html_from_to", 10, 4);
            remove_filter('woocommerce_sale_price_html', 'woocommerce_custom_sales_price', 10, 2);
        }
        wp_reset_postdata();
        wp_reset_query();
        $result = ob_get_contents();
        ob_clean();
        return $result;
    }
 /**
  * Alert message shortcode
  *
  * @param array $atts
  * @return string
  */
 function wolf_shortcode_mailchimp($atts)
 {
     if (class_exists('Vc_Manager') && function_exists('vc_map_get_attributes')) {
         $atts = vc_map_get_attributes('wolf_mailchimp', $atts);
     }
     extract(shortcode_atts(array('list' => '', 'size' => 'normal', 'label' => '', 'submit' => __('Subscribe', 'wolf'), 'button_style' => '', 'alignment' => 'center', 'animation' => '', 'animation_delay' => '', 'inline_style' => '', 'class' => ''), $atts));
     return wolf_mailchimp($list, $size, $label, $submit, $button_style, $alignment, $animation, $animation_delay, $inline_style, $class);
 }
 function cq_vc_gallery_func($atts, $content = null, $tag)
 {
     global $post;
     if (version_compare(WPB_VC_VERSION, "4.6") >= 0) {
         $atts = vc_map_get_attributes($tag, $atts);
         extract($atts);
     } else {
         extract(shortcode_atts(array('images' => '', 'itemwidth' => '240', 'minwidth' => '240', 'offset' => '4', 'onclick' => 'link_image', 'custom_links' => '', 'custom_links_target' => '', 'outeroffset' => '0', 'background' => '#fff', 'retina' => 'off', 'imagesload' => 'off', 'margintop' => '40'), $atts));
     }
     wp_enqueue_style('cq_pinterest_style', plugins_url('css/jquery.pinterest.css', __FILE__));
     wp_register_script('imagesload', plugins_url('js/imagesloaded.pkgd.min.js', __FILE__), array('jquery'));
     wp_enqueue_script('imagesload');
     wp_register_script('wookmark', plugins_url('js/jquery.wookmark.min.js', __FILE__), array('jquery', 'imagesload'));
     wp_enqueue_script('wookmark');
     if ($onclick == 'link_image') {
         wp_register_script('fs.boxer', plugins_url('js/jquery.fs.boxer.min.js', __FILE__), array('jquery'));
         wp_enqueue_script('fs.boxer');
         wp_register_style('fs.boxer', plugins_url('css/jquery.fs.boxer.css', __FILE__));
         wp_enqueue_style('fs.boxer');
     } else {
         if ($onclick == "custom_link") {
             $custom_links = explode(',', $custom_links);
         }
     }
     $imagesarr = explode(',', $images);
     $output = '';
     $output .= '<ul class="pinterest-container" data-onclick="' . $onclick . '" data-itemwidth="' . $itemwidth . '" data-minwidth="' . $minwidth . '" data-offset="' . $offset . '" data-outeroffset="' . $outeroffset . '" data-id="' . $post->ID . rand(0, 100) . '" data-imagesload="' . $imagesload . '">';
     $i = -1;
     foreach ($imagesarr as $key => $value) {
         $i++;
         $output .= "<li style='list-style:none;display:none'>";
         if (wp_get_attachment_image_src(trim($value), 'full')) {
             $return_img_arr = wp_get_attachment_image_src(trim($value), 'full');
             // $return_img_height = getimagesize(aq_resize($return_img_arr[0], $itemwidth));
             $return_img_height = aq_resize($return_img_arr[0], $itemwidth, null, null, false);
             if ($onclick == 'link_image') {
                 $output .= "<a href='" . $return_img_arr[0] . "' class='lightbox-link' rel='cq-pinterst-" . $post->ID . "'>";
                 $output .= "<img src='" . aq_resize($return_img_arr[0], $retina == "on" ? $itemwidth * 2 : $itemwidth) . "' width='{$itemwidth}' height='" . $return_img_height[1] . "' />";
                 $output .= "</a>";
             } else {
                 if ($onclick == 'custom_link') {
                     if ($i < count($custom_links)) {
                         $output .= "<a href='" . $custom_links[$i] . "' target='" . $custom_links_target . "'>";
                         $output .= "<img src='" . aq_resize($return_img_arr[0], $retina == "on" ? $itemwidth * 2 : $itemwidth) . "' width='{$itemwidth}' height='" . $return_img_height[1] . "' />";
                         $output .= "</a>";
                     } else {
                         $output .= "<img src='" . aq_resize($return_img_arr[0], $retina == "on" ? $itemwidth * 2 : $itemwidth) . "' width='{$itemwidth}' height='" . $return_img_height[1] . "' />";
                     }
                 } else {
                     $output .= "<img src='" . aq_resize($return_img_arr[0], $retina == "on" ? $itemwidth * 2 : $itemwidth) . "' width='{$itemwidth}' height='" . $return_img_height[1] . "' />";
                 }
             }
         }
         $output .= "</li>";
     }
     $output .= '</ul>';
     return $output;
 }
Example #18
0
    protected function content($atts, $content = null)
    {
        $atts = function_exists('vc_map_get_attributes') ? vc_map_get_attributes('list_product', $atts) : $atts;
        $atts = shortcode_atts(array('title' => '', 'cat' => 0, 'number' => 4, 'types' => 'sale', 'css_animation' => '', 'el_class' => '', 'css' => ''), $atts);
        extract($atts);
        global $woocommerce_loop;
        $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'popular-tabs ', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'css_animation' => $this->getCSSAnimation($css_animation), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '));
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        ob_start();
        $meta_query = WC()->query->get_meta_query();
        $query = array('post_type' => 'product', 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'posts_per_page' => $number, 'meta_query' => $meta_query);
        global $woocommerce_loop;
        $woocommerce_loop['columns'] = $number;
        if ($cat > 0) {
            $query['tax_query'] = array(array('taxonomy' => 'product_cat', 'field' => 'id', 'terms' => $cat));
        }
        if ($types == 'arrival') {
            $query['orderby'] = 'date';
            $query['order'] = 'DESC';
        }
        if ($types == 'sale') {
            $product_ids_on_sale = wc_get_product_ids_on_sale();
            $query['meta_key'] = 'total_sales';
            $query['orderby'] = 'meta_value_num';
            $query['post__in'] = array_merge(array(0), $product_ids_on_sale);
        }
        if ($types == 'review') {
            add_filter('posts_clauses', array($this, 'order_by_rating_post_clauses'));
        }
        $products = new WP_Query(apply_filters('woocommerce_shortcode_products_query', $query, $atts));
        if ($types == 'review') {
            remove_filter('posts_clauses', array($this, 'order_by_rating_post_clauses'));
        }
        if ($products->have_posts()) {
            ?>
        <div class="mega-group">
            <h4 class="mega-group-header"><span><?php 
            echo esc_html($title);
            ?>
</span></h4>
            <div class="mega-products">
                <?php 
            while ($products->have_posts()) {
                $products->the_post();
                ?>
                    <?php 
                wc_get_template_part('content', 'product-verticalmenu');
                ?>
                <?php 
            }
            // end of the loop.
            ?>
            </div>
        </div>  
        <?php 
        }
        return ob_get_clean();
    }
Example #19
0
    protected function content($atts, $content = null)
    {
        $atts = function_exists('vc_map_get_attributes') ? vc_map_get_attributes('edo_find_store', $atts) : $atts;
        $atts = shortcode_atts(array('small_title' => '', 'big_title' => '', 'desc' => '', 'el_class' => '', 'css' => ''), $atts);
        extract($atts);
        $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, ' ', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '));
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        ob_start();
        ?>
         <div class="block footer-block-box <?php 
        echo esc_attr($elementClass);
        ?>
">
            <div class="block-head">
                <div class="block-title">
                    <div class="block-icon">
                        <img src="<?php 
        echo esc_url(THEME_URL . 'assets/images/location-icon.png');
        ?>
" alt="<?php 
        esc_attr_e('store icon', 'edo');
        ?>
" />
                    </div>
                    <div class="block-title-text text-sm"><?php 
        echo esc_html($small_title);
        ?>
</div>
                    <div class="block-title-text text-lg"><?php 
        echo esc_html($big_title);
        ?>
</div>
                </div>
            </div>
            <div class="block-inner">
                <div class="block-info clearfix">
                    <?php 
        echo esc_html($desc);
        ?>
                </div>
                <div class="block-input-box box-radius clearfix find-store-form">
                    <input type="text" class="input-box-text" placeholder="<?php 
        esc_attr_e('Zip code, City, Country', 'edo');
        ?>
" />
                    <button id="find-store-button" class="block-button main-bg"><?php 
        esc_html_e('Go', 'edo');
        ?>
</button>
                    <div class="find-store-messages"></div>
                </div>
            </div>
        </div>

        <?php 
        return ob_get_clean();
    }
Example #20
0
    protected function content($atts, $content = null)
    {
        $atts = function_exists('vc_map_get_attributes') ? vc_map_get_attributes('banner', $atts) : $atts;
        $atts = shortcode_atts(array('title' => '', 'sub_title' => '', 'desc' => '', 'bg_color' => '', 'bg_image' => '', 'link' => '#', 'link_target' => '_blank'), $atts);
        extract($atts);
        $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $this->settings['base'], $atts);
        $style = "";
        if ($bg_color) {
            $style .= "background-color: " . $bg_color . ";";
        }
        if ($bg_image) {
            $att_icon = wp_get_attachment_image_src($bg_image, 'full');
            $att_icon_url = is_array($att_icon) ? esc_url($att_icon[0]) : '';
            if ($att_icon_url) {
                $style .= "background-image: url('" . $att_icon_url . "');";
                $style .= "background-repeat: no-repeat";
            }
        }
        ob_start();
        ?>
        <div class="banner-text" <?php 
        if ($style) {
            ?>
 style="<?php 
            echo esc_attr($style);
            ?>
" <?php 
        }
        ?>
 >
             <h4><?php 
        echo esc_html($title);
        ?>
</h4>
             <h2><b><?php 
        echo esc_html($sub_title);
        ?>
</b></h2>
             <p><?php 
        echo esc_html($desc);
        ?>
</p>
             <a class="button-radius white" target="<?php 
        echo esc_attr($link_target);
        ?>
" href="<?php 
        echo esc_url($link);
        ?>
"><?php 
        _e('Shop now', 'edo');
        ?>
<span class="icon"></span></a>
         </div>
        <?php 
        $result = ob_get_clean();
        return $result;
    }
 /**
  * Vertical space text shortcode
  *
  * @param array $atts
  * @return string
  */
 function wolf_spacer_shortcode($atts)
 {
     if (class_exists('Vc_Manager') && function_exists('vc_map_get_attributes')) {
         $atts = vc_map_get_attributes('wolf_spacer', $atts);
     }
     extract(shortcode_atts(array('height' => 10), $atts));
     $height = is_numeric($height) ? absint($height) . 'px' : sanitize_text_field($height);
     return '<div style="height:' . $height . ';"></div>';
 }
 /**
  * Upcoming Show widget shortcode
  *
  * @param array $atts
  * @param array $content
  *
  * @return string
  */
 function wolf_shortcode_last_photos_widget($atts, $content = null)
 {
     if (class_exists('Vc_Manager') && function_exists('vc_map_get_attributes')) {
         $atts = vc_map_get_attributes('wolf_last_photos_widget', $atts);
     }
     extract(shortcode_atts(array('count' => 10), $atts));
     if (function_exists('wolf_get_photos_widget')) {
         return wolf_get_photos_widget($count);
     }
 }
Example #23
0
function icon_social($atts, $content = null)
{
    $atts = vc_map_get_attributes('icon_social', $atts);
    extract($atts);
    $out = $animated = $animated_data = '';
    if ($css_animation != '') {
        $animated = ' animated ';
        $animated_data = ' data-gen="' . $css_animation . '"';
    }
    $out .= '<div class="clearfix social_shortcode social ' . $align . $animated . '"' . $animated_data . '>';
    if ($twitter) {
        $out .= '<a href="' . $twitter . '" target="blank"><i class="icons-social-twitter" style="color:' . $icon_color . '; font-size:' . $size . 'px; line-height:' . $size . 'px;"></i></a>';
    }
    if ($facebook) {
        $out .= '<a href="' . $facebook . '" target="blank"><i class="icons-social-facebook" style="color:' . $icon_color . '; font-size:' . $size . 'px; line-height:' . $size . 'px;"></i></a>';
    }
    if ($dribbble) {
        $out .= '<a href="' . $dribbble . '" target="blank"><i class="icons-social-dribbble" style="color:' . $icon_color . '; font-size:' . $size . 'px; line-height:' . $size . 'px;"></i></a>';
    }
    if ($rss) {
        $out .= '<a href="' . $rss . '" target="blank"><i class="icons-rss" style="color:' . $icon_color . '; font-size:' . $size . 'px; line-height:' . $size . 'px;"></i></a>';
    }
    if ($github) {
        $out .= '<a href="' . $github . '" target="blank"><i class="icons-social-github" style="color:' . $icon_color . '; font-size:' . $size . 'px; line-height:' . $size . 'px;"></i></a>';
    }
    if ($linkedin) {
        $out .= '<a href="' . $linkedin . '" target="blank"><i class="icons-social-linkedin" style="color:' . $icon_color . '; font-size:' . $size . 'px; line-height:' . $size . 'px;"></i></a>';
    }
    if ($pinterest) {
        $out .= '<a href="' . $pinterest . '" target="blank"><i class="icons-social-pinterest" style="color:' . $icon_color . '; font-size:' . $size . 'px; line-height:' . $size . 'px;"></i></a>';
    }
    if ($google) {
        $out .= '<a href="' . $google . '" target="blank"><i class="icons-social-google-plus" style="color:' . $icon_color . '; font-size:' . $size . 'px; line-height:' . $size . 'px;"></i></a>';
    }
    if ($skype) {
        $out .= '<a href="' . $skype . '" target="blank"><i class="icons-social-skype" style="color:' . $icon_color . '; font-size:' . $size . 'px; line-height:' . $size . 'px;"></i></a>';
    }
    if ($soundcloud) {
        $out .= '<a href="' . $soundcloud . '" target="blank"><i class="icons-social-soundcloud" style="color:' . $icon_color . '; font-size:' . $size . 'px; line-height:' . $size . 'px;"></i></a>';
    }
    if ($youtube) {
        $out .= '<a href="' . $youtube . '" target="blank"><i class="icons-social-youtube" style="color:' . $icon_color . '; font-size:' . $size . 'px; line-height:' . $size . 'px;"></i></a>';
    }
    if ($tumblr) {
        $out .= '<a href="' . $tumblr . '" target="blank"><i class="icons-social-tumblr" style="color:' . $icon_color . '; font-size:' . $size . 'px; line-height:' . $size . 'px;"></i></a>';
    }
    if ($flickr) {
        $out .= '<a href="' . $flickr . '" target="blank"><i class="icons-social-flickr" style="color:' . $icon_color . '; font-size:' . $size . 'px; line-height:' . $size . 'px;"></i></a>';
    }
    if ($email) {
        $out .= '<a href="mailto:' . $email . '" target="_top"><i class="icons-mail" style="color:' . $icon_color . '; font-size:' . $size . 'px; line-height:' . $size . 'px;"></i></a>';
    }
    $out .= '</div>';
    return $out;
}
 /**
  * Services table shortcode
  *
  * @param array $atts
  * @return string
  */
 function wolf_shortcode_services_table($atts, $content)
 {
     if (class_exists('Vc_Manager') && function_exists('vc_map_get_attributes')) {
         $atts = vc_map_get_attributes('wolf_services_table', $atts);
     }
     extract(shortcode_atts(array('title' => '', 'bg_color' => '', 'title_color' => '', 'font_color' => '', 'add_icon' => '', 'icon' => '', 'icon_color' => '', 'title_tag' => 'h3', 'animation' => '', 'animation_delay' => '', 'inline_style' => '', 'class' => ''), $atts));
     $output = '';
     $style = '';
     $class = $class ? "{$class} " : '';
     // add space
     $class .= 'services-table';
     if ($bg_color) {
         $style .= "background-color:{$bg_color};";
     }
     if ($font_color) {
         $style .= "color:{$font_color};";
     }
     if ($animation) {
         $class .= " wow {$animation}";
     }
     if ($animation_delay && 'none' != $animation) {
         $style .= 'animation-delay:' . absint($animation_delay) / 1000 . 's;-webkit-animation-delay:' . absint($animation_delay) / 1000 . 's;';
     }
     if ($inline_style) {
         $style .= $inline_style;
     }
     $style = $style ? " style='{$style}'" : '';
     // title style
     $title_style = '';
     if ($title_color) {
         $title_style .= "color:{$title_color};";
     }
     $title_inline_style = $title_style ? " style='{$title_style}'" : '';
     $icon_style = '';
     if ($icon_color) {
         $icon_style .= "color:{$icon_color};";
     }
     $icon_inline_style = $icon_style ? " style='{$icon_style}'" : '';
     $output .= "<div class='{$class}'{$style}>";
     $output .= '<ul>';
     $headings_array = array('h2', 'h3', 'h4', 'h5', 'h6');
     $title_tag = in_array($title_tag, $headings_array) ? $title_tag : 'h3';
     if ($title) {
         $output .= "<li class='service-title-container'><{$title_tag} class='service-title'{$title_inline_style}>{$title}</{$title_tag}></li>";
     }
     if ($icon) {
         $output .= "<li class='service-icon-container'><i class='fa fa-3x {$icon}'{$icon_inline_style}></i></li>";
     }
     if ($content) {
         $output .= wp_kses($content, array('li' => array()));
     }
     $output .= '</ul>';
     $output .= '</div>';
     return $output;
 }
Example #25
0
function space($atts, $content = null)
{
    $atts = vc_map_get_attributes('space', $atts);
    extract($atts);
    $out = $val = '';
    if ($height != '') {
        $val = ' style="height:' . $height . 'px;"';
    }
    $out .= '<div class="space"' . $val . '></div>';
    return $out;
}
Example #26
0
    protected function content($atts, $content = null)
    {
        $atts = function_exists('vc_map_get_attributes') ? vc_map_get_attributes('edo_box_countdown', $atts) : $atts;
        $atts = shortcode_atts(array('text_content' => '', 'time' => '', 'price_regular' => '', 'price_sale' => '', 'el_class' => '', 'css' => ''), $atts);
        extract($atts);
        $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, '  ', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '));
        $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
        $time = strtotime($time);
        $y = date('Y', $time);
        $m = date('m', $time);
        $d = date('d', $time);
        $h = date('h', $time);
        $mi = date('i', $time);
        $s = date('s', $time);
        ob_start();
        ?>
        <div class="edo-box-countdown <?php 
        echo esc_attr($elementClass);
        ?>
">
            <div class="box-price">
                <?php 
        if ($price_regular) {
            echo '<ins>' . $price_regular . '</ins>';
        }
        if ($price_sale) {
            echo '<del>' . $price_sale . '</del>';
        }
        ?>
            </div>
            <div class="countdown-lastest" data-y="<?php 
        echo esc_attr($y);
        ?>
" data-m="<?php 
        echo esc_attr($m);
        ?>
" data-d="<?php 
        echo esc_attr($d);
        ?>
" data-h="<?php 
        echo esc_attr($h);
        ?>
" data-i="<?php 
        echo esc_attr($mi);
        ?>
" data-s="<?php 
        echo esc_attr($s);
        ?>
"></div>
        </div>

        <?php 
        return ob_get_clean();
    }
Example #27
0
 protected function content($atts, $content = null)
 {
     $atts = function_exists('vc_map_get_attributes') ? vc_map_get_attributes('categories_tab', $atts) : $atts;
     extract(shortcode_atts(array('title' => 'Tabs Name', 'tabs_type' => 'tab-1', 'per_page' => 10, 'column' => 4, 'category' => 0, 'main_color' => '#ff3366', 'icon' => '', 'bg_cate' => '', 'banner_top' => '', 'banner_left' => '', "featured" => false, "align" => 'left', "number_slide" => 14, 'autoplay' => 'false', 'navigation' => 'false', 'margin' => 0, 'slidespeed' => 250, 'css' => '', 'css_animation' => '', 'el_class' => '', 'nav' => 'true', 'loop' => 'false', 'use_responsive' => 1, 'items_destop' => 4, 'items_tablet' => 2, 'items_mobile' => 1), $atts));
     global $woocommerce_loop;
     $is_phone = false;
     if (function_exists('kt_is_phone') && kt_is_phone()) {
         $is_phone = true;
     }
     $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, ' box-tab-category ', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'css_animation' => $this->getCSSAnimation($css_animation), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '));
     $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
     if (function_exists('kt_hex2rgb')) {
         $main_color_rgb = kt_hex2rgb($main_color);
     } else {
         $main_color_rgb = array('red' => 255, 'green' => 51, 'blue' => 102);
     }
     $elementClass = apply_filters('kt_category_tab_class_container', $elementClass);
     $tabs = kt_get_all_attributes('tab_section', $content);
     $id = uniqid($category);
     $term = get_term($category, 'product_cat');
     if (isset($bg_cate) && $bg_cate) {
         $att_bg = wp_get_attachment_image_src($bg_cate, 'full');
         $att_bg_url = is_array($att_bg) ? esc_url($att_bg[0]) : "";
         if ($att_bg_url) {
             $style = "style='background: #fff url(" . $att_bg_url . ") no-repeat left bottom;'";
         }
     }
     if (count($tabs) > 0 && $term) {
         $term_link = get_term_link($term);
         if (!$is_phone) {
             $args = array('hierarchical' => 1, 'show_option_none' => '', 'hide_empty' => 0, 'parent' => $term->term_id, 'taxonomy' => 'product_cat');
             $subcats = get_categories($args);
         }
         if (file_exists(KUTETHEME_PLUGIN_PATH . '/js_composer/includes/' . $tabs_type . '.php')) {
             if ($tabs_type == 'tab-1') {
                 $elementClass .= ' option1 tab-1';
             } elseif ($tabs_type == 'tab-2') {
                 $elementClass .= ' option2 tab-2';
             } elseif ($tabs_type == 'tab-3') {
                 $elementClass .= ' option2 tab-3';
             } elseif ($tabs_type == 'tab-4') {
                 $elementClass .= ' option2 tab-4';
             } elseif ($tabs_type == 'tab-5') {
                 $elementClass .= ' option2 tab-5';
             } elseif ($tabs_type == 'tab-6') {
                 $elementClass .= ' option7 tab-6';
             } elseif ($tabs_type == 'tab-7') {
                 $elementClass .= ' option7 tab-7';
             }
             @(include KUTETHEME_PLUGIN_PATH . 'js_composer/includes/' . $tabs_type . '.php');
         }
     }
 }
 function cq_vc_beforeafter_func($atts, $content = null, $tag)
 {
     $handleicon = $icon_fontawesome = $icon_openiconic = $icon_typicons = $icon_entypo = $icon_linecons = '';
     if (version_compare(WPB_VC_VERSION, "4.6") >= 0) {
         $atts = vc_map_get_attributes($tag, $atts);
         extract($atts);
     } else {
         extract(shortcode_atts(array("handleicon" => '', "icon_fontawesome" => '', "icon_openiconic" => '', "icon_typicons" => '', "icon_entypo" => '', "icon_linecons" => '', "beforeimage" => '', "afterimage" => '', "handletooltip" => '', "link" => '', "autoslide" => '', "handlestyle" => 'lightgray', "iconcolor" => '', "extraclass" => ""), $atts));
     }
     $content = wpb_js_remove_wpautop($content);
     // fix unclosed/unwanted paragraph tags in $content
     $output = '';
     if (version_compare(WPB_VC_VERSION, "4.4") >= 0) {
         vc_icon_element_fonts_enqueue($handleicon);
     } else {
         wp_register_style('font-awesome', plugins_url('../faanimation/css/font-awesome.min.css', __FILE__));
         wp_enqueue_style('font-awesome');
     }
     $link = vc_build_link($link);
     wp_register_style('tooltipster', plugins_url('../appmockup/css/tooltipster.css', __FILE__));
     wp_enqueue_style('tooltipster');
     wp_register_script('tooltipster', plugins_url('../appmockup/js/jquery.tooltipster.min.js', __FILE__), array('jquery'));
     wp_enqueue_script('tooltipster');
     wp_register_style('vc-extensions-beforeafter-style', plugins_url('css/style.css', __FILE__));
     wp_enqueue_style('vc-extensions-beforeafter-style');
     wp_register_script('jquery.mobile.touch', plugins_url('js/jquery.mobile.custom.min.js', __FILE__));
     wp_enqueue_script('jquery.mobile.touch');
     wp_register_script('vc-extensions-beforeafter-script', plugins_url('js/init.min.js', __FILE__), array("jquery", "jquery.mobile.touch", "tooltipster"));
     wp_enqueue_script('vc-extensions-beforeafter-script');
     $beforeimage = wp_get_attachment_image_src($beforeimage, 'full');
     $afterimage = wp_get_attachment_image_src($afterimage, 'full');
     $output = '';
     if ($link["url"] !== "") {
         $output .= '<a href="' . $link["url"] . '" title="' . $link["title"] . '" target="' . $link["target"] . '" class="cq-beforeafter-link">';
     }
     $output .= '<div class="cq-beforeafter ' . $extraclass . '" data-autoslide="' . $autoslide . '" data-iconcolor="' . $iconcolor . '">';
     $output .= '<img class="cq-beforeafter-img" src="' . $beforeimage[0] . '" />';
     $output .= '<div class="cq-beforeafter-resize">';
     $output .= '<img class="cq-beforeafter-img" src="' . $afterimage[0] . '" />';
     $output .= '</div>';
     $output .= '<span class="cq-beforeafter-handle ' . $handlestyle . '">';
     if (version_compare(WPB_VC_VERSION, "4.4") >= 0 && isset(${'icon_' . $handleicon})) {
         $output .= '<i class="' . esc_attr(${'icon_' . $handleicon}) . '" title="' . $handletooltip . '"></i> ';
     } else {
         $output .= '<i class="fa ' . $handleicon . '" title="' . $handletooltip . '"></i>';
     }
     $output .= '</span>';
     $output .= '</div>';
     if ($link["url"] !== "") {
         $output .= '</a>';
     }
     return $output;
 }
 /**
  * Client Shortcode
  *
  * @param array $atts
  * @param string $content
  * @return string
  */
 function wolf_shortcode_clients_carousel_item($atts, $content = null)
 {
     if (class_exists('Vc_Manager') && function_exists('vc_map_get_attributes')) {
         $atts = vc_map_get_attributes('wolf_clients_carousel_item', $atts);
     }
     extract(shortcode_atts(array('image' => '', 'link' => '#'), $atts));
     $link = esc_url($link);
     $src = esc_url(wolf_get_url_from_attachment_id(absint($image), 'extra-large'));
     $output = "<div class='block'>";
     $output .= "<a href='{$link}' target='_blank'><img src='{$src}' alt='client-image'></a>";
     $output .= '</div>';
     return $output;
 }
Example #30
0
 protected function contentInline($atts, $content = null)
 {
     /**
      * @var $type
      */
     $atts = vc_map_get_attributes($this->getShortcode(), $atts);
     $css = isset($atts['css']) ? $atts['css'] : '';
     $el_class = isset($atts['el_class']) ? $atts['el_class'] : '';
     $class_to_filter = 'wpb_googleplus vc_social-placeholder wpb_content_element';
     $class_to_filter .= vc_shortcode_custom_css_class($css, ' ') . $this->getExtraClass($el_class);
     $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts);
     return '<div class="' . esc_attr($css_class) . '"></div>';
 }