public function content($atts, $content = null)
 {
     $tt_double_border = $tt_border_class = $el_class = $width = $el_position = '';
     extract(shortcode_atts(array('el_class' => '', 'el_position' => '', 'width' => '1/2'), $atts));
     $output = '';
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     if ($this->shortcode == 'vc_column') {
         $el_class .= ' column_container';
         if (is_page_template('page-home.php')) {
             $tt_border_class = ' border';
             $tt_double_border = '<div class="double-bg"><div class="left-sdw"></div><div class="right-sdw"></div><div class="repeat-sdw"></div></div>';
         }
     } else {
         if ($this->shortcode == 'vc_column_text') {
             $el_class .= ' wpb_text_column';
         }
     }
     $output .= '<div class="wpb_content_element tt_border ' . $width . $el_class . '">';
     $output .= '<div class="wpb_wrapper' . $tt_border_class . '">';
     $output .= wpb_js_remove_wpautop($content);
     $output .= '</div>' . $this->endBlockComment('.wpb_wrapper');
     $output .= $tt_double_border;
     $output .= '</div>' . $this->endBlockComment($width);
     //
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
        protected function content($atts, $content = null)
        {
            extract(shortcode_atts(array('what_we_do_heading' => ''), $atts));
            if ($content != '') {
                $para_html = '<div class="largeIntro  ofsTSmall">
									' . wpb_js_remove_wpautop($content, true) . '
								</div>';
            } else {
                $para_html = '';
            }
            if ($what_we_do_heading != '') {
                $heading = '<div class="title dark">
									<h1>' . esc_html($what_we_do_heading) . '<span class="plus">+</span></h1>
								</div>';
            } else {
                $heading = '';
                $para_html = '<div class="smallIntro tCenter">
										' . wpb_js_remove_wpautop($content, true) . '
													</div>';
            }
            $html = '<div class="expertiseHolder margLTop">
					<div class="clearfix ofsBottom">
								' . $heading . '
											<div class="container clearfix">
											' . $para_html . '
													</div>
				    </div></div>';
            return $html;
        }
Esempio n. 3
0
 protected function content($atts, $content = null)
 {
     $align = $navigation = $effect = $timeout = $el_class = $el_position = '';
     //
     extract(shortcode_atts(array('width' => '', 'el_class' => '', 'effect' => '', 'timeout' => '', 'navigation' => ''), $atts));
     $output = '';
     $el_class = $this->getExtraClass($el_class);
     $output .= "\n\t" . '<div id="textslider-' . uniqid() . '" class="textslider-wrap gallery-wrap ' . $width . ' ' . $el_class . ' clearfix" data-effect="' . $effect . '" data-timeout="' . $timeout . '">';
     $output .= "\n\t\t" . '<div class="textslider-slides wpb_text_column">';
     $output .= "\n\t\t\t" . wpb_js_remove_wpautop($content);
     $output .= "\n\t\t" . '</div>';
     if ($navigation == "enable") {
         $output .= '<div class="slidernav-left">';
         $output .= '<div class="slidernav">';
         $output .= '<a class="poststage-prev nav-prev"></a>';
         $output .= '</div>';
         $output .= '</div>';
         $output .= '<div class="slidernav-right">';
         $output .= '<div class="slidernav">';
         $output .= '<a class="poststage-next nav-next"></a>';
         $output .= '</div>';
         $output .= '</div>';
     }
     $output .= "\n\t" . '</div>';
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     wp_register_script('jquery-cycle', get_template_directory_uri() . '/js/jquery.cycle.plugin.min.js', false, array('jquery'), true);
     wp_enqueue_script('jquery-cycle');
     wp_register_script('acoda-textslider', get_template_directory_uri() . '/js/text-slider.min.js', false, array('jquery-cycle'), true);
     wp_enqueue_script('acoda-textslider');
     return $output;
 }
 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;
 }
 /**
  * Visual Composer Content Fix
  * Corrects the wrong p tags caused by VComposer plugin by using its native function
  * 
  * @param  string $content
  * @return html $content
  */
 function rt_visual_composer_content_fix($content = null)
 {
     if (function_exists("wpb_js_remove_wpautop")) {
         $content = wpb_js_remove_wpautop($content, "true");
     }
     return $content;
 }
 protected function content($atts, $content = null)
 {
     extract(shortcode_atts(array('mode' => '', 'effect' => '', "speed" => '', "pause" => '', 'autoplay' => '', 'controlnav' => '', 'pagernav' => '', 'customnav' => '', 'slide_count' => 1, 'el_id' => '', 'el_class' => '', 'css_animation' => '', 'anim_type' => '', 'anim_delay' => '', 'css' => ''), $atts));
     $sc_class = 'wt_services_slider_sc';
     $id = mt_rand(9999, 99999);
     if (trim($el_id) != false) {
         $el_id = esc_attr(trim($el_id));
     } else {
         $el_id = $sc_class . '-' . $id;
     }
     wp_print_scripts('wt-extend-bx-slider');
     wp_enqueue_style('wt-extend-bx-slider');
     $output = '';
     $autoplay !== "true" ? $autoplay = 'false' : '';
     $controlnav !== "true" ? $controlnav = 'false' : '';
     $pagernav !== "true" ? $pagernav = 'false' : '';
     $customnav !== "true" ? $customnav = 'false' : '';
     $pagernav == "true" && $customnav == "true" ? $bxCustomNav = ' data-bxCustomNav="wt_bxNav_' . $id . '"' : ($bxCustomNav = '');
     $el_class = esc_attr($this->getExtraClass($el_class));
     $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $sc_class . $el_class . vc_shortcode_custom_css_class($css, ' '), $this->settings['base']);
     $css_class .= $this->wt_sc->getWTCSSAnimationClass($css_animation, $anim_type);
     $anim_data = $this->wt_sc->getWTCSSAnimationData($css_animation, $anim_delay);
     $output .= '<div id="' . $el_id . '" class="' . $css_class . '"' . $anim_data . '>';
     if ($pagernav == "true" && $customnav == "true") {
         $output .= "\n\t\t\t" . '<div id="wt_bxNav_' . $id . '" class="wt_bxslider_nav wt_services_buttons">';
         for ($i = 1; $i <= $slide_count; $i++) {
             $icon = '';
             $current = $i - 1;
             isset($atts["icon_" . $i]) && $atts["icon_" . $i] != "" ? $icon = esc_html($atts["icon_" . $i]) : '';
             $output .= '<a data-slide-index="' . $current . '" href="#" class="servicesLink"><i class="' . $icon . '"></i></a>';
         }
         $output .= "\n\t\t\t" . '</div>';
     }
     $speed = (int) $speed;
     $pause = (int) $pause;
     $output .= "\n\t\t\t" . '<ul class="wt_bxslider" data-bx-mode="' . $mode . '" data-bx-effect="' . $effect . '" data-bx-speed="' . $speed . '" data-bx-pause="' . $pause . '" data-bx-autoPlay="' . $autoplay . '" data-bx-controlNav="' . $controlnav . '" data-bx-pagerNav="' . $pagernav . '" data-bx-customNav="' . $customnav . '"' . $bxCustomNav . '>';
     for ($i = 1; $i <= $slide_count; $i++) {
         $item_content = '';
         isset($atts["content_" . $i]) && $atts["content_" . $i] != "" ? $item_content = $atts["content_" . $i] : '';
         if ($item_content != '') {
             $item_content = wpb_js_remove_wpautop($item_content, true);
             // fix unclosed/unwanted paragraph tags in $content
         }
         isset($atts["target_" . $i]) && $atts["target_" . $i] == "true" ? $target = '_blank' : ($target = '_self');
         $output .= "\n\t\t\t\t" . '<li class="item"><div class="wt_services_slider">';
         if (isset($atts["name_" . $i]) && $atts["name_" . $i] != "") {
             $item_name = esc_html($atts["name_" . $i]);
             if (isset($atts["link_" . $i]) && $atts["link_" . $i] != "") {
                 $output .= "\n\t\t\t\t\t" . '<h3><a href="' . esc_url($atts["link_" . $i]) . '" title="' . $item_name . '" target="' . $target . '">' . $item_name . '</a></h3>';
             } else {
                 $output .= "\n\t\t\t\t\t" . '<h3>' . $item_name . '</h3>';
             }
         }
         $output .= "\n\t\t\t\t\t" . $item_content;
         $output .= "\t\t\t\t" . '</div></li>';
     }
     $output .= "\n\t\t\t" . '</ul>';
     $output .= "\n\t\t\t" . '</div>';
     return $output;
 }
