• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP vc_map_get_attributes函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中vc_map_get_attributes函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_map_get_attributes函数的具体用法?PHP vc_map_get_attributes怎么用?PHP vc_map_get_attributes使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了vc_map_get_attributes函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: images_content

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;
}
开发者ID:devmoonshine,项目名称:development,代码行数:34,代码来源:vc_content_image.php


示例2: content

    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();
    }
开发者ID:ngocthangict,项目名称:edo,代码行数:35,代码来源:vertical-menu.php


示例3: getAttributes

 /**
  * 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);
 }
开发者ID:evanbuss,项目名称:wordpress,代码行数:35,代码来源:vc-custom-heading.php


示例4: gmap

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;
}
开发者ID:devmoonshine,项目名称:development,代码行数:28,代码来源:vc_gmap3.php


示例5: cq_vc_fullscreenintro_func

 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;
 }
开发者ID:sopada85,项目名称:esquema-test,代码行数:27,代码来源:vc-extensions-fullscreenintro.php


示例6: counter

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;
}
开发者ID:devmoonshine,项目名称:development,代码行数:27,代码来源:vc_counter.php


示例7: list_icon

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;
}
开发者ID:devmoonshine,项目名称:development,代码行数:30,代码来源:vc_list_icon.php


示例8: wolf_shortcode_images_gallery

 /**
  * 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;
 }
开发者ID:estrategasdigitales,项目名称:dictobas,代码行数:34,代码来源:shortcode-images-gallery.php


示例9: wolf_highlight_shortcode_text

 /**
  * 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>';
 }
开发者ID:estrategasdigitales,项目名称:dictobas,代码行数:14,代码来源:shortcode-highlight.php


示例10: cq_vc_pagetransition_func

 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;
 }
开发者ID:sopada85,项目名称:esquema-test,代码行数:30,代码来源:vc-extensions-pagetransition.php


示例11: cq_vc_cqbutton_func

 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;
 }
开发者ID:sopada85,项目名称:esquema-test,代码行数:28,代码来源:vc-extensions-cqbutton.php


示例12: wolf_shortcode_testimonial

    /**
     * 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;
    }
开发者ID:estrategasdigitales,项目名称:dictobas,代码行数:37,代码来源:shortcode-testimonials.php


示例13: icon_font

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;
}
开发者ID:devmoonshine,项目名称:development,代码行数:27,代码来源:vc_icons.php


示例14: service_one

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;
}
开发者ID:devmoonshine,项目名称:development,代码行数:29,代码来源:vc_service_one.php


示例15: content

    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;
    }
开发者ID:hikaram,项目名称:wee,代码行数:59,代码来源:lastest_deals_sidebar.php


示例16: wolf_shortcode_mailchimp

 /**
  * 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);
 }
开发者ID:estrategasdigitales,项目名称:dictobas,代码行数:14,代码来源:shortcode-mailchimp.php


示例17: cq_vc_gallery_func

 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;
 }
开发者ID:sopada85,项目名称:esquema-test,代码行数:58,代码来源:vc-extensions-depthmodal.php


示例18: content

    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();
    }
开发者ID:hikaram,项目名称:wee,代码行数:58,代码来源:list_product.php


示例19: content

    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();
    }
开发者ID:ngocthangict,项目名称:edo,代码行数:57,代码来源:edo_find_store.php


示例20: content

    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);
 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP vc_map_integrate_shortcode函数代码示例发布时间:2022-05-23
下一篇:
PHP vc_map_add_css_animation函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap