コード例 #1
2
ファイル: banner.php プロジェクト: websideas/Mondova
 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
1
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
0
ファイル: vc_grid_item.php プロジェクト: Angelpm28/ong-canada
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
0
ファイル: thb_image.php プロジェクト: adampdarcy/paola
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
0
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
0
ファイル: button.php プロジェクト: kevinotsuka/coffeecircle
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
0
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
0
ファイル: vc_ewf_service.php プロジェクト: kadr/semashko
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
0
ファイル: __vc_ewf_client.php プロジェクト: kadr/semashko
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
0
 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
0
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
0
        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
0
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
0
 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
0
 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;
 }
コード例 #16
0
 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;
 }
コード例 #17
0
ファイル: Link.php プロジェクト: digitalunited/components
 private function unserializeString($linkString)
 {
     if ($linkString === '||') {
         return ['url' => ''];
     }
     if (preg_match('/\\|/', $linkString)) {
         $maybeUnserialized = vc_build_link($linkString);
         if (array_filter($maybeUnserialized)) {
             return $maybeUnserialized;
         }
     }
     return ['title' => $linkString, 'url' => $linkString];
 }
コード例 #18
0
function nm_shortcode_feature($atts, $content = NULL)
{
    extract(shortcode_atts(array('title' => '', 'subtitle' => '', 'icon_type' => 'icon', 'icon' => '', 'icon_style' => 'simple', 'icon_background_color' => '', 'icon_color' => '', 'image_id' => '', 'image_style' => 'default', 'layout' => 'default', 'top_offset' => '', 'bottom_spacing' => 'none', 'link' => ''), $atts));
    // Prepare icon/image
    if ($icon_type === 'icon') {
        if (strlen($icon) > 0) {
            // Enqueue font icon styles
            wp_enqueue_style('pe-icons-filled', NM_THEME_URI . '/css/font-icons/pe-icon-7-filled/css/pe-icon-7-filled.css');
            wp_enqueue_style('pe-icons-stroke', NM_THEME_URI . '/css/font-icons/pe-icon-7-stroke/css/pe-icon-7-stroke.css');
            // Background/border color
            $icon_background_color_style = '';
            if (strlen($icon_background_color) > 0) {
                if ($icon_style == 'background') {
                    $icon_background_color_style = ' style="background-color: ' . $icon_background_color . '"';
                } else {
                    if ($icon_style == 'border') {
                        $icon_background_color_style = ' style="border-color: ' . $icon_background_color . '"';
                    }
                }
            }
            // Icon color
            $icon_color_style = '';
            if (strlen($icon_color) > 0) {
                $icon_color_style = ' style="color: ' . $icon_color . ';"';
            }
            $icon = '<div class="nm-feature-icon"' . $icon_background_color_style . '><i class="' . $icon . '"' . $icon_color_style . '></i></div>';
        }
    } else {
        $icon_style = 'image-' . $image_style;
        if (strlen($image_id) > 0) {
            $image_src = wp_get_attachment_image_src($image_id, 'full');
            $icon = '<div class="nm-feature-icon"><img src="' . esc_url($image_src[0]) . '" alt="' . esc_attr($title) . '" /></div>';
        }
    }
    $title = strlen($title) > 0 ? '<h2>' . esc_attr($title) . '</h2>' : '';
    $subtitle = strlen($subtitle) > 0 ? '<h3>' . esc_attr($subtitle) . '</h3>' : '';
    // Button
    if (strlen($link) > 0) {
        $link = vc_build_link($link);
        $button = '<a href="' . esc_url($link['url']) . '" title="' . esc_attr($link['title']) . '" class="vc_btn vc_btn_md vc_btn_link"><span class="vc_btn_title">' . esc_attr($link['title']) . '</span></a>';
    } else {
        $button = '';
    }
    $top_offset = strlen($top_offset) > 0 ? ' style="padding-top: ' . intval($top_offset) . 'px";' : '';
    return '
			<div class="nm-feature layout-' . esc_attr($layout) . ' icon-style-' . esc_attr($icon_style) . ' bottom-spacing-' . esc_attr($bottom_spacing) . '">' . $icon . '
				<div class="nm-feature-content"' . $top_offset . '>' . $title . $subtitle . '
					<div class="wpb_text_column">' . wpb_js_remove_wpautop($content, true) . '</div>' . $button . '
				</div>
			</div>';
}
コード例 #19
0
/** 
  * BANNER
  *   
  * @example
  * [banner url="" target="_self or _blank" border="yes or no" border_color="" back_image="true or false" img="image id" height="0..n" background=""]
**/
function df_banner_sc($atts, $content = null)
{
    extract(shortcode_atts(array('link' => '', 'border' => 'yes', 'border_color' => '', 'back_image' => 'true', 'img' => '', 'height' => '', 'background' => '#eeeeee', 'el_class' => ''), $atts));
    $output_img = '';
    $img = explode(',', $img);
    $i = -1;
    foreach ($img as $attach_id) {
        $i++;
        $image_src = wp_get_attachment_image_src($attach_id, 'full');
        $output_img .= $image_src[0];
    }
    if ($output_img == '') {
        $return_img = get_template_directory_uri() . '/includes/images/presets/post-formats/big/image.jpg';
    } else {
        $return_img = $output_img;
    }
    $link = $link == '||' ? '' : $link;
    $link = vc_build_link($link);
    $a_href = $link['url'];
    $a_title = $link['title'];
    $a_target = $link['target'];
    if ($border != 'yes') {
        $border_color = 'transparent';
    } else {
        $border_color;
    }
    $height = 'height: ' . $height . 'px';
    if ($back_image == 'false') {
        return '<div class="banner-warpper ' . $el_class . '">
                       <div class="banner-warpper-inner">
                          <a href="' . $a_href . '" target="' . $a_target . '" title="' . $a_title . '">
                             <div class="banner-background" style=" background-color:' . $background . ';"></div>
                             <div class="banner-inner">
                                 <div class="banner-content" style="border-color:' . $border_color . '; ' . $height . ';">' . do_shortcode($content) . '</div>
                             </div>
                          </a>
                       </div>
                     </div>';
    } else {
        return '<div class="banner-warpper ' . $el_class . '">
                       <div class="banner-warpper-inner">
                           <a href="' . $a_href . '" target="' . $a_target . '" title="' . $a_title . '">
                             <div class="banner-background" style=" background-image: url(' . $return_img . ');"></div>
                             <div class="banner-inner">
                                 <div class="banner-content" style="border-color:' . $border_color . '; ' . $height . ';">' . do_shortcode($content) . '</div>
                             </div>
                           </a>
                       </div>
                     </div>';
    }
}
コード例 #20
0
if (class_exists("Ultimate_Pricing_Table")) {
    class Pricing_Design01 extends Ultimate_Pricing_Table
    {
        public static function generate_design($atts, $content = null)
        {
            $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 = '';
            extract(shortcode_atts(array("color_scheme" => "", "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" => ""), $atts));
            $output = $link = $target = $featured = $featured_style = $normal_style = $dynamic_style = '';
            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;
            }
            $output .= '<div class="ult_pricing_table_wrap ult_design_1 ' . $featured . ' ult-cs-' . $color_scheme . '">
						<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">
コード例 #21
0
ファイル: gallery.php プロジェクト: bogdandobritoiu/aripi
 public function render($atts, $content = null)
 {
     $css = $see_more = '';
     extract(shortcode_atts(array('css' => '', 'see_more' => ''), $atts));
     $see_more = vc_build_link($see_more);
     $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class($css, ' '));
     $gallery = new WP_Query(array('post_type' => 'gallery', 'posts_per_page' => 8));
     $output = '';
     if ($gallery->have_posts()) {
         $gallery_images = array();
         $i = 0;
         while ($gallery->have_posts()) {
             $gallery->the_post();
             if (has_post_thumbnail()) {
                 if ($i >= 4) {
                     $gallery_images[] = get_the_post_thumbnail(get_the_ID(), 'thumb-673x266');
                 } else {
                     $gallery_images[] = get_the_post_thumbnail(get_the_ID(), 'thumb-281x266');
                 }
             }
             $i++;
         }
         $output .= '<div class="gallery_module clearfix ' . $css_class . '">';
         $output .= '<div class="gallery_left clearfix">';
         $output .= '<div class="gallery_inner_right">' . $gallery_images[0] . '</div>';
         $output .= '<div class="gallery_inner_left">' . $gallery_images[4] . '</div>';
         $output .= '<div class="gallery_inner_right">' . $gallery_images[1] . '</div>';
         $output .= '<div class="gallery_inner_left">' . $gallery_images[5] . '</div>';
         $output .= '</div>';
         $output .= '<div class="gallery_right clearfix">';
         $output .= '<div class="gallery_inner_left">' . $gallery_images[2] . '</div>';
         $output .= '<div class="gallery_inner_right">' . $gallery_images[6] . '</div>';
         $output .= '<div class="gallery_inner_left">' . $gallery_images[3] . '</div>';
         $output .= '<div class="gallery_inner_right">' . $gallery_images[7] . '</div>';
         $output .= '</div>';
         if ($see_more['url']) {
             if (!$see_more['title']) {
                 $see_more['title'] = __('See more', STM_DOMAIN);
             }
             if (!$see_more['target']) {
                 $see_more['target'] = '_self';
             }
             $output .= '<div class="see_more"><a href="' . $see_more['url'] . '" target="' . $see_more['target'] . '"><i class="fa fa-camera"></i>' . $see_more['title'] . ' <i class="fa fa-angle-right"></i></a></div>';
         }
         $output .= '</div>';
     }
     wp_reset_query();
     return $output;
 }
コード例 #22
0
 /**
  * Single Image shortcode
  *
  * @param array $atts
  * @return string
  */
 function wolf_shortcode_linked_image($atts)
 {
     if (class_exists('Vc_Manager') && function_exists('vc_map_get_attributes')) {
         $atts = vc_map_get_attributes('wolf_linked_image', $atts);
     }
     extract(shortcode_atts(array('image' => '', 'alignment' => 'center', 'text_alignment' => 'center', 'image_style' => '', 'full_size' => '', 'link' => '', 'text' => '', 'secondary_text' => '', 'overlay_color' => '#000', 'overlay_opacity' => '40', 'text_color' => '#fff', 'text_tag' => 'h3', 'font' => '', 'class' => '', 'image_size' => 'large', 'animation' => '', 'animation_delay' => '', 'inline_style' => '', 'class' => ''), $atts));
     $href = $image_css = '';
     $image_class = $class;
     $image_style = sanitize_text_field($image_style);
     $container_class = "wolf-linked-image text-{$alignment} {$image_style}";
     $overlay_opacity = absint($overlay_opacity) / 100;
     $text = sanitize_text_field($text);
     $link = vc_build_link($link);
     $url = esc_url($link['url']);
     $target = $link['target'];
     $title = $link['title'];
     $secondary_text = sanitize_text_field($secondary_text);
     $secondary_text = "<span class='wolf-linked-image-secondary-text text-{$text_alignment}' style='color:{$text_color}'>{$secondary_text}</span>";
     $text_color = $text_color ? sanitize_text_field($text_color) : '#fff';
     $caption = "<{$text_tag} class='wolf-linked-image-caption text-{$text_alignment}' style='color:{$text_color}'>{$text}</{$text_tag}>";
     if ($inline_style) {
         $image_css .= $inline_style;
     }
     if ('round' == $image_style) {
         $image_size = '2x2';
     }
     $image_css = $inline_style ? " style='{$inline_style}'" : '';
     if ($animation) {
         $container_class .= " wow {$animation}";
     }
     $src = wolf_get_url_from_attachment_id(absint($image), $image_size);
     $src = $src ? $src : wolf_get_theme_uri('/images/placeholders/' . $image_size . '.jpg');
     $output = "<div class='{$container_class}'>";
     if ('http://' != $url && $url) {
         $output .= '<a href="' . esc_url($url) . '" title="' . esc_attr($title) . '" target="' . esc_attr($target) . '" class="image-item">';
     } else {
         $output .= "<span class='image-item'>";
     }
     $output .= "<img src='{$src}' alt='single-image' {$image_css} class='{$image_class}'>";
     $output .= "<span class='wolf-linked-image-overlay' style='opacity:{$overlay_opacity};background-color:{$overlay_color}'></span>";
     $output .= "<span class='wolf-linked-image-caption-container'><span class='wolf-linked-image-caption-table'>\r\n\t\t<span class='wolf-linked-image-caption-table-cell'>\r\n\t\t{$caption}\r\n\t\t{$secondary_text}\r\n\t\t</span>\r\n\t\t</span>\r\n\t\t</span>";
     if ($full_size || 'http://' != $link && $link) {
         $output .= "</a>";
     } else {
         $output .= "</span>";
     }
     $output .= '</div>';
     return $output;
 }
コード例 #23
0
 public function logic($atts)
 {
     foreach ($atts as $key => &$att) {
         $param = $this->params[$key];
         switch ($param['type']) {
             case 'vc_link':
                 $att = vc_build_link($att);
                 break;
             case 'attach_image':
                 $att = wp_get_attachment_image_src($att, 'large')[0];
                 break;
         }
     }
     return $atts;
 }
コード例 #24
0
function nicdark_shortcode_focus_image($atts, $content = null)
{
    $atts = shortcode_atts(array('title' => '', 'image' => '', 'text' => '', 'link' => '', 'class' => ''), $atts);
    $str = '';
    //target if
    $atts['link'] = vc_build_link($atts['link']);
    $a_href = $atts['link']['url'];
    $a_title = $atts['link']['title'];
    $a_target = $atts['link']['target'];
    $imgsrc = wp_get_attachment_image_src($atts['image'], 'large');
    $str .= '


      <!--start image-->
        <div class="nicdark_focus nicdark_border_grey nicdark_sizing nicdark_relative nicdark_fadeinout nicdark_overflow">    

            <img alt="" class="nicdark_focus nicdark_zoom_image" src="' . $imgsrc[0] . '">
            
            <!--start content-->
            <div class="nicdark_fadeout nicdark_filter nicdark_absolute nicdark_height100percentage nicdark_width_percentage100">
                <div class="nicdark_absolute nicdark_display_table nicdark_width_percentage100">
                    <div class="nicdark_cell nicdark_vertical_middle">
                        <a class="nicdark_btn nicdark_bg_white grey medium">' . $atts['title'] . '</a>
                    </div>   
                </div>   
            </div>
            <!--end content-->


            <!--start content-->
            <div class="nicdark_fadein nicdark_filter greydark nicdark_absolute nicdark_height100percentage nicdark_width_percentage100">
                <div class="nicdark_absolute nicdark_display_table nicdark_height100percentage nicdark_width_percentage100">
                    <div class="nicdark_cell nicdark_vertical_middle">
                        <p class="white">' . $atts['text'] . '</p>
                        <div class="nicdark_space20"></div>
                        <a target="' . $a_target . '" href="' . $a_href . '" class="white nicdark_btn nicdark_border_white medium">' . $a_title . '</a>
                    </div>   
                </div>   
            </div>
            <!--end content-->

        </div>
        <!--end image-->


   ';
    return apply_filters('uds_shortcode_out_filter', $str);
}
コード例 #25
0
function nicdark_shortcode_price_vertical($atts, $content = null)
{
    $atts = shortcode_atts(array('title' => '', 'price' => '', 'description' => '', 'image' => '', 'text' => '', 'link' => '', 'color' => '', 'class' => ''), $atts);
    $str = '';
    //target if
    $atts['link'] = vc_build_link($atts['link']);
    $a_href = $atts['link']['url'];
    $a_title = $atts['link']['title'];
    $a_target = $atts['link']['target'];
    $imgsrc = wp_get_attachment_image_src($atts['image'], 'large');
    $str .= '
      
    <div class="nicdark_archive1 center nicdark_bg_' . $atts['color'] . '  ">
                
                
                <div class="nicdark_textevidence nicdark_bg_greydark ">
                    <h4 class="white nicdark_margin20">' . $atts['title'] . '</h4>
                </div>


                <div style="background:url(' . $imgsrc[0] . '); background-size:cover;" class="nicdark_archive1">
                    <div class="nicdark_filter greydark">

                        <div class="nicdark_space40"></div>
                        
                        <h3 class="white subtitle">' . $atts['price'] . '</h3>
                        <div class="nicdark_space20"></div>
                        <div class="nicdark_divider small"><span class="nicdark_bg_white "></span></div>
                        <div class="nicdark_space20"></div>
                        <h4 class="white subtitle">' . $atts['description'] . '</h4>

                        <div class="nicdark_space40"></div>

                    </div>
                </div>

                <div class="nicdark_textevidence nicdark_bg_grey nicdark_border_grey nicdark_sizing">
                    <div style="display:block;" class="nicdark_margin20 nicdark_archive1_content">' . $atts['text'] . '</div>
                </div>

                <a target="' . $a_target . '" href="' . $a_href . '" class="white nicdark_btn nicdark_bg_' . $atts['color'] . ' medium nicdark_radius_bottom">' . $a_title . '</a>

            </div>

   ';
    return apply_filters('uds_shortcode_out_filter', $str);
}
コード例 #26
0
ファイル: box_colored.php プロジェクト: websideas/Mondova
 protected function content($atts, $content = null)
 {
     extract(shortcode_atts(array('title' => esc_html__('Title', 'js_composer'), 'image' => '', 'link' => '', 'img_size' => 'thumbnail', 'background_title_color' => '#ebebeb', 'use_theme_fonts' => 'true', 'font_container' => '', 'google_fonts' => '', 'css_animation' => '', 'animation_delay' => '', 'el_class' => '', 'css' => ''), $atts));
     $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'box-colored ', $this->settings['base'], $atts), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '), 'extra' => $this->getExtraClass($el_class), 'css_animation' => cruxstore_getCSSAnimation($css_animation));
     $style_title = '';
     extract($this->getAttributes($atts));
     unset($font_container_data['values']['text_align']);
     $styles = array();
     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($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);
     }
     if ($background_title_color) {
         $styles[] = 'background-color: ' . $background_title_color . ';';
     }
     if (!empty($styles)) {
         $style_title .= 'style="' . esc_attr(implode(';', $styles)) . '"';
     }
     $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') . '" />';
     }
     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) . '"');
         $title = '<a class="box-link" ' . implode(' ', $icon_box_link) . '>' . $title . '</a>';
         $img['thumbnail'] = '<a class="box-link" ' . implode(' ', $icon_box_link) . '>' . $img['thumbnail'] . '</a>';
     }
     $box_title = $title ? '<' . $font_container_data['values']['tag'] . ' class="box-colored-title" ' . $style_title . '>' . $title . '</' . $font_container_data['values']['tag'] . '>' : '';
     $output = '<div class="box-colored-image">' . $img['thumbnail'] . '</div>' . $box_title;
     $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>';
 }
