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

PHP vc_param_group_parse_atts函数代码示例

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

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



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

示例1: processData

 function processData($atts)
 {
     $per_row = $atts['gallery_row_amount'];
     $col = (int) (12 / $per_row);
     $atts['col'] = $col;
     $atts['per_row'] = $per_row;
     $gallery_items = vc_param_group_parse_atts($atts['gallery_items']);
     $atts['amount'] = count($gallery_items);
     $i = 0;
     $items = array();
     foreach ($gallery_items as $item) {
         $items[$i]['id'] = self::GenerateId();
         // Headline
         $headline = self::Exists($item['headline'], '');
         $items[$i]['headline'] = $headline;
         // Image
         $attachment = wp_get_attachment_image_src($item['image'], 'full');
         $image_url = $attachment[0];
         $items[$i]['image_url'] = $image_url;
         // Text
         $text = self::Exists($item['text'], '');
         $items[$i]['image_text'] = $text;
         ++$i;
     }
     $atts['items'] = $items;
     return $atts;
 }
开发者ID:sebjon-bytbil,项目名称:BB.CMS,代码行数:27,代码来源:gallery.php


示例2: content

 protected function content($atts, $content = null)
 {
     $atts = shortcode_atts(array('image' => '', 'img_size' => 'thumbnail', 'values' => '', 'css_animation' => '', 'animation_delay' => '', 'el_class' => '', 'css' => ''), $atts);
     extract($atts);
     $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'image-tooltip', $this->settings['base'], $atts), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '), 'extra' => $this->getExtraClass($el_class), 'css_animation' => cruxstore_getCSSAnimation($css_animation));
     $img_id = preg_replace('/[^\\d]/', '', $image);
     $img = wpb_getImageBySize(array('attach_id' => $img_id, 'thumb_size' => $img_size, 'class' => 'img-responsive'));
     if ($img == null) {
         $img['thumbnail'] = '<img class="vc_img-placeholder img-responsive" src="' . vc_asset_url('vc/no_image.png') . '" />';
     }
     $output = '';
     $values = (array) vc_param_group_parse_atts($values);
     $text = '';
     $left_text = '';
     $left_right = '';
     foreach ($values as $key => $data) {
         $new_line = $data;
         $new_line['left'] = isset($data['left']) ? $data['left'] : 0;
         $new_line['top'] = isset($data['top']) ? $data['top'] : 0;
         $new_line['label'] = isset($data['label']) ? $data['label'] : '';
         $new_line['color'] = isset($data['color']) ? $data['color'] : 'default';
         $new_line['color'] = isset($data['color']) ? $data['color'] : 'default';
         $new_line['content'] = isset($data['content']) ? $data['content'] : '';
         $active = $key == 0 ? ' active' : '';
         $text .= sprintf('<div class="image-tooltip-item %s" style="top: %s; left: %s;"><div class="image-tooltip-content" data-count="%s" title="%s"></div></div>', 'tooltip-' . $new_line['color'] . $active, $new_line['top'] . '%', $new_line['left'] . '%', $key, $new_line['label']);
         $tooltip = sprintf('<div class="image-tooltip-element %s" data-count="%s"><h4>%s</h4><div>%s</div></div>', $active, $key, $new_line['label'], $data['content']);
         if ($new_line['align'] == 'right') {
             $left_right .= $tooltip;
         } else {
             $left_text .= $tooltip;
         }
     }
     $output = sprintf('<div class="row"><div class="image-tooltip-left col-md-4">%s</div><div class="image-tooltip-center col-md-4">%s %s</div><div class="image-tooltip-right col-md-4">%s</div></div>', $left_text, '<div class="image-tooltip-image">' . $img['thumbnail'] . '</div>', '<div class="image-tooltip-text">' . $text . '</div>', $left_right);
     $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
     if ($animation_delay) {
         $animation_delay = sprintf(' data-wow-delay="%sms"', $animation_delay);
     }
     return '<div class="' . esc_attr($elementClass) . '"' . $animation_delay . '>' . $output . '</div>';
 }
