Exemplo n.º 1
0
 /**
  *
  */
 public static function pricetable($atts, $content = null, $code = null)
 {
     if ($atts == 'generator') {
         global $wpdb;
         $prices_list = array();
         $pricetables = $wpdb->get_results('SELECT ID, post_title FROM ' . $wpdb->posts . ' WHERE post_type = "pricetable"');
         if (is_array($pricetables)) {
             foreach ($pricetables as $key => $value) {
                 $prices_list[$value->ID] = $pricetables[$key]->post_title;
             }
         } else {
             $price_list[0] = __('Please install Price Table plugin...', MISS_ADMIN_TEXTDOMAIN);
         }
         $option = array('name' => __('Blog Grid Layout', MISS_ADMIN_TEXTDOMAIN), 'value' => 'pricetable', 'options' => array(array('name' => __('Select Table', MISS_ADMIN_TEXTDOMAIN), 'desc' => __('Choose "Pricing Table" to use.', MISS_ADMIN_TEXTDOMAIN), 'id' => 'id', 'type' => 'select', 'options' => $prices_list), 'shortcode_has_atts' => true));
         return $option;
     }
     extract(shortcode_atts(array('id' => ''), $atts));
     $pricetable = new WP_Query();
     $pricetable->query(array('post_type' => 'pricetable', 'post_id' => $id));
     while ($pricetable->have_posts()) {
         $pricetable->the_post();
         $prices_list[get_the_ID()] = get_the_title();
         $out = '[price_table id="' . $id . '"]';
     }
     return do_shortcode($out);
 }
Exemplo n.º 2
0
 public function test_languageがEnglishならHello()
 {
     // ショートコードを実行して結果を取得
     $greeting = do_shortcode('[greeting language="english"]');
     // アサーションメソッドを実行して期待した結果かどうかチェック
     $this->assertEquals('Hello', $greeting);
 }
 /**
  * Columns shortcode
  *
  * @param array $atts
  * @param string $content
  * @return string
  */
 function wolf_columns_shortcode($atts, $content = null)
 {
     // if ( class_exists( 'Vc_Manager' ) && function_exists( 'vc_map_get_attributes' ) ) {
     // 	$atts = vc_map_get_attributes( 'wolf_column', $atts );
     // }
     extract(shortcode_atts(array('col' => 'col-6', 'class' => '', 'first' => '', 'last' => '', 'inline_style' => ''), $atts));
     $col = esc_attr($col);
     $first = esc_attr($first);
     $last = esc_attr($last);
     $col = esc_attr($col);
     $inline_style = sanitize_text_field($inline_style);
     $output = '';
     $style = '';
     $class = $class ? "{$class} " : '';
     // add space
     if ($inline_style) {
         $style .= $inline_style;
     }
     $style = $style ? " style='{$style}'" : '';
     if ($first) {
         $class = 'first';
     } elseif ($last) {
         $class = 'last';
     }
     if ($class == 'first') {
         $output .= '<div class="clear"></div>';
     }
     $output .= '<div class="' . $col . ' ' . $class . '"' . $style . '>' . do_shortcode($content) . '</div>';
     if ($class == 'last') {
         $output .= '<div class="clear"></div>';
     }
     return $output;
 }
Exemplo n.º 4
0
 /**
  * Render the shortcode
  * 
  * @param  array $args	 Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string		  HTML output
  */
 function render($args, $content = '')
 {
     global $smof_data;
     $defaults = shortcode_atts(array('class' => '', 'id' => '', 'background_color' => '', 'background_image' => '', 'background_position' => 'left top', 'background_repeat' => 'no-repeat', 'border_color' => '', 'border_size' => '', 'border_style' => 'solid', 'center_content' => 'no', 'hide_on_mobile' => 'no', 'last' => 'no', 'margin_top' => $smof_data['col_top_margin'], 'margin_bottom' => $smof_data['col_bottom_margin'], 'padding' => '', 'spacing' => 'yes', 'animation_type' => '', 'animation_direction' => 'left', 'animation_speed' => '0.1'), $args);
     extract($defaults);
     if ($defaults['margin_top'] == '') {
         $defaults['margin_top'] = $smof_data['col_top_margin'];
     }
     if ($defaults['margin_bottom'] == '') {
         $defaults['margin_bottom'] = $smof_data['col_bottom_margin'];
     }
     self::$args = $defaults;
     // After the last column we need a clearing div
     $clearfix = '';
     if (self::$args['last'] == 'yes') {
         $clearfix = sprintf('<div %s></div>', FusionCore_Plugin::attributes('fusion-clearfix'));
     }
     $inner_content = do_shortcode($content);
     // If content should be centered, add needed markup
     if ($center_content == 'yes') {
         $inner_content = sprintf('<div class="fusion-column-table"><div class="fusion-column-tablecell">%s</div></div>', $inner_content);
     }
     // Setup the main markup
     $html = sprintf('<div %s><div %s>%s</div></div>%s', FusionCore_Plugin::attributes('two-fifth-shortcode'), FusionCore_Plugin::attributes('two-fifth-shortcode-wrapper'), $inner_content, $clearfix);
     return $html;
 }