コード例 #27
0
ファイル: products_price.php プロジェクト: websideas/Mondova
 protected function content($atts, $content = null)
 {
     $atts = shortcode_atts(array('badge' => esc_html__('only', 'cruxstore'), 'price' => 245, 'currency' => esc_html__('$', 'cruxstore'), 'desktop' => 4, 'values' => '', 'el_class' => '', 'css_animation' => '', 'animation_delay' => '', 'css' => ''), $atts);
     extract($atts);
     $output = '';
     $product_columns = 12 / $desktop;
     $product_land = $product_columns == 4 ? 2 : 3;
     $values = (array) vc_param_group_parse_atts($values);
     $text = '';
     foreach ($values as $data) {
         $new_line = $data;
         $button_text = '';
         $img_id = isset($data['image']) ? $data['image'] : 0;
         $pd_link = isset($data['link']) ? $data['link'] : '';
         $pd_title = isset($data['label']) ? $data['label'] : '';
         $img_id = preg_replace('/[^\\d]/', '', $img_id);
         $img = wpb_getImageBySize(array('attach_id' => $img_id, 'thumb_size' => 'full', 'class' => 'img-responsive'));
         if ($img == null) {
             $img['thumbnail'] = '<img class="vc_img-placeholder img-responsive" src="' . vc_asset_url('vc/no_image.png') . '" />';
         }
         $pd_image = $img['thumbnail'];
         if (!empty($pd_link)) {
             $pd_link = vc_build_link($pd_link);
             if ($pd_title) {
                 $pd_title = '<a href="' . esc_attr($pd_link['url']) . '"' . ($pd_link['target'] ? ' target="' . esc_attr($pd_link['target']) . '"' : '') . ($pd_link['title'] ? ' title="' . esc_attr($pd_link['title']) . '"' : '') . '>' . $pd_title . '</a>';
             }
             $pd_image = '<a href="' . esc_attr($pd_link['url']) . '"' . ($pd_link['target'] ? ' target="' . esc_attr($pd_link['target']) . '"' : '') . ($pd_link['title'] ? ' title="' . esc_attr($pd_link['title']) . '"' : '') . '>' . $img['thumbnail'] . '</a>';
         }
         $pd_image = sprintf('<div class="product-price-image">%s</div>', $pd_image);
         if ($pd_title) {
             $pd_title = sprintf('<h5>%s</h5>', $pd_title);
         }
         $text .= sprintf('<div class="%s %s">%s</div>', 'col-md-' . $product_columns . ' col-sm-' . $product_land, 'product-price-item', $pd_image . $pd_title);
     }
     $output = '<div class="row multi-columns-row">' . $text . '</div>';
     $output .= sprintf('<div class="products-price-content visible-lg-block"><div class="products-price-circle"><span class="products-price-only">%s</span><span class="products-price-currency">%s</span><span class="products-price-text">%s</span></div><span class="products-price-cart">%s</span></div>', $badge, $currency, $price, '<i class="fa fa-shopping-basket" aria-hidden="true"></i>');
     $elementClass = array('base' => apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'products-price ', $this->settings['base'], $atts), 'extra' => $this->getExtraClass($el_class), 'css_animation' => $this->getCSSAnimation($css_animation), 'shortcode_custom' => vc_shortcode_custom_css_class($css, ' '));
     $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>';
 }