开发者ID:websideas,项目名称:Mondova,代码行数:39,代码来源:image_tooltip.php


示例3: __construct

 /**
  * @param $settings
  * @param $value
  * @param $tag
  *
  * @since 4.4
  */
 public function __construct($settings, $value, $tag)
 {
     $this->settings = $settings;
     $this->settings['base'] = $tag;
     $this->value = vc_param_group_parse_atts($value);
     $this->unparsed_value = $value;
 }
开发者ID:RDePoppe,项目名称:luminaterealestate,代码行数:14,代码来源:param_group.php


示例4: convertAttributesToNewProgressBar

 public static function convertAttributesToNewProgressBar($atts)
 {
     if (isset($atts['values']) && strlen($atts['values']) > 0) {
         $values = vc_param_group_parse_atts($atts['values']);
         if (!is_array($values)) {
             $temp = explode(',', $atts['values']);
             $paramValues = array();
             foreach ($temp as $value) {
                 $data = explode('|', $value);
                 $colorIndex = 2;
                 $newLine = array();
                 $newLine['value'] = isset($data[0]) ? $data[0] : 0;
                 $newLine['label'] = isset($data[1]) ? $data[1] : '';
                 if (isset($data[1]) && preg_match('/^\\d{1,3}\\%$/', $data[1])) {
                     $colorIndex += 1;
                     $newLine['value'] = (double) str_replace('%', '', $data[1]);
                     $newLine['label'] = isset($data[2]) ? $data[2] : '';
                 }
                 if (isset($data[$colorIndex])) {
                     $newLine['customcolor'] = $data[$colorIndex];
                 }
                 $paramValues[] = $newLine;
             }
             $atts['values'] = urlencode(json_encode($paramValues));
         }
     }
     return $atts;
 }
开发者ID:evanbuss,项目名称:wordpress,代码行数:28,代码来源:vc-progress-bar.php


示例5: processData

 function processData($atts)
 {
     $id = self::Exists($atts['facility'], '');
     if ($id !== '') {
         $title = get_the_title($id);
         $atts['title'] = $title;
         $content = htmlspecialchars($atts['facility_content']);
         $content = preg_replace('/\\`{2}/', '"', $content);
         $atts['facility_content'] = htmlspecialchars_decode($content);
         $coordinates = get_field('facility-visiting-address', $id);
         if ($coordinates) {
             $atts['coordinates'] = $coordinates;
             $atts['zoom'] = 14;
         }
         $i = 0;
         $buttons = array();
         $facility_buttons = vc_param_group_parse_atts($atts['facility_buttons']);
         foreach ($facility_buttons as $button) {
             $buttons[$i]['text'] = $button['button_text'];
             $buttons[$i]['color'] = $button['color'];
             $buttons[$i]['link_to'] = $button['link_to'];
             ++$i;
         }
         $atts['buttons'] = $buttons;
     }
     return $atts;
 }
开发者ID:sebjon-bytbil,项目名称:BB.CMS,代码行数:27,代码来源:facilitycard.php


示例6: ProcessData

 public function ProcessData($atts)
 {
     if ($atts['use_picture'] == "0" && !isset($atts['icon_bytbil'])) {
         $atts['icon_bytbil'] = "";
     }
     $atts['links'] = vc_param_group_parse_atts($atts['link_list']);
     return $atts;
 }
开发者ID:sebjon-bytbil,项目名称:BB.CMS,代码行数:8,代码来源:card.php


示例7: processData

 function processData($atts)
 {
     $accordions = vc_param_group_parse_atts($atts['accordions']);
     $filtered = array_filter($accordions);
     if (!empty($filtered)) {
         $atts['accordions'] = $accordions;
     } else {
         $atts['accordions'] = false;
     }
     return $atts;
 }