Exemplo n.º 5
0
 /**
  * List group.
  *
  * @param  array  $atts
  * @param  string $content
  * @return string
  */
 public function list_group($atts, $content = null)
 {
     extract(shortcode_atts(array('class' => ''), $atts));
     $content = str_replace('<ul>', '<ul class="list-group">', $content);
     $content = str_replace('<li>', '<li class="list-group-item">', $content);
     return '<div class="wabbr-list-group ' . $class . '">' . do_shortcode($content) . '</div>';
 }
Exemplo n.º 6
0
    /**
     * Render the child shortcode
     * @param  array $args     Shortcode paramters
     * @param  string $content Content between shortcode
     * @return string          HTML output
     */
    function render_child($args, $content = '')
    {
        $defaults = Magee_Core::set_shortcode_defaults(array('title' => '', 'status' => '', 'icon' => ''), $args);
        extract($defaults);
        self::$args = $defaults;
        if ($status == "open") {
            $status = "in";
            $expanded = "true";
            $collapse = "";
        } else {
            $status = "";
            $expanded = "false";
            $collapse = "collapsed";
        }
        $itemId = 'collapse' . $this->id . "-" . $this->num;
        $html = '<div class="panel panel-default">
                                                    <div class="panel-heading" role="tab" id="heading' . $itemId . '">
                                                        <a class="accordion-toggle ' . $collapse . '" data-toggle="collapse" data-parent="#' . $this->id . '" href="#' . $itemId . '" aria-expanded="' . $expanded . '" aria-controls="' . $itemId . '">
                                                            <h4 class="panel-title">
                                                                <i class="fa ' . $icon . '"></i> ' . esc_attr($title) . '
                                                            </h4>
                                                        </a>
                                                    </div>
                                                    <div id="' . $itemId . '" class="panel-collapse collapse ' . $status . '" role="tabpanel" aria-labelledby="heading' . $itemId . '" aria-expanded="' . $expanded . '">
                                                        <div class="panel-body">
                                                          ' . do_shortcode(Magee_Core::fix_shortcodes($content)) . '
														  <div class="clear"></div>
                                                        </div>
                                                    </div>
                                                </div>';
        $this->num++;
        return $html;
    }
 function icon_list_item_shortcode($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 = $icon_link = $el_class = $icon_animation = $tooltip_disp = $tooltip_text = $icon_margin = '';
     extract(shortcode_atts(array('icon_type' => 'selector', 'icon' => '', 'icon_img' => '', 'icon_color' => '#333333', 'icon_style' => 'none', 'icon_color_bg' => '#ffffff', 'icon_color_border' => '#333333', 'icon_border_style' => '', 'icon_border_size' => '1', 'icon_border_radius' => '500', 'icon_border_spacing' => '50', "icon_size" => "", "icon_margin" => "", 'el_class' => ''), $atts));
     global $vc_list_icon_size, $vc_list_icon_margin;
     if (empty($icon_size)) {
         $icon_size = $vc_list_icon_size;
     }
     if (empty($icon_margin)) {
         $icon_margin = $vc_list_icon_margin;
     }
     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 = '';
     if ($icon_margin !== '') {
         $style .= 'margin-right:' . $icon_margin . 'px;';
     }
     $icon_animation = $icon_link = '';
     $output .= '<div class="uavc-list-content">';
     if ($icon !== "" || $icon_img !== '') {
         if ($icon_type == 'custom') {
             $icon_style = 'none';
         }
         $main_icon = do_shortcode('[just_icon icon_type="' . $icon_type . '" icon="' . $icon . '" icon_img="' . $icon_img . '" img_width="' . $icon_size . '" 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 . '" icon_link="' . $icon_link . '" icon_animation="' . $icon_animation . '"]');
         $output .= "\n" . '<div class="uavc-list-icon ' . $el_class . '" ' . $css_trans . ' style="' . $style . '">';
         $output .= $main_icon;
         $output .= "\n" . '</div>';
     }
     $output .= '<span class="uavc-list-desc">' . do_shortcode($content) . '</span>';
     $output .= '</div>';
     $output = '<li>' . $output . '</li>';
     return $output;
 }
Exemplo n.º 8
0
function tabgroup_vertical($params, $content = null)
{
    $GLOBALS['tabs'] = array();
    $GLOBALS['tab_count'] = 0;
    $i = 1;
    $randomid = rand();
    extract(shortcode_atts(array('title' => '', 'style' => 'normal'), $params));
    $content = do_shortcode($content);
    if (is_array($GLOBALS['tabs'])) {
        foreach ($GLOBALS['tabs'] as $key => $tab) {
            $current = $key == 0 ? ' current-menu-item' : '';
            // Set first menu item active by default.
            $active = $key == 0 ? ' active' : '';
            // Set first tab active by default.
            $tabs[] = '<li class="tab' . $current . '"><a href="#panel' . $randomid . $i . '">' . $tab['title'] . ' <span>asdf</span></a></li>';
            $panes[] = '<div class="tabs-inner' . $active . '" id="panel' . $randomid . $i . '"><p>' . do_shortcode($tab['content']) . '</p></div>';
            $i++;
        }
        $return = '
			<div class="row collapse vertical-tabs shortcode_tabgroup_vertical pos_' . $style . '">
			<h3>' . $title . '</h3>
			<div class="large-3 columns"><ul class="tabs-nav">' . implode("\n", $tabs) . '</ul></div><div class="large-9 columns">' . implode("\n", $panes) . '</div></div>';
    }
    return $return;
}
Exemplo n.º 9
0
function banner_simple_height($params = array(), $content = null)
{
    extract(shortcode_atts(array('title' => 'Freeshipping on all order over $75', 'subtitle' => 'Shop Now', 'link_url' => '', 'title_color' => '#fff', 'subtitle_color' => '#fff', 'inner_stroke' => '0px', 'inner_stroke_color' => '#fff', 'bg_color' => '#000', 'bg_image' => '', 'height' => 'auto', 'sep_padding' => '5px', 'sep_color' => 'rgba(255,255,255,0.01)', 'with_bullet' => 'no', 'bullet_text' => 'Bullet Text Goes Here', 'bullet_bg_color' => '', 'bullet_text_color' => ''), $params));
    $banner_with_img = '';
    if (is_numeric($bg_image)) {
        $bg_image = wp_get_attachment_url($bg_image);
        $banner_with_img = 'banner_with_img';
    }
    $content = do_shortcode($content);
    $banner_simple_height = '
		<div class="shortcode_banner_simple_height ' . $banner_with_img . '" onclick="location.href=\'' . $link_url . '\';">
			<div class="shortcode_banner_simple_height_inner">
				<div class="shortcode_banner_simple_height_bkg" style="background-color:' . $bg_color . '; background-image:url(' . $bg_image . ')"></div>
			
				<div class="shortcode_banner_simple_height_inside" style="height:' . $height . '; border: ' . $inner_stroke . ' solid ' . $inner_stroke_color . '">
					<div class="shortcode_banner_simple_height_content">
						<div><h3 style="color:' . $title_color . ' !important">' . $title . '</h3></div>
						<div class="shortcode_banner_simple_height_sep" style="margin:' . $sep_padding . ' auto; background-color:' . $sep_color . ';"></div>
						<div><h4 style="color:' . $subtitle_color . ' !important">' . $subtitle . '</h4></div>
					</div>
				</div>
			</div>';
    if ($with_bullet == 'yes') {
        $banner_simple_height .= '<div class="shortcode_banner_simple_height_bullet" style="background:' . $bullet_bg_color . '; color:' . $bullet_text_color . '"><span>' . $bullet_text . '</span></div>';
    }
    $banner_simple_height .= '</div>';
    return $banner_simple_height;
}
Exemplo n.º 10
0
 function widget($args, $instance)
 {
     global $wpdb;
     extract($args);
     $wpwb_title = $instance['wpwb_title'];
     echo do_shortcode('[wpwb_tweet_widget title="' . $wpwb_title . '"]');
 }
Exemplo n.º 11
0
function converio_image_slider($atts, $content = '')
{
    if (isset($atts) && !empty($atts)) {
        array_walk($atts, 'converio_arrangement_shortcode_arr_value');
    }
    extract(shortcode_atts(array('type' => '', 'translate_next' => '', 'translate_previous' => ''), $atts));
    remove_all_filters('converio_filters_image_slider', 10);
    if ($type == '2') {
        add_filter('converio_filters_image_slider', 'converio_filter_image_slider_two', 10);
        $output = '<div class="slider-image">';
        $output .= '<div class="container">';
        $output .= '<p class="number"><span></span>/<b></b></p>';
        $output .= '<ul id="slides">';
        $output .= '<a class="slidesjs-previous slidesjs-navigation" href="#" title="Previous">' . $translate_next . '</a> <a class="slidesjs-next slidesjs-navigation" href="#" title="Next">' . $translate_previous . '</a>';
        $output .= do_shortcode($content);
        $output .= '</ul>';
        $output .= '</div>';
        $output .= '</div>';
    } else {
        add_filter('converio_filters_image_slider', 'converio_filter_image_slider_one', 10);
        $output = '<section class="slider3">';
        $output .= '<div class="slider">';
        $output .= do_shortcode($content);
        $output .= '</div>';
        $output .= '</section>';
    }
    return $output;
}
Exemplo n.º 12
0
function ntabs($atts, $content)
{
    extract(shortcode_atts(array('title' => 'Tab %d', 'state' => ''), $atts));
    $x = $GLOBALS['tab_count'];
    $GLOBALS['tabs'][$x] = array('title' => sprintf($title, $GLOBALS['tab_count']), 'state' => sprintf($state, $GLOBALS['tab_count']), 'content' => do_shortcode($content));
    $GLOBALS['tab_count']++;
}
Exemplo n.º 13
0
 public function content($atts, $content = null)
 {
     $title = $type = $custom_styling = $custom_bg_colour = $custom_text_colour = $pb_margin_bottom = $el_class = $width = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'type' => '', 'custom_bg_colour' => '', 'custom_text_colour' => '', 'pb_margin_bottom' => 'no', 'el_class' => '', 'el_position' => '', 'width' => '1/2'), $atts));
     $output = '';
     $el_class = $this->getExtraClass($el_class);
     $width = spb_translateColumnWidthToSpan($width);
     $el_class .= ' spb_box_text';
     $el_class .= ' ' . $type;
     if ($pb_margin_bottom == "yes") {
         $el_class .= ' pb-margin-bottom';
     }
     if ($custom_bg_colour != "") {
         $custom_styling .= 'background: ' . $custom_bg_colour . '!important;';
     }
     if ($custom_text_colour != "") {
         $custom_styling .= 'color: ' . $custom_text_colour . '!important;';
     }
     $output .= "\n\t" . '<div class="spb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="spb_wrapper">';
     $output .= $title != '' ? "\n\t\t\t" . '<h3 class="spb-heading spb-text-heading"><span>' . $title . '</span></h3>' : '';
     $output .= "\n\t\t\t";
     if ($custom_styling != "") {
         $output .= '<div class="box-content-wrap" style="' . $custom_styling . '">' . do_shortcode($content) . '</div>';
     } else {
         $output .= '<div class="box-content-wrap">' . do_shortcode($content) . '</div>';
     }
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.spb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     //
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
Exemplo n.º 14
0
        function display_ultimate_map($atts, $content = null)
        {
            $width = $height = $map_type = $lat = $lng = $zoom = $streetviewcontrol = $maptypecontrol = $top_margin = $pancontrol = $zoomcontrol = $zoomcontrolsize = $dragging = $marker_icon = $icon_img = $map_override = $output = $map_style = $scrollwheel = $el_class = '';
            extract(shortcode_atts(array("width" => "100%", "height" => "300px", "map_type" => "ROADMAP", "lat" => "18.591212", "lng" => "73.741261", "zoom" => "14", "scrollwheel" => "", "streetviewcontrol" => "false", "maptypecontrol" => "false", "pancontrol" => "false", "zoomcontrol" => "false", "zoomcontrolsize" => "SMALL", "dragging" => "true", "marker_icon" => "default", "icon_img" => "", "top_margin" => "page_margin_top", "map_override" => "0", "map_style" => "", "el_class" => "", "infowindow_open" => "", "map_vc_template" => ""), $atts));
            $marker_lat = $lat;
            $marker_lng = $lng;
            if ($marker_icon == "default_self") {
                $icon_url = plugins_url("../assets/img/icon-marker-pink.png", __FILE__);
            } elseif ($marker_icon == "default") {
                $icon_url = "";
            } else {
                $icon_url = apply_filters('ult_get_img_single', $icon_img, 'url');
            }
            $id = "map_" . uniqid();
            $wrap_id = "wrap_" . $id;
            $map_type = strtoupper($map_type);
            $width = substr($width, -1) != "%" && substr($width, -2) != "px" ? $width . "px" : $width;
            $map_height = substr($height, -1) != "%" && substr($height, -2) != "px" ? $height . "px" : $height;
            $margin_css = '';
            if ($top_margin != 'none') {
                $margin_css = $top_margin;
            }
            if ($map_vc_template == 'map_vc_template_value') {
                $el_class .= 'uvc-boxed-layout';
            }
            $output .= "<div id='" . $wrap_id . "' class='ultimate-map-wrapper " . $el_class . "' style='" . ($map_height != "" ? "height:" . $map_height . ";" : "") . "'><div id='" . $id . "' data-map_override='" . $map_override . "' class='ultimate_google_map wpb_content_element " . $margin_css . "'" . ($width != "" || $map_height != "" ? " style='" . ($width != "" ? "width:" . $width . ";" : "") . ($map_height != "" ? "height:" . $map_height . ";" : "") . "'" : "") . "></div></div>";
            if ($scrollwheel == "disable") {
                $scrollwheel = 'false';
            } else {
                $scrollwheel = 'true';
            }
            $output .= "<script type='text/javascript'>\n\t\t\t(function(\$) {\n  \t\t\t'use strict';\n\t\t\tvar map_{$id} = null;\n\t\t\tvar coordinate_{$id};\n\t\t\tvar isDraggable = \$(document).width() > 641 ? true : {$dragging};\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvar map_{$id} = null;\n\t\t\t\tvar coordinate_{$id};\n\t\t\t\tcoordinate_{$id}=new google.maps.LatLng({$lat}, {$lng});\n\t\t\t\tvar mapOptions=\n\t\t\t\t{\n\t\t\t\t\tzoom: {$zoom},\n\t\t\t\t\tcenter: coordinate_{$id},\n\t\t\t\t\tscaleControl: true,\n\t\t\t\t\tstreetViewControl: {$streetviewcontrol},\n\t\t\t\t\tmapTypeControl: {$maptypecontrol},\n\t\t\t\t\tpanControl: {$pancontrol},\n\t\t\t\t\tzoomControl: {$zoomcontrol},\n\t\t\t\t\tscrollwheel: {$scrollwheel},\n\t\t\t\t\tdraggable: isDraggable,\n\t\t\t\t\tzoomControlOptions: {\n\t\t\t\t\t  style: google.maps.ZoomControlStyle.{$zoomcontrolsize}\n\t\t\t\t\t},";
            if ($map_style == "") {
                $output .= "mapTypeId: google.maps.MapTypeId.{$map_type},";
            } else {
                $output .= " mapTypeControlOptions: {\n\t\t\t\t\t  \t\tmapTypeIds: [google.maps.MapTypeId.{$map_type}, 'map_style']\n\t\t\t\t\t\t}";
            }
            $output .= "};";
            if ($map_style !== "") {
                $output .= 'var styles = ' . rawurldecode(base64_decode(strip_tags($map_style))) . ';
						var styledMap = new google.maps.StyledMapType(styles,
					    	{name: "Styled Map"});';
            }
            $output .= "var map_{$id} = new google.maps.Map(document.getElementById('{$id}'),mapOptions);";
            if ($map_style !== "") {
                $output .= "map_{$id}.mapTypes.set('map_style', styledMap);\n \t\t\t\t\t\t\t map_{$id}.setMapTypeId('map_style');";
            }
            if ($marker_lat != "" && $marker_lng != "") {
                $output .= "\n\t\t\t\t\t\tvar x = '" . $infowindow_open . "';\n\t\t\t\t\t\tvar marker_{$id} = new google.maps.Marker({\n\t\t\t\t\t\tposition: new google.maps.LatLng({$marker_lat}, {$marker_lng}),\n\t\t\t\t\t\tanimation:  google.maps.Animation.DROP,\n\t\t\t\t\t\tmap: map_{$id},\n\t\t\t\t\t\ticon: '" . $icon_url . "'\n\t\t\t\t\t});\n\t\t\t\t\tgoogle.maps.event.addListener(marker_{$id}, 'click', toggleBounce);";
                if (trim($content) !== "") {
                    $output .= "var infowindow = new google.maps.InfoWindow();\n\t\t\t\t\t\t\tinfowindow.setContent('<div class=\"map_info_text\" style=\\'color:#000;\\'>" . trim(preg_replace('/\\s+/', ' ', do_shortcode($content))) . "</div>');";
                    if ($infowindow_open == 'off') {
                        $output .= "infowindow.open(map_{$id},marker_{$id});";
                    }
                    $output .= "google.maps.event.addListener(marker_{$id}, 'click', function() {\n\t\t\t\t\t\t\t\tinfowindow.open(map_{$id},marker_{$id});\n\t\t\t\t\t\t  \t});";
                }
            }
            $output .= "}\n\t\t\tcatch(e){};\n\t\t\tjQuery(document).ready(function(\$){\n\t\t\t\tgoogle.maps.event.trigger(map_{$id}, 'resize');\n\t\t\t\t\$(window).resize(function(){\n\t\t\t\t\tgoogle.maps.event.trigger(map_{$id}, 'resize');\n\t\t\t\t\tif(map_{$id}!=null)\n\t\t\t\t\t\tmap_{$id}.setCenter(coordinate_{$id});\n\t\t\t\t});\n\t\t\t\t\$('.ui-tabs').bind('tabsactivate', function(event, ui) {\n\t\t\t\t   if(\$(this).find('.ultimate-map-wrapper').length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\t\$(window).trigger('resize');\n\t\t\t\t\t\t},200);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\$('.ui-accordion').bind('accordionactivate', function(event, ui) {\n\t\t\t\t   if(\$(this).find('.ultimate-map-wrapper').length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\t\$(window).trigger('resize');\n\t\t\t\t\t\t},200);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\$(window).load(function(){\n\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\$(window).trigger('resize');\n\t\t\t\t\t},200);\n\t\t\t\t});\n\t\t\t\t\$('.ult_exp_section').select(function(){\n\t\t\t\t\tif(\$(map_{$id}).parents('.ult_exp_section'))\n\t\t\t\t\t{\n\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\t\$(window).trigger('resize');\n\t\t\t\t\t\t},200);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\$(document).on('onUVCModalPopupOpen', function(){\n\t\t\t\t\tif(\$(map_{$id}).parents('.ult_modal-content'))\n\t\t\t\t\t{\n\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\t\$(window).trigger('resize');\n\t\t\t\t\t\t},200);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\$(document).on('click','.ult_tab_li',function(){\n\t\t\t\t\t\$(window).trigger('resize');\n\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\$(window).trigger('resize');\n\t\t\t\t\t},200);\n\t\t\t\t});\n\t\t\t});\n\t\t\tfunction toggleBounce() {\n\t\t\t  if (marker_{$id}.getAnimation() != null) {\n\t\t\t\tmarker_{$id}.setAnimation(null);\n\t\t\t  } else {\n\t\t\t\tmarker_{$id}.setAnimation(google.maps.Animation.BOUNCE);\n\t\t\t  }\n\t\t\t}\n\t\t\t})(jQuery);\n\t\t\t</script>";
            return $output;
        }
