本文整理汇总了PHP中vc_icon_element_fonts_enqueue函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_icon_element_fonts_enqueue函数的具体用法?PHP vc_icon_element_fonts_enqueue怎么用?PHP vc_icon_element_fonts_enqueue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vc_icon_element_fonts_enqueue函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: content
protected function content($atts, $content = null)
{
$atts_extra = shortcode_atts(array('mode' => 'horitbntal', 'item_title' => '', 'show_value' => 'false', 'value' => '60', 'value_suffix' => '', 'bg_color' => '#e9e9e9', 'color' => '', 'width' => '250px', 'height' => '50px', 'border_radius' => '', 'striped' => 'no', 'class' => ''), $atts);
$atts['icon_type'] = isset($atts['icon_type']) ? $atts['icon_type'] : 'fontawesome';
$atts = array_merge($atts_extra, $atts);
if ($atts['icon_type'] == 'pe7stroke') {
wp_enqueue_style('tb-icon-pe7stroke', TB_CSS . 'Pe-icon-7-stroke.css');
} else {
vc_icon_element_fonts_enqueue($atts['icon_type']);
}
/* CSS */
wp_register_style('bootstrap-progressbar', TB_CSS . "bootstrap-progressbar.min.css", "", "0.7.0", "all");
wp_enqueue_style('bootstrap-progressbar');
/* JS */
wp_register_script('bootstrap-progressbar', TB_JS . "bootstrap-progressbar.min.js", array('jquery'), "0.7.0", true);
wp_register_script('tb-progressbar', TB_JS . "bootstrap-progressbar.tb.js", array('jquery', 'bootstrap-progressbar'), "1.0.0", true);
wp_enqueue_script('tb-progressbar');
wp_enqueue_script('waypoints');
/* Layout */
$html_id = tbHtmlID('tb-progressbar');
/* Get Icon */
$icon_name = "icon_" . $atts['icon_type'];
$atts['icon'] = isset($atts[$icon_name]) ? $atts[$icon_name] : '';
$atts['template'] = 'template-' . str_replace('.php', '', $atts['tb_template']) . ' ' . $atts['class'];
$atts['html_id'] = $html_id;
return parent::content($atts, $content);
}
开发者ID:BearsTheme,项目名称:leonard,代码行数:27,代码来源:tb_progressbar.php
示例2: waxom_counter
function waxom_counter($atts, $content = null)
{
$defaultFont = 'fontawesome';
$defaultIconClass = 'fa fa-info-circle';
extract(shortcode_atts(array("title" => 'Days', "number" => '100', "color" => 'accent', "color_custom" => '', "icon" => 'heart-o', "icon_type" => $defaultFont, "icon_fontawesome" => $defaultIconClass, "icon_typicons" => '', "icon_openiconic" => '', "icon_entypo" => '', "icon_linecons" => '', "style" => 'default'), $atts));
// Icon related
$icon = str_replace('fa-', '', $icon);
vc_icon_element_fonts_enqueue($icon_type);
$iconClass = isset(${"icon_" . $icon_type}) ? ${"icon_" . $icon_type} : $defaultIconClass;
// End Icon related
$rand_id = rand(1, 1000);
$extra_style = '';
$return = '<div id="counter-' . $rand_id . '" class="vntd-counter counter-color-' . $color . ' counter-style-' . $style . '" data-perc="' . $number . '"><div class="counter-icon"><i class="' . $iconClass . '"' . $extra_style . '></i></div>';
$return .= '<div class="counter-value"><div class="counter-number"' . $extra_style . '>0</div></div>';
$return .= '<div class="counter-title"><h6' . $extra_style . '>' . $title . '</h6></div>';
$return .= '</div>';
if ($color == 'custom' && $color_custom) {
$return .= '<style type="text/css">.counter-color-dark,
#counter-' . $rand_id . ' h6,
#counter-' . $rand_id . ' .counter-number,
#counter-' . $rand_id . ' .counter-icon {
color: ' . $color_custom . ' !important;
}
#counter-' . $rand_id . ' .counter-number:after,
#counter-' . $rand_id . ' .counter-number:before,
#counter-' . $rand_id . ' .counter-value {
border-color: ' . $color_custom . ' !important;
}
}</style>';
}
return $return;
}
开发者ID:siiiiilvio,项目名称:kadcnc,代码行数:33,代码来源:counter.php
示例3: waxom_icon_box
function waxom_icon_box($atts, $content = null)
{
$defaultFont = 'fontawesome';
$defaultIconClass = 'fa fa-info-circle';
extract(shortcode_atts(array("icon" => 'heart-o', "icon_type" => $defaultFont, "icon_fontawesome" => $defaultIconClass, "icon_typicons" => '', "icon_openiconic" => '', "icon_entypo" => '', "icon_linecons" => '', "style" => 'big-centered-icon', "title" => 'Icon Box Title', "text" => '', "url" => '', "link_button" => 'no', "link_button_label" => 'Read more', "target" => '_blank', "text_style" => 'fullwidth', "animated" => '', "icon_hover" => '', "animation_delay" => 100), $atts));
$icon = str_replace('fa-', '', $icon);
vc_icon_element_fonts_enqueue($icon_type);
$iconClass = isset(${"icon_" . $icon_type}) ? ${"icon_" . $icon_type} : $defaultIconClass;
$aligned_class = ' box';
if ($style == 'left' || $style == 'right') {
$aligned_class = ' feature-box';
}
$animated_class = $animated_data = '';
if ($animated != 'no') {
$animated_class = ' animated';
$animated_data = ' data-animation="fadeIn" data-animation-delay="' . $animation_delay . '"';
}
$url_extra_class = $icon_hover_class = '';
if ($url) {
$url_extra_class = ' icon-box-with-link';
}
if ($icon_hover != 'no' || $url) {
$icon_hover_class = ' icon-box-hover';
}
$output = '<div class="vntd-icon-box icon-box-' . $style . $animated_class . $aligned_class . $url_extra_class . $icon_hover_class . '"' . $animated_data . '>';
if ($style == 'boxed-circle') {
$output .= '<div class="icon-box-inner">';
}
if ($url) {
$output .= '<a href="' . $url . '">';
}
$output .= '<div class="icon-box-icon">';
if ($style == 'medium-left-triangle' || $style == 'medium-right-triangle' || $style == 'big-centered-triangle') {
$output .= '<div class="icon-box-triangle"></div>';
}
$output .= '<i class="' . $iconClass . '"></i>';
$output .= '</div><div class="icon-box-content">';
if ($title) {
$output .= '<h3 class="icon-box-title">' . $title . '</h3>';
}
$output .= '<p class="icon-description">' . $text . '</p>';
if ($link_button == 'yes' && $url) {
if ($style == 'boxed-circle') {
$output .= '<div class="icon-box-link-icon"><i class="fa fa-angle-right"></i></div>';
} else {
$output .= '<div class="icon-box-link-button">' . $link_button_label . ' <i class="fa fa-caret-right"></i></div>';
}
}
$output .= '</div>';
if ($url) {
$output .= '</a>';
}
if ($style == 'boxed-circle') {
$output .= '</div>';
}
$output .= '</div>';
return $output;
}
开发者ID:siiiiilvio,项目名称:kadcnc,代码行数:58,代码来源:icon-box.php
示例4: getParamIcon
/**
* @param $atts
* @param $content
*
* @return string|null
*/
public function getParamIcon($atts, $content)
{
if (!empty($atts['add_icon']) && 'true' === $atts['add_icon']) {
$iconClass = '';
if (isset($atts['i_icon_' . $atts['i_type']])) {
$iconClass = $atts['i_icon_' . $atts['i_type']];
}
vc_icon_element_fonts_enqueue($atts['i_type']);
return '<i class="vc_tta-icon ' . esc_attr($iconClass) . '"></i>';
}
return null;
}
开发者ID:lenguyenitc,项目名称:donations,代码行数:18,代码来源:vc-tta-section.php
示例5: cq_vc_beforeafter_func
function cq_vc_beforeafter_func($atts, $content = null, $tag)
{
$handleicon = $icon_fontawesome = $icon_openiconic = $icon_typicons = $icon_entypo = $icon_linecons = '';
if (version_compare(WPB_VC_VERSION, "4.6") >= 0) {
$atts = vc_map_get_attributes($tag, $atts);
extract($atts);
} else {
extract(shortcode_atts(array("handleicon" => '', "icon_fontawesome" => '', "icon_openiconic" => '', "icon_typicons" => '', "icon_entypo" => '', "icon_linecons" => '', "beforeimage" => '', "afterimage" => '', "handletooltip" => '', "link" => '', "autoslide" => '', "handlestyle" => 'lightgray', "iconcolor" => '', "extraclass" => ""), $atts));
}
$content = wpb_js_remove_wpautop($content);
// fix unclosed/unwanted paragraph tags in $content
$output = '';
if (version_compare(WPB_VC_VERSION, "4.4") >= 0) {
vc_icon_element_fonts_enqueue($handleicon);
} else {
wp_register_style('font-awesome', plugins_url('../faanimation/css/font-awesome.min.css', __FILE__));
wp_enqueue_style('font-awesome');
}
$link = vc_build_link($link);
wp_register_style('tooltipster', plugins_url('../appmockup/css/tooltipster.css', __FILE__));
wp_enqueue_style('tooltipster');
wp_register_script('tooltipster', plugins_url('../appmockup/js/jquery.tooltipster.min.js', __FILE__), array('jquery'));
wp_enqueue_script('tooltipster');
wp_register_style('vc-extensions-beforeafter-style', plugins_url('css/style.css', __FILE__));
wp_enqueue_style('vc-extensions-beforeafter-style');
wp_register_script('jquery.mobile.touch', plugins_url('js/jquery.mobile.custom.min.js', __FILE__));
wp_enqueue_script('jquery.mobile.touch');
wp_register_script('vc-extensions-beforeafter-script', plugins_url('js/init.min.js', __FILE__), array("jquery", "jquery.mobile.touch", "tooltipster"));
wp_enqueue_script('vc-extensions-beforeafter-script');
$beforeimage = wp_get_attachment_image_src($beforeimage, 'full');
$afterimage = wp_get_attachment_image_src($afterimage, 'full');
$output = '';
if ($link["url"] !== "") {
$output .= '<a href="' . $link["url"] . '" title="' . $link["title"] . '" target="' . $link["target"] . '" class="cq-beforeafter-link">';
}
$output .= '<div class="cq-beforeafter ' . $extraclass . '" data-autoslide="' . $autoslide . '" data-iconcolor="' . $iconcolor . '">';
$output .= '<img class="cq-beforeafter-img" src="' . $beforeimage[0] . '" />';
$output .= '<div class="cq-beforeafter-resize">';
$output .= '<img class="cq-beforeafter-img" src="' . $afterimage[0] . '" />';
$output .= '</div>';
$output .= '<span class="cq-beforeafter-handle ' . $handlestyle . '">';
if (version_compare(WPB_VC_VERSION, "4.4") >= 0 && isset(${'icon_' . $handleicon})) {
$output .= '<i class="' . esc_attr(${'icon_' . $handleicon}) . '" title="' . $handletooltip . '"></i> ';
} else {
$output .= '<i class="fa ' . $handleicon . '" title="' . $handletooltip . '"></i>';
}
$output .= '</span>';
$output .= '</div>';
if ($link["url"] !== "") {
$output .= '</a>';
}
return $output;
}
开发者ID:sopada85,项目名称:esquema-test,代码行数:53,代码来源:vc-extensions-beforeafter.php
示例6: waxom_button
function waxom_button($atts, $content = null)
{
$defaultFont = 'fontawesome';
$defaultIconClass = 'fa fa-info-circle';
extract(shortcode_atts(array("label" => 'Text on the button', "url" => '', "target" => '_self', "color" => 'accent', "hover" => '', "customcolor" => '', "size" => 'regular', "style" => '', "scroll" => '', "align" => '', "icon_enabled" => '', "icon" => 'heart-o', "icon_type" => $defaultFont, "icon_fontawesome" => $defaultIconClass, "icon_typicons" => '', "icon_openiconic" => '', "icon_entypo" => '', "icon_linecons" => ''), $atts));
$icon = str_replace('fa-', '', $icon);
vc_icon_element_fonts_enqueue($icon_type);
$iconClass = isset(${"icon_" . $icon_type}) ? ${"icon_" . $icon_type} : $defaultIconClass;
$custom_style = $scroll_class = $align_class = $icon_class = $icon_element = '';
if ($color == "custom") {
$custom_style .= ' style="background-color:' . $customcolor . ';border-color:' . $customcolor . ';';
if ($style == "stroke") {
$custom_style .= 'color:' . $customcolor . ';';
}
$custom_style .= '" ';
} elseif (strpos($color, '#') !== false) {
$custom_style .= ' style="background-color:' . $color . ';border-color:' . $color . ';';
if ($style == "stroke") {
$custom_style .= 'color:' . $customcolor . ';';
}
$custom_style .= '" ';
}
if ($align == 'center') {
$align_class = ' btn-center';
}
if ($scroll == 'yes') {
$scroll_class = ' scroll';
}
// Button Size
$size_class = $hover_class = '';
if ($size == 'large') {
$size_class = ' btn-large';
} elseif ($size == 'small') {
$size_class = ' btn-small';
}
if ($hover == 'accent') {
$hover_class = ' accent-hover-bg';
}
if ($icon_enabled == "yes") {
$icon_class = ' btn-icon';
$icon_element = '<i class="' . $iconClass . '"></i>';
}
if (!$style) {
$style = 'default';
}
return '<a href="' . $url . '" class="btn btn-style-' . $style . ' btn-' . esc_attr($color) . $size_class . $scroll_class . $align_class . $hover_class . $icon_class . '" target="' . $target . '"' . $custom_style . '>' . $icon_element . $label . '</a>';
}
开发者ID:siiiiilvio,项目名称:kadcnc,代码行数:47,代码来源:button.php
示例7: content
protected function content($atts, $content = null)
{
$atts_extra = shortcode_atts(array('title' => '', 'description' => '', 'content_align' => 'default', 'button_type' => 'button', 'button_text' => '', 'button_link' => '', 'icon_type' => 'fontawesome', 'icon_fontawesome' => '', 'icon_openiconic' => '', 'icon_typicons' => '', 'icon_entypoicons' => '', 'icon_linecons' => '', 'icon_entypo' => '', 'icon_pe7stroke' => '', 'description_item' => '', 'class' => ''), $atts);
$atts = array_merge($atts_extra, $atts);
$atts['icon_type'] = isset($atts['icon_type']) ? $atts['icon_type'] : 'fontawesome';
$atts['description_item'] = isset($atts['description_item']) ? $atts['description_item'] : '';
$atts['title_item'] = isset($atts['title_item']) ? $atts['title_item'] : '';
if ($atts['icon_type'] == 'pe7stroke') {
wp_enqueue_style('tb-icon-pe7stroke', TB_CSS . 'Pe-icon-7-stroke.css');
} else {
vc_icon_element_fonts_enqueue($atts['icon_type']);
}
$html_id = tbHtmlID('tb-fancy-box-single');
$atts['template'] = 'template-' . str_replace('.php', '', $atts['tb_template']) . ' content-align-' . $atts['content_align'] . ' ' . $atts['class'];
$atts['html_id'] = $html_id;
return parent::content($atts, $content);
}
开发者ID:BearsTheme,项目名称:leonard,代码行数:17,代码来源:tb_fancybox_single.php
示例8: add_shortcode_visual_carousel
function add_shortcode_visual_carousel($atts, $content = '')
{
global $shortcode_template;
$slider_source = $style = $items = $margin = $loop = $center = $stagepadding = $merge = $autowidth = $startposition = $smart_speed = $nav = $nav_type = $next_text = $prev_text = $next_icon = $prev_icon = $nav_position = $nav_align = $dots = $dots_position = $dots_align = $autoplay = $autoplay_timeout = $autoplay_hover_pause = $autoplay_speed = $nav_speed = $dots_speed = $animate_in = $animate_out = $fallback_easing = $lazyload = $mousewheel = $responsive = '';
extract(shortcode_atts(array('slider_source' => '', 'style' => 'default', 'items' => '', 'margin' => '', 'loop' => '', 'center' => '', 'stagepadding' => '', 'merge' => '', 'autowidth' => '', 'startposition' => '', 'nav' => '', 'nav_type' => '', 'next_text' => '', 'next_icon' => '', 'prev_text' => '', 'prev_icon' => '', 'nav_position' => 'bottom', 'dots_position' => 'bottom', 'nav_align' => 'left', 'dots_align' => 'right', 'dots' => '', 'autoplay' => '', 'autoplay' => '', 'autoplay_timeout' => '', 'autoplay_hover_pause' => '', 'smart_speed' => '', 'autoplay_speed' => '', 'nav_speed' => '', 'dots_speed' => '', 'responsive' => '', 'animate_out' => '', 'animate_in' => '', 'mousewheel' => ''), $atts));
$data = array('data-items' => esc_attr($items), 'data-margin' => esc_attr($margin), 'data-loop' => esc_attr($loop), 'data-center' => esc_attr($center), 'data-stagepadding' => esc_attr($stagepadding), 'data-merge' => esc_attr($merge), 'data-autowidth' => esc_attr($autowidth), 'data-startposition' => esc_attr($startposition), 'data-smart_speed' => esc_attr($smart_speed), 'data-nav' => esc_attr($nav), 'data-dots' => esc_attr($dots), 'data-autoplay_speed' => esc_attr($autoplay_speed), 'data-autoplay' => esc_attr($autoplay), 'data-autoplay_timeout' => esc_attr($autoplay_timeout), 'data-autoplay_hover_pause' => esc_attr($autoplay_hover_pause), 'data-nav_speed' => esc_attr($nav_speed), 'data-dots_speed' => esc_attr($dots_speed), 'data-animate_in' => esc_attr($animate_in), 'data-animate_out' => esc_attr($animate_out), 'data-mousewheel' => esc_attr($mousewheel), 'data-responsive' => esc_attr($responsive), 'data-mousewheel' => esc_attr($mousewheel));
$shortcode_template = $style;
/* nav custom. */
if ($nav_type) {
$data['data-next'] = esc_attr($next_text);
$data['data-prev'] = esc_attr($prev_text);
} else {
$data['data-next'] = "<i class='" . esc_attr($next_icon) . "'></i>";
$data['data-prev'] = "<i class='" . esc_attr($prev_icon) . "'></i>";
}
/* remove attributes null. */
$data = array_filter($data);
/* class */
$_class = array('visual-carousel', 'template-' . $style);
if ($nav) {
$_class[] = 'nav-' . $nav_position;
$_class[] = 'nav-' . $nav_align;
}
if ($dots) {
$_class[] = 'dots-' . $dots_position;
$_class[] = 'dots-' . $dots_align;
/* load icon fonts. */
vc_icon_element_fonts_enqueue('fontawesome');
}
$_class = apply_filters('visualcarousel/shortcodes/carousel/class', $_class);
/* if source from query. */
if ($slider_source) {
$carousel = new WP_Query($this->parse_data($slider_source));
set_query_var('carousel', $carousel);
}
/* load style. */
visual_carousel_get_template_style();
set_query_var('_class', $_class);
set_query_var('data', $data);
set_query_var('content', $content);
ob_start();
/* load template. */
visual_carousel_get_template_part('archive', 'slider');
wp_reset_postdata();
return ob_get_clean();
}
开发者ID:uxtheme,项目名称:edge-project-anything-carousel,代码行数:46,代码来源:vc.addon.php
示例9: cq_vc_bannerblock_func
function cq_vc_bannerblock_func($atts, $content = null, $tag)
{
$bannericon = $icon_fontawesome = $icon_openiconic = $icon_typicons = $icon_entypo = $icon_linecons = '';
if (version_compare(WPB_VC_VERSION, "4.6") >= 0) {
$atts = vc_map_get_attributes($tag, $atts);
extract($atts);
} else {
extract(shortcode_atts(array("icon_fontawesome" => '', "icon_openiconic" => '', "icon_typicons" => '', "icon_entypo" => '', "icon_linecons" => '', "bannertype" => "", "bannertitle" => "", "bannertitlesize" => "", "titleborder" => "none", "titlebordercolor" => "#fff", "titlebordersize" => "1px", "bannercontent" => "", "bannercontentsize" => "", "bannerbutton" => "", "buttonborder" => "", "backbuttonbg" => "", "backbuttoncolor" => "", "backbuttonhoverbg" => "", "backbuttonhovercolor" => "", "buttonbordersize" => "", "buttonbordercolor" => "", "bannericon" => "", "bannerbg" => "", "isicon" => "", "isarrow" => "", "arrowsize" => "", "arrowcolor" => "", "link" => "", "titleborderwidth" => "", "buttonshape" => "", "buttonpadding" => "", "iconanimation" => "", "textcolor" => "", "issmoothscroll" => "", "buttonfontsize" => "", "elementheight" => "", "elementmargin" => "", "extraclass" => ""), $atts));
}
// $color_style_arr = array("grapefruit" => array("#ED5565", "#DA4453"), "bittersweet" => array("#FC6E51", "#E9573F"), "sunflower" => array("#FFCE54", "#F6BB42"), "grass" => array("#A0D468", "#8CC152"), "mint" => array("#48CFAD", "#37BC9B"), "aqua" => array("#4FC1E9", "#3BAFDA"), "bluejeans" => array("#5D9CEC", "#4A89DC"), "lavender" => array("#AC92EC", "#967ADC"), "pinkrose" => array("#EC87C0", "#D770AD"), "lightgray" => array("#F5F7FA", "#E6E9ED"), "mediumgray" => array("#CCD1D9", "#AAB2BD"), "darkgray" => array("#656D78", "#434A54"), "customized" => array("$bannerbg", "$bannerbg") );
$content = wpb_js_remove_wpautop($content);
// fix unclosed/unwanted paragraph tags in $content
$output = '';
if (version_compare(WPB_VC_VERSION, "4.4") >= 0) {
vc_icon_element_fonts_enqueue($bannericon);
} else {
wp_register_style('font-awesome', plugins_url('../faanimation/css/font-awesome.min.css', __FILE__));
wp_enqueue_style('font-awesome');
}
$link = vc_build_link($link);
wp_register_style('animate.css', plugins_url('css/animate.min.css', __FILE__));
wp_enqueue_style('animate.css');
wp_register_style('vc-extensions-bannerblock-style', plugins_url('css/style.css', __FILE__));
wp_enqueue_style('vc-extensions-bannerblock-style');
wp_register_script('smooth-scroll', plugins_url('js/jquery.smooth-scroll.min.js', __FILE__), array("jquery"));
wp_enqueue_script('smooth-scroll');
wp_register_script('vc-extensions-bannerblock-script', plugins_url('js/init.min.js', __FILE__), array("jquery", "smooth-scroll"));
wp_enqueue_script('vc-extensions-bannerblock-script');
// $bannerimage = wp_get_attachment_image_src($bannerimage, 'full');
$output_buttontext_start = $output_buttontext_icon = $output_buttontext_text = $output_buttontext_end = '';
$output = '';
$output .= '<div class="cq-bannerblock ' . $extraclass . '" data-titleborder="' . $titleborder . '" data-titlebordercolor="' . $titlebordercolor . '" data-titlebordersize="' . $titlebordersize . '" data-bannertitlesize="' . $bannertitlesize . '" data-bannercontentsize="' . $bannercontentsize . '" data-buttonborder="' . $buttonborder . '" data-buttonbordersize="' . $buttonbordersize . '" data-buttonbordercolor="' . $buttonbordercolor . '" data-titleborderwidth="' . $titleborderwidth . '" data-elementmargin="' . $elementmargin . '" data-elementheight="' . $elementheight . '" data-backbuttoncolor="' . $backbuttoncolor . '" data-backbuttonbg="' . $backbuttonbg . '" data-backbuttonhoverbg="' . $backbuttonhoverbg . '" data-backbuttonhovercolor="' . $backbuttonhovercolor . '" data-buttonshape="' . $buttonshape . '" data-issmoothscroll="' . $issmoothscroll . '" data-isarrow="' . $isarrow . '" data-arrowsize="' . $arrowsize . '" data-arrowcolor="' . $arrowcolor . '" data-buttonfontsize="' . $buttonfontsize . '" data-buttonpadding="' . $buttonpadding . '" data-textcolor="' . $textcolor . '">';
if ($isarrow == "arrowtop" || $isarrow == "arrowbottom") {
$output .= '<div class="cq-bannerblock-arrow ' . $isarrow . '"></div>';
}
if ($isarrow == "circletop" || $isarrow == "circlebottom") {
$output .= '<div class="cq-bannerblock-circle ' . $isarrow . '"></div>';
}
$output .= '<div class="cq-bannerblock-content">';
if ($bannertitle != "") {
$output .= '<h4 class="cq-bannerblock-title">';
$output .= $bannertitle;
$output .= '</h4>';
}
if ($bannercontent != "") {
$output .= '<span class="cq-bannerblock-desc">';
$output .= $bannercontent;
$output .= '</span>';
}
if ($titleborder != "none") {
$output .= '<span class="cq-bannerblock-line"></span>';
}
if ($bannerbutton != "" || (isset(${'icon_' . $bannericon}) || $bannericon != "") && $isicon != "no") {
$output_buttontext_start .= '<div class="cq-bannerblock-buttonarea">';
if ($link["url"] !== "") {
$output_buttontext_start .= '<a href="' . $link["url"] . '" title="' . $link["title"] . '" class="cq-bannerblock-link" target="' . $link["target"] . '">';
}
$output_buttontext_start .= '<div class="cq-bannerblock-buttonlink">';
if ($bannerbutton != "") {
$output_buttontext_text .= '<span class="cq-bannerblock-button">';
$output_buttontext_text .= $bannerbutton;
$output_buttontext_text .= '</span>';
}
if (version_compare(WPB_VC_VERSION, "4.4") >= 0 && isset(${'icon_' . $bannericon}) && $isicon != "no") {
if ($bannerbutton != "") {
if ($isicon == "yes_start") {
$output_buttontext_icon .= '<i class="cq-bannerblock-icon animated cq-infinite ' . $iconanimation . ' ' . esc_attr(${'icon_' . $bannericon}) . '"></i> ';
} else {
if ($isicon == "yes_end") {
$output_buttontext_icon .= ' <i class="cq-bannerblock-icon animated cq-infinite ' . $iconanimation . ' ' . esc_attr(${'icon_' . $bannericon}) . '"></i>';
}
}
} else {
$output_buttontext_icon .= '<i class="cq-bannerblock-icon animated cq-infinite ' . $iconanimation . ' ' . esc_attr(${'icon_' . $bannericon}) . '"></i>';
}
} else {
if ($bannerbutton != "") {
if ($isicon == "yes_start") {
$output_buttontext_icon .= '<i class="fa animated cq-infinite ' . $iconanimation . ' ' . $bannericon . '"></i> ';
} else {
if ($isicon == "yes_end") {
$output_buttontext_icon .= ' <i class="fa animated cq-infinite ' . $iconanimation . ' ' . $bannericon . '"></i>';
}
}
} else {
$output_buttontext_icon .= '<i class="fa animated cq-infinite ' . $iconanimation . ' ' . $bannericon . '"></i>';
}
}
$output_buttontext_end .= '</div>';
if ($link["url"] !== "") {
$output_buttontext_end .= '</a>';
}
$output_buttontext_end .= '</div>';
}
if ($isicon == "yes_start") {
$output .= $output_buttontext_start . $output_buttontext_icon . $output_buttontext_text . $output_buttontext_end;
} else {
$output .= $output_buttontext_start . $output_buttontext_text . $output_buttontext_icon . $output_buttontext_end;
}
$output .= '</div>';
//.........这里部分代码省略.........
开发者ID:sopada85,项目名称:esquema-test,代码行数:101,代码来源:vc-extensions-bannerblock.php
示例10: cq_vc_sidebyside_func
function cq_vc_sidebyside_func($atts, $content = null, $tag)
{
$icon = $dividericon = $new_card1icon = $new_card2icon = $card1icon = $icon_fontawesome = $icon_openiconic = $icon_typicons = $icon_entypoicons = $icon_linecons = $divider_icon_fontawesome = $divider_icon_openiconic = $divider_icon_typicons = $divider_icon_entypoicons = $divider_icon_linecons = $card2_icon_fontawesome = $card2_icon_openiconic = $card2_icon_typicons = $card2_icon_entypoicons = $card2_icon_linecons = '';
if (version_compare(WPB_VC_VERSION, "4.6") >= 0) {
$atts = vc_map_get_attributes($tag, $atts);
extract($atts);
} else {
extract(shortcode_atts(array('new_card1icon' => 'fontawesome', 'new_card2icon' => 'fontawesome', 'icon_fontawesome' => '', 'icon_openiconic' => '', 'icon_typicons' => '', 'icon_entypoicons' => '', 'icon_linecons' => '', 'icon_entypo' => '', 'divider_icon_fontawesome' => '', 'divider_icon_openiconic' => '', 'divider_icon_typicons' => '', 'divider_icon_entypoicons' => '', 'divider_icon_linecons' => '', 'divider_icon_entypo' => '', 'card2_icon_fontawesome' => '', 'card2_icon_openiconic' => '', 'card2_icon_typicons' => '', 'card2_icon_entypoicons' => '', 'card2_icon_linecons' => '', 'card2_icon_entypo' => '', "divider" => '', "dividericon" => '', "dividertype" => 'text', "dividerbg" => '', "dividercolor" => '', "dividerborder" => '0', "dividerfontsize" => '', "dividerwidth" => '', "dividerheight" => '', "card1avatar" => '', "card1image" => '', "card1icon" => '', "card1icontext" => '', "card1iconsize" => '', "card1title" => '', "card1titlecolor" => '', "card1contentcolor" => '', "card1iconcolor" => '', "card1bg" => '', "card2bg" => '', "card1content" => '', "card2avatar" => '', "card2image" => '', "card2icon" => '', "card2icontext" => '', "card2iconsize" => '', "card2title" => '', "card2titlecolor" => '', "card2contentcolor" => '', "card2iconcolor" => '', "card2content" => '', "card1link" => '', "card2link" => '', "cardstyle" => '', "cardheight" => '', "titlesize" => '', "contentwidth" => '', "contentsize" => '', "carddirection" => 'leftright', "elementwidth" => '', "cardmargin" => '', "tooltipposition" => 'top', "imagewidth" => '', "cardshape" => '', "isgap" => '', "gapcolor" => '', "followyoffset" => '', "link" => ''), $atts));
}
if (version_compare(WPB_VC_VERSION, "4.4") >= 0) {
vc_icon_element_fonts_enqueue($new_card1icon);
vc_icon_element_fonts_enqueue($new_card2icon);
vc_icon_element_fonts_enqueue($dividericon);
} else {
wp_register_style('font-awesome', plugins_url('../faanimation/css/font-awesome.min.css', __FILE__));
wp_enqueue_style('font-awesome');
}
$content = wpb_js_remove_wpautop($content);
// fix unclosed/unwanted paragraph tags in $content
$output = '';
wp_register_style('tooltipster', plugins_url('../appmockup/css/tooltipster.css', __FILE__));
wp_enqueue_style('tooltipster');
wp_register_script('tooltipster', plugins_url('../appmockup/js/jquery.tooltipster.min.js', __FILE__), array('jquery'));
wp_enqueue_script('tooltipster');
wp_register_style('vc-extensions-sidebyside-style', plugins_url('css/style.css', __FILE__));
wp_enqueue_style('vc-extensions-sidebyside-style');
wp_register_script('vc-extensions-sidebyside-script', plugins_url('js/init.min.js', __FILE__), array("jquery", "tooltipster"));
wp_enqueue_script('vc-extensions-sidebyside-script');
$card1link = vc_build_link($card1link);
$card2link = vc_build_link($card2link);
$color_style_arr = array("grapefruit" => array("#ED5565", "#DA4453"), "bittersweet" => array("#FC6E51", "#E9573F"), "sunflower" => array("#FFCE54", "#F6BB42"), "grass" => array("#A0D468", "#8CC152"), "mint" => array("#48CFAD", "#37BC9B"), "aqua" => array("#4FC1E9", "#3BAFDA"), "bluejeans" => array("#5D9CEC", "#4A89DC"), "lavender" => array("#AC92EC", "#967ADC"), "pinkrose" => array("#EC87C0", "#D770AD"), "lightgray" => array("#F5F7FA", "#E6E9ED"), "mediumgray" => array("#CCD1D9", "#AAB2BD"), "darkgray" => array("#656D78", "#434A54"), "customized" => array("{$card1bg}", "{$card2bg}"));
$cardstyle_arr = $color_style_arr[$cardstyle];
$card1image = wp_get_attachment_image_src($card1image, 'full');
$card2image = wp_get_attachment_image_src($card2image, 'full');
$output .= '<div class="cq-sidebyside-container ' . $cardshape . ' cq-sidebyside-' . $carddirection . '" data-card1titlecolor="' . $card1titlecolor . '" data-card1contentcolor="' . $card1contentcolor . '" data-card1bg="' . $cardstyle_arr[0] . '" data-card2titlecolor="' . $card2titlecolor . '" data-card2contentcolor="' . $card2contentcolor . '" data-card2bg="' . $cardstyle_arr[1] . '" data-dividerbg="' . $dividerbg . '" data-dividercolor="' . $dividercolor . '" data-card1iconsize="' . $card1iconsize . '" data-cardheight="' . $cardheight . '" data-dividerborder="' . $dividerborder . '" data-dividerfontsize="' . $dividerfontsize . '" data-dividerwidth="' . $dividerwidth . '" data-dividerheight="' . $dividerheight . '" data-contentsize="' . $contentsize . '" data-titlesize="' . $titlesize . '" data-contentwidth="' . $contentwidth . '" data-card2iconsize="' . $card2iconsize . '" data-elementwidth="' . $elementwidth . '" data-cardmargin="' . $cardmargin . '" data-card1avatar="' . $card1avatar . '" data-card2avatar="' . $card2avatar . '" data-tooltipposition="' . $tooltipposition . '" data-cardshape="' . $cardshape . '" data-isgap="' . $isgap . '" data-gapcolor="' . $gapcolor . '" data-carddirection="' . $carddirection . '" data-followyoffset="' . $followyoffset . '">';
$output .= '<div class="cq-sidebyside-content ' . $isgap . ' cq-sidecontent-1" data-cardtitle="' . $card1title . '" data-cardavatar="' . $card1avatar . '" data-iconcolor="' . $card1iconcolor . '">';
if ($imagewidth != "") {
$output .= '<div class="cq-sidebyside-paragraphy" data-image="' . aq_resize($card1image[0], $imagewidth, null, true, true, true) . '">';
} else {
$output .= '<div class="cq-sidebyside-paragraphy" data-image="' . $card1image[0] . '">';
}
if ($card1link["url"] !== "") {
$output .= '<a href="' . $card1link["url"] . '" title="' . $card1link["title"] . '" target="' . $card1link["target"] . '" class="cq-sidebyside-link">';
}
if ($card1avatar == "image") {
if ($card1image[0] != "") {
$output .= '<div class="cq-sidebyside-imgcontainer">';
// $output .= '<img src="'.aq_resize($card1image[0], 500*2, 320*2, true, true, true).'" class="cq-sidebyside-image" width="500" height="320" />';
$output .= '</div>';
}
} else {
if ($card1avatar == "icon") {
$output .= '<div class="cq-sidebyside-iconcontainer">';
if (version_compare(WPB_VC_VERSION, "4.4") >= 0) {
if (isset(${'icon_' . $new_card1icon})) {
$output .= '<i class="cq-sidebyside-cardicon ' . esc_attr(${'icon_' . $new_card1icon}) . '"></i>';
}
} else {
$output .= '<i class="fa ' . $card1icon . ' cq-sidebyside-cardicon"></i>';
}
if ($card1icontext != "") {
$output .= ' <span class="cq-sidebyside-icontext">';
$output .= $card1icontext;
$output .= '</span>';
}
$output .= '</div>';
}
}
if ($card1title != "" && $card1avatar != "image") {
$output .= '<h4 class="cq-sidebyside-title">';
$output .= $card1title;
$output .= '</h4>';
}
if ($card1content != "") {
$output .= '<span class="cq-sidebyside-text">' . $card1content . '</span>';
}
if ($card1link["url"] !== "") {
$output .= '</a>';
}
$output .= '</div>';
$output .= '</div>';
if ($dividertype == "text") {
if ($divider != "") {
$output .= '<span class="cq-sidebyside-divider">' . rawurldecode(base64_decode($divider)) . '</span>';
}
} else {
if (isset(${'divider_icon_' . $dividericon})) {
$output .= '<span class="cq-sidebyside-divider">';
$output .= '<i class="' . esc_attr(${'divider_icon_' . $dividericon}) . '"></i>';
$output .= '</span>';
}
}
$output .= '<div class="cq-sidebyside-content ' . $isgap . ' cq-sidecontent-2" data-cardtitle="' . $card2title . '" data-cardavatar="' . $card2avatar . '" data-iconcolor="' . $card2iconcolor . '">';
if ($imagewidth != "") {
$output .= '<div class="cq-sidebyside-paragraphy" data-image="' . aq_resize($card2image[0], $imagewidth, null, true, true, true) . '">';
} else {
$output .= '<div class="cq-sidebyside-paragraphy" data-image="' . $card2image[0] . '">';
}
if ($card2link["url"] !== "") {
$output .= '<a href="' . $card2link["url"] . '" title="' . $card2link["title"] . '" target="' . $card2link["target"] . '" class="cq-sidebyside-link">';
//.........这里部分代码省略.........
开发者ID:sopada85,项目名称:esquema-test,代码行数:101,代码来源:vc-extensions-sidebyside.php
示例11: vcex_enqueue_icon_font
/**
* Helper function enqueues icon fonts from Visual Composer
*
* @since 2.0.0
*/
function vcex_enqueue_icon_font($family = '')
{
// Return if VC function doesn't exist
if (!function_exists('vc_icon_element_fonts_enqueue')) {
return;
}
// Return if icon type is empty or it's fontawesome
if (empty($family) || 'fontawesome' == $family) {
return;
}
// Enqueue script
vc_icon_element_fonts_enqueue($family);
}
开发者ID:iq007,项目名称:MadScape,代码行数:18,代码来源:vc-helpers.php
示例12: mm_icon_box
/**
* Build and return the Icon Box component.
*
* @since 1.0.0
*
* @param array $args The args.
*
* @return string The HTML.
*/
function mm_icon_box($args)
{
$component = 'mm-icon-box';
// Set our defaults and use them as needed.
$defaults = array('icon_type' => 'fontawesome', 'icon_fontawesome' => '', 'icon_openiconic' => '', 'icon_typicons' => '', 'icon_entypo' => '', 'icon_linecons' => '', 'icon_size' => 'normal', 'heading_text' => '', 'content' => '', 'link' => '', 'link_text' => '', 'link_title' => '', 'link_target' => '');
$args = wp_parse_args((array) $args, $defaults);
// Get clean param values.
$icon_type = $args['icon_type'];
$icon_fontawesome = $args['icon_fontawesome'];
$icon_openiconic = $args['icon_openiconic'];
$icon_typicons = $args['icon_typicons'];
$icon_entypo = $args['icon_entypo'];
$icon_linecons = $args['icon_linecons'];
$icon_size = $args['icon_size'];
$heading_text = $args['heading_text'];
$content = $args['content'];
$link_url = $args['link'];
$link_title = $args['link_title'];
$link_target = $args['link_target'];
// Handle a VC link array.
if ('url' === substr($args['link'], 0, 3) && function_exists('vc_build_link')) {
$link_array = vc_build_link($args['link']);
$link_url = $link_array['url'];
$link_title = $link_array['title'];
$link_target = $link_array['target'];
}
// Fix wpautop issues in $content.
if (function_exists('wpb_js_remove_wpautop')) {
$content = wpb_js_remove_wpautop($content, true);
}
// Get Mm classes.
$mm_classes = apply_filters('mm_components_custom_classes', '', $component, $args);
// Add icon size class.
if ($icon_size) {
$mm_classes .= ' icon-size-' . $icon_size;
}
// Get the icon classes.
switch ($icon_type) {
case 'fontawesome':
$icon = !empty($icon_fontawesome) ? $icon_fontawesome : 'fa fa-adjust';
break;
case 'openiconic':
$icon = $icon_openiconic;
break;
case 'typicons':
$icon = $icon_typicons;
break;
case 'entypo':
$icon = $icon_entypo;
break;
case 'linecons':
$icon = $icon_linecons;
break;
default:
$icon = 'fa fa-adjust';
}
// Enqueue the icon font that we're using.
if (function_exists('vc_icon_element_fonts_enqueue')) {
vc_icon_element_fonts_enqueue($icon_type);
}
ob_start();
?>
<div class="<?php
echo esc_attr($mm_classes);
?>
">
<i class="mm-icon <?php
echo esc_attr($icon);
?>
"></i>
<?php
if (!empty($atts['heading_text'])) {
?>
<h3 class="icon-box-heading"><?php
echo esc_html($atts['heading_text']);
?>
</h3>
<?php
}
?>
<?php
if ($content) {
?>
<div class="icon-box-content"><?php
echo wp_kses_post($content);
?>
</div>
//.........这里部分代码省略.........
开发者ID:roosalles,项目名称:mm-components,代码行数:101,代码来源:icon-box.php
示例13: cq_vc_materialcard_func
function cq_vc_materialcard_func($atts, $content = null, $tag)
{
$labelicon = $icon_fontawesome = $icon_openiconic = $icon_typicons = $icon_entypo = $icon_linecons = '';
if (version_compare(WPB_VC_VERSION, "4.6") >= 0) {
$atts = vc_map_get_attributes($tag, $atts);
extract($atts);
} else {
extract(shortcode_atts(array("labelicon" => '', "icon_fontawesome" => '', "icon_openiconic" => '', "icon_typicons" => '', "icon_entypo" => '', "icon_linecons" => '', "title" => '', "titlecolor" => '', "contentcolor" => '', "author" => '', "label" => '', "labeltext" => '', "bordercolor" => '', "link" => '', "isripple" => '', "colorstyle" => '', "titlemargin" => '', "cardwidth" => ''), $atts));
}
$output = '';
if (version_compare(WPB_VC_VERSION, "4.4") >= 0) {
vc_icon_element_fonts_enqueue($labelicon);
} else {
wp_register_style('font-awesome', plugins_url('../faanimation/css/font-awesome.min.css', __FILE__));
wp_enqueue_style('font-awesome');
}
wp_register_style('vc-extensions-materialcard-style', plug
|
请发表评论