本文整理汇总了PHP中vc_build_link函数的典型用法代码示例。如果您正苦于以下问题:PHP vc_build_link函数的具体用法?PHP vc_build_link怎么用?PHP vc_build_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vc_build_link函数的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>';
}
示例2: wpc_shortcode_featured_box
function wpc_shortcode_featured_box($atts, $content = null)
{
extract(shortcode_atts(array('image' => '', 'video_url' => '', 'title' => '', 'desc' => '', 'link' => '', 'more_text' => '', 'bg_color' => '', 'el_class' => ''), $atts));
$href = null;
if ($link !== '') {
$href = vc_build_link($link);
}
$custom_bg = null;
if ($bg_color) {
$custom_bg = ' style="background:' . $bg_color . '"';
}
$output = null;
$output .= '
<div class="wpb_content_element featured-box ' . esc_attr($el_class) . '" ' . $custom_bg . '>';
if ($image) {
$imgurl = wp_get_attachment_image_src($image, 'medium-thumb');
$output .= '
<div class="featured-box-thumb">';
if ($video_url) {
$output .= '
<a class="popup-video" href="' . esc_url($video_url) . '">
<img src="' . $imgurl[0] . '">
<span class="video_icon"><i class="fa fa-play"></i></span>
</a>';
} else {
if ($link) {
$output .= '<a href="' . $href['url'] . '"><img src="' . $imgurl[0] . '"></a>';
} else {
$output .= '<img src="' . $imgurl[0] . '">';
}
}
$output .= '
</div>';
}
if ($title || $desc || $more_text) {
$output .= '
<div class="featured-box-content">';
if ($title) {
$output .= '<h4>' . wp_kses_post($title) . '</h4>';
}
if ($desc) {
$output .= '
<div class="featured-box-desc">';
$output .= '<p>' . wp_kses_post($desc) . '</p>';
$output .= '
</div>';
}
if ($more_text && $link) {
$output .= '
<div class="featured-box-button">
<a href="' . $href['url'] . '" class="">' . esc_attr($more_text) . '</a>
</div>';
}
$output .= '
</div>';
}
$output .= '
</div>';
return $output;
}
示例3: vc_gitem_create_link_real
function vc_gitem_create_link_real($atts, $post, $default_class = '', $title = '')
{
$link = '';
$target = '';
$title_attr = '';
if (isset($atts['link'])) {
$link_css_class = 'vc_gitem-link' . (strlen($default_class) > 0 ? ' ' . $default_class : '');
if ('custom' === $atts['link'] && !empty($atts['url'])) {
$link = vc_build_link($atts['url']);
if (strlen($link['target'])) {
$target = ' target="' . esc_attr($link['target']) . '"';
}
if (strlen($link['title'])) {
$title = $link['title'];
}
$link = 'a href="' . esc_attr($link['url']) . '" class="' . esc_attr($link_css_class) . '"';
} elseif ('post_link' === $atts['link']) {
$link = 'a href="' . get_permalink($post->ID) . '" class="' . esc_attr($link_css_class) . '"';
if (!strlen($title)) {
$title = the_title('', '', false);
}
} elseif ('image' === $atts['link']) {
$href_link = vc_gitem_template_attribute_post_image_url('', array('post' => $post, 'data' => ''));
$link = 'a href="' . $href_link . '" class="' . esc_attr($link_css_class) . '"';
} elseif ('image_lightbox' === $atts['link']) {
$link = 'a' . vc_gitem_template_attribute_post_image_url_attr_prettyphoto('', array('post' => $post, 'data' => $link_css_class));
}
}
if (strlen($title) > 0) {
$title_attr = ' title="' . esc_attr($title) . '"';
}
return apply_filters('vc_gitem_post_data_get_link_real_link', $link, $atts, $post, $link_css_class) . apply_filters('vc_gitem_post_data_get_link_real_target', $target, $atts, $post) . apply_filters('vc_gitem_post_data_get_link_real_title', $title_attr, $atts);
}
示例4: thb_image
function thb_image($atts, $content = null)
{
extract(shortcode_atts(array('image' => '', 'target_blank' => false, 'img_size' => 'full', 'img_link' => '', 'alignment' => '', 'lightbox' => '', 'full_width' => false, 'size' => 'full', 'animation' => false), $atts));
$img_id = preg_replace('/[^\\d]/', '', $image);
$full = $full_width == 'true' ? 'full' : '';
$img = wpb_getImageBySize(array('attach_id' => $img_id, 'thumb_size' => $img_size, 'class' => $animation . ' ' . $alignment . ' ' . $full));
if ($img == NULL) {
$img['thumbnail'] = '<img src="http://placekitten.com/g/400/300" />';
}
$link_to = $c_lightbox = '';
if ($lightbox == true) {
$link_to = wp_get_attachment_image_src($img_id, 'large');
$link_to = $link_to[0];
$c = ' class="fresco overlay-effect"';
} else {
$img_link = $img_link == '||' ? '' : $img_link;
$link = vc_build_link($img_link);
$c = ' class="overlay-effect"';
$link_to = $link['url'];
$a_title = $link['title'];
$a_target = $link['target'];
}
$out = !empty($link_to) ? '<a ' . $c . ' href="' . $link_to . '" target="' . esc_attr($a_target) . '" title="' . esc_attr($a_title) . '"><div class="simple-overlay"></div>' . $img['thumbnail'] . '</a>' : $img['thumbnail'];
return $out;
}
示例5: nicdark_shortcode_focus_number
function nicdark_shortcode_focus_number($atts, $content = null)
{
$atts = shortcode_atts(array('title' => '', 'description' => '', 'number' => '', 'link' => '', 'color' => '', 'class' => ''), $atts);
$str = '';
//extract link
$atts['link'] = vc_build_link($atts['link']);
$a_href = $atts['link']['url'];
$a_title = $atts['link']['title'];
$a_target = $atts['link']['target'];
$str .= '
<div class="' . $atts['class'] . ' nicdark_archive1 nicdark_bg_' . $atts['color'] . ' nicdark_bg_' . $atts['color'] . 'dark_hover nicdark_transition ">
<div class="nicdark_margin20 nicdark_relative">
<a target="' . $a_target . '" href="' . $a_href . '" class="nicdark_displaynone_ipadpotr nicdark_btn_icon nicdark_bg_' . $atts['color'] . 'dark medium white nicdark_absolute "><i>' . $atts['number'] . '</i></a>
<div class="nicdark_activity nicdark_marginleft70 nicdark_disable_marginleft_ipadpotr">
<h4 class="white">' . $atts['title'] . '</h4>
<div class="nicdark_space20"></div>
<p class="white">' . $atts['description'] . '</p>
</div>
</div>
</div>
';
return apply_filters('uds_shortcode_out_filter', $str);
}
示例6: nm_shortcode_button
function nm_shortcode_button($atts, $content = NULL)
{
extract(shortcode_atts(array('title' => __('Button with Text', 'nm-framework-admin'), 'link' => '', 'style' => 'filled', 'color' => '', 'size' => 'lg', 'align' => 'left'), $atts));
// Parse link
$link = $link == '||' ? '' : $link;
$link = vc_build_link($link);
$a_href = $link['url'];
$a_title = $link['title'];
$a_target = $link['target'];
// Class
$button_class = 'nm_btn nm_btn_' . esc_attr($size) . ' nm_btn_' . esc_attr($style);
// Background style
$button_style = $bg_style = '';
if (strlen($color) > 0) {
if (strpos($style, 'border') !== false) {
$button_style = ' style="color:' . $color . ';"';
} else {
$bg_style = ' style="background-color:' . $color . ';"';
}
}
$output = '
<div class="nm_btn_align_' . $align . '">
<a href="' . esc_url($a_href) . '" class="' . $button_class . '" title="' . esc_attr($a_title) . '" target="' . esc_attr($a_target) . '"' . $button_style . '>
<span class="nm_btn_title">' . esc_attr($title) . '</span>
<span class="nm_btn_bg"' . $bg_style . '></span>
</a>
</div>';
return $output;
}
示例7: nicdark_shortcode_focus_text
function nicdark_shortcode_focus_text($atts, $content = null)
{
$atts = shortcode_atts(array('title' => '', 'description' => '', 'link' => '', 'icon' => '', 'color' => '', 'class' => ''), $atts);
$str = '';
//extract link
$atts['link'] = vc_build_link($atts['link']);
$a_href = $atts['link']['url'];
$a_title = $atts['link']['title'];
$a_target = $atts['link']['target'];
//if link
$linkoutput = $a_href != '' ? ' <a target="' . $a_target . '" href="' . $a_href . '" class="nicdark_btn nicdark_press nicdark_bg_' . $atts['color'] . 'dark white medium ">' . $a_title . '</a> ' : '';
$str .= '
<div class="' . $atts['class'] . ' nicdark_textevidence nicdark_bg_' . $atts['color'] . ' ">
<div class="nicdark_margin20">
<h4 class="white">' . $atts['title'] . '</h4>
<div class="nicdark_space20"></div>
<p class="white">' . $atts['description'] . '</p>
<div class="nicdark_space20"></div>
' . $linkoutput . '
</div>
<i class="' . $atts['icon'] . ' nicdark_iconbg right big ' . $atts['color'] . '"></i>
</div>
';
return apply_filters('uds_shortcode_out_filter', $str);
}
示例8: ewf_vc_service
function ewf_vc_service($atts, $content)
{
extract(shortcode_atts(array('title' => __('Sample title', 'bitpub'), 'image_id' => 0, 'image_url' => '#', 'link' => '#', 'css' => null), $atts));
$link = vc_build_link($link);
$class_extra = ' ' . $css;
if ($image_id) {
$image_url = wp_get_attachment_image_src($image_id, 'large');
$image_url = $image_url[0];
}
ob_start();
echo '<div class="service-box' . $class_extra . '">';
echo '<div class="service-box-thumb">';
if ($image_id) {
echo '<img src="' . $image_url . '" alt="' . $image_id . '" />';
}
echo '</div><!-- end .service-box-thumb -->';
if ($title) {
echo '<h2><strong><a href="#">' . $title . '</a></strong></h2>';
}
if ($content) {
echo '<p>' . $content . '</p>';
}
if ($link['title'] != '') {
echo '<a class="btn btn-white" href="' . $link['url'] . '">' . $link['title'] . '</a>';
}
echo '</div><!-- end .service-box -->';
return ob_get_clean();
}
示例9: ewf_vc_client_item
function ewf_vc_client_item($atts, $content)
{
extract(shortcode_atts(array('image_id' => 0, 'image_url' => '', 'link' => '#', 'details' => '', 'css' => ''), $atts));
$link = vc_build_link($link);
$class_extra = ' ' . $css;
if ($image_id) {
$image_url = wp_get_attachment_image_src($image_id, 'large');
$image_url = $image_url[0];
}
ob_start();
// if ($link['url']){
// echo '<a href="'.$link['url'].'" class="client-item'.$class_extra.'" title="'.$link['title'].'" ';
// if (trim($link['target'])){
// echo ' target="'.trim($link['target']).'"';
// }
// echo ' >';
// }
echo '<div class="client-item">';
if ($image_id) {
echo '<img src="' . $image_url . '" alt="' . $image_id . '" />';
}
if ($details) {
echo '<div class="client-details">';
echo '<p>' . $details . '</p>';
echo '</div>';
}
echo '</div>';
// if ($link['url']){
// echo '</a>';
// }
return ob_get_clean();
}
示例10: cq_vc_cqbutton_func
function cq_vc_cqbutton_func($atts, $content = null, $tag)
{
if (version_compare(WPB_VC_VERSION, "4.6") >= 0) {
$atts = vc_map_get_attributes($tag, $atts);
extract($atts);
} else {
extract(shortcode_atts(array('buttonlabel' => '', 'link' => '', 'buttoncolor' => '', 'buttonbackground' => '', 'containerwidth' => '', 'animationstyle' => 'animatetype-1', 'iconbuttoncolor' => 'cqbtn-1', 'iconposition' => '', 'icon' => '', 'icontop' => '', 'iconleft' => '', 'mobilewidth' => '', 'onclick' => '', 'extra_class' => ''), $atts));
}
wp_register_style('vc_cqbutton_cq_style', plugins_url('css/style.min.css', __FILE__));
wp_enqueue_style('vc_cqbutton_cq_style');
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 = '';
$link = vc_build_link($link);
$output .= '<div class="cq-buttoncontainer ' . $iconposition . ' ' . $extra_class . '">';
$output .= '<div class="' . $animationstyle . '">';
$output .= '<div>';
$output .= '<a href="' . $link['url'] . '" title="' . $link['title'] . '" target="' . $link['target'] . '" style="color:' . $buttoncolor . ';background-color:' . $buttonbackground . ';" class="btn ' . $iconbuttoncolor . '">';
$output .= '<span class="txt">' . $buttonlabel . '</span>';
$output .= '<span class="round"><i style="margin-top:' . $icontop . ';margin-left:' . $iconleft . ';" class="fa fa-' . $icon . '"></i></span>';
$output .= '</a>';
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
return $output;
}
示例11: generate_design
if (class_exists("Ultimate_Pricing_Table")) {
class Info_Design01 extends Ultimate_Info_Table
{
public static function generate_design($atts, $content = null)
{
$icon_type = $icon_img = $img_width = $icon = $icon_color = $icon_color_bg = $icon_size = $icon_style = $icon_border_style = $icon_border_radius = $icon_color_border = $icon_border_size = $icon_border_spacing = $el_class = $package_heading = $package_sub_heading = $package_price = $package_unit = $package_btn_text = $package_link = $package_featured = $color_bg_main = $color_txt_main = $color_bg_highlight = $color_txt_highlight = $color_scheme = $use_cta_btn = '';
extract(shortcode_atts(array('color_scheme' => '', 'package_heading' => '', 'package_sub_heading' => '', 'icon_type' => '', 'icon' => '', 'icon_img' => '', 'img_width' => '', 'icon_size' => '', 'icon_color' => '', 'icon_style' => '', 'icon_color_bg' => '', 'icon_color_border' => '', 'icon_border_style' => '', 'icon_border_size' => '', 'icon_border_radius' => '', 'icon_border_spacing' => '', 'use_cta_btn' => '', 'package_btn_text' => '', 'package_link' => '', 'package_featured' => '', 'color_bg_main' => '', 'color_txt_main' => '', 'color_bg_highlight' => '', 'color_txt_highlight' => ''), $atts));
$output = $link = $target = $featured = $featured_style = $normal_style = $dynamic_style = $box_icon = '';
if ($icon_type !== "none") {
$box_icon = do_shortcode('[just_icon icon_type="' . $icon_type . '" icon="' . $icon . '" icon_img="' . $icon_img . '" img_width="' . $img_width . '" icon_size="' . $icon_size . '" icon_color="' . $icon_color . '" icon_style="' . $icon_style . '" icon_color_bg="' . $icon_color_bg . '" icon_color_border="' . $icon_color_border . '" icon_border_style="' . $icon_border_style . '" icon_border_size="' . $icon_border_size . '" icon_border_radius="' . $icon_border_radius . '" icon_border_spacing="' . $icon_border_spacing . '"]');
}
if ($color_scheme == "custom") {
if ($color_bg_main !== "") {
$normal_style .= 'background:' . $color_bg_main . ';';
}
if ($color_txt_main !== "") {
$normal_style .= 'color:' . $color_txt_main . ';';
}
if ($color_bg_highlight !== "") {
$featured_style .= 'background:' . $color_bg_highlight . ';';
}
if ($color_txt_highlight !== "") {
$featured_style .= 'color:' . $color_txt_highlight . ';';
}
}
if ($package_link !== "") {
$link = vc_build_link($package_link);
if (isset($link['target'])) {
$target = 'target="' . $link['target'] . '"';
} else {
$target = '';
}
$link = $link['url'];
} else {
$link = "#";
}
if ($package_featured !== "") {
$featured = "ult_featured";
$dynamic_style = $featured_style;
} else {
$dynamic_style = $normal_style;
}
if ($use_cta_btn == "box") {
$output .= '<a href="' . $link . '" ' . $target . ' class="ult_price_action_button">' . $package_btn_text;
}
$output .= '<div class="ult_pricing_table_wrap ult_info_table ult_design_1 ' . $featured . ' ult-cs-' . $color_scheme . ' ' . $el_class . '">
<div class="ult_pricing_table" style="' . $featured_style . '">';
$output .= '<div class="ult_pricing_heading">
<h3>' . $package_heading . '</h3>';
if ($package_sub_heading !== '') {
$output .= '<h5>' . $package_sub_heading . '</h5>';
}
$output .= '</div><!--ult_pricing_heading-->';
$output .= '<div class="ult_price_body_block">
<div class="ult_price_body">
<div class="ult_price">
' . $box_icon . '
</div>
</div>
示例12: single_icon_shortcode
function single_icon_shortcode($atts)
{
$icon_type = $icon_img = $img_width = $icon = $icon_color = $icon_color_bg = $icon_size = $icon_style = $icon_border_style = $icon_border_radius = $icon_color_border = $icon_border_size = $icon_border_spacing = $icon_link = $el_class = $icon_animation = $tooltip_disp = $tooltip_text = $icon_margin = '';
extract(shortcode_atts(array('icon' => '', 'icon_size' => '', 'icon_color' => '', 'icon_style' => '', 'icon_color_bg' => '', 'icon_color_border' => '', 'icon_border_style' => '', 'icon_border_size' => '', 'icon_border_radius' => '', 'icon_border_spacing' => '', 'icon_link' => '', 'icon_margin' => '', 'icon_animation' => '', 'tooltip_disp' => '', 'tooltip_text' => '', 'el_class' => ''), $atts));
if ($icon_animation !== 'none') {
$css_trans = 'data-animation="' . $icon_animation . '" data-animation-delay="03"';
}
$output = $style = $link_sufix = $link_prefix = $target = $href = $icon_align_style = '';
$uniqid = uniqid();
if ($icon_link !== '') {
$href = vc_build_link($icon_link);
$target = isset($href['target']) ? "target='" . $href['target'] . "'" : '';
$link_prefix .= '<a class="aio-tooltip ' . $uniqid . '" href = "' . $href['url'] . '" ' . $target . ' data-toggle="tooltip" data-placement="' . $tooltip_disp . '" title="' . $tooltip_text . '">';
$link_sufix .= '</a>';
} else {
if ($tooltip_disp !== "") {
$link_prefix .= '<span class="aio-tooltip ' . $uniqid . '" href = "' . $href . '" ' . $target . ' data-toggle="tooltip" data-placement="' . $tooltip_disp . '" title="' . $tooltip_text . '">';
$link_sufix .= '</span>';
}
}
if ($icon_color !== '') {
$style .= 'color:' . $icon_color . ';';
}
if ($icon_style !== 'none') {
if ($icon_color_bg !== '') {
$style .= 'background:' . $icon_color_bg . ';';
}
}
if ($icon_style == 'advanced') {
$style .= 'border-style:' . $icon_border_style . ';';
$style .= 'border-color:' . $icon_color_border . ';';
$style .= 'border-width:' . $icon_border_size . 'px;';
$style .= 'width:' . $icon_border_spacing . 'px;';
$style .= 'height:' . $icon_border_spacing . 'px;';
$style .= 'line-height:' . $icon_border_spacing . 'px;';
$style .= 'border-radius:' . $icon_border_radius . 'px;';
}
if ($icon_size !== '') {
$style .= 'font-size:' . $icon_size . 'px;';
}
if ($icon_margin !== '') {
$style .= 'margin-right:' . $icon_margin . 'px;';
}
if ($icon !== "") {
$output .= "\n" . $link_prefix . '<div class="aio-icon ' . $icon_style . ' ' . $el_class . '" ' . $css_trans . ' style="' . $style . '">';
$output .= "\n\t" . '<i class="' . $icon . '"></i>';
$output .= "\n" . '</div>' . $link_sufix;
}
//$output .= do_shortcode($content);
if ($tooltip_disp !== "") {
$output .= '<script>
jQuery(function () {
jQuery(".' . $uniqid . '").bsf_tooltip("hide");
})
</script>';
}
return $output;
}
示例13: nicdark_shortcode_team_vertical
function nicdark_shortcode_team_vertical($atts, $content = null)
{
$atts = shortcode_atts(array('title' => '', 'description' => '', 'role' => '', 'icon' => '', 'image' => '', 'color' => '', 'class' => '', 'icons' => '', 'icon1' => '', 'iconlink1' => '', 'icon2' => '', 'iconlink2' => '', 'icon3' => '', 'iconlink3' => ''), $atts);
$str = '';
//link icon1
$atts['iconlink1'] = vc_build_link($atts['iconlink1']);
$a_href_iconlink1 = $atts['iconlink1']['url'];
$a_title_iconlink1 = $atts['iconlink1']['title'];
$a_target_iconlink1 = $atts['iconlink1']['target'];
//link icon2
$atts['iconlink2'] = vc_build_link($atts['iconlink2']);
$a_href_iconlink2 = $atts['iconlink2']['url'];
$a_title_iconlink2 = $atts['iconlink2']['title'];
$a_target_iconlink2 = $atts['iconlink2']['target'];
//link icon1
$atts['iconlink3'] = vc_build_link($atts['iconlink3']);
$a_href_iconlink3 = $atts['iconlink3']['url'];
$a_title_iconlink3 = $atts['iconlink3']['title'];
$a_target_iconlink3 = $atts['iconlink3']['target'];
//image
$imgsrc = wp_get_attachment_image_src($atts['image'], 'large');
//if icon1 icon2 icon3
$icon1output = $atts['icon1'] != '' ? ' <a target="' . $a_target_iconlink1 . '" title="' . $a_title_iconlink1 . '" href="' . $a_href_iconlink1 . '" class="nicdark_displaynone_ipadpotr nicdark_btn_icon nicdark_tooltip nicdark_bg_white nicdark_border_grey small grey nicdark_margin010"><i class="' . $atts['icon1'] . ' nicdark_rotate"></i></a> ' : '';
$icon2output = $atts['icon2'] != '' ? ' <a target="' . $a_target_iconlink2 . '" title="' . $a_title_iconlink2 . '" href="' . $a_href_iconlink2 . '" class="nicdark_displaynone_ipadpotr nicdark_btn_icon nicdark_tooltip nicdark_bg_white small nicdark_border_grey grey nicdark_margin010"><i class="' . $atts['icon2'] . ' nicdark_rotate"></i></a> ' : '';
$icon3output = $atts['icon3'] != '' ? ' <a target="' . $a_target_iconlink3 . '" title="' . $a_title_iconlink3 . '" href="' . $a_href_iconlink3 . '" class="nicdark_displaynone_ipadpotr nicdark_btn_icon nicdark_tooltip nicdark_bg_white small nicdark_border_grey grey nicdark_margin010"><i class="' . $atts['icon3'] . ' nicdark_rotate"></i></a> ' : '';
//if icons
$iconsoutput = $atts['icons'] == 'yes' ? ' <div class="nicdark_space20 nicdark_displaynone_ipadpotr"></div>' . $icon1output . ' ' . $icon2output . ' ' . $icon3output . '' : '';
$str .= '
<div class="nicdark_archive1 nicdark_border_grey center">
<div class="nicdark_textevidence nicdark_bg_greydark ">
<h4 class="white nicdark_margin20">' . $atts['title'] . '</h4>
</div>
<img class="nicdark_opacity" alt="" src="' . $imgsrc[0] . '">
<div class="nicdark_textevidence nicdark_bg_' . $atts['color'] . '">
<h5 class="white nicdark_margin20">' . $atts['role'] . '</h5>
<i class="' . $atts['icon'] . ' nicdark_iconbg right medium ' . $atts['color'] . '"></i>
</div>
<div class="nicdark_textevidence">
<div class="nicdark_margin20">
<p>' . $atts['description'] . '</p>
' . $iconsoutput . '
</div>
</div>
</div>
';
return apply_filters('uds_shortcode_out_filter', $str);
}
示例14: get_link_end
protected function get_link_end($href)
{
// Break apart in array
$href = vc_build_link($href);
// Make variables
extract($href);
$url = trim($url);
if ($url) {
return "</a>";
}
return '';
}
示例15: TS_VCSC_SinglePage_Item_Function
function TS_VCSC_SinglePage_Item_Function($atts)
{
global $VISUAL_COMPOSER_EXTENSIONS;
ob_start();
extract(shortcode_atts(array('icon' => '', 'animation_type' => 'hover', 'animation_class' => '', 'external' => 'false', 'link' => '', 'itemid' => '', 'tooltip' => '', 'background' => '#000000', 'color' => '#999999', 'el_id' => '', 'el_class' => '', 'css' => ''), $atts));
if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VCFrontEditMode == "true") {
$frontend = "true";
} else {
$frontend = "false";
}
$output = '';
if ($animation_class != '') {
$icon_animation = 'ts-' . $animation_type . '-css-' . $animation_class . '';
} else {
$icon_animation = '';
}
if ($external == "false") {
if ($itemid != '') {
$item_link = substr($itemid, 0, 1) === '#' ? $itemid : "#" . $itemid;
} else {
$item_link = "";
}
$item_target = "_parent";
} else {
$link = $link == '||' ? '' : $link;
$link = vc_build_link($link);
$a_href = $link['url'];
$a_title = $link['title'];
$a_target = $link['target'];
$item_link = $a_href;
$item_target = $a_target === '' ? '_parent' : $a_target;
if (TS_VCSC_checkValidURL($item_link) == false || substr($item_link, 0, 1) === '#') {
$external = 'false';
}
}
if ($frontend == "false") {
$output .= '<div class="ts-singlepage-navigator-item" data-icon="' . $icon . '" data-type="standard" data-placement="standard" data-class="' . $el_class . '" data-animation="' . $icon_animation . '" data-external="' . $external . '" data-link="' . $item_link . '" data-target="' . $item_target . '" data-tooltip="' . rawurldecode(base64_decode(strip_tags($tooltip))) . '" data-background="' . $background . '" data-color="' . $color . '"></div>';
} else {
$output .= '<div class="ts-singlepage-navigator-item" style="margin: 5px 0; padding: 5px 10px; border: 1px solid #ededed;">';
$output .= '<div style="display: block;">Icon: ' . $icon . '<i class="' . $icon . '" style="font-size: 14px; margin-left: 10px;"></i></div>';
$output .= '<div style="display: block;">Animation: ' . ($icon_animation != "" ? $icon_animation : "N/A") . '</div>';
$output .= '<div style="display: block;">External: ' . $external . '</div>';
if ($external == 'false') {
$output .= '<div style="display: block;">Anchor: ' . ($item_link != "" ? $item_link : "N/A") . '</div>';
} else {
$output .= '<div style="display: block;">Link: ' . ($item_link != "" ? $item_link : "N/A") . '</div>';
}
$output .= '</div>';
}
echo $output;
$myvariable = ob_get_clean();
return $myvariable;
}