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

PHP vc_build_safe_css_class函数代码示例

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

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



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

示例1: content

 protected function content($atts, $content = null)
 {
     extract(shortcode_atts(array('title' => esc_html__('Title', 'js_composer'), 'subcontent' => '', 'use_theme_fonts' => 'true', 'font_container' => '', 'google_fonts' => '', 'css_animation' => '', 'animation_delay' => '', 'el_class' => '', 'css' => ''), $atts));
     $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'flip-box ', $this->settings['base'], $atts), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '), 'extra' => $this->getExtraClass($el_class), 'css_animation' => cruxstore_getCSSAnimation($css_animation));
     $style_title = '';
     extract($this->getAttributes($atts));
     unset($font_container_data['values']['text_align']);
     $styles = array();
     extract($this->getStyles($el_class, $css, $google_fonts_data, $font_container_data, $atts));
     $settings = get_option('wpb_js_google_fonts_subsets');
     $subsets = '';
     if (is_array($settings) && !empty($settings)) {
         $subsets = '&subset=' . implode(',', $settings);
     }
     if (!empty($google_fonts_data) && isset($google_fonts_data['values']['font_family'])) {
         wp_enqueue_style('vc_google_fonts_' . vc_build_safe_css_class($google_fonts_data['values']['font_family']), '//fonts.googleapis.com/css?family=' . $google_fonts_data['values']['font_family'] . $subsets);
     }
     if (!empty($styles)) {
         $style_title .= 'style="' . esc_attr(implode(';', $styles)) . '"';
     }
     $box_title = $title ? '<' . $font_container_data['values']['tag'] . ' class="flip-box-before" ' . $style_title . '>' . $title . '</' . $font_container_data['values']['tag'] . '>' : '';
     $output = $box_title . '<div class="flip-box-after">' . $subcontent . '</div>';
     if ($animation_delay) {
         $animation_delay = sprintf(' data-wow-delay="%sms"', $animation_delay);
     }
     $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
     return '<div class="' . esc_attr($elementClass) . '"' . $animation_delay . '>' . $output . '</div>';
 }
开发者ID:websideas,项目名称:Mondova,代码行数:28,代码来源:flip_box.php


示例2: content

 protected function content($atts, $content = null)
 {
     $atts = shortcode_atts(array('date_coming' => '2016/5/19', 'style_coming' => 'style1', 'use_theme_fonts' => '', 'font_container' => '', 'google_fonts' => '', 'use_theme_fonts_value' => '', 'font_container_value' => '', 'google_fonts_value' => '', 'css_animation' => '', 'el_class' => '', 'css' => ''), $atts);
     extract($atts);
     $rand = rand();
     $custom_css = $data_animate = $cl_animate = $animate_item = '';
     $style_title = '';
     extract($this->getAttributes($atts));
     unset($font_container_data['values']['text_align']);
     extract($this->getStyles($el_class, $css, $google_fonts_data, $font_container_data, $atts));
     $settings = get_option('wpb_js_google_fonts_subsets');
     $subsets = '';
     if (is_array($settings) && !empty($settings)) {
         $subsets = '&subset=' . implode(',', $settings);
     }
     if (!empty($google_fonts_data) && isset($google_fonts_data['values']['font_family'])) {
         wp_enqueue_style('vc_google_fonts_' . vc_build_safe_css_class($google_fonts_data['values']['font_family']), '//fonts.googleapis.com/css?family=' . $google_fonts_data['values']['font_family'] . $subsets);
     }
     if (!empty($styles)) {
         $style_title .= esc_attr(implode(';', $styles));
         $custom_css .= '#kt_comming_' . $rand . ' .title{ ' . $style_title . ' }';
     }
     $style_value = '';
     $atts['font_container'] = $font_container_value;
     $atts['google_fonts'] = $google_fonts_value;
     $atts['use_theme_fonts'] = $use_theme_fonts_value;
     extract($this->getAttributes($atts));
     unset($font_container_data['values']['text_align']);
     extract($this->getStyles($el_class, $css, $google_fonts_data, $font_container_data, $atts));
     $settings = get_option('wpb_js_google_fonts_subsets');
     $subsets = '';
     if (is_array($settings) && !empty($settings)) {
         $subsets = '&subset=' . implode(',', $settings);
     }
     if (!empty($google_fonts_data) && isset($google_fonts_data['values']['font_family'])) {
         wp_enqueue_style('vc_google_fonts_' . vc_build_safe_css_class($google_fonts_data['values']['font_family']), '//fonts.googleapis.com/css?family=' . $google_fonts_data['values']['font_family'] . $subsets);
     }
     if (!empty($styles)) {
         $style_value .= esc_attr(implode(';', $styles));
         $custom_css .= '#kt_comming_' . $rand . ' .value-time{ ' . $style_value . ' }';
     }
     if ($custom_css) {
         $custom_css = '<div class="kt_custom_css" data-css="' . esc_attr($custom_css) . '"></div>';
     }
     if ($css_animation != '') {
         $data_animate = 'data-timeeffect="200" data-animation="' . $css_animation . '"';
         $cl_animate = 'animation-effect';
         $animate_item = 'animation-effect-item';
     }
     $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wrapper-comingsoon clearfix ', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '), 'animate' => $cl_animate, 'style' => $style_coming);
     $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
     $html = '<div class="wrap"><div class="value-time">266</div><div class="title">Days</div></div>
              <div class="wrap"><div class="value-time">09</div><div class="title">Hours</div></div>
              <div class="wrap"><div class="value-time">53</div><div class="title">Minutes</div></div>
              <div class="wrap"><div class="value-time">59</div><div class="title">Seconds</div></div>';
     $output = '<div class="' . esc_attr($elementClass) . '" ' . $data_animate . '><div id="kt_comming_' . $rand . '" class="coming-soon ' . $animate_item . '" data-date="' . $date_coming . '">' . $html . '</div>' . $custom_css . '</div>';
     return $output;
 }