开发者ID:sebjon-bytbil,项目名称:BB.CMS,代码行数:11,代码来源:accordion.php


示例8: content

 protected function content($atts, $content = null)
 {
     $atts = shortcode_atts(array('badge' => esc_html__('only', 'cruxstore'), 'price' => 245, 'currency' => esc_html__('$', 'cruxstore'), 'desktop' => 4, 'values' => '', 'el_class' => '', 'css_animation' => '', 'animation_delay' => '', 'css' => ''), $atts);
     extract($atts);
     $output = '';
     $product_columns = 12 / $desktop;
     $product_land = $product_columns == 4 ? 2 : 3;
     $values = (array) vc_param_group_parse_atts($values);
     $text = '';
     foreach ($values as $data) {
         $new_line = $data;
         $button_text = '';
         $img_id = isset($data['image']) ? $data['image'] : 0;
         $pd_link = isset($data['link']) ? $data['link'] : '';
         $pd_title = isset($data['label']) ? $data['label'] : '';
         $img_id = preg_replace('/[^\\d]/', '', $img_id);
         $img = wpb_getImageBySize(array('attach_id' => $img_id, 'thumb_size' => 'full', 'class' => 'img-responsive'));
         if ($img == null) {
             $img['thumbnail'] = '<img class="vc_img-placeholder img-responsive" src="' . vc_asset_url('vc/no_image.png') . '" />';
         }
         $pd_image = $img['thumbnail'];
         if (!empty($pd_link)) {
             $pd_link = vc_build_link($pd_link);
             if ($pd_title) {
                 $pd_title = '<a href="' . esc_attr($pd_link['url']) . '"' . ($pd_link['target'] ? ' target="' . esc_attr($pd_link['target']) . '"' : '') . ($pd_link['title'] ? ' title="' . esc_attr($pd_link['title']) . '"' : '') . '>' . $pd_title . '</a>';
             }
             $pd_image = '<a href="' . esc_attr($pd_link['url']) . '"' . ($pd_link['target'] ? ' target="' . esc_attr($pd_link['target']) . '"' : '') . ($pd_link['title'] ? ' title="' . esc_attr($pd_link['title']) . '"' : '') . '>' . $img['thumbnail'] . '</a>';
         }
         $pd_image = sprintf('<div class="product-price-image">%s</div>', $pd_image);
         if ($pd_title) {
             $pd_title = sprintf('<h5>%s</h5>', $pd_title);
         }
         $text .= sprintf('<div class="%s %s">%s</div>', 'col-md-' . $product_columns . ' col-sm-' . $product_land, 'product-price-item', $pd_image . $pd_title);
     }
     $output = '<div class="row multi-columns-row">' . $text . '</div>';
     $output .= sprintf('<div class="products-price-content visible-lg-block"><div class="products-price-circle"><span class="products-price-only">%s</span><span class="products-price-currency">%s</span><span class="products-price-text">%s</span></div><span class="products-price-cart">%s</span></div>', $badge, $currency, $price, '<i class="fa fa-shopping-basket" aria-hidden="true"></i>');
     $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'products-price ', $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 ($animation_delay) {
         $animation_delay = sprintf(' data-wow-delay="%sms"', $animation_delay);
     }
     return '<div class="' . esc_attr($elementClass) . '"' . $animation_delay . '>' . $output . '</div>';
 }
开发者ID:websideas,项目名称:Mondova,代码行数:43,代码来源:products_price.php


示例9: market

 public function market($settings, $value){
     $settings["params"] = array(
         array(
             "type" => "textfield",
             "heading" => __( "Database", 'slz-core' ),
             "param_name" => "database_code",
             "value" => ''
         ),
         array(
             "type" => "slz_dropdownmultiple",
             "heading" => __( "Dataset", 'slz-core' ),
             "param_name" => "dataset_code",
             "value" => array()
         )
     );
     
     return $this->render('market', array(
         'edit_form' => new Vc_ParamGroup_Edit_Form_Fields( $settings ),
         'value' => vc_param_group_parse_atts( $value ),
         'unparsed_value' => $value,
         'settings' => $settings,
     ), true);
 }