コード例 #28
0
function nicdark_shortcode_focus_image($atts, $content = null)
{
    $atts = shortcode_atts(array('title' => '', 'image' => '', 'link' => '', 'openpopup' => '', 'class' => ''), $atts);
    $str = '';
    $outputopenpopup = $atts['openpopup'] == 'yes' ? 'nicdark_mpopup_iframe' : '';
    //target if
    $atts['link'] = vc_build_link($atts['link']);
    $a_href = $atts['link']['url'];
    $a_title = $atts['link']['title'];
    $a_target = $atts['link']['target'] != '' ? 'target= ' . $atts['link']['target'] . '; ' : '';
    $imgsrc = wp_get_attachment_image_src($atts['image'], 'large');
    $str .= '

        <!--start image-->
        <div class=" ' . $atts['class'] . ' nicdark_focus nicdark_relative nicdark_fadeinout nicdark_overflow">    

            <img alt="" class="nicdark_focus nicdark_zoom_image" src="' . $imgsrc[0] . '">

            <!--filter-->
            <div class="nicdark_fadeout nicdark_filter grey nicdark_absolute nicdark_height100percentage nicdark_width_percentage100">  
            </div>
            <!--end filter-->

            <!--start content-->
            <div class="nicdark_fadein nicdark_filter greydark2 nicdark_absolute nicdark_height100percentage nicdark_width_percentage100">
                <div class="nicdark_absolute nicdark_display_table nicdark_height100percentage nicdark_width_percentage100">
                    <div class="nicdark_cell nicdark_vertical_middle">
                        <h1 class="signature extrasize white">' . $atts['title'] . '</h1>
                        <div class="nicdark_space20"></div>
                        <h4><span class="nicdark_displaynone">.</span><a ' . $a_target . ' class="nicdark_outline white ' . $outputopenpopup . ' " href="' . $a_href . '">' . $a_title . '</a></h4>
                    </div>   
                </div>   
            </div>
            <!--end content-->

        </div>
        <!--end image-->


   ';
    return apply_filters('uds_shortcode_out_filter', $str);
}
コード例 #29
0
    protected function content($atts, $content = null)
    {
        extract(shortcode_atts(array("title" => "Title Name", "subtitle" => "Subtitle", "overlay_color" => "", 'url' => "", "css" => ""), $atts));
        $href = vc_build_link($url);
        $address = $href['url'];
        $btn_title = $href['title'];
        $target = $href['target'];
        $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class($css, ' '), $this->settings['base'], $atts);
        ob_start();
        ?>

		<div class="box_link_wraper <?php 
        echo esc_attr($css_class);
        ?>