function acf_fields_do_shortcode($value, $post_id, $field)
{
    if (is_admin()) {
        return $value;
    }
    return do_shortcode($value);
}
 /**
  * Outputs the content of the widget
  *
  * @version 2.5.5
  * @param array $args
  * @param array $instance
  */
 public function widget($args, $instance)
 {
     // outputs the content of the widget
     echo $args['before_widget'];
     if (!empty($instance['title'])) {
         echo $args['before_title'] . apply_filters('widget_title', $instance['title']) . $args['after_title'];
     }
     if (!wcj_is_module_enabled('price_by_country')) {
         echo __('Prices and Currencies by Country module not enabled!', 'woocommerce-jetpack');
     } elseif ('by_ip' === get_option('wcj_price_by_country_customer_country_detection_method', 'by_ip')) {
         echo __('Customer Country Detection Method must include "by user selection"!', 'woocommerce-jetpack');
     } else {
         if (!isset($instance['replace_with_currency'])) {
             $instance['replace_with_currency'] = 'no';
         }
         echo do_shortcode('[wcj_country_select_drop_down_list countries="' . $instance['countries'] . '" replace_with_currency="' . $instance['replace_with_currency'] . '"]');
         /* switch ( $instance['switcher_type'] ) {
         				case 'link_list':
         					echo do_shortcode( '[wcj_currency_select_link_list]' );
         					break;
         				case 'radio_list':
         					echo do_shortcode( '[wcj_currency_select_radio_list]' );
         					break;
         				default:
         					echo do_shortcode( '[wcj_currency_select_drop_down_list]' );
         					break;
         			} */
     }
     echo $args['after_widget'];
 }