Esempio n. 7
0
 protected function content($atts, $content = null)
 {
     $align = $share_icon = $el_position = $el_class = '';
     //
     extract(shortcode_atts(array('align' => '', 'share_icon' => '', 'el_class' => ''), $atts));
     $output = '';
     $el_class = $this->getExtraClass($el_class);
     if ($share_icon == 'yes') {
         $output .= "\n\t" . '<div class="socialicons init ' . $align . ' ' . $el_class . ' clearfix">';
         $output .= "\n\t\t" . '<ul>';
         $output .= "\n\t\t\t" . '<li class="dock-tab"><a class="socialinit" href="#"><i class="fa fa-share-square-o fa-lg"></i></a></li>';
         $output .= "\n\t\t" . '</ul>';
         $output .= "\n\t" . '</div>';
         $output .= "\n\t" . '<div class="socialicons ' . $align . ' ' . $el_class . ' toggle">';
         $output .= "\n\t\t" . '<ul class="clearfix">';
         $output .= "\n\t\t\t" . wpb_js_remove_wpautop($content);
         $output .= "\n\t\t" . '</ul>';
         $output .= "\n\t" . '</div>';
     } else {
         $output .= "\n\t" . '<div class="socialicons display ' . $align . ' ' . $el_class . ' clearfix">';
         $output .= "\n\t\t" . '<ul>';
         $output .= "\n\t\t\t" . wpb_js_remove_wpautop($content);
         $output .= "\n\t\t" . '</ul>';
         $output .= "\n\t" . '</div>';
         $output .= "\n\t" . '<div class="clear"></div>';
     }
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
 function cq_vc_pagetransition_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('animationmode' => 'normal', 'pagein' => 'fade-in', 'pageout' => 'fade-out', 'overlayin' => 'overlay-slide-in-top', 'overlayout' => 'overlay-slide-out-top', 'pageinspeed' => '1500', 'pageoutspeed' => '800', 'linkelement' => '', 'isdisplay' => 'yes', 'sitewrapper' => '', 'overlaycolor' => ''), $atts));
     }
     $i = -1;
     $content = wpb_js_remove_wpautop($content);
     // fix unclosed/unwanted paragraph tags in $content
     // if($animationmode=="normal"&&$pagein!="zoom-in"){
     //   $pagein_arr = Array("fade-in", "fade-in-up-sm", "fade-in-up", "fade-in-up-lg", "fade-in-down-sm", "fade-in-down", "fade-in-down-lg", "fade-in-left-sm", "fade-in-left", "fade-in-left-lg", "fade-in-right-sm", "fade-in-right", "fade-in-right-lg", "rotate-in-sm", "rotate-in", "rotate-in-lg", "flip-in-x-fr", "flip-in-x", "flip-in-x-nr", "flip-in-y-fr", "flip-in-y", "flip-in-y-nr", "zoom-in-sm", "zoom-in", "zoom-in-lg");
     //   $pagein = $pagein_arr[array_rand($pagein_arr)];
     // }
     $output = '';
     if ($isdisplay != "no") {
         // wp_register_style('vc-extensions-pagetransition-style', plugins_url('css/style.css', __FILE__));
         // wp_enqueue_style('vc-extensions-pagetransition-style');
         wp_register_style('animsition', plugins_url('css/animsition.min.css', __FILE__));
         wp_enqueue_style('animsition');
         wp_register_script('animsition', plugins_url('js/jquery.animsition.min.js', __FILE__), array("jquery"));
         wp_enqueue_script('animsition');
         wp_register_script('vc-extensions-pagetransition-script', plugins_url('js/init.min.js', __FILE__), array("jquery"));
         wp_enqueue_script('vc-extensions-pagetransition-script');
         $output .= '<div class="cq-animsition" data-animationmode="' . $animationmode . '" data-pagein="' . $pagein . '" data-pageout="' . $pageout . '" data-overlayin="' . $overlayin . '" data-overlayout="' . $overlayout . '" data-pageinspeed="' . $pageinspeed . '" data-pageoutspeed="' . $pageoutspeed . '" data-linkelement="' . $linkelement . '" data-overlaycolor="' . $overlaycolor . '" data-sitewrapper="' . $sitewrapper . '">';
         $output .= '</div>';
     }
     return $output;
 }
