本文整理汇总了PHP中vc_asset_url函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_asset_url函数的具体用法?PHP vc_asset_url怎么用?PHP vc_asset_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vc_asset_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: cruxstore_get_thumbnail_callback
function cruxstore_get_thumbnail_callback()
{
$image = intval($_POST['image']);
$img_size = $_POST['size'];
$img = wpb_getImageBySize(array('attach_id' => $image, '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') . '" />';
}
echo $img['thumbnail'];
wp_die();
}
开发者ID:websideas,项目名称:Mondova,代码行数:11,代码来源:admin.php
示例17: jsCssScripts
public function jsCssScripts()
{
// wp_register_script('vc_bxslider', vc_asset_url('lib/bxslider-4/jquery.bxslider.min.js'));
// wp_register_style('vc_bxslider_css', vc_asset_url('lib/bxslider-4/jquery.bxslider.css'));
// wp_register_script('vc_swiper', vc_asset_url('lib/swiper/dist/idangerous.swiper-2.2.js'), array(), time());
// wp_register_style('vc_swiper_css', vc_asset_url('lib/swiper/dist/idangerous.swiper.css'));
wp_register_script('vc_transition_bootstrap_js', vc_asset_url('lib/vc_carousel/js/transition.js'), array(), WPB_VC_VERSION, true);
wp_register_script('vc_carousel_js', vc_asset_url('lib/vc_carousel/js/vc_carousel.js'), array('vc_transition_bootstrap_js'), WPB_VC_VERSION, true);
wp_register_style('vc_carousel_css', vc_asset_url('lib/vc_carousel/css/vc_carousel.css'), array(), WPB_VC_VERSION);
// try bootstap http://jsfiddle.net/HHsxc/2/
}
开发者ID:epiii,项目名称:aros,代码行数:11,代码来源:vc-images-carousel.php
示例18: render
function render()
{
$output = '<div class="vc-css-editor row vc-row" data-css-editor="true">';
$output .= $this->onionLayout();
$output .= '<div class="col-xs-5 vc_span5 vc-settings">' . ' <label>' . __('Border', 'js_composer') . '</label> ' . ' <div class="color-group"><input type="text" name="border_color" value="" class="vc-color-control"></div>' . ' <div class="vc-border-style"><select name="border_style" class="vc-border-style">' . $this->getBorderStyleOptions() . '</select></div>' . ' <label>' . __('Background', 'js_composer') . '</label>' . ' <div class="color-group"><input type="text" name="background_color" value="" class="vc-color-control"></div>' . ' <div class="vc-background-image">' . $this->getBackgroundImageControl() . '<div class="clearfix"></div></div>' . ' <div class="vc-background-style"><select name="background_style" class="vc-background-style">' . $this->getBackgroundStyleOptions() . '</select></div>' . ' <label>' . __('Box controls', 'js_composer') . '</label>' . ' <label class="vc-checkbox"><input type="checkbox" name="simply" class="vc-simplify" value=""> ' . __('Simplify controls', 'js_composer') . '</label>' . '</div>';
$output .= '<input name="' . $this->setting('param_name') . '" class="wpb_vc_param_value ' . $this->setting('param_name') . ' ' . $this->setting('type') . '_field" type="hidden" value="' . esc_attr($this->value()) . '"/>';
$output .= '</div><div class="clearfix"></div>';
$output .= '<script type="text/html" id="vc-css-editor-image-block">' . '<li class="added">' . ' <div class="inner" style="width: 75px; height: 75px; overflow: hidden;text-align: center;">' . ' <img src="{{ img.url }}?id={{ img.id }}" data-image-id="{{ img.id }}" class="vc-ce-image<# if(!_.isUndefined(img.css_class)) {#> {{ img.css_class }}<# }#>">' . ' </div>' . ' <a href="#" class="icon-remove"></a>' . '</li>' . '</script>';
$output .= '<script type="text/javascript" src="' . vc_asset_url('js/params/css_editor.js') . '"></script>';
return apply_filters('vc_css_editor', $output);
}
开发者ID:Vatia13,项目名称:tofido,代码行数:11,代码来源:css_editor.php
示例19: setItemsIfEmpty
public function setItemsIfEmpty($items)
{
if (empty($items)) {
require_once vc_path_dir('PARAMS_DIR', 'vc_grid_item/class-vc-grid-item.php');
$grid_item = new Vc_Grid_Item();
$grid_item->setGridAttributes($this->atts);
$grid_item->shortcodes();
$item = '[vc_gitem]<img src="' . vc_asset_url('vc/vc_gitem_image.png') . '">[/vc_gitem]';
$grid_item->parseTemplate($item);
$items = str_repeat($grid_item->renderItem(get_post((int) vc_request_param('vc_post_id'))), 3);
}
return $items;
}
开发者ID:Sibzsolutions,项目名称:Schiffrinpa,代码行数:13,代码来源:vc-media-grid.php
示例20: vc_pointer_load
function vc_pointer_load($hook_suffix = '')
{
global $vc_pointers;
// Don't run on WP < 3.3
if (get_bloginfo('version') < '3.3') {
return;
}
$screen = get_current_screen();
$screen_id = $screen->id;
// Get pointers for this screen
$pointers = apply_filters('vc-ui-pointers', array());
$pointers = apply_filters('vc_ui-pointers-' . $screen_id, $pointers);
if (!$pointers || !is_array($pointers)) {
return;
}
// Get dismissed pointers
$dismissed = explode(',', (string) get_user_meta(get_current_user_id(), 'dismissed_wp_pointers', true));
$vc_pointers = array('pointers' => array());
// Check pointers and remove dismissed ones.
foreach ($pointers as $pointer_id => $pointer) {
// Sanity check
if (in_array($pointer_id, $dismissed) || empty($pointer) || empty($pointer_id) || empty($pointer['name'])) {
continue;
}
$pointer['pointer_id'] = $pointer_id;
// Add the pointer to $valid_pointers array
$vc_pointers['pointers'][] = $pointer;
}
// No valid pointers? Stop here.
if (empty($vc_pointers['pointers'])) {
return;
}
// Add pointers style to queue.
wp_enqueue_style('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);
wp_enqueue_script('vc_pointers-controller', vc_asset_url('js/lib/vc-pointers/vc-pointers-controller.js'), array('vc_pointer-message', 'wpb_js_composer_js_listeners', 'wpb_scrollTo_js'), WPB_VC_VERSION, true);
/*
wp_enqueue_script( 'vc_event-pointers-controller', vc_asset_url( 'js/lib/vc-pointers/vc-event-pointers-controller.js' ), array( 'vc_pointers-controller' ),
WPB_VC_VERSION,
true );
*/
wp_enqueue_script('vc_wp-pointer', vc_asset_url('js/lib/vc-pointers/pointers.js'), array('vc_pointers-controller'), WPB_VC_VERSION, true);
// messages
$vc_pointers['texts'] = array('finish' => __('Finish', 'js_composer'), 'next' => __('Next', 'js_composer'), 'prev' => __('Prev', 'js_composer'));
// Add pointer options to script.
wp_localize_script('vc_wp-pointer', 'vcPointer', $vc_pointers);
}
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:48,代码来源:ui-vc-pointers.php
注:本文中的vc_asset_url函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论