Exemplo n.º 17
0
function osc_theme_dlitem($params, $content = null)
{
    extract(shortcode_atts(array('heading' => ''), $params));
    $out = '<dt>' . do_shortcode($heading) . '</dt>';
    $out .= '<dd>' . do_shortcode($content) . '</dd>';
    return $out;
}
Exemplo n.º 18
0
    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', $instance['title']);
        $not_login = esc_attr($instance['not_login']);
        $register_like_button = esc_attr($instance['register_like_button']);
        if (empty($not_login) || !is_user_logged_in()) {
            echo $before_widget;
            if ($title) {
                echo $before_title . esc_attr($title) . $after_title;
            }
            ?>
				<div class="widget_login">
					<?php 
            if (!is_user_logged_in()) {
                echo '<div class="form-style form-style-2">
							' . do_shortcode("[ask_login" . (isset($register_like_button) && $register_like_button == "on" ? " register='button'" : "") . "]");
                if (empty($register_like_button)) {
                    echo '<ul class="login-links login-links-r">
									<li><a href="#">' . __("Register", "vbegy") . '</a></li>
								</ul>';
                }
                echo '<div class="clearfix"></div>
						</div>';
            } else {
                echo do_shortcode("[ask_login]");
            }
            ?>
				</div>
				<?php 
            echo $after_widget;
        }
    }
