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

PHP vc_gitem_create_link函数代码示例

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

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



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

示例1: die

<?php

if (!defined('ABSPATH')) {
    die('-1');
}
/** @var $this WPBakeryShortCode_VC_Icon */
$icon = $color = $size = $align = $el_class = $custom_color = $link = $background_style = $background_color = $type = $icon_fontawesome = $icon_openiconic = $icon_typicons = $icon_entypoicons = $icon_linecons = $custom_background_color = '';
/** @var array $atts - shortcode attributes */
$atts = vc_map_get_attributes($this->getShortcode(), $atts);
extract($atts);
$link = vc_gitem_create_link($atts, 'vc_icon_element-link');
$class_to_filter = $this->getCSSAnimation($css_animation);
$class_to_filter .= vc_shortcode_custom_css_class($css, ' ') . $this->getExtraClass($el_class);
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts);
// Enqueue needed icon font.
vc_icon_element_fonts_enqueue($type);
$has_style = false;
if (strlen($background_style) > 0) {
    $has_style = true;
    if (false !== strpos($background_style, 'outline')) {
        $background_style .= ' vc_icon_element-outline';
        // if we use outline style it is border in css
    } else {
        $background_style .= ' vc_icon_element-background';
    }
}
$style = '';
if ('custom' === $background_color) {
    if (false !== strpos($background_style, 'outline')) {
        $style = 'border-color:' . $custom_background_color;
    } else {
开发者ID:arkev,项目名称:IntelligentMode,代码行数:31,代码来源:vc_icon.php


示例2: extract

<?php

/**
 * Shortcode attributes
 * @var $atts
 * Shortcode class
 * @var $this WPBakeryShortCode_VC_Gitem_Post_Data
 */
$output = $text = $google_fonts = $font_container = $el_class = $css = $google_fonts_data = $font_container_data = $link_html = '';
extract($this->getAttributes($atts));
extract($this->getStyles($el_class, $css, $google_fonts_data, $font_container_data, $atts));
$data_source = $this->getDataSource($atts);
if (isset($atts['link']) && '' !== $atts['link'] && 'none' !== $atts['link']) {
    $link_html = vc_gitem_create_link($atts);
}
$use_custom_fonts = isset($atts['use_custom_fonts']) && 'yes' === $atts['use_custom_fonts'];
$settings = get_option('wpb_js_google_fonts_subsets');
$subsets = '';
if (is_array($settings) && !empty($settings)) {
    $subsets = '&subset=' . implode(',', $settings);
}
$content = '{{ post_data:' . esc_attr($data_source) . ' }}';
if (!empty($link_html)) {
    $content = '<' . $link_html . '>' . $content . '</a>';
}
$css_class .= ' vc_gitem-post-data';
if ($data_source) {
    $css_class .= ' vc_gitem-post-data-source-' . $data_source;
}
if ($use_custom_fonts && !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);
开发者ID:Sibzsolutions,项目名称:Schiffrinpa,代码行数:31,代码来源:vc_gitem_post_data.php


示例3: extract

<?php

/**
 * @var $this WPBakeryShortCode_VC_Custom_heading
 */
$output = $text = $google_fonts = $font_container = $el_class = $css = $google_fonts_data = $font_container_data = '';
extract($this->getAttributes($atts));
$link = vc_gitem_create_link($atts);
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($link)) {
    $text = '<' . $link . '>' . $text . '</a>';
}
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 .= '<div class="' . esc_attr($css_class) . '" >';
$style = '';
if (!empty($styles)) {
    $style = 'style="' . esc_attr(implode(';', $styles)) . '"';
}
$output .= '<' . $font_container_data['values']['tag'] . ' ' . $style . ' >';
$output .= $text;
$output .= '</' . $font_container_data['values']['tag'] . '>';
$output .= '</div>';
echo $output;
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:30,代码来源:vc_custom_heading.php


示例4: switch

switch ($source) {
    case 'media_library':
        $img = wpb_getImageBySize(array('attach_id' => $img_id, 'thumb_size' => $img_size, 'class' => 'vc_single_image-img'));
        break;
    case 'external_link':
        $dimensions = vcExtractDimensions($img_size);
        $hwstring = $dimensions ? image_hwstring($dimensions[0], $dimensions[1]) : '';
        $custom_src = $custom_src ? esc_attr($custom_src) : $default_src;
        $img = array('thumbnail' => '<img class="vc_single_image-img" ' . $hwstring . ' src="' . $custom_src . '" />');
        break;
    default:
        $img = false;
}
if (!$img) {
    $img['thumbnail'] = '<img class="vc_single_image-img" src="' . $default_src . '" />';
}
$wrapperClass = 'vc_single_image-wrapper ' . $style . ' ' . $border_color;
$link = vc_gitem_create_link($atts, $wrapperClass);
$image_string = !empty($link) ? '<' . $link . '>' . $img['thumbnail'] . '</a>' : '<div class="' . $wrapperClass . '"> ' . $img['thumbnail'] . ' </div>';
$class_to_filter = 'wpb_single_image wpb_content_element vc_align_' . $alignment . ' ' . $this->getCSSAnimation($css_animation);
$class_to_filter .= vc_shortcode_custom_css_class($css, ' ') . $this->getExtraClass($el_class);
$css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts);
$output = '
	<div class="' . esc_attr($css_class) . '">
		' . wpb_widget_title(array('title' => $title, 'extraclass' => 'wpb_singleimage_heading')) . '
		<figure class="wpb_wrapper vc_figure">
			' . $image_string . '
		</figure>
	</div>
';
echo $output;
开发者ID:arkev,项目名称:IntelligentMode,代码行数:31,代码来源:vc_single_image.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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