开发者ID:hoanghd,项目名称:tools,代码行数:23,代码来源:class-shortcode-extend.php


示例10: vc_param_group_parse_atts

if (!empty($stroke_color)) {
    if ('custom' === $stroke_color) {
        if ($custom_stroke_color) {
            $color = $custom_stroke_color;
        } else {
            $color = $base_colors['normal']['white'];
        }
    } else {
        $color = $base_colors['normal'][$stroke_color];
    }
    $options[] = 'data-vc-stroke-color="' . $color . '"';
}
if (!empty($stroke_width)) {
    $options[] = 'data-vc-stroke-width="' . $stroke_width . '"';
}
$values = (array) vc_param_group_parse_atts($values);
$data = array();
foreach ($values as $k => $v) {
    if ('custom' === $style) {
        if (!empty($v['custom_color'])) {
            $color = $v['custom_color'];
            $highlight = vc_colorCreator($v['custom_color'], -10);
            //10% darker
        } else {
            $color = $base_colors['normal']['grey'];
            $highlight = $base_colors['active']['grey'];
        }
    } else {
        $color = isset($colors[$style]['normal'][$v['color']]) ? $colors[$style]['normal'][$v['color']] : $v['normal']['color'];
        $highlight = isset($colors[$style]['active'][$v['color']]) ? $colors[$style]['active'][$v['color']] : $v['active']['color'];
    }
开发者ID:hikaram,项目名称:wee,代码行数:31,代码来源:vc_round_chart.php


示例11: processData

 function processData($atts)
 {
     $atts['tabs'] = vc_param_group_parse_atts($atts['tabs']);
     return $atts;
 }
开发者ID:sebjon-bytbil,项目名称:BB.CMS,代码行数:5,代码来源:tabs.php


示例12: x_shortcode_page_list

function x_shortcode_page_list($atts)
{
    ob_start();
    $titles = vc_param_group_parse_atts($atts['titles']);
    $output = '<div class="abt_facilities bullet"><ul>';
    foreach ($titles as $value) {
        $output .= '<li>';
        $output .= '<h5>' . $value['title'] . "</h5>";
        $output .= '<p class="text-justify">' . $value['excerpt'] . "</p>";
        $link = explode('|', $value['link']);
        $url = explode(':', $link[0]);
        $url_text = explode(':', $link[1]);
        $output .= '<div><a href="' . urldecode($url[1]) . '"  class="aboutLink">' . urldecode($url_text[1]) . '</a></div></li>';
    }
    $output .= '</ul></div>';
    return $output;
    $returnvariable = ob_get_clean();
    return $returnvariable;
}
开发者ID:ratheeshpkr,项目名称:snhotel,代码行数:19,代码来源:snhotel-vc_addons.php


示例13: vc_featured_product_func

 function vc_featured_product_func($atts, $content = null)
 {
     // New function parameter $content is added!
     global $makeclean_theme_option;
     extract(shortcode_atts(array('title' => '', 'list_tabs' => ''), $atts));
     $tabs = vc_param_group_parse_atts($list_tabs);
     $output = '<div class="col-md-12 col-sm-12 ">';
     $output .= '<div class="product-category"> ';
     $output .= '<ul class="nav nav-tabs" role="tablist">';
     $active = 'active';
     for ($i = 0; $i < count($tabs); $i++) {
         if ($i != 0) {
             $active = '';
         }
         $output .= '<li class="' . $active . '" role="presentation" ><a  href="#tab' . $i . '" aria-controls="tab' . $i . '" role="tab" data-toggle="tab">' . $tabs[$i]["title_tab"] . ' </a></li>';
     }
     $output .= '</ul> </div>';
     $active = 'in active';
     $output .= '  <div class="tab-content">';
     foreach ($tabs as $key => $tab) {
         if ($key != 0) {
             $active = '';
         }
         $output .= '<div role="tabpanel" class="tab-pane fade  ' . $active . '" id="tab' . $key . '">';
         $output .= do_shortcode('[' . $tab["my_product_cat"] . ' per_page="' . $tab["num_items"] . '" columns="' . $tab["columns_count"] . '"]');
         $output .= '</div>';
     }
     $output .= '</div>';
     $output .= '</div>';
     return $output;
 }
开发者ID:khiconit,项目名称:makeclean,代码行数:31,代码来源:visual_composer.php


示例14: esc_attr

			</span>
		</li>
		<?php 
if (strlen($desc) > 0) {
    ?>
		<li class="desc"><?php 
    echo esc_attr($desc);
    ?>
</li>
		<?php 
}
?>
		
		<?php 
if (strlen($features) > 0) {
    $features = (array) vc_param_group_parse_atts($features);
    //$features = array_map( 'trim', explode(',', wp_strip_all_tags($features)) );
    ?>
			<?php 
    foreach ($features as $feature) {
        if (isset($feature['title']) && strlen($feature['title']) > 0) {
            ?>
			<li class="feature"><?php 
            echo do_shortcode($feature['title']);
            if (isset($feature['tooltip']) && strlen($feature['tooltip']) > 0) {
                echo '<span class="nth-more-info" data-toggle="tooltip" data-placement="top" title="' . esc_attr($feature['tooltip']) . '">?</span>';
            }
            ?>
</li>
			<?php 
        }
开发者ID:kinhdon2011,项目名称:nexthemes-plugins,代码行数:31,代码来源:pricing.tpl.php


示例15: processData

 public function processData($atts)
 {
     $processed_slides = array();
     if (!empty($atts['slides'])) {
         $slides = vc_param_group_parse_atts($atts['slides']);
         foreach ($slides as $slide) {
             switch ($slide['slide_type']) {
                 case 'image':
                     $processed_slide = self::build_image_slide($slide);
                     if (!empty($processed_slide)) {
                         array_push($processed_slides, $processed_slide);
                     }
                     break;
                 case 'offer':
                     $processed_slide = self::build_offer_slide($slide);
                     if (!empty($processed_slide)) {
                         array_push($processed_slides, $processed_slide);
                     }
                     break;
             }
         }
     }
     $atts['slides'] = $processed_slides;
     // Slider animation
     $slider_animation = self::Exists($atts['slider_effect'], 'fade');
     $atts['slider_effect'] = $slider_animation;
     // Slider animation speed
     $slider_animation_speed = self::Exists($atts['slider_animation_speed'], '600');
     $atts['slider_animation_speed'] = $slider_animation_speed;
     // Slider speed
     $slider_speed = self::Exists($atts['slider_speed'], '7') * 1000;
     $atts['slider_speed'] = $slider_speed;
     // Arrows
     $slider_arrows = self::Exists($atts['slider_arrows'], 'false');
     $atts['slider_arrows'] = $slider_arrows;
     // Slideshow controls
     $slider_controls = self::Exists($atts['slider_controls'], 'false');
     $atts['slider_controls'] = $slider_controls;
     return $atts;
 }
开发者ID:sebjon-bytbil,项目名称:BB.CMS,代码行数:40,代码来源:imageslider.php


示例16: processData

 function processData($atts)
 {
     $buttons = vc_param_group_parse_atts($atts['the_buttons']);
     $atts['the_buttons'] = $buttons;
     return $atts;
 }
开发者ID:sebjon-bytbil,项目名称:BB.CMS,代码行数:6,代码来源:buttons.php



注:本文中的vc_param_group_parse_atts函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP vc_parse_multi_attribute函数代码示例发布时间:2022-05-23
下一篇:
PHP vc_mode函数代码示例发布时间: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