当前位置: 首页>>代码示例>>PHP>>正文


PHP vc_asset_url函数代码示例

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


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

示例1: content

 protected function content($atts, $content = null)
 {
     extract(shortcode_atts(array('title' => '', 'suffix' => '', 'prefix' => '', 'image' => '', 'link' => '', 'img_size' => 'thumbnail', 'align' => 'center', 'el_class' => '', 'css' => '', 'style' => '1', 'overlay' => '', 'position' => 'middle'), $atts));
     $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'banner ', $this->settings['base'], $atts), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '), 'extra' => $this->getExtraClass($el_class), 'style' => 'style' . $style, 'overlay' => 'banner-' . $overlay, 'align' => 'banner-' . $align, 'position' => 'position-' . $position);
     $banner_link = '';
     $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 = $img['thumbnail'];
     $suffix = $suffix ? '<p class="banner-suffix">' . $suffix . '</p>' : '';
     $prefix = $prefix ? '<p class="banner-prefix">' . $prefix . '</p>' : '';
     $output .= sprintf('<div class="banner-content">%s<h3 class="banner-title">%s</h3>%s</div>', $suffix, $title, $prefix);
     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) . '"');
         $banner_link = '<a class="banner-link" ' . implode(' ', $icon_box_link) . '></a>';
     }
     $output .= $banner_link;
     $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
     return '<div class="' . esc_attr($elementClass) . '">' . $output . '</div>';
 }
开发者ID:websideas,项目名称:Mondova,代码行数:26,代码来源:banner.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: addPlaceholderImage

 public function addPlaceholderImage($img)
 {
     if (NULL === $img || false === $img) {
         $img = array('thumbnail' => '<img class="vc_img-placeholder vc_single_image-img" src="' . vc_asset_url('vc/vc_gitem_image.png') . '" />');
     }
     return $img;
 }
开发者ID:syncopetwice,项目名称:STG,代码行数:7,代码来源:class-vc-grid-item-preview.php

示例4: check_vc

 function check_vc($content)
 {
     if (class_exists('Vc_Base')) {
         global $post;
         $course_status = vibe_get_option('start_course');
         $force_include_pages = apply_filters('wplms_vc_force_include_pages', array($course_status));
         $force_include_post_types = apply_filters('wplms_vc_force_include_custom_post_types', array('course', 'unit', 'quiz', 'question'));
         if (in_array($post->ID, $force_include_pages) || in_array($post->post_type, $force_include_post_types)) {
             if (strpos($content, 'vc_row')) {
                 /*
                 wp_register_style( 'js_composer_front', vc_asset_url( 'css/js_composer.min.css' ), array(), WPB_VC_VERSION );
                 			    	wp_register_script( 'wpb_composer_front_js', vc_asset_url( 'js/dist/js_composer_front.min.js' ), array( 'jquery' ), WPB_VC_VERSION, true );
                 			    	wp_enqueue_style( 'js_composer_front');
                 			    	wp_enqueue_script( 'wpb_composer_front_js');
                 */
                 echo "<link rel='stylesheet' id='swiftype-css' href='" . vc_asset_url('css/js_composer.min.css') . "' type='text/css' media='all'/>";
                 echo "<script type='text/javascript' src='" . vc_asset_url('js/dist/js_composer_front.min.js') . "'></script>";
                 global $vc_manager;
                 foreach (WPBMap::getShortCodes() as $sc_base => $el) {
                     $vc_manager->shortcodes[$sc_base] = new WPBakeryShortCodeFishBones($el);
                 }
             }
         }
     }
     return $content;
 }
开发者ID:nikitansk,项目名称:devschool,代码行数:26,代码来源:bp-course-filters.php

示例5: addImage

 public function addImage($img)
 {
     if (empty($img)) {
         $img = '<img src="' . vc_asset_url('vc/vc_gitem_image.png') . '" alt="">';
     }
     return $img;
 }
开发者ID:chicosilva,项目名称:olharambiental,代码行数:7,代码来源:class-vc-grid-item-preview.php