Esempio n. 9
0
 public function renderMyBartag($atts)
 {
     extract(shortcode_atts(array('foo' => 'something', 'color' => '#FF0000'), $atts));
     $content = wpb_js_remove_wpautop($content, true);
     $output = "<div style='color:{$color};' data-foo='{$foo}'>{$content}</div>";
     return $output;
 }
        protected function content($atts, $content = null)
        {
            extract(shortcode_atts(array('page_img' => '', 'page_heading' => '', 'theme_op' => ''), $atts));
            $src = wp_get_attachment_image_src($page_img, 'full');
            if ($theme_op == 'theme1') {
                $html = '<div class="abIntro2Holder ofsTopH ofsBottomL">
				<div class="container clearfix ">
					<div class="thirteen columns abIntro2">
					<div class="logo">
						<img src="' . esc_url($src[0]) . '" alt=""/>
						<h2 class="est">' . esc_html($page_heading) . '</h2>
					</div>
					' . wpb_js_remove_wpautop($content, true) . '
					
					</div>
				</div>
			</div>';
            } else {
                $html = '<div class="hSingleHeight tCenter" style="clear:both;">
				<div class="hero wide">
						<div class="container clearfix ">
								<div class="thirteen columns ofsBottom long">	
									' . wpb_js_remove_wpautop($content, true) . '
								</div>
						</div>					
				</div>	</div>';
            }
            return $html;
        }
Esempio n. 11
0
function curly_column($atts, $content = null)
{
    extract(shortcode_atts(array("size" => '1/2', "last" => 'no', "margin" => null), $atts));
    $css = 'content-column';
    if ($last == 'yes') {
        $css .= " last clearfix";
    }
    switch ($size) {
        case '1/2':
            $css .= ' half';
            break;
        case '1/3':
            $css .= ' one-three';
            break;
        case '1/4':
            $css .= ' one-four';
            break;
        case '2/3':
            $css .= ' two-three';
            break;
        case '2/4':
            $css .= ' two-four';
            break;
        case '3/4':
            $css .= ' three-four';
            break;
    }
    $inline = $margin != null ? ' style="margin-bottom: ' . $margin . 'px" ' : null;
    $content = function_exists('wpb_js_remove_wpautop') ? wpb_js_remove_wpautop($content, true) : $content;
    return $last == 'yes' ? '<div class="' . $css . '" ' . $inline . '>' . apply_filters('the_content', $content) . '</div><div class="clear"></div>' : '<div class="' . $css . '" ' . $inline . '>' . apply_filters('the_content', $content) . '</div>';
}
Esempio n. 12
0
function curly_lists($atts, $content = null)
{
    extract(shortcode_atts(array("type" => null), $atts));
    switch ($type) {
        case 'bullets':
            $css = 'list-bullets';
            break;
        case 'square':
            $css = 'list-square';
            break;
        case 'circle':
            $css = 'list-circle';
            break;
        case 'checklist':
            $css = 'list-checklist';
            break;
        case 'crosslist':
            $css = 'list-crosslist';
            break;
        case 'default':
            $css = 'list-default-list';
            break;
        case 'none':
            $css = 'list-none';
            break;
        default:
            $css = 'list-none';
    }
    $content = function_exists('wpb_js_remove_wpautop') ? wpb_js_remove_wpautop($content, true) : $content;
    return '<div class="' . $css . '">' . apply_filters('the_content', $content) . '</div>';
}
 function cq_vc_fullscreenintro_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('backgroundtype' => '', 'backgroundcolor' => '', 'image' => '', 'imagerepeat' => '', 'introtext' => '', 'texticon' => 'fa-chevron-down', 'textposition' => '', 'textcolor' => '', 'textsize' => '', 'textfamily' => '', 'textclickable' => '', 'scrollto' => '', 'scrolloffset' => '', 'scrollspeed' => '', 'containerheight' => '', 'extraclass' => ''), $atts));
     }
     wp_register_style('font-awesome', plugins_url('../faanimation/css/font-awesome.min.css', __FILE__));
     wp_enqueue_style('font-awesome');
     wp_register_style('vc-extensions-fullscreenintro-style', plugins_url('css/style.css', __FILE__));
     wp_enqueue_style('vc-extensions-fullscreenintro-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-fullscreenintro-script', plugins_url('js/init.min.js', __FILE__), array("jquery", "smooth-scroll"));
     wp_enqueue_script('vc-extensions-fullscreenintro-script');
     $i = -1;
     $content = wpb_js_remove_wpautop($content);
     // fix unclosed/unwanted paragraph tags in $content
     $image = wp_get_attachment_image_src(trim($image), 'full');
     $output = '';
     $output .= '<div class="cq-fullscreen-intro ' . $extraclass . '" data-backgroundtype="' . $backgroundtype . '" data-image="' . $image[0] . '" data-textcolor="' . $textcolor . '" data-textsize="' . $textsize . '" data-textfamily="' . $textfamily . '" data-backgroundcolor="' . $backgroundcolor . '" data-textposition="' . $textposition . '" data-textclickable="' . $textclickable . '" data-imagerepeat="' . $imagerepeat . '" data-containerheight="' . $containerheight . '" data-scrollto="' . htmlspecialchars($scrollto) . '" data-scrolloffset="' . $scrolloffset . '" data-scrollspeed="' . $scrollspeed . '">';
     // $output .= do_shortcode($content);
     $output .= '<span class="cq-intro-text"><span class="intro-text">' . $introtext . '</span><i class="fa ' . $texticon . '"></i></span>';
     $output .= '</div>';
     return $output;
 }