开发者ID:websideas,项目名称:Mondova,代码行数:58,代码来源:coming_soon.php


示例3: content

 protected function content($atts, $content = null)
 {
     extract(shortcode_atts(array('title' => esc_html__('Title', 'js_composer'), 'image' => '', 'link' => '', 'img_size' => 'thumbnail', 'background_title_color' => '#ebebeb', 'use_theme_fonts' => 'true', 'font_container' => '', 'google_fonts' => '', 'css_animation' => '', 'animation_delay' => '', 'el_class' => '', 'css' => ''), $atts));
     $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'box-colored ', $this->settings['base'], $atts), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '), 'extra' => $this->getExtraClass($el_class), 'css_animation' => cruxstore_getCSSAnimation($css_animation));
     $style_title = '';
     extract($this->getAttributes($atts));
     unset($font_container_data['values']['text_align']);
     $styles = array();
     extract($this->getStyles($el_class, $css, $google_fonts_data, $font_container_data, $atts));
     $settings = get_option('wpb_js_google_fonts_subsets');
     $subsets = '';
     if (is_array($settings) && !empty($settings)) {
         $subsets = '&subset=' . implode(',', $settings);
     }
     if (!empty($google_fonts_data) && isset($google_fonts_data['values']['font_family'])) {
         wp_enqueue_style('vc_google_fonts_' . vc_build_safe_css_class($google_fonts_data['values']['font_family']), '//fonts.googleapis.com/css?family=' . $google_fonts_data['values']['font_family'] . $subsets);
     }
     if ($background_title_color) {
         $styles[] = 'background-color: ' . $background_title_color . ';';
     }
     if (!empty($styles)) {
         $style_title .= 'style="' . esc_attr(implode(';', $styles)) . '"';
     }
     $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') . '" />';
     }
     if ($link) {
         $link = vc_build_link($link);
         $a_href = $link['url'];
         $a_title = $link['title'];
         $a_target = $link['target'];
         $icon_box_link = array('href="' . esc_attr($a_href) . '"', 'title="' . esc_attr($a_title) . '"', 'target="' . esc_attr($a_target) . '"');
         $title = '<a class="box-link" ' . implode(' ', $icon_box_link) . '>' . $title . '</a>';
         $img['thumbnail'] = '<a class="box-link" ' . implode(' ', $icon_box_link) . '>' . $img['thumbnail'] . '</a>';
     }
     $box_title = $title ? '<' . $font_container_data['values']['tag'] . ' class="box-colored-title" ' . $style_title . '>' . $title . '</' . $font_container_data['values']['tag'] . '>' : '';
     $output = '<div class="box-colored-image">' . $img['thumbnail'] . '</div>' . $box_title;
     $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,代码行数:45,代码来源:box_colored.php


示例4: getCustomStyle

 function getCustomStyle($atts)
 {
     $styles = array();
     $google_fonts_data = $font_container_data = $style = '';
     extract($this->getAttributes($atts));
     unset($font_container_data['values']['text_align']);
     extract($this->getStyles($el_class, $css, $google_fonts_data, $font_container_data, $atts));
     $settings = get_option('wpb_js_google_fonts_subsets');
     $subsets = '';
     if (is_array($settings) && !empty($settings)) {
         $subsets = '&subset=' . implode(',', $settings);
     }
     if (!empty($google_fonts_data) && isset($google_fonts_data['values']['font_family'])) {
         wp_enqueue_style('vc_google_fonts_' . vc_build_safe_css_class($google_fonts_data['values']['font_family']), '//fonts.googleapis.com/css?family=' . $google_fonts_data['values']['font_family'] . $subsets);
     }
     $output = array('style' => $styles, 'data' => $font_container_data);
     return $output;
 }
开发者ID:websideas,项目名称:Mondova,代码行数:18,代码来源:heading.php


示例5: df_googlefont_sc_enqueue

function df_googlefont_sc_enqueue()
{
    wp_enqueue_style('df_google_fonts_' . vc_build_safe_css_class($google), '//fonts.googleapis.com/css?family=' . $google);
    // wp_enqueue_style( 'df_google_fonts_' . vc_build_safe_css_class( $google ));
}
开发者ID:HMC-Advertising,项目名称:HMC-Changes-Foodtruck-,代码行数:5,代码来源:shortcodes.php


示例6: extract

 * Shortcode class
 * @var $this WPBakeryShortCode_VC_Custom_heading
 */