示例6: shortcodeScripts

 /**
  * Register scripts and styles for pager
  */
 public function shortcodeScripts()
 {
     wp_register_script('vc_pageable_owl-carousel', vc_asset_url('lib/owl-carousel2-dist/owl.carousel.min.js'), array('jquery'), WPB_VC_VERSION, true);
     wp_register_script('waypoints', vc_asset_url('lib/waypoints/waypoints.min.js'), array('jquery'), WPB_VC_VERSION, true);
     wp_register_style('vc_pageable_owl-carousel-css', vc_asset_url('lib/owl-carousel2-dist/assets/owl.min.css'), array(), WPB_VC_VERSION, false);
     wp_register_style('animate-css', vc_asset_url('lib/bower/animate-css/animate.min.css'), array(), WPB_VC_VERSION, false);
 }
开发者ID:k2jysy,项目名称:wedev,代码行数:10,代码来源:class-vc-pageable.php

示例7: singleParamHtmlHolder

 public function singleParamHtmlHolder($param, $value)
 {
     $output = '';
     // Compatibility fixes
     $old_names = array('yellow_message', 'blue_message', 'green_message', 'button_green', 'button_grey', 'button_yellow', 'button_blue', 'button_red', 'button_orange');
     $new_names = array('alert-block', 'alert-info', 'alert-success', 'btn-success', 'btn', 'btn-info', 'btn-primary', 'btn-danger', 'btn-warning');
     $value = str_ireplace($old_names, $new_names, $value);
     $param_name = isset($param['param_name']) ? $param['param_name'] : '';
     $type = isset($param['type']) ? $param['type'] : '';
     $class = isset($param['class']) ? $param['class'] : '';
     if ('attach_image' === $param['type'] && 'image' === $param_name) {
         $output .= '<input type="hidden" class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" value="' . $value . '" />';
         $element_icon = $this->settings('icon');
         $img = wpb_getImageBySize(array('attach_id' => (int) preg_replace('/[^\\d]/', '', $value), 'thumb_size' => 'thumbnail'));
         $this->setSettings('logo', ($img ? $img['thumbnail'] : '<img width="150" height="150" src="' . vc_asset_url('vc/blank.gif') . '" class="attachment-thumbnail vc_element-icon"  data-name="' . $param_name . '" alt="" title="" style="display: none;" />') . '<span class="no_image_image vc_element-icon' . (!empty($element_icon) ? ' ' . $element_icon : '') . ($img && !empty($img['p_img_large'][0]) ? ' image-exists' : '') . '" /><a href="#" class="column_edit_trigger' . ($img && !empty($img['p_img_large'][0]) ? ' image-exists' : '') . '">' . __('Add image', 'js_composer') . '</a>');
         $output .= $this->outputTitleTrue($this->settings['name']);
     } elseif (!empty($param['holder'])) {
         if ($param['holder'] === 'input') {
             $output .= '<' . $param['holder'] . ' readonly="true" class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" value="' . $value . '">';
         } elseif (in_array($param['holder'], array('img', 'iframe'))) {
             $output .= '<' . $param['holder'] . ' class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" src="' . $value . '">';
         } elseif ($param['holder'] !== 'hidden') {
             $output .= '<' . $param['holder'] . ' class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '">' . $value . '</' . $param['holder'] . '>';
         }
     }
     if (!empty($param['admin_label']) && $param['admin_label'] === true) {
         $output .= '<span class="vc_admin_label admin_label_' . $param['param_name'] . (empty($value) ? ' hidden-label' : '') . '"><label>' . $param['heading'] . '</label>: ' . $value . '</span>';
     }
     return $output;
 }
开发者ID:VitaAprel,项目名称:mynotebook,代码行数:30,代码来源:vc-single-image.php

示例8: singleParamHtmlHolder

 public function singleParamHtmlHolder($param, $value)
 {
     $output = '';
     // Compatibility fixes
     $old_names = array('yellow_message', 'blue_message', 'green_message', 'button_green', 'button_grey', 'button_yellow', 'button_blue', 'button_red', 'button_orange');
     $new_names = array('alert-block', 'alert-info', 'alert-success', 'btn-success', 'btn', 'btn-info', 'btn-primary', 'btn-danger', 'btn-warning');
     $value = str_ireplace($old_names, $new_names, $value);
     $param_name = isset($param['param_name']) ? $param['param_name'] : '';
     $type = isset($param['type']) ? $param['type'] : '';
     $class = isset($param['class']) ? $param['class'] : '';
     if (isset($param['holder']) && 'hidden' !== $param['holder']) {
         $output .= '<' . $param['holder'] . ' class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '">' . $value . '</' . $param['holder'] . '>';
     }
     if ('images' === $param_name) {
         $images_ids = empty($value) ? array() : explode(',', trim($value));
         $output .= '<ul class="attachment-thumbnails' . (empty($images_ids) ? ' image-exists' : '') . '" data-name="' . $param_name . '">';
         foreach ($images_ids as $image) {
             $img = wpb_getImageBySize(array('attach_id' => (int) $image, 'thumb_size' => 'thumbnail'));
             $output .= $img ? '<li>' . $img['thumbnail'] . '</li>' : '<li><img width="150" height="150" test="' . $image . '" src="' . vc_asset_url('vc/blank.gif') . '" class="attachment-thumbnail" alt="" title="" /></li>';
         }
         $output .= '</ul>';
         $output .= '<a href="#" class="column_edit_trigger' . (!empty($images_ids) ? ' image-exists' : '') . '">' . __('Add images', 'js_composer') . '</a>';
     }
     return $output;
 }