Esempio n. 14
0
function form_map_func($atts, $content = null)
{
    // New function parameter $content is added!
    extract(shortcode_atts(array('width' => '1/2', 'el_position' => '', 'map_code' => '', 'map_height' => '', 'map_zoom' => '', 'title' => '', 'sub_title' => '', 'show_map_text' => '', 'show_form_text' => '', 'form_id' => ''), $atts));
    $width_class = '';
    //wpb_translateColumnWidthToSpan($width); // Determine width for our div holder
    $content = wpb_js_remove_wpautop($content, true);
    $image_attributes = wp_get_attachment_image_src($author_image, 'full');
    // returns an array
    $output = '';
    $output .= '<section class="content-layer brightText removemargin">';
    $output .= '<div class="mapOuter">';
    $output .= '<div class="googleMap" data-location="' . $map_code . '" data-height="' . $map_height . '" data-offset="0" data-zoom="' . $map_zoom . '"></div>';
    $output .= '</div>';
    $output .= '<a href="#" class="showMap btn btn-primary" data-text="' . $show_form_text . '">' . $show_map_text . '</a>';
    $output .= '<div class="bg-layer"></div>';
    $output .= '<div class="placeOver">';
    $output .= '<div class="container">';
    $output .= '<header class="page-header text-center">';
    if ($title) {
        $output .= '<h2>' . $title . '</h2>';
    }
    if ($sub_title) {
        $output .= '<p>' . $sub_title . '</p>';
    }
    $output .= '</header>';
    if ($form_id) {
        $output .= do_shortcode('[contact-form-7 id="' . $form_id . '"]');
    }
    $output .= '</div>';
    $output .= '</div>';
    $output .= '</section>';
    return $output;
}
Esempio n. 15
0
 public function renderLogin($atts, $content = null)
 {
     extract(shortcode_atts(array('use_in_sidebar' => 'no', 'redirect_to' => '', 'captcha' => 'no', 'register_link' => 'yes', 'forgot_link' => 'yes', 'register_text' => '', 'forgot_text' => '', 'custom_register_url' => '', 'custom_forgot_url' => ''), $atts));
     $content = wpb_js_remove_wpautop($content, true);
     // fix unclosed/unwanted paragraph tags in $content
     $params = '';
     if ($use_in_sidebar == 'yes') {
         $params .= ' use_in_sidebar="yes" ';
     }
     if ($redirect_to != 'yes') {
         $params .= ' redirect_to="' . $redirect_to . '" ';
     }
     if ($captcha != 'no') {
         $params .= ' captcha="' . $captcha . '" ';
     }
     $params .= ' register_link="' . $register_link . '" ';
     $params .= ' forgot_link="' . $forgot_link . '" ';
     $params .= ' register_text="' . $register_text . '" ';
     $params .= ' forgot_text="' . $forgot_text . '" ';
     $params .= ' custom_register_url="' . $custom_register_url . '" ';
     $params .= ' custom_forgot_url="' . $custom_forgot_url . '" ';
     $output = do_shortcode('[upme_login ' . $params . ' ]');
     //"<div style='color:{$color};' data-foo='${foo}'>{$content}</div>";
     return $output;
 }