Exemplo n.º 19
0
 function Dashboard()
 {
     global $wp_query;
     if (!is_user_logged_in()) {
         include wpdm_tpl_path('wpdm-be-member.php');
         return;
     }
     $udb_page = isset($wp_query->query_vars['udb_page']) ? $wp_query->query_vars['udb_page'] : '';
     $udb_page_parts = explode("/", $udb_page);
     $udb_page = $udb_page_parts[0];
     if (isset($this->dashboard_menu[$udb_page]['callback'])) {
         $dashboard_contents = call_user_func($this->dashboard_menu[$udb_page]['callback'], $udb_page_parts);
     } else {
         if (isset($this->dashboard_menu[$udb_page]['shortcode'])) {
             $dashboard_contents = do_shortcode($this->dashboard_menu[$udb_page]['shortcode']);
         } else {
             if (isset($this->dashboard_menu_actions[$udb_page])) {
                 $dashboard_contents = call_user_func($this->dashboard_menu_actions[$udb_page], $udb_page_parts);
             }
         }
     }
     //else if(isset($this->dashboard_menu_actions[$udb_page]['shortcode']))
     //    $dashboard_contents = do_shortcode($this->dashboard_menu_actions[$udb_page]['shortcode']);
     include_once wpdm_tpl_path('wpdm-dashboard.php');
 }
 /**
  * Process our Success Message notification
  * 
  * @access public
  * @since 2.8
  * @return void
  */
 public function process($id)
 {
     global $ninja_forms_processing;
     $success_msg = Ninja_Forms()->notification($id)->get_setting('success_msg');
     $success_msg = do_shortcode(wpautop($success_msg));
     $ninja_forms_processing->add_success_msg('success_msg', $success_msg);
 }