// This is needed to extract $font_container_data and $google_fonts_data
extract($this->getAttributes($atts));
$atts = vc_map_get_attributes($this->getShortcode(), $atts);
extract($atts);
extract($this->getStyles($el_class, $css, $google_fonts_data, $font_container_data, $atts));
$settings = get_option('wpb_js_google_fonts_subsets');
if (is_array($settings) && !empty($settings)) {
    $subsets = '&subset=' . implode(',', $settings);
} else {
    $subsets = '';
}
if (isset($google_fonts_data['values']['font_family'])) {
    wp_enqueue_style('vc_google_fonts_' . vc_build_safe_css_class($google_fonts_data['values']['font_family']), '//fonts.googleapis.com/css?family=' . $google_fonts_data['values']['font_family'] . $subsets);
}
if (!empty($styles)) {
    $style = 'style="' . esc_attr(implode(';', $styles)) . '"';
} else {
    $style = '';
}
if ('post_title' === $source) {
    $text = get_the_title(get_the_ID());
}
if (!empty($link)) {
    $link = vc_build_link($link);
    $text = '<a href="' . esc_attr($link['url']) . '"' . ($link['target'] ? ' target="' . esc_attr($link['target']) . '"' : '') . ($link['title'] ? ' title="' . esc_attr($link['title']) . '"' : '') . '>' . $text . '</a>';
}
$output = '';
if (apply_filters('vc_custom_heading_template_use_wrapper', false)) {
开发者ID:pcuervo,项目名称:odc,代码行数:31,代码来源:vc_custom_heading.php


示例7: render


//.........这里部分代码省略.........
         if (isset($fields['text_align'])) {
             $data['text_align'] = '
             <div class="vc_row-fluid vc_column">
                 <div class="wpb_element_label">' . __('Text align', 'js_composer') . '</div>
                 <div class="vc_font_container_form_field-text_align-container">
                     <select class="vc_font_container_form_field-text_align-select">
                         <option value="left" class="left" ' . ($values['text_align'] == 'left' ? 'selected="selected"' : '') . '>' . __('left', 'js_composer') . '</option>
                         <option value="right" class="right" ' . ($values['text_align'] == 'right' ? 'selected="selected"' : '') . '>' . __('right', 'js_composer') . '</option>
                         <option value="center" class="center" ' . ($values['text_align'] == 'center' ? 'selected="selected"' : '') . '>' . __('center', 'js_composer') . '</option>
                         <option value="justify" class="justify" ' . ($values['text_align'] == 'justify' ? 'selected="selected"' : '') . '>' . __('justify', 'js_composer') . '</option>
                     </select>
                 </div>';
             if (isset($fields['text_align_description']) && strlen($fields['text_align_description']) > 0) {
                 $data['text_align'] .= '
                 <span class="vc_description clear">' . $fields['text_align_description'] . '</span>
                 ';
             }
             $data['text_align'] .= '</div>';
         }
         if (isset($fields['line_height'])) {
             $data['line_height'] = '
             <div class="vc_row-fluid vc_column">
                 <div class="wpb_element_label">' . __('Line height', 'js_composer') . '</div>
                 <div class="vc_font_container_form_field-line_height-container">
                     <input class="vc_font_container_form_field-line_height-input"  type="text"  value="' . $values['line_height'] . '" />
                 </div>';
             if (isset($fields['line_height_description']) && strlen($fields['line_height_description']) > 0) {
                 $data['line_height'] .= '
                 <span class="vc_description clear">' . $fields['line_height_description'] . '</span>
                 ';
             }
             $data['line_height'] .= '</div>';
         }
         if (isset($fields['color'])) {
             $data['color'] = '
             <div class="vc_row-fluid vc_column">
                 <div class="wpb_element_label">' . __('Text color', 'js_composer') . '</div>
                 <div class="vc_font_container_form_field-color-container">
                     <div class="color-group">
                         <input type="text" value="' . $values['color'] . '" class="vc_font_container_form_field-color-input vc_color-control" />
                     </div>
                 </div>';
             if (isset($fields['color_description']) && strlen($fields['color_description']) > 0) {
                 $data['color'] .= '
                 <span class="vc_description clear">' . $fields['color_description'] . '</span>
                 ';
             }
             $data['color'] .= '</div>';
         }
         if (isset($fields['font_family'])) {
             $data['font_family'] = '
             <div class="vc_row-fluid vc_column">
                 <div class="wpb_element_label">' . __('Font Family', 'js_composer') . '</div>
                 <div class="vc_font_container_form_field-font_family-container">
                     <select class="vc_font_container_form_field-font_family-select">';
             $fonts = $this->_vc_font_container_get_web_safe_fonts();
             foreach ($fonts as $font_name => $font_data) {
                 $data['font_family'] .= '<option value="' . $font_name . '" class="' . vc_build_safe_css_class($font_name) . '" ' . (strtolower($values['font_family']) == strtolower($font_name) ? 'selected="selected"' : '') . ' data[font_family]="' . urlencode($font_data) . '">' . __($font_name, 'js_composer') . '</option>';
             }
             $data['font_family'] .= '
                     </select>
                 </div>';
             if (isset($fields['font_family_description']) && strlen($fields['font_family_description']) > 0) {
                 $data['font_family'] .= '
                 <span class="vc_description clear">' . $fields['font_family_description'] . '</span>
                 ';
             }
             $data['font_family'] .= '</div>';
         }
         if (isset($fields['font_style'])) {
             $data['font_style'] = '
             <div class="vc_row-fluid vc_column">
                 <div class="wpb_element_label">' . __('Font style', 'js_composer') . '</div>
                 <div class="vc_font_container_form_field-font_style-container">
                     <label>
                         <input type="checkbox" class="vc_font_container_form_field-font_style-checkbox italic" value="italic" ' . ($values['font_style_italic'] == "1" ? 'checked="checked"' : '') . '><span class="vc_font_container_form_field-font_style-label italic">' . __('italic', 'js_composer') . '</span>
                      </label>
                     <br />
                     <label>
                         <input type="checkbox" class="vc_font_container_form_field-font_style-checkbox bold" value="bold" ' . ($values['font_style_bold'] == "1" ? 'checked="checked"' : '') . '><span class="vc_font_container_form_field-font_style-label bold">' . __('bold', 'js_composer') . '</span>
                     </label>
                 </div>';
             if (isset($fields['font_style_description']) && strlen($fields['font_style_description']) > 0) {
                 $data['font_style'] .= '
                 <span class="vc_description clear">' . $fields['font_style_description'] . '</span>
                 ';
             }
             $data['font_style'] .= '</div>';
         }
         $data = apply_filters('vc_font_container_output_data', $data, $fields, $values, $settings);
         // combine all in output, make sure you follow ordering
         foreach ($fields as $key => $field) {
             if (isset($data[$key])) {
                 $output .= $data[$key];
             }
         }
     }
     $output .= '<input name="' . $settings['param_name'] . '" class="wpb_vc_param_value  ' . $settings['param_name'] . ' ' . $settings['type'] . '_field" type="hidden" value="' . $value . '" />';
     return $output;
 }
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:101,代码来源:font_container.php