Esempio n. 16
0
 public function renderProfile($atts, $content = null)
 {
     extract(shortcode_atts(array('name' => '', 'id' => '', 'view' => '', 'show_id' => 'no', 'show_profile_status' => 'no', 'use_in_sidebar' => '', 'show_stats' => 'yes', 'show_social_bar' => 'yes', 'show_role' => 'no', 'logout_redirect' => '', 'profile_fields' => ''), $atts));
     $content = wpb_js_remove_wpautop($content, true);
     // fix unclosed/unwanted paragraph tags in $content
     $params = '';
     if ($name != '') {
         $params .= ' name="' . $name . '" ';
     }
     if ($id != '') {
         $params .= ' id="' . $id . '" ';
     }
     if ($use_in_sidebar == 'yes') {
         $params .= ' use_in_sidebar="' . $use_in_sidebar . '" ';
     }
     if ($logout_redirect != '') {
         $params .= ' logout_redirect="' . $logout_redirect . '" ';
     }
     if ($view == 'compact') {
         $params .= ' view="compact" ';
     } else {
         if ($view == 'fields') {
             $params .= ' view="' . $profile_fields . '" ';
         }
     }
     $params .= ' profile_fields="" ';
     $params .= ' show_id="' . $show_id . '" ';
     $params .= ' show_profile_status="' . $show_profile_status . '" ';
     $params .= ' show_stats="' . $show_stats . '" ';
     $params .= ' show_social_bar="' . $show_social_bar . '" ';
     $params .= ' show_role="' . $show_role . '" ';
     $output = do_shortcode('[upme ' . $params . ' ]');
     return $output;
 }
Esempio n. 17
0
function theme_items_list($atts, $content)
{
    extract(shortcode_atts(array("id" => "scrolling_list_0", "type" => "items", "header" => "", "class" => "", "color" => "", "read_more" => 0, "button_label" => "", "button_url" => "", "top_margin_header" => "page_margin_top_section", "top_margin" => "page_margin_top"), $atts));
    $output = "";
    if ($type == "scrolling") {
        $output .= '<div class="clearfix' . ($top_margin_header != "none" ? ' ' . $top_margin_header : '') . '">
		<div class="header_left">';
    }
    if ($header != "") {
        $output .= '<h3 class="box_header' . ($top_margin_header != "none" && $type != "scrolling" ? ' ' . $top_margin_header : '') . '">' . $header . '</h3>';
    }
    if ($type == "scrolling") {
        $output .= '</div>
		<div class="header_right">
			<a href="#" id="' . $id . '_prev" class="scrolling_list_control_left icon_small_arrow left_black"></a>
			<a href="#" id="' . $id . '_next" class="scrolling_list_control_right icon_small_arrow right_black"></a>
		</div>
	</div>
	<div class="scrolling_list_wrapper">';
    }
    $output .= '<ul class="' . $type . '_list' . ($id != '' && $type == 'scrolling' ? ' ' . $id : '') . ($color != '' ? ' ' . $color : '') . ($class != '' ? ' ' . $class : '') . ($top_margin != "none" ? ' ' . $top_margin : '') . ' clearfix">' . wpb_js_remove_wpautop($content) . '</ul>';
    if ($type == "scrolling") {
        $output .= '</div>';
    }
    if ((int) $read_more) {
        $output .= '<div class="item_footer clearfix"><a class="more" href="' . $button_url . '" title="' . esc_attr($button_label) . '">' . $button_label . '</a></div>';
    }
    return $output;
}
Esempio n. 18
0
function nicdark_shortcode_table($atts, $content = null)
{
    $atts = shortcode_atts(array('content' => ''), $atts);
    $str = '';
    $str .= wpb_js_remove_wpautop($content, true);
    return apply_filters('uds_shortcode_out_filter', $str);
}
        protected function content($atts, $content = null)
        {
            extract(shortcode_atts(array('intro_img' => '', 'intro_heading' => ''), $atts));
            $images = explode(',', esc_html($intro_img));
            if (!empty($images)) {
                $images_html = '<div class="halfSlider slider flexslider"><ul class="slides">';
                foreach ($images as $single_image) {
                    $src = wp_get_attachment_image_src($single_image, 'float_slide');
                    $images_html .= '<li><img src="' . esc_url($src[0]) . '" width="' . esc_attr($src[1]) . '" height="' . esc_attr($src[2]) . '"  alt=""/></li>';
                }
                $images_html .= '</ul></div>';
            } else {
                $images_html = '';
            }
            $html = '<div class="officeHolder clearfix bgGrey">
			' . $images_html . '
			<div class="halfDesc tLeft  ">

				<div class="halfInner">
				<h3>' . esc_html($intro_heading) . '</h3>
				' . wpb_js_remove_wpautop($content, true) . '
				</div>

			</div>
			</div>';
            return $html;
        }
 public function renderRegistration($atts, $content = null)
 {
     extract(shortcode_atts(array('use_in_sidebar' => 'no', 'redirect_to' => '', 'captcha' => 'no', 'display_login' => 'yes', 'name' => '', 'user_role' => ''), $atts));
     $content = wpb_js_remove_wpautop($content, true);
     // fix unclosed/unwanted paragraph tags in $content
     $params = '';
     if ($user_role != '') {
         $params .= ' user_role="' . $user_role . '" ';
     }
     if ($name != '') {
         $params .= ' name="' . $name . '" ';
     }
     if ($captcha != 'no') {
         $params .= ' captcha="' . $captcha . '" ';
     }
     if ($redirect_to != '') {
         $params .= ' redirect_to="' . $redirect_to . '" ';
     }
     if ($use_in_sidebar == 'yes') {
         $params .= ' use_in_sidebar="' . $use_in_sidebar . '" ';
     }
     $params .= ' display_login="******" ';
     $output = do_shortcode('[upme_registration ' . $params . ' ]');
     //"<div style='color:{$color};' data-foo='${foo}'>{$content}</div>";
     return $output;
 }