Exemplo n.º 21
0
function dnp_code_inline($params, $content = null)
{
    extract(shortcode_atts(array('type' => '', 'value' => ''), $params));
    $content = preg_replace('/<br class="nc".\\/>/', '', $content);
    $result = '<code>' . do_shortcode($content) . '</code>';
    return force_balance_tags($result);
}
Exemplo n.º 22
0
 /**
  * Render the shortcode
  * @param  array $args	 Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string		  HTML output
  */
 function render($args, $content = '')
 {
     global $smof_data;
     $defaults = FusionCore_Plugin::set_shortcode_defaults(array('class' => '', 'id' => '', 'backgroundcolor' => strtolower($smof_data['tagline_bg']), 'border' => '0px', 'bordercolor' => strtolower($smof_data['tagline_border_color']), 'button' => '', 'buttoncolor' => 'default', 'button_shape' => strtolower($smof_data['button_shape']), 'button_size' => strtolower($smof_data['button_size']), 'button_type' => strtolower($smof_data['button_type']), 'content_alignment' => 'left', 'description' => '', 'highlightposition' => 'left', 'link' => '', 'linktarget' => '_self', 'modal' => '', 'shadow' => 'no', 'shadowopacity' => '0.7', 'title' => '', 'animation_type' => '', 'animation_direction' => 'left', 'animation_speed' => ''), $args);
     if ($defaults['modal']) {
         $defaults['link'] = '#';
     }
     $defaults['button_type'] = strtolower($defaults['button_type']);
     extract($defaults);
     self::$args = $defaults;
     $additional_content = '';
     $styles = "<style type='text/css'>.reading-box-container-{$this->tagline_box_counter} .element-bottomshadow:before,.reading-box-container-{$this->tagline_box_counter} .element-bottomshadow:after{opacity:{$shadowopacity};}</style>";
     if (isset($link) && $link && (isset($button) && $button) && self::$args['content_alignment'] != 'center') {
         self::$args['button_class'] = ' continue';
         $additional_content = sprintf('<a %s><span>%s</span></a>', FusionCore_Plugin::attributes('tagline-shortcode-button'), $button);
     }
     if (isset($title) && $title) {
         $additional_content .= sprintf('<h2>%s</h2>', $title);
     }
     if (isset($description) && $description) {
         $additional_content .= sprintf('<div class="reading-box-description">%s</div>', $description);
     }
     if (isset($link) && $link && (isset($button) && $button) && self::$args['content_alignment'] == 'center') {
         self::$args['button_class'] = ' continue';
         $additional_content .= sprintf('<a %s>%s</a>', FusionCore_Plugin::attributes('tagline-shortcode-button'), $button);
     }
     if (isset($link) && $link && (isset($button) && $button)) {
         self::$args['button_class'] = ' mobile-button';
         $additional_content .= sprintf('<a %s><span>%s</span></a>', FusionCore_Plugin::attributes('tagline-shortcode-button'), $button);
     }
     $html = sprintf('%s<div %s><div %s>%s%s</div></div>', $styles, FusionCore_Plugin::attributes('tagline-shortcode'), FusionCore_Plugin::attributes('tagline-shortcode-reading-box'), $additional_content, do_shortcode($content));
     $this->tagline_box_counter++;
     return $html;
 }