">
			<div class="overlay" style="background-color:<?php 
        echo esc_attr($overlay_color);
        ?>
;"></div>
			<div>
				<p><?php 
        echo esc_html($subtitle);
        ?>
</p>
				<h2><a href="<?php 
        echo esc_url($address);
        ?>
" target="<?php 
        echo esc_attr($target);
        ?>
"><?php 
        echo esc_html($title);
        ?>
</a></h2>
			</div>
		</div>

		<?php 
        $output = ob_get_contents();
        ob_end_clean();
        return $output;
    }
コード例 #30
0
function nicdark_shortcode_button_icon($atts, $content = null)
{
    $atts = shortcode_atts(array('link' => '', 'icon' => '', 'size' => '', 'textcolor' => '', 'bgcolor' => '', 'bordercolor' => '', 'align' => '', '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'] != '' ? 'target= ' . $atts['link']['target'] . '; ' : '';
    //color
    $outputtextcolor = $atts['textcolor'] != '' ? 'color: ' . $atts['textcolor'] . '; ' : '';
    $outputbgcolor = $atts['bgcolor'] != '' ? 'background-color: ' . $atts['bgcolor'] . '; ' : '';
    $outputbordercolor = $atts['bordercolor'] != '' ? 'border: 1px solid ' . $atts['bordercolor'] . '; ' : '';
    $outputcolor = 'style=" ' . $outputtextcolor . ' ' . $outputbgcolor . ' ' . $outputbordercolor . '  "';
    //icon
    $outputicon = $atts['icon'] != '' ? ' <i class="' . $atts['icon'] . '"></i> ' : '';
    $outputclassiconorbtn = $a_title == '' ? ' nicdark_btn_icon ' : ' nicdark_btn ';
    $str .= '<a ' . $a_target . ' ' . $outputcolor . ' href="' . $a_href . '" class=" ' . $atts['class'] . ' ' . $atts['align'] . ' nicdark_outline ' . $outputclassiconorbtn . ' ' . $atts['size'] . ' title">' . $outputicon . '' . $a_title . '</a>';
    return apply_filters('uds_shortcode_out_filter', $str);
}