Esempio n. 21
0
function curly_person($atts, $content = null)
{
    extract(shortcode_atts(array('style' => null, 'picture' => null, 'name' => null, 'facebook' => null, 'twitter' => null, 'linkedin' => null, 'position' => null, 'email' => null), $atts));
    $html = '<div class="person clearfix ' . ($style ? $style : null) . '">';
    $style = is_null($style) ? 'normal' : $style;
    $picture = is_numeric($picture) ? wp_get_attachment_url($picture) : $picture;
    $content = function_exists('wpb_js_remove_wpautop') ? wpb_js_remove_wpautop($content, true) : $content;
    if ($style) {
        if ($style == 'mini') {
            $html .= $picture ? '<img src="' . $picture . '" alt="' . $name . '">' : null;
            $html .= '<div>';
            $html .= $name ? '<strong>' . $name . '</strong><br>' : null;
            $html .= $position ? $position . '<br>' : null;
            $html .= $content ? apply_filters('the_content', $content) : null;
            $html .= '</div>';
        } else {
            $html .= $picture ? '<p class="text-center"><img src="' . $picture . '" alt="' . $name . '"></p>' : null;
            $html .= '<div class="text-center">';
            $html .= $name ? '<h5>' . $name . '</h5>' : null;
            $html .= $position ? $position . '<br><br>' : null;
            $html .= $content ? '<p>' . apply_filters('the_content', $content) . '</p>' : null;
            $html .= $facebook || $twitter || $linkedin || $email ? '<p>' : null;
            $html .= $facebook ? '<a href="' . $facebook . '">' . do_shortcode('[icon icon="facebook" boxed="yes"]') . '</a> ' : null;
            $html .= $twitter ? '<a href="' . $twitter . '">' . do_shortcode('[icon icon="twitter" boxed="yes"]') . '</a> ' : null;
            $html .= $linkedin ? '<a href="' . $linkedin . '">' . do_shortcode('[icon icon="linkedin" boxed="yes"]') . '</a> ' : null;
            $html .= $email ? '<a href="mailto:' . $email . '">' . do_shortcode('[icon icon="envelope" boxed="yes"]') . '</a> ' : null;
            $html .= $facebook || $twitter || $linkedin || $email ? '</p>' : null;
            $html .= '</div>';
        }
    }
    $html .= '</div>';
    return $html;
}
Esempio n. 22
0
function wf_tooltip_func($atts, $content = null)
{
    extract(shortcode_atts(array('tooltip_id' => 'tooltip', 'tooltip_theme' => 'tooltipster-black', 'tooltip_animation' => 'fade', 'message_text' => 'This div has a tooltip when you hover over it!'), $atts));
    $content = wpb_js_remove_wpautop($content, true);
    // fix unclosed/unwanted paragraph tags in $content
    $tooltip = '
		<div class="tooltipster" data-id="tooltip" title="' . $content . '">
			' . $message_text . '
		</div>

		<script>
			jQuery(document).ready(function($) {
				$(".tooltipster").tooltipster({
					animation: "' . $tooltip_animation . '",
					delay: 200,
					theme: "' . $tooltip_theme . '",
					touchDevices: false,
					trigger: "hover",
					contentAsHTML: true
				});
			});
		</script>
    ';
    return $tooltip;
}
 protected function content($atts, $content = null)
 {
     extract(shortcode_atts(array('mode' => '', 'effect' => '', "speed" => '', "pause" => '', 'autoplay' => '', 'controlnav' => '', 'pagernav' => '', 'img_size' => 'thumbnail', 'slide_count' => 1, 'el_id' => '', 'el_class' => '', 'css_animation' => '', 'anim_type' => '', 'anim_delay' => '', 'css' => ''), $atts));
     $sc_class = 'wt_testimonials_slider_sc';
     $id = mt_rand(9999, 99999);
     if (trim($el_id) != false) {
         $el_id = esc_attr(trim($el_id));
     } else {
         $el_id = $sc_class . '-' . $id;
     }
     wp_print_scripts('wt-extend-bx-slider');
     wp_enqueue_style('wt-extend-bx-slider');
     $output = '';
     $autoplay !== "true" ? $autoplay = 'false' : '';
     $controlnav !== "true" ? $controlnav = 'false' : '';
     $pagernav !== "true" ? $pagernav = 'false' : '';
     $el_class = esc_attr($this->getExtraClass($el_class));
     $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $sc_class . $el_class . vc_shortcode_custom_css_class($css, ' '), $this->settings['base']);
     $css_class .= $this->wt_sc->getWTCSSAnimationClass($css_animation, $anim_type);
     $anim_data = $this->wt_sc->getWTCSSAnimationData($css_animation, $anim_delay);
     $speed = (int) $speed;
     $pause = (int) $pause;
     $img_size = esc_html($img_size);
     $output .= '<div id="' . $el_id . '" class="' . $css_class . '"' . $anim_data . '>';
     $output .= "\n\t\t\t" . '<ul class="wt_bxslider" data-bx-mode="' . $mode . '" data-bx-effect="' . $effect . '" data-bx-speed="' . $speed . '" data-bx-pause="' . $pause . '" data-bx-autoPlay="' . $autoplay . '" data-bx-controlNav="' . $controlnav . '" data-bx-pagerNav="' . $pagernav . '">';
     for ($i = 1; $i <= $slide_count; $i++) {
         $item_content = '';
         $image = '';
         isset($atts["content_" . $i]) && $atts["content_" . $i] != "" ? $item_content = $atts["content_" . $i] : '';
         if ($item_content != '') {
             $item_content = wpb_js_remove_wpautop($item_content, true);
             // fix unclosed/unwanted paragraph tags in $content
         }
         if ($atts["image_" . $i] != NULL) {
             $image = $atts["image_" . $i];
             $img_id = preg_replace('/[^\\d]/', '', $image);
             $img = wpb_getImageBySize(array('attach_id' => $img_id, 'thumb_size' => $img_size, 'class' => 'wt_testimonial_image'));
         } else {
             $image = '';
         }
         isset($atts["target_" . $i]) && $atts["target_" . $i] == "true" ? $target = '_blank' : ($target = '_self');
         $output .= "\n\t\t\t\t" . '<li class="item">';
         if ($image != '') {
             $output .= "\n\t\t\t\t\t" . $img['thumbnail'];
         }
         $output .= "\n\t\t\t\t\t" . $item_content;
         if (isset($atts["name_" . $i]) && $atts["name_" . $i] != "") {
             $item_name = esc_html($atts["name_" . $i]);
             if (isset($atts["link_" . $i]) && $atts["link_" . $i] != "") {
                 $output .= "\n\t\t\t\t\t" . '<h3><a href="' . esc_url($atts["link_" . $i]) . '" title="' . $item_name . '" target="' . $target . '">' . $item_name . '</a></h3>';
             } else {
                 $output .= "\n\t\t\t\t\t" . '<h3>' . $item_name . '</h3>';
             }
         }
         $output .= "\t\t\t\t" . '</li>';
     }
     $output .= "\n\t\t\t" . '</ul>';
     $output .= "\n\t\t\t" . '</div>';
     return $output;
 }