Exemplo n.º 23
0
 /**
  * How to display the widget on the screen.
  */
 function widget($args, $instance)
 {
     global $wp_query;
     $this_id = $wp_query->post->ID;
     $post = get_post($this_id);
     $this_type = $wp_query->post->post_type;
     if ($this_type == 'landing-page') {
         extract($args);
         $position = $_SESSION['lp_conversion_area_position'];
         if ($position == 'widget') {
             $title = apply_filters('widget_title', $instance['title']);
             /* Before widget (defined by themes). */
             echo $before_widget;
             /* Display the widget title if one was input (before and after defined by themes). */
             if ($title) {
                 echo $before_title . $title . $after_title;
             }
             echo "<div id='lp_container' class='inbound-conversion-sidebar'>";
             echo do_shortcode(lp_conversion_area($post, $content = null, $return = true, $doshortcode = false));
             echo "</div>";
             /* After widget (defined by themes). */
             echo $after_widget;
         }
     }
 }
    /**
     * Timeline Single Event Shortcode
     * 
     * @param  array $atts
     * @param  string $content
     * @return html $holder_output
     */
    function rt_tl_event($atts, $content = null)
    {
        extract(shortcode_atts(array("id" => '', "class" => '', "day" => '', "month" => '', "year" => '', "title" => ''), $atts));
        //content
        $content = rt_visual_composer_content_fix(do_shortcode($content));
        //title
        $title_output = !empty($title) ? '<h4 class="event-title">' . $title . '</h4>' : "";
        //output
        $date_output = sprintf('	 
		<span class="event-date">
			<span class="day">%1$s</span>
			<span class="month">%2$s</span>
			<span class="year">%3$s</span>
		</span>
	', $day, $month, $year);
        //id attr
        $id_attr = !empty($id) ? 'id="' . $id . '"' : "";
        //class attr
        $class_attr = !empty($class) ? 'class="' . $class . '"' : "";
        //output
        $output = sprintf('	 
		<div %1$s %2$s>
		%3$s<div class="event-details">%4$s%5$s</div>
		</div>
	', $id_attr, $class_attr, $date_output, $title_output, $content);
        return $output;
    }
Exemplo n.º 25
0
    function calltoaction_sc($atts, $content = '')
    {
        extract(shortcode_atts(array("link" => '', "class" => '', "title" => 'Call to actions'), $atts));
        $href = '';
        if ($link) {
            $href = 'href="' . $link . '"';
        }
        $classes = "btn";
        if ($class) {
            $classes .= ' ' . $class;
        }
        $classes = 'class="' . $classes . '"';
        ob_start();
        ?>

		<div class="row">
			<div class="twelve col text-center">
				<?php 
        echo do_shortcode($content);
        ?>
				<a <?php 
        echo $href . ' ' . $classes;
        ?>
 ><?php 
        echo $title;
        ?>
</a>
			</div>
		</div>

<?php 
        $data = ob_get_clean();
        return $data;
    }
Exemplo n.º 26
0
function inbound_shortcode_tabs($atts, $content = null)
{
    extract(shortcode_atts(array('heading' => ''), $atts));
    $out = '';
    if (!preg_match_all("/(.?)\\[(tab)\\b(.*?)(?:(\\/))?\\](?:(.+?)\\[\\/tab\\])?(.?)/s", $content, $matches)) {
        return do_shortcode($content);
    } else {
        for ($i = 0; $i < count($matches[0]); $i++) {
            $matches[3][$i] = shortcode_parse_atts($matches[3][$i]);
        }
        if ($heading != '') {
            $out .= '<div class="heading"><h3>' . $heading . '</h3><div class="sep"></div></div>';
        }
        $out .= '<div class="tabs-content">';
        $out .= '<ul class="tabs-nav clearfix">';
        for ($i = 0; $i < count($matches[0]); $i++) {
            $icon = $matches[3][$i]['icon'] != '' ? '<i class="tab-icon icon-' . $matches[3][$i]['icon'] . '"></i>' : '';
            $out .= '<li><a id="tab_' . $i . '_nav" title="' . $matches[3][$i]['title'] . '" href="#tab_' . $i . '">' . $icon . '<span>' . $matches[3][$i]['title'] . '<span></a></li>';
        }
        $out .= '</ul>';
        $out .= '<div class="tabs">';
        for ($i = 0; $i < count($matches[0]); $i++) {
            $out .= '<div id="tab_' . $i . '">' . do_shortcode(trim($matches[5][$i])) . '</div>';
        }
        $out .= '</div>';
        $out .= '</div>';
        return $out;
    }
}
    /**
     * Output the form
     *
     * @param array $atts
     */
    public static function output($atts, $content = null)
    {
        global $post, $wp;
        extract(shortcode_atts(self::options(), $atts));
        if ($content == null) {
            $content = self::content();
        }
        $current_url = add_query_arg($wp->query_string, '', home_url($wp->request));
        if (!isset($_GET['sp-unsubscribe'])) {
            ?>
<form method="post" action="<?php 
            echo home_url();
            ?>
">
			<input type="hidden" name="sendpress" value="post" />
			<input type="hidden" name="sp-shortcode" value="SC-Unsubscribe-Form" />
			<input type="hidden" name="sp-current-page" value="<?php 
            echo esc_url($current_url);
            ?>
" />
			<input type="text" name="sp-email" class="sp-input" placeholder="<?php 
            echo $placeholder;
            ?>
"/>
			<input type="submit" value="<?php 
            echo $btntxt;
            ?>
" />
			</form><?php 
        } else {
            echo do_shortcode($content);
        }
    }
Exemplo n.º 28
0
function wpsr_floatingbts_output()
{
    $wpsr_floatbts = get_option('wpsr_template_floating_bar_data');
    if (wpsr_floatingbts_check()) {
        echo do_shortcode(wpsr_process_floatingbts());
    }
}
Exemplo n.º 29
0
 /**
  * Front-end display of widget.
  *
  * @see WP_Widget::widget()
  *
  * @param array $args     Widget arguments.
  * @param array $instance Saved values from database.
  */
 public function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('widget_title', $instance['title']);
     echo $before_widget;
     if (!empty($title)) {
         echo $before_title . $title . $after_title;
     }
     $linked_page_is_set = 0 < strlen($instance['url_to_page']);
     $linked_page_id_is_set = 0 < (int) $instance['sc_id_for_url'];
     $shortcode = '[event-list show_nav=false';
     $shortcode .= ' num_events="' . $instance['num_events'] . '"';
     $shortcode .= ' title_length=' . $instance['title_length'];
     $shortcode .= ' show_starttime=' . $instance['show_starttime'];
     $shortcode .= ' show_location=' . $instance['show_location'];
     $shortcode .= ' location_length=' . $instance['location_length'];
     $shortcode .= ' show_details=' . $instance['show_details'];
     $shortcode .= ' details_length=' . $instance['details_length'];
     if ($linked_page_is_set && $linked_page_id_is_set) {
         $shortcode .= ' link_to_event=' . $instance['link_to_event'];
         $shortcode .= ' url_to_page="' . $instance['url_to_page'] . '"';
         $shortcode .= ' sc_id_for_url=' . $instance['sc_id_for_url'];
     } else {
         $shortcode .= ' link_to_event=false';
     }
     $shortcode .= ' cat_filter="' . $instance['category'] . '"';
     $shortcode .= ']';
     echo do_shortcode($shortcode);
     if ('true' === $instance['link_to_page'] && $linked_page_is_set) {
         echo '<div style="clear:both"><a title="' . $instance['link_to_page_caption'] . '" href="' . $instance['url_to_page'] . '">' . $instance['link_to_page_caption'] . '</a></div>';
     }
     echo $after_widget;
 }
Exemplo n.º 30
0
 protected function content($atts, $content = null)
 {
     $title = $width = $el_class = $output = $items = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'fullwidth' => '', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     /* PAGE BUILDER OUTPUT
        ================================================== */
     $width = spb_translateColumnWidthToSpan($width);
     $el_class = $this->getExtraClass($el_class);
     if ($fullwidth == "yes" && $width == "col-sm-12") {
         $fullwidth = true;
     } else {
         $fullwidth = false;
     }
     $output .= "\n\t" . '<div class="spb_supersearch_widget spb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="spb-asset-content">';
     $output .= $title != '' ? "\n\t\t\t" . $this->spb_title($title, '', $fullwidth) : '';
     $output .= "\n\t\t" . do_shortcode('[sf_supersearch]');
     $output .= "\n\t\t" . '</div>';
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     if ($fullwidth == "yes") {
         $output = $this->startRow($el_position, '', true) . $output . $this->endRow($el_position, '', true);
     } else {
         $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     }
     return $output;
 }