示例8: foreach

foreach ($fonts as $font_data) {
    ?>
            <option value="<?php 
    echo $font_data->font_family . ':' . $font_data->font_styles;
    ?>
" data[font_types]="<?php 
    echo $font_data->font_types;
    ?>
" data[font_family]="<?php 
    echo $font_data->font_family;
    ?>
" data[font_styles]="<?php 
    echo $font_data->font_styles;
    ?>
" class="<?php 
    echo vc_build_safe_css_class($font_data->font_family);
    ?>
" <?php 
    echo strtolower($values['font_family']) == strtolower($font_data->font_family) || strtolower($values['font_family']) == strtolower($font_data->font_family) . ':' . $font_data->font_styles ? 'selected="selected"' : '';
    ?>
 ><?php 
    _e($font_data->font_family, 'js_composer');
    ?>
</option>
        <?php 
}
?>
        </select>
    </div>
    <?php 
if (isset($fields['font_family_description']) && strlen($fields['font_family_description']) > 0) {
开发者ID:chicosilva,项目名称:olharambiental,代码行数:31,代码来源:template.php


示例9: content

 protected function content($atts, $content = null)
 {
     $atts = shortcode_atts(array('title' => esc_html__('Title', 'js_composer'), 'source' => 'widgets', 'categories' => '', 'per_page' => 8, 'orderby' => 'date', 'order' => 'DESC', 'style' => 1, 'active_section' => 1, 'font_size' => '', 'line_height' => '', 'letter_spacing' => '', 'font_container' => '', 'use_theme_fonts' => 'yes', 'google_fonts' => '', 'css_animation' => '', 'el_class' => '', 'css' => '', 'operator' => 'IN'), $atts);
     $columns = 3;
     $product_type = 'classic';
     // This is needed to extract $font_container_data and $google_fonts_data
     extract($this->getAttributes($atts));
     unset($font_container_data['values']['text_align']);
     $atts = vc_map_get_attributes($this->getShortcode(), $atts);
     extract($atts);
     extract($this->getStyles($el_class, $css, $google_fonts_data, $font_container_data, $atts));
     $settings = get_option('wpb_js_google_fonts_subsets');
     if (is_array($settings) && !empty($settings)) {
         $subsets = '&subset=' . implode(',', $settings);
     } else {
         $subsets = '';
     }
     if (isset($google_fonts_data['values']['font_family'])) {
         wp_enqueue_style('vc_google_fonts_' . vc_build_safe_css_class($google_fonts_data['values']['font_family']), '//fonts.googleapis.com/css?family=' . $google_fonts_data['values']['font_family'] . $subsets);
     }
     if ($letter_spacing) {
         if (empty($styles)) {
             $styles = array();
         }
         $styles[] = 'letter-spacing: ' . $letter_spacing . 'px';
     }
     if (!empty($styles)) {
         $style = 'style="' . esc_attr(implode(';', $styles)) . '"';
     } else {
         $style = '';
     }
     $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wc-products-vertical', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'css_animation' => $this->getCSSAnimation($css_animation), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '), 'product_stype' => 'cruxstore-products cruxstore-products-classic', 'woocommerce' => 'woocommerce columns-' . $columns);
     if (!$active_section) {
         $active_section = 1;
     }
     $uniqeID = uniqid();
     $meta_query = WC()->query->get_meta_query();
     $args = array('post_type' => 'product', 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'posts_per_page' => $atts['per_page'], 'meta_query' => $meta_query);
     if ($source == 'categories') {
         $tabs = explode(',', $categories);
         $args['order'] = $order;
         $args['orderby'] = $orderby;
     } else {
         $tabs = array('onsale', 'new', 'bestselling');
     }
     $tab_heading = '<ul class="nav-style" data-count="' . count($tabs) . '">';
     $i = 1;
     foreach ($tabs as $tab) {
         if ($source == 'categories') {
             $term = get_term_by('slug', sanitize_title($tab), 'product_cat');
             $text = $term->name;
         } else {
             if ($tab == 'new') {
                 $text = esc_html__('Arrivals Products', 'cruxstore');
             } elseif ($tab == 'bestselling') {
                 $text = esc_html__('Best Sellers', 'cruxstore');
             } elseif ($tab == 'onsale') {
                 $text = esc_html__('On sale', 'cruxstore');
             }
         }
         $class = $active_section == $i ? ' class="active"' : '';
         $tab_heading .= sprintf('<li %s><a href="%s" data-toggle="tab"><span data-hover="%s">%s</span></a></li>', $class, '#tab-' . $tab . '-' . $uniqeID, esc_attr($text), $text);
         $i++;
     }
     $tab_heading .= "</ul>";
     global $woocommerce_loop;
     $i = 1;
     $output_content = '';
     $carousel_atts = array('desktop' => $columns, 'navigation' => false, 'gutters' => false);
     $carousel_ouput = cruxstore_render_carousel(apply_filters('cruxstore_render_args', $carousel_atts), '', 'wc-carousel-wrapper');
     foreach ($tabs as $tab) {
         $new_args = $args;
         if ($source == 'categories') {
             $new_args['tax_query'] = array(array('taxonomy' => 'product_cat', 'terms' => sanitize_title($tab), 'field' => 'slug', 'operator' => $atts['operator']));
         } else {
             if ($tab == 'bestselling') {
                 $new_args['meta_key'] = 'total_sales';
                 $new_args['orderby'] = 'meta_value_num';
             } elseif ($tab == 'featured') {
                 $new_args['meta_query'][] = array('key' => '_featured', 'value' => 'yes');
             } elseif ($tab == 'onsale') {
                 $new_args['post__in'] = array_merge(array(0), wc_get_product_ids_on_sale());
             }
         }
         $products = new WP_Query(apply_filters('woocommerce_shortcode_products_query', $new_args, $atts));
         $woocommerce_loop['columns'] = $columns;
         $woocommerce_loop['type'] = $product_type;
         ob_start();
         if ($products->have_posts()) {
             woocommerce_product_loop_start();
             while ($products->have_posts()) {
                 $products->the_post();
                 wc_get_template_part('content', 'product');
             }
             // end of the loop.
             woocommerce_product_loop_end();
         }
         wp_reset_postdata();
         $carousel_html = ob_get_clean();
         $carousel_html = str_replace('%carousel_html%', $carousel_html, $carousel_ouput);
//.........这里部分代码省略.........
开发者ID:websideas,项目名称:Mondova,代码行数:101,代码来源:products_tab_vertical.php


示例10: content

 protected function content($atts, $content = null)
 {
     $atts = shortcode_atts(array('title' => __('Title', 'js_composer'), 'layout' => '1', 'from' => '0', 'to' => '100', 'speed' => '2000', 'prefix' => '', 'suffix' => '', 'skin' => '', 'use_theme_fonts' => 'yes', 'font_container' => '', 'google_fonts' => '', 'use_theme_fonts_value' => 'yes', 'font_container_value' => '', 'google_fonts_value' => '', 'icon_hover_div' => '', 'icon_type' => 'icon', 'icon_image' => '', 'icon_icon' => '', 'icon_size' => 'md', 'icon_color' => '', 'icon_custom_color' => '', 'icon_color_hover' => '', 'icon_custom_color_hover' => '', 'el_class' => '', 'css' => ''), $atts);
     extract($atts);
     $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'counter-wrapper ', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '), 'layout' => 'layout-' . $layout, 'size' => 'size-' . $icon_size);
     if ($skin) {
         $elementClass['skin'] = 'skin-' . $skin;
     }
     $uniqid = 'counter-' . uniqid();
     $style_title = $output = '';
     extract($this->getAttributes($atts));
     unset($font_container_data['values']['text_align']);
     $styles = array();
     extract($this->getStyles($el_class, $css, $google_fonts_data, $font_container_data, $atts));
     $settings = get_option('wpb_js_google_fonts_subsets');
     $subsets = '';
     if (is_array($settings) && !empty($settings)) {
         $subsets = '&subset=' . implode(',', $settings);
     }
     if (!empty($google_fonts_data) && isset($google_fonts_data['values']['font_family'])) {
         wp_enqueue_style('vc_google_fonts_' . vc_build_safe_css_class($google_fonts_data['values']['font_family']), '//fonts.googleapis.com/css?family=' . $google_fonts_data['values']['font_family'] . $subsets);
     }
     if (!empty($styles)) {
         $style_title .= 'style="' . esc_attr(implode(';', $styles)) . '"';
     }
     $counter_text = '<div class="counter-text" ' . $style_title . '>' . $title . '</div>';
     $style_value = '';
     $atts['font_container'] = $font_container_value;
     $atts['google_fonts'] = $google_fonts_value;
     $atts['use_theme_fonts'] = $use_theme_fonts_value;
     extract($this->getAttributes($atts));
     unset($font_container_data['values']['text_align']);
     extract($this->getStyles($el_class, $css, $google_fonts_data, $font_container_data, $atts));
     $settings = get_option('wpb_js_google_fonts_subsets');
     $subsets = '';
     if (is_array($settings) && !empty($settings)) {
         $subsets = '&subset=' . implode(',', $settings);
     }
     if (!empty($google_fonts_data) && isset($google_fonts_data['values']['font_family'])) {
         wp_enqueue_style('vc_google_fonts_' . vc_build_safe_css_class($google_fonts_data['values']['font_family']), '//fonts.googleapis.com/css?family=' . $google_fonts_data['values']['font_family'] . $subsets);
     }
     if (!empty($styles)) {
         $style_value .= 'style="' . esc_attr(implode(';', $styles)) . '"';
     }
     $decimals = explode('.', $to);
     $decimals_html = '';
     if (count($decimals) > 1) {
         $decimals_html = 'data-decimals="' . esc_attr(strlen($decimals[1])) . '"';
     }
     $from_attr = $from ? 'data-from="' . $from . '"' : 'data-from="0"';
     $speed = $speed ? $speed : 1;
     $counter_content = '<' . $font_container_data['values']['tag'] . ' class="counter-content" ' . $style_value . '>' . $prefix . '<span class="counter" ' . $from_attr . ' data-speed="' . intval($speed) . '"  ' . $decimals_html . ' data-to="' . esc_attr($to) . '">' . $from . '</span>' . $suffix . '</' . $font_container_data['values']['tag'] . '>';
     if ($layout == '4') {
         $algin = 'left';
     } else {
         $algin = 'center';
     }
     $counter_icon = do_shortcode('[cruxstore_icon hover_div="#' . $uniqid . ':hover .iconbox-ct" type = "' . $icon_type . '" image = "' . $icon_image . '" icon = "' . $icon_icon . '" size = "' . $icon_size . '" color = "' . $icon_color . '" custom_color = "' . $icon_custom_color . '" color_hover = "' . $icon_color_hover . '" custom_color_hover = "' . $icon_custom_color_hover . '" align="' . $algin . '"]');
     if ($layout == '3') {
         $output = $counter_content . $counter_icon . $counter_text;
     } else {
         $output = $counter_icon . $counter_content . $counter_text;
     }
     $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
     return '<div class="' . esc_attr($elementClass) . '">' . $output . '</div>';
 }
开发者ID:websideas,项目名称:Mondova,代码行数:66,代码来源:counter.php


示例11: content

 protected function content($atts, $content = null)
 {
     $atts = shortcode_atts(array('title' => esc_html__('Title', 'js_composer'), 'word' => 'false', 'line_color' => '#333333', 'border_width' => '1', 'line_width' => '', 'line_style' => '', 'size' => 'md', 'color' => 'grey', 'custom_color' => '', 'icon' => '', 'image' => '', 'spacer_position' => 'middle', 'spacer' => '', 'align' => 'center', 'font_size' => '', 'line_height' => '', 'letter_spacing' => '', 'font_container' => '', 'use_theme_fonts' => 'yes', 'google_fonts' => '', 'font_option' => '', 'css_animation' => '', 'animation_delay' => '', 'el_class' => '', 'css' => ''), $atts);
     // This is needed to extract $font_container_data and $google_fonts_data
     extract($this->getAttributes($atts));
     unset($font_container_data['values']['text_align']);
     $atts = vc_map_get_attributes($this->getShortcode(), $atts);
     extract($atts);
     extract($this->getStyles($el_class, $css, $google_fonts_data, $font_container_data, $atts));
     $settings = get_option('wpb_js_google_fonts_subsets');
     if (is_array($settings) && !empty($settings)) {
         $subsets = '&subset=' . implode(',', $settings);
     } else {
         $subsets = '';
     }
     if (isset($google_fonts_data['values']['font_family'])) {
         wp_enqueue_style('vc_google_fonts_' . vc_build_safe_css_class($google_fonts_data['values']['font_family']), '//fonts.googleapis.com/css?family=' . $google_fonts_data['values']['font_family'] . $subsets);
     }
     if (!empty($styles)) {
         $styles = array();
     }
     $font_option = explode(',', $font_option);
     if (in_array('uppercase', $font_option)) {
         $styles[] = 'text-transform: uppercase;';
     }
     if (in_array('underline', $font_option)) {
         $styles[] = 'text-decoration: underline;';
     }
     if (in_array('italic', $font_option)) {
         $styles[] = 'font-style: italic;';
     }
     if ($letter_spacing) {
         $styles[] = 'letter-spacing: ' . $letter_spacing . 'px';
     }
     if (count($styles)) {
         $style = 'style="' . esc_attr(implode(';', $styles)) . '"';
     } else {
         $style = '';
     }
     $output = '';
     $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'cruxstore-heading ', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'css_animation' => cruxstore_getCSSAnimation($css_animation), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '), 'align' => 'text-' . $align);
     $custom_css = '';
     $rand = 'cruxstore_heading_' . rand();
     if ($font_size) {
         $custom_css .= cruxstore_responsive_render('#' . $rand . ' .cruxstore-heading-title', 'font-size', $font_size);
     }
     if ($line_height) {
         $custom_css .= cruxstore_responsive_render('#' . $rand . ' .cruxstore-heading-title', 'line-height', $line_height);
     }
     if ($word == 'true') {
         $title_arr = preg_split("/\\s+/", $title);
         $title_arr[0] = "<span>" . $title_arr[0] . "</span>";
         $title = join(" ", $title_arr);
     }
     $title = sprintf('<%1$s class="cruxstore-heading-title" %2$s>%3$s</%1$s>', $font_container_data['values']['tag'], $style, $title);
     $content = sprintf('<div class="cruxstore-heading-content">%s</div>', $content);
     $divider = '';
     if ($spacer) {
         $elementClass['spacer'] = 'cruxstore-heading-' . $spacer_position;
         $divider_content = '';
         $divider_class = array('cruxstore-heading-spacer', 'cruxstore-heading-' . $spacer);
         $styles_divider = array();
         if (!$line_style) {
             $line_style = 'solid';
         }
         if (!$border_width) {
             $border_width = 1;
         }
         if ($spacer == 'line') {
             $styles_divider[] = 'border-color: ' . $line_color;
             $styles_divider[] = 'border-top-width: ' . intval($border_width) . 'px';
             $styles_divider[] = 'border-top-style: ' . $line_style;
             if ($line_width) {
                 $styles_diver[] = 'width: ' . intval($line_width) . 'px';
             }
         } elseif ($spacer == 'icon') {
             if ($icon) {
                 $icon_style = '';
                 $icon_class = array('iconbox-ct', 'size-' . $size);
                 if ($color != '' && $color != 'custom') {
                     $icon_class[] = 'color-' . $color;
                     $custom_color = cruxstore_color2Hex($color);
                 }
                 if ($custom_color) {
                     $icon_style .= 'color: ' . $custom_color . ';';
                 }
                 if ($icon_style) {
                     $icon_style = sprintf('style="%s"', $icon_style);
                 }
                 $divider_content = sprintf('<span class="%s %s" %s></span>', $icon, implode(' ', $icon_class), $icon_style);
             }
         } elseif ($spacer == 'image') {
             $img_id = preg_replace('/[^\\d]/', '', $image);
             $img_url = wp_get_attachment_image_src($img_id, 'full');
             if (array($img_url)) {
                 $icon = sprintf('<img src="%s" class="img-responsive" alt="" />', $img_url['0']);
             }
             $divider_content = sprintf('<span class="%s">%s</span>', 'icon-image', $icon);
         }
         $styles_divider = 'style="' . esc_attr(implode(';', $styles_divider)) . '"';
//.........这里部分代码省略.........
开发者ID:websideas,项目名称:Mondova,代码行数:101,代码来源:heading.php


示例12: content

 protected function content($atts, $content = null)
 {
     $atts = shortcode_atts(array('title' => esc_html__('Title', 'js_composer'), 'link' => '', 'skin' => '', 'readmore' => '', 'use_theme_fonts' => 'true', 'font_container' => '', 'google_fonts' => '', 'letter_spacing' => '0', 'icon_hover_div' => '', 'icon_type' => 'icon', 'icon_image' => '', 'icon_icon' => 'fa fa-adjust', 'icon_size' => 'md', 'icon_color' => '', 'icon_custom_color' => '', 'icon_color_hover' => '', 'icon_custom_color_hover' => '', 'icon_background_style' => 'default', 'icon_background_color' => 'grey', 'icon_custom_background_color' => '', 'icon_background_color_hover' => '', 'icon_custom_background_color_hover' => '', 'icon_box_layout' => '1', 'boxed_background_color' => 'grey', 'boxed_border_color' => 'grey', 'boxed_custom_background_color' => '', 'boxed_custom_border_color' => '', 'el_class' => '', 'css_animation' => '', 'animation_delay' => '', 'css' => ''), $atts);
     extract($atts);
     $custom_css = $output = $style_title = '';
     $uniqid = 'features-box-' . uniqid();
     $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'feature-box', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'css_animation' => cruxstore_getCSSAnimation($css_animation), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '), 'layout' => 'layout-' . $icon_box_layout, 'size' => 'size-' . $icon_size);
     if ($icon_background_style == 'default') {
         $elementClass['style'] = 'style-' . $icon_background_style;
     }
     if ($skin) {
         $elementClass['skin'] = 'skin-' . $skin;
     }
     extract($this->getAttributes($atts));
     unset($font_container_data['values']['text_align']);
     $styles = array();
     extract($this->getStyles($el_class, $css, $google_fonts_data, $font_container_data, $atts));
     $settings = get_option('wpb_js_google_fonts_subsets');
     $subsets = '';
     if (is_array($settings) && !empty($settings)) {
         $subsets = '&subset=' . implode(',', $settings);
     }
     if (!empty($google_fonts_data) && isset($google_fonts_data['values']['font_family'])) {
         wp_enqueue_style('vc_google_fonts_' . vc_build_safe_css_class($google_fonts_data['values']['font_family']), '//fonts.googleapis.com/css?family=' . $google_fonts_data['values']['font_family'] . $subsets);
     }
     if ($letter_spacing) {
         $styles[] = 'letter-spacing: ' . $letter_spacing . 'px;';
     }
     if (!empty($styles)) {
         $style_title .= 'style="' . esc_attr(implode(';', $styles)) . '"';
     }
     if ($icon_box_layout == '2' || $icon_box_layout == '3' || $icon_box_layout == '4') {
         $icon_align = 'center';
     } else {
         $icon_align = 'left';
     }
     if ($icon_box_layout == '3' || $icon_box_layout == '4' || $icon_box_layout == '6') {
         $elementClass['boxed'] = 'background-' . $boxed_background_color;
     }
     if ($icon_box_layout == '4') {
         $elementClass['border'] = 'border-' . $boxed_border_color;
     }
     $icon_box_icon = do_shortcode('[cruxstore_icon hover_div="#' . $uniqid . ':hover .iconbox-ct" link="' . $link . '" type = "' . $icon_type . '" image = "' . $icon_image . '" icon = "' . $icon_icon . '" size = "' . $icon_size . '" color = "' . $icon_color . '" custom_color = "' . $icon_custom_color . '" color_hover = "' . $icon_color_hover . '" custom_color_hover = "' . $icon_custom_color_hover . '" background_style = "' . $icon_background_style . '" background_color = "' . $icon_background_color . '" custom_background_color = "' . $icon_custom_background_color . '" background_color_hover = "' . $icon_background_color_hover . '" custom_background_color_hover = "' . $icon_custom_background_color_hover . '" align="' . $icon_align . '"]');
     if ($icon_box_icon) {
         $icon_box_icon = '<div class="feature-box-icon">' . $icon_box_icon . '</div>';
     }
     $icon_readmore = '';
     $link = $link == '||' ? '' : $link;
     if ($link) {
         $link = vc_build_link($link);
         $a_href = $link['url'];
         $a_title = $link['title'];
         $a_target = $link['target'];
         $icon_box_link = array('href="' . esc_attr($a_href) . '"', 'title="' . esc_attr($a_title) . '"', 'target="' . esc_attr($a_target) . '"');
         if ($title) {
             $style_link = '';
             if (isset($font_container_data['values']['color'])) {
                 $style_link .= ' style="color: ' . $font_container_data['values']['color'] . '"';
             }
             $title = '<a ' . implode(' ', $icon_box_link) . $style_link . '>' . $title . '</a>';
         }
         $icon_readmore = '<div class="feature-box-readmore"><a ' . implode(' ', $icon_box_link) . '>' . $readmore . '</a></div>';
     }
     $icon_box_title = $title ? '<' . $font_container_data['values']['tag'] . ' class="feature-box-title" ' . $style_title . '>' . $title . '</' . $font_container_data['values']['tag'] . '>' : '';
     $icon_box_content = $content ? '<div class="feature-box-content">' . $content . '</div>' : '';
     $output .= $icon_box_icon . $icon_box_title . $icon_box_content . $icon_readmore;
     if ($custom_css) {
         $custom_css = '<div class="cruxstore_custom_css" data-css="' . esc_attr($custom_css) . '"></div>';
     }
     if ($animation_delay) {
         $animation_delay = sprintf(' data-wow-delay="%sms"', $animation_delay);
     }
     $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
     return '<div id="' . $uniqid . '" class="' . esc_attr($elementClass) . '"' . $animation_delay . '><div class="feature-box-inner">' . $output . $custom_css . '</div></div>';
 }
开发者ID:websideas,项目名称:Mondova,代码行数:75,代码来源:icon_box.php


示例13: content

 protected function content($atts, $content = null)
 {
     $atts = shortcode_atts(array('title' => '', 'image' => '', 'link' => '', 'link_text' => '', 'link_color' => 'default', 'img_size' => 'full', 'align' => 'center', 'skin' => '', 'overlay' => '', 'position' => 'middle', 'style' => 1, 'font_container' => '', 'use_theme_fonts' => 'yes', 'google_fonts' => '', 'font_size' => '', 'line_height' => '', 'letter_spacing' => '', 'font_option' => '', 'css_animation' => '', 'animation_delay' => '', 'el_class' => '', 'css' => ''), $atts);
     // This is needed to extract $font_container_data and $google_fonts_data
     extract($this->getAttributes($atts));
     unset($font_container_data['values']['text_align']);
     $atts = vc_map_get_attributes($this->getShortcode(), $atts);
     extract($atts);
     extract($this->getStyles($el_class, $css, $google_fonts_data, $font_container_data, $atts));
     $settings = get_option('wpb_js_google_fonts_subsets');
     if (is_array($settings) && !empty($settings)) {
         $subsets = '&subset=' . implode(',', $settings);
     } else {
         $subsets = '';
     }
     if (isset($google_fonts_data['values']['font_family'])) {
         wp_enqueue_style('vc_google_fonts_' . vc_build_safe_css_class($google_fonts_data['values']['font_family']), '//fonts.googleapis.com/css?family=' . $google_fonts_data['values']['font_family'] . $subsets);
     }
     if (!empty($styles)) {
         $styles = array();
     }
     $font_option = explode(',', $font_option);
     if (in_array('uppercase', $font_option)) {
         $styles[] = 'text-transform: uppercase;';
     }
     if (in_array('underline', $font_option)) {
         $styles[] = 'text-decoration: underline;';
    

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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