Esempio n. 24
0
function ro_menu_item_box_func($atts, $content = null)
{
    extract(shortcode_atts(array('title' => '', 'text_featured' => '', 'desc' => '', 'el_class' => ''), $atts));
    $content = wpb_js_remove_wpautop($content, true);
    $class = array();
    $class[] = 'ro-menu-item-wrap';
    $class[] = $el_class;
    ob_start();
    ?>
		<div class="<?php 
    echo esc_attr(implode(' ', $class));
    ?>
">
			<div class="ro-menu-item">
				<?php 
    if ($text_featured) {
        $text_featured = '<span>' . esc_html($text_featured) . '</span>';
    }
    if ($title) {
        echo '<h6>' . esc_html($title) . $text_featured . '</h6>';
    }
    if ($content) {
        echo '<div class="ro-content">' . $content . '</div>';
    }
    ?>
			</div>
		</div>
		
    <?php 
    return ob_get_clean();
}
Esempio n. 25
0
function quote_func($atts, $content = null)
{
    // New function parameter $content is added!
    extract(shortcode_atts(array('width' => '1/2', 'el_position' => '', 'author' => '', 'company' => '', 'author_image' => ''), $atts));
    $width_class = '';
    //wpb_translateColumnWidthToSpan($width); // Determine width for our div holder
    $content = wpb_js_remove_wpautop($content, true);
    $image_attributes = wp_get_attachment_image_src($author_image, 'full');
    // returns an array
    $output = '';
    $output .= '<blockquote class="customerblockquote clearfix">';
    $output .= '<div class="inner">';
    $output .= $content;
    $output .= '</div>';
    $output .= '<div class="media author">';
    if ($author_image) {
        $output .= '<span class="pull-left">';
        $output .= '<img class="media-object" src="' . $image_attributes[0] . '" alt="">';
        $output .= '</span>';
    }
    $output .= '<div class="media-body">';
    $output .= '<h4 class="media-heading">' . $author;
    $output .= '<span>' . $company . '</span>';
    $output .= '</h4>';
    $output .= '</div>';
    $output .= '</div>';
    $output .= '</blockquote>';
    return $output;
}
Esempio n. 26
0
function bartag_func($atts, $content = null)
{
    extract(shortcode_atts(array('foo' => 'something', 'color' => '#FFF'), $atts));
    $content = wpb_js_remove_wpautop($content);
    // fix unclosed/unwanted paragraph tags in $content
    return "<div style='color:{$color};' data-foo='{$foo}'>{$content}</div>";
}
Esempio n. 27
0
 public function renderMemberContent($atts, $content = null)
 {
     $content = wpb_js_remove_wpautop($content, true);
     // fix unclosed/unwanted paragraph tags in $content
     $output = do_shortcode('[upme_member]' . $content . '[/upme_member]');
     return $output;
 }
        protected function content($atts, $content = null)
        {
            extract(shortcode_atts(array('img_url' => '', 'heading' => '', 'para' => '', 'left_right' => ''), $atts));
            $src = wp_get_attachment_image_src($img_url, 'full');
            if ($left_right == 'img_right') {
                $html = '	<div class="servHolder clearfix ofsTop ofsBottom "><div class="clearfix  servHolderInner">
								<div class="content tLeft seven columns">
									<h1>' . esc_html($heading) . '</h1>
										' . wpb_js_remove_wpautop($content, true) . '
								</div>
								<div class="shot tLeft nine columns ">
									<img src="' . esc_url($src[0]) . '" alt=""/>
								</div>
								</div></div>';
            } else {
                $html = '	<div class="servHolder clearfix ofsTop ofsBottom "><div class="clearfix  servHolderInner">
								<div class="shot tLeft nine columns ">
									<img src="' . esc_url($src[0]) . '" alt=""/>
								</div>
								<div class="content tLeft seven columns">
									<h1>' . esc_html($heading) . '</h1>
										' . wpb_js_remove_wpautop($content, true) . '
								</div>
								</div></div>';
            }
            return $html;
        }