开发者ID:severnrescue,项目名称:web,代码行数:25,代码来源:vc-gallery.php

示例9: addImageUrl

 public function addImageUrl($url)
 {
     if (empty($url)) {
         $url = vc_asset_url('vc/vc_gitem_image.png');
     }
     return $url;
 }
开发者ID:rovak73,项目名称:sinfronterasdoc,代码行数:7,代码来源:class-vc-grid-item-preview.php

示例10: content

 protected function content($atts, $content = null)
 {
     extract(shortcode_atts(array('name' => '', 'image' => '', 'image_size' => 'full', 'agency' => '', 'facebook_link' => '', 'twitter_link' => '', 'dribbble_link' => '', 'linkedin_link' => '', 'el_class' => '', 'css' => ''), $atts));
     $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'team ', $this->settings['base'], $atts), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '), 'extra' => $this->getExtraClass($el_class));
     $elementClass = preg_replace(array('/\\s+/', '/^\\s|\\s$/'), array(' ', ''), implode(' ', $elementClass));
     $img_id = preg_replace('/[^\\d]/', '', $image);
     $img = wpb_getImageBySize(array('attach_id' => $img_id, 'thumb_size' => $image_size, 'class' => 'vc_single_image-img img-responsive team-avatar'));
     if ($img == null) {
         $img['thumbnail'] = '<img class="vc_img-placeholder vc_single_image-img team-avatar" src="' . vc_asset_url('vc/no_image.png') . '" />';
     }
     $output = '';
     $socials = array('<i class="fa fa-facebook"></i>' => $facebook_link, '<i class="fa fa-twitter"></i>' => $twitter_link, '<i class="fa fa-dribbble"></i>' => $dribbble_link, '<i class="fa fa-linkedin"></i>' => $linkedin_link);
     if ($name) {
         $output .= '<div class="' . $elementClass . '">';
         $output .= $img['thumbnail'];
         $output .= '<div class="team-attr">';
         $output .= '<h4 class="name">' . $name . '</h4>';
         $output .= '<div class="agency">' . $agency . '</div>';
         if ($facebook_link || $twitter_link || $dribbble_link || $linkedin_link) {
             $output .= '<ul class="clearfix">';
             foreach ($socials as $key => $value) {
                 if ($value) {
                     $output .= '<li><a href="' . $value . '">' . $key . '</a></li>';
                 }
             }
             $output .= '</ul>';
         }
         $output .= '</div>';
         $output .= '</div>';
     }
     return $output;
 }
开发者ID:websideas,项目名称:Mondova,代码行数:32,代码来源:team.php

示例11: shortcodeScripts

 public function shortcodeScripts()
 {
     parent::shortcodeScripts();
     wp_register_script('vc_masonry', vc_asset_url('lib/bower/masonry/dist/masonry.pkgd.min.js'));
     wp_register_script('vc_grid-style-all-masonry', vc_asset_url('js/components/vc_grid_style_all_masonry.js'), array('vc_grid-style-all'), WPB_VC_VERSION, true);
     wp_register_script('vc_grid-style-lazy-masonry', vc_asset_url('js/components/vc_grid_style_lazy_masonry.js'), array('vc_grid-style-all'), WPB_VC_VERSION, true);
     wp_register_script('vc_grid-style-load-more-masonry', vc_asset_url('js/components/vc_grid_style_load_more_masonry.js'), array('vc_grid-style-all'), WPB_VC_VERSION, true);
 }
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:8,代码来源:vc-masonry-grid.php