Esempio n. 29
0
 public function buildTemplate($atts, $content)
 {
     $output = array();
     $inline_css = array();
     $main_wrapper_classes = array('vc_cta3');
     $container_classes = array();
     if (!empty($atts['el_class'])) {
         $main_wrapper_classes[] = $atts['el_class'];
     }
     if (!empty($atts['style'])) {
         $main_wrapper_classes[] = 'vc_cta3-style-' . $atts['style'];
     }
     if (!empty($atts['shape'])) {
         $main_wrapper_classes[] = 'vc_cta3-shape-' . $atts['shape'];
     }
     if (!empty($atts['txt_align'])) {
         $main_wrapper_classes[] = 'vc_cta3-align-' . $atts['txt_align'];
     }
     if (!empty($atts['color']) && !(isset($atts['style']) && 'custom' === $atts['style'])) {
         $main_wrapper_classes[] = 'vc_cta3-color-' . $atts['color'];
     }
     if (isset($atts['style']) && 'custom' === $atts['style']) {
         if (!empty($atts['custom_background'])) {
             $inline_css[] = vc_get_css_color('background-color', $atts['custom_background']);
         }
     }
     if (!empty($atts['i_on_border'])) {
         $main_wrapper_classes[] = 'vc_cta3-icons-on-border';
     }
     if (!empty($atts['i_size'])) {
         $main_wrapper_classes[] = 'vc_cta3-icon-size-' . $atts['i_size'];
     }
     if (!empty($atts['i_background_style'])) {
         $main_wrapper_classes[] = 'vc_cta3-icons-in-box';
     }
     if (!empty($atts['el_width'])) {
         $container_classes[] = 'vc_cta3-size-' . $atts['el_width'];
     }
     if (!empty($atts['add_icon'])) {
         $output['icons-' . $atts['add_icon']] = $this->getVcIcon($atts);
         $main_wrapper_classes[] = 'vc_cta3-icons-' . $atts['add_icon'];
     }
     if (!empty($atts['add_button'])) {
         $output['actions-' . $atts['add_button']] = $this->getButton($atts);
         $main_wrapper_classes[] = 'vc_cta3-actions-' . $atts['add_button'];
     }
     if (!empty($atts['css_animation'])) {
         $main_wrapper_classes[] = $this->getCSSAnimation($atts['css_animation']);
     }
     if (!empty($atts['css'])) {
         $main_wrapper_classes[] = vc_shortcode_custom_css_class($atts['css']);
     }
     $output['content'] = wpb_js_remove_wpautop($content, true);
     $output['heading1'] = $this->getHeading('h2', $atts);
     $output['heading2'] = $this->getHeading('h4', $atts);
     $output['css-class'] = $main_wrapper_classes;
     $output['container-class'] = $container_classes;
     $output['inline-css'] = $inline_css;
     $this->template_vars = $output;
 }
 function cq_vc_notify_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('width' => '240', 'height' => '140', 'textcolor' => '#333', 'background' => '#fff', 'easein' => 'fadeInLeft', 'easeout' => 'fadeOutRight', 'cookie' => 'false', 'autohidedelay' => '', 'days' => '10', 'top' => '', 'right' => '10', 'bottom' => '10', 'left' => '', 'opacity' => '0.8', 'displaywhen' => 'scrolling', 'closeposition' => 'left'), $atts));
     }
     wp_register_style('vc_notify_cq_style', plugins_url('css/jquery.scroll-notify.css', __FILE__));
     wp_enqueue_style('vc_notify_cq_style');
     wp_register_style('animate', plugins_url('css/animate.min.css', __FILE__));
     wp_enqueue_style('animate');
     wp_register_script('modernizr_css3', plugins_url('js/modernizr.custom.49511.js', __FILE__), array("jquery"));
     wp_enqueue_script('modernizr_css3');
     wp_enqueue_script('jquery-cookie', plugins_url('js/jquery.cookie.js', __FILE__), array('jquery'));
     wp_enqueue_script('vc_notify_cq_js', plugins_url('js/jquery.scroll-notify.min.js', __FILE__), array('jquery'));
     $content = wpb_js_remove_wpautop($content);
     // fix unclosed/unwanted paragraph tags in $content
     $output = '';
     if (is_single() || is_page()) {
         if ($displaywhen == "scrollhidden") {
             return "<div id='cq-scroll-notification' data-width='{$width}' data-height='{$height}' data-textcolor='{$textcolor}' data-background='{$background}' data-easein='{$easein}' data-easeout='{$easeout}' data-positiontop='{$top}' data-positionright='{$right}' data-positionbottom='{$bottom}' data-positionleft='{$left}' data-cookie='{$cookie}' data-days='{$days}' data-autohidedelay='{$autohidedelay}' data-displaywhen='loaded' data-opacity='{$opacity}' data-from='0' data-to='all' data-closebutton='true' data-displaybydefault='on' data-closeposition='{$closeposition}' class='cq-scroll-notification'> {$content} </div>";
         } else {
             return "<div id='cq-scroll-notification' data-width='{$width}' data-height='{$height}' data-textcolor='{$textcolor}' data-background='{$background}' data-easein='{$easein}' data-easeout='{$easeout}' data-positiontop='{$top}' data-positionright='{$right}' data-positionbottom='{$bottom}' data-positionleft='{$left}' data-cookie='{$cookie}' data-days='{$days}' data-autohidedelay='{$autohidedelay}' data-displaywhen='{$displaywhen}' data-opacity='{$opacity}' data-from='0' data-to='all' data-closebutton='true' data-closeposition='{$closeposition}' class='cq-scroll-notification' style='display:none'> {$content} </div>";
         }
     }
 }