示例12: vc_page_editable_enqueue_pointer_scripts

function vc_page_editable_enqueue_pointer_scripts()
{
    if (vc_is_page_editable()) {
        wp_enqueue_style('wp-pointer');
        wp_enqueue_script('wp-pointer');
        // Add pointers script to queue. Add custom script.
        wp_enqueue_script('vc_pointer-message', vc_asset_url('js/lib/vc-pointers/vc-pointer-message.js'), array('jquery', 'underscore', 'wp-pointer'), WPB_VC_VERSION, true);
    }
}
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:9,代码来源:vc-pointers-frontend-editor.php

示例13: shortcodeScripts

 /**
  * Register scripts and styles for pager
  */
 public function shortcodeScripts()
 {
     wp_register_script('vc_pageable_owl-carousel', vc_asset_url('lib/owl-carousel2-dist/owl.carousel.js'), array('jquery'), WPB_VC_VERSION, true);
     wp_register_script('waypoints', vc_asset_url('lib/waypoints/waypoints.min.js'), array('jquery'), WPB_VC_VERSION, true);
     //wp_register_script( 'waypoints-infinite', vc_asset_url( 'lib/jquery-waypoints/shortcuts/infinite-scroll/waypoints-infinite.js' ), array( 'jquery', 'waypoints' ), WPB_VC_VERSION, true );
     wp_register_style('vc_pageable_owl-carousel-css', vc_asset_url('lib/owl-carousel2-dist/assets/owl.carousel.css'), array(), WPB_VC_VERSION, false);
     wp_register_style('vc_pageable_owl-carousel-css-theme', vc_asset_url('lib/owl-carousel2-dist/assets/owl.theme.default.css'), array(), WPB_VC_VERSION, false);
     //wp_register_script( 'jquery-mousewheel', vc_asset_url( 'lib/jquery-mousewheel/jquery.mousewheel.js' ), array( 'jquery' ), WPB_VC_VERSION, false );
     wp_register_style('animate-css', vc_asset_url('lib/animate-css/animate.css'), array(), WPB_VC_VERSION, false);
 }
开发者ID:chicosilva,项目名称:olharambiental,代码行数:13,代码来源:class-vc-pageable.php

示例14: shortcodeScripts

 public function shortcodeScripts()
 {
     parent::shortcodeScripts();
     wp_register_script('vc_grid-js-imagesloaded', vc_asset_url('lib/bower/imagesloaded/imagesloaded.pkgd.min.js'));
     wp_register_script('vc_grid-style-all', vc_asset_url('js/components/vc_grid_style_all.js'), array(), WPB_VC_VERSION, true);
     wp_register_script('vc_grid-style-load-more', vc_asset_url('js/components/vc_grid_style_load_more.js'), array(), WPB_VC_VERSION, true);
     wp_register_script('vc_grid-style-lazy', vc_asset_url('js/components/vc_grid_style_lazy.js'), array('waypoints'), WPB_VC_VERSION, true);
     wp_register_script('vc_grid-style-pagination', vc_asset_url('js/components/vc_grid_style_pagination.js'), array(), WPB_VC_VERSION, true);
     wp_register_script('vc_grid', vc_asset_url('js/components/vc_grid.js'), array('jquery', 'underscore', 'vc_pageable_owl-carousel', 'waypoints', 'vc_grid-style-all', 'vc_grid-style-load-more', 'vc_grid-style-lazy', 'vc_grid-style-pagination'), WPB_VC_VERSION, true);
 }
开发者ID:AlchemyMomentum,项目名称:public_html,代码行数:10,代码来源:vc-basic-grid.php

示例15: vc_network_menu_page_build

function vc_network_menu_page_build()
{
    if (vc_user_access()->wpAny('manage_options')->part('settings')->can('vc-general-tab')->get()) {
        define('VC_PAGE_MAIN_SLUG', 'vc-general');
    } else {
        define('VC_PAGE_MAIN_SLUG', 'vc-welcome');
    }
    add_menu_page(__('Visual Composer', 'js_composer'), __('Visual Composer', 'js_composer'), 'exist', VC_PAGE_MAIN_SLUG, null, vc_asset_url('vc/visual_composer.png'), 76);
    do_action('vc_network_menu_page_build');
}
开发者ID:severnrescue,项目名称:web,代码行数:10,代码来源:pages.php


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