Exemplo n.º 1
0
    vc_map(array("name" => __("ST Blog", ST_TEXTDOMAIN), "base" => "st_blog", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => array(array("type" => "dropdown", "holder" => "div", "heading" => __("Style", ST_TEXTDOMAIN), "param_name" => "st_style", "value" => array(__("Style one", ST_TEXTDOMAIN) => "style1", __("Style two", ST_TEXTDOMAIN) => "style2")), array("type" => "textfield", "holder" => "div", "heading" => __("Number post", ST_TEXTDOMAIN), "param_name" => "st_blog_number_post", "value" => '4', "description" => __("Post number", ST_TEXTDOMAIN)), array("type" => "dropdown", "holder" => "div", "heading" => __("Number post of row", ST_TEXTDOMAIN), "param_name" => "st_blog_style", "value" => '', "description" => __("Number colums show in a row ", ST_TEXTDOMAIN), "value" => array(__('Four', ST_TEXTDOMAIN) => '4', __('Three', ST_TEXTDOMAIN) => '3', __('Two', ST_TEXTDOMAIN) => '2')), array("type" => "checkbox", "holder" => "div", "heading" => __("Category", ST_TEXTDOMAIN), "param_name" => "st_category", "value" => st_get_list_taxonomy_id('category')), array("type" => "dropdown", "holder" => "div", "heading" => __("Order", ST_TEXTDOMAIN), "param_name" => "st_blog_order", 'value' => array(__('Asc', ST_TEXTDOMAIN) => 'asc', __('Desc', ST_TEXTDOMAIN) => 'desc'), 'edit_field_class' => 'vc_col-sm-6', "description" => __("", ST_TEXTDOMAIN)), array("type" => "dropdown", "holder" => "div", "heading" => __("Order By", ST_TEXTDOMAIN), "param_name" => "st_blog_orderby", "value" => st_get_list_order_by(), 'edit_field_class' => 'vc_col-sm-6', "description" => __("", ST_TEXTDOMAIN)))));
}
if (!function_exists('st_vc_blog')) {
    function st_vc_blog($attr, $content = false)
    {
        $data = shortcode_atts(array('st_blog_number_post' => 5, 'st_blog_orderby' => 0, 'st_blog_order' => '', 'st_blog_style' => '', 'st_category' => '', 'st_style' => 'style1'), $attr, 'st_blog');
        extract($data);
        $query = array('post_type' => 'post', 'orderby' => $st_blog_orderby, 'order' => $st_blog_order, 'posts_per_page' => $st_blog_number_post);
        if ($st_category != '0' && $st_category != '') {
            $query['tax_query'][] = array('taxonomy' => 'category', 'terms' => explode(',', $st_category));
        }
        query_posts($query);
        $txt = '';
        while (have_posts()) {
            the_post();
            if ($st_style == 'style1') {
                $txt .= st()->load_template('vc-elements/st-blog/loop', false, $data);
            }
            if ($st_style == 'style2') {
                $txt .= st()->load_template('vc-elements/st-blog/loop2', false, $data);
            }
        }
        wp_reset_query();
        $r = '<div class="row row-wrap">
                 ' . $txt . '
               </div>';
        return $r;
    }
}
st_reg_shortcode('st_blog', 'st_vc_blog');
Exemplo n.º 2
0
<?php

if (function_exists('vc_map')) {
    vc_map(array("name" => __("ST Alert", ST_TEXTDOMAIN), "base" => "st_alert", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => array(array("type" => "textarea", "holder" => "div", "heading" => __("Content Alert", ST_TEXTDOMAIN), "param_name" => "st_content", "description" => "", 'edit_field_class' => 'vc_col-sm-12'), array("type" => "dropdown", "holder" => "div", "heading" => __("Type Alert", ST_TEXTDOMAIN), "param_name" => "st_type", "description" => "", 'edit_field_class' => 'vc_col-sm-12', 'value' => array(__('--Select--', ST_TEXTDOMAIN) => '', __('Success', ST_TEXTDOMAIN) => 'alert-success', __('Info', ST_TEXTDOMAIN) => 'alert-info', __('Warning', ST_TEXTDOMAIN) => 'alert-warning', __('Danger', ST_TEXTDOMAIN) => 'alert-danger')))));
}
if (!function_exists('st_vc_alert')) {
    function st_vc_alert($attr, $content = false)
    {
        $data = shortcode_atts(array('st_content' => '', 'st_type' => 'alert-success'), $attr, 'st_alert');
        extract($data);
        $txt = '<div class="alert ' . $st_type . '">
                    <button data-dismiss="alert" type="button" class="close"><span aria-hidden="true">×</span>
                    </button>
                    <p class="text-small">' . $st_content . '</p>
                </div>';
        return $txt;
    }
}
st_reg_shortcode('st_alert', 'st_vc_alert');
Exemplo n.º 3
0
<?php

if (function_exists('vc_map')) {
    vc_map(array("name" => __("ST Gird", ST_TEXTDOMAIN), "base" => "st_gird", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => array(array("type" => "colorpicker", "holder" => "div", "heading" => __("Color", ST_TEXTDOMAIN), "param_name" => "st_color", "description" => "", 'edit_field_class' => 'vc_col-sm-12', 'value' => '#999'), array("type" => "dropdown", "holder" => "div", "heading" => __("Size", ST_TEXTDOMAIN), "param_name" => "st_size", "description" => "", 'edit_field_class' => 'vc_col-sm-12', 'value' => array(__('--Select--', ST_TEXTDOMAIN) => '', __('col-1', ST_TEXTDOMAIN) => 'col-md-1', __('col-2', ST_TEXTDOMAIN) => 'col-md-2', __('col-3', ST_TEXTDOMAIN) => 'col-md-3', __('col-4', ST_TEXTDOMAIN) => 'col-md-4', __('col-5', ST_TEXTDOMAIN) => 'col-md-5', __('col-6', ST_TEXTDOMAIN) => 'col-md-6', __('col-7', ST_TEXTDOMAIN) => 'col-md-7', __('col-8', ST_TEXTDOMAIN) => 'col-md-8', __('col-9', ST_TEXTDOMAIN) => 'col-md-9', __('col-10', ST_TEXTDOMAIN) => 'col-md-10', __('col-11', ST_TEXTDOMAIN) => 'col-md-11', __('col-12', ST_TEXTDOMAIN) => 'col-md-12')))));
}
if (!function_exists('st_vc_gird')) {
    function st_vc_gird($attr, $content = false)
    {
        $data = shortcode_atts(array('st_color' => '', 'st_size' => 'col-md-1'), $attr, 'st_gird');
        extract($data);
        $class = Assets::build_css('background : ' . $st_color . ' ; height : 20px');
        $txt = '<div class="row"><div class="demo-grid">
                    <div class="' . $st_size . '">
                        <div class="' . $class . '"></div>
                    </div>
               </div></div>';
        return $txt;
    }
}
st_reg_shortcode('st_gird', 'st_vc_gird');
Exemplo n.º 4
0
<?php

if (!st_check_service_available('st_holidays')) {
    return;
}
if (function_exists('vc_map')) {
    vc_map(array("name" => __("ST Detailed Holiday Gallery", ST_TEXTDOMAIN), "base" => "st_holiday_detail_photo", "content_element" => true, "icon" => "icon-st", "category" => 'Shinetheme', "params" => array(array("type" => "dropdown", "holder" => "div", "heading" => __("Style", ST_TEXTDOMAIN), "param_name" => "style", "description" => "", "value" => array(__('--Select--', ST_TEXTDOMAIN) => '', __('Slide', ST_TEXTDOMAIN) => 'slide', __('Grid', ST_TEXTDOMAIN) => 'grid')))));
}
if (!function_exists('st_vc_holiday_detail_photo')) {
    function st_vc_holiday_detail_photo($attr, $content = false)
    {
        $default = array('style' => 'slide');
        $attr = wp_parse_args($attr, $default);
        if (is_singular('st_holidays')) {
            return st()->load_template('holidays/elements/photo', null, array('attr' => $attr));
        }
    }
}
if (st_check_service_available('st_holidays')) {
    st_reg_shortcode('st_holiday_detail_photo', 'st_vc_holiday_detail_photo');
}
Exemplo n.º 5
0
        }
        if ($st_orderby == 'sale') {
            $query['meta_key'] = 'cars_price';
            $query['orderby'] = 'meta_value';
        }
        if ($st_orderby == 'featured') {
            $query['meta_key'] = 'is_featured';
            $query['orderby'] = 'meta_value';
        }
        if (!empty($sort_taxonomy)) {
            if (isset($attr["id_term_" . $sort_taxonomy])) {
                $id_term = $attr["id_term_" . $sort_taxonomy];
                $query['tax_query'] = array(array('taxonomy' => $sort_taxonomy, 'field' => 'id', 'terms' => explode(',', $id_term)));
            }
        }
        if (!empty($st_location)) {
            $query['meta_query'][] = array('key' => 'id_location', 'value' => $st_location, 'compare' => "IN");
        }
        query_posts($query);
        $txt = '';
        while (have_posts()) {
            the_post();
            $txt .= st()->load_template('vc-elements/st-list-cars/loop', 'list', array('attr' => $attr, 'data_' => $data));
        }
        wp_reset_query();
        return '<div class="row row-wrap">' . $txt . '</div>';
    }
}
if (st_check_service_available('st_cars')) {
    st_reg_shortcode('st_list_cars', 'st_vc_list_cars');
}
Exemplo n.º 6
0
* ST Restaurent Detail Map
* @since 1.1.0
**/
if (function_exists('vc_map')) {
    vc_map(array('name' => __('ST Detailed Hotel Map', ST_TEXTDOMAIN), 'base' => 'st_restaurent_detail_map', 'content_element' => true, 'icon' => 'icon-st', 'category' => 'Hotel', 'show_settings_on_create' => false, 'params' => array()));
}
if (!function_exists('st_restaurent_detail_map')) {
    function st_restaurent_detail_map()
    {
        if (is_singular('st_restaurent')) {
            $lat = get_post_meta(get_the_ID(), 'map_lat', true);
            $lng = get_post_meta(get_the_ID(), 'map_lng', true);
            $zoom = get_post_meta(get_the_ID(), 'map_zoom', true);
            $html = ' <div style="width:100%; height:500px;" class="st_google_map" data-type="2" data-lat="' . $lat . '"
                             data-lng="' . $lng . '"
                             data-zoom="' . $zoom . '"
                            ></div>';
            return $html;
        }
    }
}
st_reg_shortcode('st_restaurent_detail_map', 'st_restaurent_detail_map');
if (!function_exists('st_restaurent_detail_photo_func')) {
    function st_restaurent_detail_photo_func()
    {
        if (is_singular('st_restaurent')) {
            return st()->load_template('restaurent/elements/photo');
        }
    }
    st_reg_shortcode('st_restaurent_detail_photo', 'st_restaurent_detail_photo_func');
}
Exemplo n.º 7
0
                            <img src="' . $img[0] . '" alt="Avatar" title="' . $st_name . '" />
                            <p class="testimonial-author-name" >' . $st_name . '</p>
                            <cite>' . $st_sub . '</cite>
                        </div>
                    </div>';
        }
        if ($st_style == 'style2') {
            $txt = '  <div class="testimonial style2 hidden-sm hidden-xs ' . $class_color . ' ' . $st_testimonial_color . '">
                        <div class="testimonial-inner">
                            <div class="row">
                                <div class="col-md-3">
                                     <img src="' . $img[0] . '" alt="Avatar" title="' . $st_name . '" />
                                </div>
                                <div class="col-md-8">
                                     <blockquote>
                                        <p>' . $st_desc . '</p>
                                     </blockquote>
                                </div>
                            </div>
                        </div>
                        <div class="testimonial-author">
                            <p class="testimonial-author-name dark" >' . $st_name . '</p>
                            <cite>' . $st_sub . '</cite>
                        </div>
                    </div>';
        }
        return $txt;
    }
}
st_reg_shortcode('st_testimonial', 'st_vc_testimonial');
Exemplo n.º 8
0
        if (is_singular('st_tours')) {
            if ($video = get_post_meta(get_the_ID(), 'video', true)) {
                return "<div class='media-responsive'>" . wp_oembed_get($video) . "</div>";
            }
        }
    }
}
/**
* ST Tour Nearby
* @since 1.1.0
**/
if (function_exists('vc_map')) {
    vc_map(array('name' => __("ST Tour Nearby", ST_TEXTDOMAIN), 'base' => 'st_tour_nearby', 'content_element' => true, 'icon' => 'icon-st', 'category' => 'Tour', 'show_settings_on_create' => false, 'params' => array()));
}
if (!function_exists('st_tour_nearby')) {
    function st_tour_nearby()
    {
        if (is_singular('st_tours')) {
            return st()->load_template('tours/elements/nearby');
        }
    }
}
st_reg_shortcode('st_tour_nearby', 'st_tour_nearby');
st_reg_shortcode('st_tour_video', 'st_tour_video');
st_reg_shortcode('st_tour_price', 'st_tour_price');
st_reg_shortcode('st_tour_review', 'st_tour_review');
st_reg_shortcode('st_tour_detail_list_schedules', 'st_tour_detail_list_schedules');
st_reg_shortcode('st_tour_detail_review_detail', 'st_tour_detail_review_detail');
st_reg_shortcode('st_tour_detail_review_summary', 'st_tour_detail_review_summary');
st_reg_shortcode('st_tour_detail_map', 'st_tour_detail_map');
Exemplo n.º 9
0
    function st_post_data($attr = array())
    {
        $default = array('field' => 'title', 'post_id' => false);
        extract(wp_parse_args($attr, $default));
        if (!$post_id and is_single()) {
            $post_id = get_the_ID();
        }
        if ($post_id and is_single()) {
            switch ($field) {
                case "content":
                    $post = get_post($post_id);
                    $content = $post->post_content;
                    $content = apply_filters('the_content', $content);
                    $content = str_replace(']]>', ']]&gt;', $content);
                    return $content;
                    break;
                case "excerpt":
                    $post = get_post($post_id);
                    if (isset($post->post_excerpt)) {
                        return $post->post_excerpt;
                    }
                    break;
                case "title":
                    return get_the_title($post_id);
                    break;
            }
        }
    }
}
st_reg_shortcode('st_post_data', 'st_post_data');
Exemplo n.º 10
0
                        $data_map[$stt]['name'] = get_the_title();
                        $data_map[$stt]['post_type'] = $post_type;
                        $data_map[$stt]['lat'] = $map_lat;
                        $data_map[$stt]['lng'] = $map_lng;
                        if ($post_type == 'st_hotel') {
                            $data_map[$stt]['icon_mk'] = st()->get_option('st_hotel_icon_map_marker', 'http://maps.google.com/mapfiles/marker_yellow.png');
                        } else {
                            $data_map[$stt]['icon_mk'] = st()->get_option('st_rental_icon_map_marker', 'http://maps.google.com/mapfiles/marker_yellow.png');
                        }
                        $data_map[$stt]['content_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop/room', false, array('hotel_id' => $hotel_id)));
                        $data_map[$stt]['content_adv_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop-adv/room', false, array('hotel_id' => $hotel_id)));
                        $stt++;
                    }
                }
                wp_reset_postdata();
            }
            if ($location_center == '[,]') {
                $location_center = '[0,0]';
            }
            if ($show_circle == 'no') {
                $range = 0;
            }
            $data_tmp = array('location_center' => $location_center, 'zoom' => $zoom, 'data_map' => $data_map, 'height' => 500, 'style_map' => 'normal', 'number' => $number, 'range' => $range, 'hotel_id' => $hotel_id);
            $data_tmp['data_tmp'] = $data_tmp;
            $html = '<div class="map_single">' . st()->load_template('hotel/elements/detail', 'map', $data_tmp) . '</div>';
            return $html;
        }
    }
}
st_reg_shortcode('st_room_map', 'st_room_map_fc');
<?php

if (function_exists('vc_map')) {
    vc_map(array("name" => __("ST Rental Attribute", ST_TEXTDOMAIN), "base" => "st_rental_attribute", "content_element" => true, "icon" => "icon-st", "category" => 'Shinetheme', "params" => array(array("type" => "dropdown", "holder" => "div", "heading" => __("Select Taxonomy", ST_TEXTDOMAIN), "param_name" => "taxonomy", "description" => "", "value" => st_list_taxonomy('st_rental')), array("type" => "dropdown", "holder" => "div", "heading" => __("Item Size", ST_TEXTDOMAIN), "param_name" => "item_col", "description" => "", "value" => array(2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12)))));
}
if (!function_exists('st_vc_rental_attribute')) {
    function st_vc_rental_attribute($attr, $content = false)
    {
        if (is_singular('st_rental')) {
            return st()->load_template('rental/elements/attribute', null, array('attr' => $attr));
        }
    }
}
st_reg_shortcode('st_rental_attribute', 'st_vc_rental_attribute');
<?php

if (function_exists('vc_map')) {
    vc_map(array("name" => __("ST Activity Search Results", ST_TEXTDOMAIN), "base" => "st_activiry_content_search", "content_element" => true, "icon" => "icon-st", "category" => 'Shinetheme', "params" => array(array("type" => "dropdown", "holder" => "div", "heading" => __("Style", ST_TEXTDOMAIN), "param_name" => "st_style", "description" => "", "value" => array(__('Style 1 ', ST_TEXTDOMAIN) => '1', __('Style 2 ', ST_TEXTDOMAIN) => '2')))));
}
if (!function_exists('st_vc_activiry_content_search')) {
    function st_vc_activiry_content_search($attr, $content = false)
    {
        return st()->load_template('activity/content', 'activity', array('attr' => $attr));
    }
}
st_reg_shortcode('st_activiry_content_search', 'st_vc_activiry_content_search');
Exemplo n.º 13
0
<?php

if (function_exists('vc_map')) {
    vc_map(array("name" => __("ST Cars Attribute", ST_TEXTDOMAIN), "base" => "st_cars_attribute", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => array(array("type" => "dropdown", "holder" => "div", "heading" => __("Select Taxonomy", ST_TEXTDOMAIN), "param_name" => "taxonomy", "description" => "", "value" => st_list_taxonomy('st_cars')), array("type" => "textfield", "holder" => "div", "heading" => __("Title", ST_TEXTDOMAIN), "param_name" => "title", "description" => ""))));
}
if (!function_exists('st_vc_cars_attribute')) {
    function st_vc_cars_attribute($attr, $content = false)
    {
        if (is_singular('st_cars')) {
            return st()->load_template('cars/elements/attribute', null, array('attr' => $attr));
        }
    }
}
st_reg_shortcode('st_cars_attribute', 'st_vc_cars_attribute');
Exemplo n.º 14
0
 * Car review summary (like hotel)
 */
if (function_exists('vc_map')) {
    vc_map(array('name' => __("ST Car  detail review summary", ST_TEXTDOMAIN), 'base' => 'st_car_detail_review_summary', 'content_element' => true, 'icon' => 'icon-st', 'category' => 'Car', 'show_settings_on_create' => false, 'params' => array()));
}
if (!function_exists('st_car_detail_review_summary')) {
    function st_car_detail_review_summary()
    {
        if (is_singular('st_cars')) {
            return st()->load_template('cars/elements/review_summary');
        }
    }
}
st_reg_shortcode('st_car_detail_review_summary', 'st_car_detail_review_summary');
/**
 * ST Cars Detail Review Detail
 * @since 1.1.0
 **/
if (function_exists('vc_map')) {
    vc_map(array('name' => __('ST Car Show Discount', ST_TEXTDOMAIN), 'base' => 'st_car_show_discount', 'content_element' => true, 'icon' => 'icon-st', 'category' => 'Car', 'show_settings_on_create' => false, 'params' => array()));
}
if (!function_exists('st_car_show_discount')) {
    function st_car_show_discount()
    {
        if (is_singular('st_cars')) {
            return st()->load_template('cars/elements/car_show_info_discount');
        }
    }
}
st_reg_shortcode('st_car_show_discount', 'st_car_show_discount');
Exemplo n.º 15
0
<?php

if (function_exists('vc_map')) {
    vc_map(array("name" => __("ST Flickr", ST_TEXTDOMAIN), "base" => "st_flickr", "content_element" => true, "icon" => "icon-st", "params" => array(array("type" => "textfield", "heading" => __("Number", ST_TEXTDOMAIN), "param_name" => "st_number", "description" => ""), array("type" => "textfield", "heading" => __("User", ST_TEXTDOMAIN), "param_name" => "st_user", "description" => ""))));
}
if (!function_exists('st_vc_flickr')) {
    function st_vc_flickr($arg, $content = false)
    {
        $data = shortcode_atts(array('st_number' => 5, 'st_user' => '23401669@N00'), $arg, 'st_flickr');
        extract($data);
        $r = st()->load_template('vc-elements/st-fickr/html', null, $data);
        return $r;
    }
}
st_reg_shortcode('st_flickr', 'st_vc_flickr');
Exemplo n.º 16
0
            $query_images_args = array('post_type' => 'attachment', 'post_mime_type' => 'image', 'post_status' => 'inherit', 'posts_per_page' => $per_page - $list_in, 'post__not_in' => explode(',', $st_images_not_in . ',' . $st_images_in));
            $list = query_posts($query_images_args);
            foreach ($list as $k => $v) {
                $image = wp_get_attachment_image($v->ID, array(300, 300));
                $txt .= '<li class="image-' . $v->ID . '">
                        <a href="#">
                            ' . $image . '
                        </a>
                     </li>';
            }
            wp_reset_query();
        }
        $r = '<div class="bg-holder">
                    <div class="bg-mask-darken"></div>
                    <div class="bg-parallax"></div>
                    <!-- START GRIDROTATOR -->
                     <div class="ri-grid" id="ri-grid" data-col="' . $st_col . '" data-row="' . $st_row . '" data-speed="' . $st_speed . '">
                        <ul>' . $txt . '</ul>
                    </div>
                    <!-- END GRIDROTATOR -->
                    <div class="bg-front full-center">
                        <div class="container">
                            ' . st()->load_template('vc-elements/st-search/search', 'form', array('st_style_search' => 'style_1', 'st_box_shadow' => 'no', 'class' => '')) . '
                        </div>
                    </div>
                </div>';
        return $r;
    }
}
st_reg_shortcode('st_bg_gallery', 'st_vc_bg_gallery');
Exemplo n.º 17
0
}
if (!function_exists('st_vc_icon')) {
    function st_vc_icon($attr, $content = false)
    {
        $data = shortcode_atts(array('st_tooltip' => '', 'st_pos_tooltip' => 'none', 'st_icon' => '', 'st_color_icon' => '', 'st_to_color' => '', 'st_size_icon' => 'box-icon-sm', 'st_round' => '', 'st_border' => '', 'st_animation' => '', 'st_aligment' => 'box-icon-none'), $attr, 'st_about_icon');
        extract($data);
        $class_bg_color = Assets::build_css("background: " . $st_color_icon . "");
        $class_bg_to_color = Assets::build_css("background: " . $st_to_color . ";\r\n                                                border-color: " . $st_to_color . ";\r\n                                                ", ":hover");
        if ($st_animation == "border-rise") {
            $class__ = Assets::build_css("box-shadow: 0 0 0 2px " . $st_to_color . " ", ":after");
            $class_bg_to_color = $class_bg_to_color . " " . $class__;
        }
        if (!empty($st_border)) {
            $class_bg_color = Assets::build_css("border-color: " . $st_color_icon . ";\r\n                                                 color: " . $st_color_icon . ";");
        }
        if (!$st_pos_tooltip or $st_pos_tooltip != 'none') {
            $html_tooltip = 'data-placement="' . $st_pos_tooltip . '" title="" rel="tooltip" data-original-title="' . $st_tooltip . '"';
        } else {
            $html_tooltip = "";
        }
        if (!empty($st_animation)) {
            $animate = "animate-icon-" . $st_animation;
        } else {
            $animate = "";
        }
        $txt = '<i class="fa ' . $st_icon . ' ' . $st_size_icon . ' ' . $st_border . ' ' . $st_aligment . ' ' . $class_bg_color . ' ' . $st_round . ' ' . $class_bg_to_color . ' ' . $animate . ' " ' . $html_tooltip . '> </i>';
        return $txt;
    }
}
st_reg_shortcode('st_icon', 'st_vc_icon');
Exemplo n.º 18
0
            $content = str_ireplace('</ul>', '', $content);
            $txt = '<div class="hover-img">
                     <img title="" alt="" src="' . $img[0] . '">
                     <ul class="hover-icon-group' . $st_pos_layout . ' ' . $st_hover_hold . '">
                    ' . st_remove_wpautop($content) . '
                    </ul>
                   </div>';
        }
        if ($st_type == "title") {
            $txt = '<a href="#" class="hover-img">
                            <img title="" alt="" src="' . $img[0] . '">
                            <h5 class="hover-title' . $st_pos_layout . ' ' . $st_hover_hold . '">' . $st_title . '</h5>
                         </a>';
        }
        if ($st_type == "inner-full") {
            $txt = '<a href="#" class="hover-img">
                            <img title="" alt="" src="' . $img[0] . '">
                            <div class="hover-inner">' . $st_title . '</div>
                         </a>';
        }
        if ($st_type == "inner-block") {
            $txt = '<a href="#" class="hover-img">
                            <img title="" alt="" src="' . $img[0] . '">
                            <div class="hover-inner hover-hold">' . $st_title . '</div>
                         </a>';
        }
        return $txt;
    }
}
st_reg_shortcode('st_image_effect', 'st_vc_image_effect');
<?php

if (function_exists('vc_map')) {
    vc_map(array("name" => __("ST Rental Search Results", ST_TEXTDOMAIN), "base" => "st_search_rental_result", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => array(array("type" => "dropdown", "holder" => "div", "heading" => __("Style", ST_TEXTDOMAIN), "param_name" => "style", "description" => "", "value" => array(__('Grid', ST_TEXTDOMAIN) => 'grid', __('List', ST_TEXTDOMAIN) => 'list')))));
}
if (!function_exists('st_search_rental_result')) {
    function st_search_rental_result($arg = array())
    {
        if (!get_post_type() == 'st_rental' and get_query_var('post_type') != "st_rental") {
            return;
        }
        return st()->load_template('rental/search-elements/result', false, array('arg' => $arg));
    }
}
st_reg_shortcode('st_search_rental_result', 'st_search_rental_result');
Exemplo n.º 20
0
<?php

if (!st_check_service_available('st_rental')) {
    return;
}
if (function_exists('vc_map')) {
    vc_map(array("name" => __("ST Sum of Rental Search Results", ST_TEXTDOMAIN), "base" => "st_search_rental_title", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => array(array("type" => "dropdown", "holder" => "div", "heading" => __("Search Modal", ST_TEXTDOMAIN), "param_name" => "search_modal", "description" => "", "value" => array(__('--Select--', ST_TEXTDOMAIN) => '', __('Yes', ST_TEXTDOMAIN) => '1', __('No', ST_TEXTDOMAIN) => '0')))));
}
if (!function_exists('st_search_rental_title')) {
    function st_search_rental_title($arg = array())
    {
        if (!get_post_type() == 'st_rental' and get_query_var('post_type') != 'st_rental') {
            return;
        }
        $default = array('search_modal' => 1);
        extract(wp_parse_args($arg, $default));
        $object = new STRental();
        $a = '<h3 class="booking-title">' . balanceTags($object->get_result_string());
        if ($search_modal) {
            $a .= '<small><a class="popup-text" href="#search-dialog" data-effect="mfp-zoom-out">' . __('Change search', ST_TEXTDOMAIN) . '</a></small>';
        }
        $a .= '</h3>';
        return $a;
    }
}
if (st_check_service_available('st_rental')) {
    st_reg_shortcode('st_search_rental_title', 'st_search_rental_title');
}
<?php

if (function_exists('vc_map')) {
    vc_map(array("name" => __("ST Cars Search Results", ST_TEXTDOMAIN), "base" => "st_cars_content_search", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => array(array("type" => "dropdown", "holder" => "div", "heading" => __("Style", ST_TEXTDOMAIN), "param_name" => "st_style", "description" => "", "value" => array(__('Style 1 ', ST_TEXTDOMAIN) => '1', __('Style 2 ', ST_TEXTDOMAIN) => '2')))));
}
if (!function_exists('st_vc_cars_content_search')) {
    function st_vc_cars_content_search($attr, $content = false)
    {
        return st()->load_template('cars/content', 'cars', array('attr' => $attr));
    }
}
st_reg_shortcode('st_cars_content_search', 'st_vc_cars_content_search');
Exemplo n.º 22
0
<?php

if (!st_check_service_available('st_rental')) {
    return;
}
if (function_exists('vc_map')) {
    vc_map(array("name" => __("ST Rental Photo", ST_TEXTDOMAIN), "base" => "st_rental_photo", "content_element" => true, "icon" => "icon-st", "category" => 'Shinetheme', "params" => array(array("type" => "dropdown", "holder" => "div", "heading" => __("Style", ST_TEXTDOMAIN), "param_name" => "style", "description" => "", "value" => array(__('--Select--', ST_TEXTDOMAIN) => '', __('Slide', ST_TEXTDOMAIN) => 'slide', __('Grid', ST_TEXTDOMAIN) => 'grid')))));
}
if (!function_exists('st_vc_rental_photo')) {
    function st_vc_rental_photo($attr, $content = false)
    {
        $default = array('style' => 'slide');
        $attr = wp_parse_args($attr, $default);
        if (is_singular('st_rental')) {
            return st()->load_template('rental/elements/photo', null, array('attr' => $attr));
        }
    }
}
if (st_check_service_available('st_rental')) {
    st_reg_shortcode('st_rental_photo', 'st_vc_rental_photo');
}
Exemplo n.º 23
0
<?php

if (!st_check_service_available('st_tours')) {
    return;
}
if (function_exists('vc_map')) {
    vc_map(array("name" => __("ST Tour Detail Attribute", ST_TEXTDOMAIN), "base" => "st_tour_detail_attribute", "content_element" => true, "icon" => "icon-st", "category" => 'Shinetheme', "params" => array(array("type" => "textfield", "holder" => "div", "heading" => __("Title", ST_TEXTDOMAIN), "param_name" => "title", "description" => "", "value" => "", 'edit_field_class' => 'vc_col-sm-6'), array("type" => "dropdown", "holder" => "div", "heading" => __("Font Size", ST_TEXTDOMAIN), "param_name" => "font_size", "description" => "", "value" => array(__('--Select--', ST_TEXTDOMAIN) => '', __("H1", ST_TEXTDOMAIN) => '1', __("H2", ST_TEXTDOMAIN) => '2', __("H3", ST_TEXTDOMAIN) => '3', __("H4", ST_TEXTDOMAIN) => '4', __("H5", ST_TEXTDOMAIN) => '5'), 'edit_field_class' => 'vc_col-sm-6'), array("type" => "dropdown", "holder" => "div", "heading" => __("Select Taxonomy", ST_TEXTDOMAIN), "param_name" => "taxonomy", "description" => "", "value" => st_list_taxonomy('st_tours')), array("type" => "dropdown", "holder" => "div", "heading" => __("Item col", ST_TEXTDOMAIN), "param_name" => "item_col", "description" => "", "value" => array(__('--Select--', ST_TEXTDOMAIN) => '', 12 => 12, 11 => 11, 10 => 10, 9 => 9, 8 => 8, 7 => 7, 6 => 6, 5 => 5, 4 => 4, 3 => 3, 2 => 2)))));
}
if (!function_exists('st_tour_detail_attribute')) {
    function st_tour_detail_attribute($attr, $content = false)
    {
        $default = array('item_col' => 12, 'font_size' => 4);
        $attr = wp_parse_args($attr, $default);
        if (is_singular('st_tours')) {
            return st()->load_template('tours/elements/attribute', null, array('attr' => $attr));
        }
    }
}
if (st_check_service_available('st_tours')) {
    st_reg_shortcode('st_tour_detail_attribute', 'st_tour_detail_attribute');
}
Exemplo n.º 24
0
<?php

if (!st_check_service_available('st_cars')) {
    return;
}
if (function_exists('vc_map')) {
    vc_map(array("name" => __("ST Sum of Cars Search Results", ST_TEXTDOMAIN), "base" => "st_search_cars_title", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => array(array("type" => "dropdown", "holder" => "div", "heading" => __("Search Modal", ST_TEXTDOMAIN), "param_name" => "search_modal", "description" => "", "value" => array(__('--Select--', ST_TEXTDOMAIN) => '', __('Yes', ST_TEXTDOMAIN) => '1', __('No', ST_TEXTDOMAIN) => '0')))));
}
if (!function_exists('st_search_cars_title')) {
    function st_search_cars_title($arg = array())
    {
        if (!get_post_type() == 'st_cars' and get_query_var('post_type') != "st_cars") {
            return;
        }
        $default = array('search_modal' => 1);
        extract(wp_parse_args($arg, $default));
        $car = new STCars();
        $html = '<h3 class="booking-title">' . balanceTags($car->get_result_string());
        if ($search_modal) {
            $html .= '<small><a class="popup-text" href="#search-dialog" data-effect="mfp-zoom-out">' . __('Change search', ST_TEXTDOMAIN) . '</a></small>';
        }
        $html .= '</h3>';
        return $html;
    }
}
if (st_check_service_available('st_cars')) {
    st_reg_shortcode('st_search_cars_title', 'st_search_cars_title');
}
Exemplo n.º 25
0
                        $terms[] = $value;
                    }
                }
                if ($terms) {
                    $query['tax_query'] = array(array('taxonomy' => $sort_taxonomy, 'field' => 'id', 'terms' => $terms));
                }
            }
        }
        query_posts($query);
        if ($st_style == 'style_1') {
            $r = "<div class='list_tours'>" . st()->load_template('vc-elements/st-list-tour/loop', '', $data) . "</div>";
        }
        if ($st_style == 'style_2') {
            $r = "<div class='list_tours'>" . st()->load_template('vc-elements/st-list-tour/loop2', '', $data) . "</div>";
        }
        if ($st_style == 'style_3') {
            $r = "<div class='list_tours'>" . st()->load_template('vc-elements/st-list-tour/loop3', '', $data) . "</div>";
        }
        if ($st_style == 'style_4') {
            $r = "<div class='list_tours'>" . st()->load_template('vc-elements/st-list-tour/loop4', '', $data) . "</div>";
        }
        wp_reset_query();
        if (!empty($title) and !empty($r)) {
            $r = '<h' . $font_size . '>' . $title . '</h' . $font_size . '>' . $r;
        }
        return $r;
    }
}
if (st_check_service_available('st_tours')) {
    st_reg_shortcode('st_list_tour_related', 'st_list_tour_related');
}
Exemplo n.º 26
0
        $icons_center = '';
        if ($st_text_align == 'text-center') {
            $icons_center = 'box-icon-center';
        }
        $class_bg_color = Assets::build_css("background: " . $st_color_icon . "");
        if (!empty($st_border)) {
            $class_bg_color = Assets::build_css("border-color: " . $st_color_icon . "!important;\r\n                                                 color: " . $st_color_icon . "!important;");
        }
        if (empty($st_link)) {
            $title = '<h4 class="thumb-title">' . $st_name . '</h4>';
        } else {
            $title = ' <h5 class="thumb-title">
                        <a href="' . $st_link . '" class="text-darken">' . $st_name . '</a>
                       </h5>';
        }
        $txt = '
                    <div class="thumb ' . $st_text_align . '">
                            <header class="thumb-header pull-' . $st_pos_icon . ' st-thumb-header">
                               <i class="fa ' . $st_icon . ' ' . $st_size_icon . ' box-icon-' . $st_pos_icon . ' ' . $icons_center . ' round ' . $class_bg_color . ' animate-icon-top-to-bottom ' . $st_border . '  box-icon-to-' . $st_to_color . ' "></i>
                            </header>
                            <div class="thumb-caption pull-' . $st_pos_icon . ' st-thumb-caption">
                                 ' . $title . '
                                <p class="thumb-desc">' . $st_description . '</p>
                            </div>
                    </div>
                    ';
        return $txt;
    }
}
st_reg_shortcode('st_about_icon', 'st_vc_about_icon');
Exemplo n.º 27
0
<?php

if (!st_check_service_available('st_hotel')) {
    return;
}
if (function_exists('vc_map')) {
    vc_map(array("name" => __("ST Hotel List Room", ST_TEXTDOMAIN), "base" => "st_hotel_list_room", "content_element" => true, "category" => "Shinetheme", "icon" => "icon-st", "params" => array(array("type" => "dropdown", "heading" => __("Rows", ST_TEXTDOMAIN), "param_name" => "st_rows", "value" => array(__("--Select--", ST_TEXTDOMAIN) => "", __("1", ST_TEXTDOMAIN) => "1", __("2", ST_TEXTDOMAIN) => "2", __("3", ST_TEXTDOMAIN) => "3", __("4", ST_TEXTDOMAIN) => "4", __("5", ST_TEXTDOMAIN) => "5", __("6", ST_TEXTDOMAIN) => "6")), array("type" => "dropdown", "heading" => __("Items in a row", ST_TEXTDOMAIN), "param_name" => "st_items_in_row", "value" => array(__("--Select--", ST_TEXTDOMAIN) => "", __("1", ST_TEXTDOMAIN) => "1", __("2", ST_TEXTDOMAIN) => "2", __("3", ST_TEXTDOMAIN) => "3", __("4", ST_TEXTDOMAIN) => "4", __("6", ST_TEXTDOMAIN) => "6")), array("type" => "dropdown", "heading" => __("Show Title", ST_TEXTDOMAIN), "param_name" => "is_title", "description" => "", "value" => array(__("--Select--", ST_TEXTDOMAIN) => "", __("Yes", ST_TEXTDOMAIN) => "yes", __("No", ST_TEXTDOMAIN) => "no")), array("type" => "dropdown", "heading" => __("Show Price", ST_TEXTDOMAIN), "param_name" => "is_price", "description" => "", "value" => array(__("--Select--", ST_TEXTDOMAIN) => "", __("Yes", ST_TEXTDOMAIN) => "yes", __("No", ST_TEXTDOMAIN) => "no")), array("type" => "dropdown", "heading" => __("Show Facilities", ST_TEXTDOMAIN), "param_name" => "is_facilities", "description" => "", "value" => array(__("--Select--", ST_TEXTDOMAIN) => "", __("Yes", ST_TEXTDOMAIN) => "yes", __("No", ST_TEXTDOMAIN) => "no")))));
    if (!function_exists('st_hotel_list_room_func')) {
        function st_hotel_list_room_func($attr)
        {
            $data = shortcode_atts(array('st_rows' => 2, 'st_items_in_row' => 3, 'is_title' => 'yes', 'is_facilities' => 'yes', 'is_price' => 'yes'), $attr, 'st_hotel_list_room');
            extract($data);
            $arg = array('post_type' => 'hotel_room', 'posts_per_page' => $st_items_in_row * $st_rows, 'post_status' => 'publish');
            query_posts($arg);
            $return = "";
            $return .= "<div class='st_hotel_list_room st_grid'>";
            if (have_posts()) {
                while (have_posts()) {
                    the_post();
                    $return .= st()->load_template('vc-elements/st-hotel-list-room/st_hotel_list_room', null, $data);
                }
            }
            wp_reset_postdata();
            $return .= "</div>";
            return $return;
        }
        if (st_check_service_available('st_hotel')) {
            st_reg_shortcode('st_hotel_list_room', 'st_hotel_list_room_func');
        }
    }
}
Exemplo n.º 28
0
            $default = array('title' => '', 'font_size' => '3');
            extract($data = wp_parse_args($arg, $default));
            return st()->load_template('holidays/elements/nearby', '', $data);
        }
    }
}
st_reg_shortcode('st_holiday_nearby', 'st_holiday_nearby');
st_reg_shortcode('st_holiday_video', 'st_holiday_video');
st_reg_shortcode('st_holiday_price', 'st_holiday_price');
st_reg_shortcode('st_holiday_review', 'st_holiday_review');
st_reg_shortcode('st_holiday_detail_list_schedules', 'st_holiday_detail_list_schedules');
st_reg_shortcode('st_holiday_detail_review_detail', 'st_holiday_detail_review_detail');
st_reg_shortcode('st_holiday_detail_review_summary', 'st_holiday_detail_review_summary');
st_reg_shortcode('st_holiday_detail_map', 'st_holiday_detail_map');
/**
 * ST holidays show discount
 * @since 1.1.9
 **/
if (function_exists('vc_map')) {
    vc_map(array('name' => __('ST Holiday Show Discount', ST_TEXTDOMAIN), 'base' => 'st_holiday_show_discount', 'content_element' => true, 'icon' => 'icon-st', 'category' => 'Holiday', 'show_settings_on_create' => false, 'params' => array()));
}
if (!function_exists('st_holiday_show_discount')) {
    function st_holiday_show_discount()
    {
        if (is_singular('st_holidays')) {
            return st()->load_template('holidays/elements/holiday_show_info_discount');
        }
    }
}
st_reg_shortcode('st_holiday_show_discount', 'st_holiday_show_discount');
Exemplo n.º 29
0
<?php

if (function_exists('vc_map')) {
    vc_map(array("name" => __("ST Single Search", ST_TEXTDOMAIN), "base" => "st_single_search", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => array(array("type" => "textfield", "holder" => "div", "heading" => __("Title form search", ST_TEXTDOMAIN), "param_name" => "st_title_search", "description" => ""), array("type" => "dropdown", "holder" => "div", "heading" => __("Select form search", ST_TEXTDOMAIN), "param_name" => "st_list_form", "description" => "", 'value' => array(__('--Select--', ST_TEXTDOMAIN) => '', __('Hotel', ST_TEXTDOMAIN) => 'hotel', __('Rental', ST_TEXTDOMAIN) => 'rental', __('Cars', ST_TEXTDOMAIN) => 'cars', __('Activities', ST_TEXTDOMAIN) => 'activities', __('Tours', ST_TEXTDOMAIN) => 'tours', __('Holidays', ST_TEXTDOMAIN) => 'holidays', __('All Post Type', ST_TEXTDOMAIN) => 'all-post-type')), array("type" => "dropdown", "holder" => "div", "heading" => __("Form's direction", ST_TEXTDOMAIN), "param_name" => "st_direction", "description" => "", 'value' => array(__('--Select--', ST_TEXTDOMAIN) => '', __('Vertical form', ST_TEXTDOMAIN) => 'vertical', __('Horizontal form', ST_TEXTDOMAIN) => 'horizontal')), array("type" => "dropdown", "holder" => "div", "heading" => __("Style", ST_TEXTDOMAIN), "param_name" => "st_style_search", "description" => "", 'value' => array(__('--Select--', ST_TEXTDOMAIN) => '', __('Large', ST_TEXTDOMAIN) => 'style_1', __('Normal', ST_TEXTDOMAIN) => 'style_2')), array("type" => "dropdown", "holder" => "div", "heading" => __("Show box shadow", ST_TEXTDOMAIN), "param_name" => "st_box_shadow", "description" => "", 'value' => array(__('--Select--', ST_TEXTDOMAIN) => '', __('No', ST_TEXTDOMAIN) => 'no', __('Yes', ST_TEXTDOMAIN) => 'yes')), array("type" => "dropdown", "holder" => "div", "heading" => __("Field Size", ST_TEXTDOMAIN), "param_name" => "field_size", "description" => "", 'value' => array(__('--Select--', ST_TEXTDOMAIN) => '', __('Large', ST_TEXTDOMAIN) => 'lg', __('Normal', ST_TEXTDOMAIN) => '')))));
}
if (!function_exists('st_vc_single_search')) {
    function st_vc_single_search($attr, $content = false)
    {
        $data = shortcode_atts(array('st_list_form' => '', 'st_style_search' => 'style_1', 'st_direction' => 'horizontal', 'st_box_shadow' => 'no', 'st_search_tabs' => 'yes', 'st_title_search' => '', 'field_size' => '', 'active' => 1), $attr, 'st_single_search');
        extract($data);
        $txt = st()->load_template('vc-elements/st-single-search/search', 'form', array('data' => $data));
        return $txt;
    }
}
st_reg_shortcode('st_single_search', 'st_vc_single_search');
<?php

if (!st_check_service_available('st_activity')) {
    return;
}
if (function_exists('vc_map')) {
    vc_map(array("name" => __("ST Sum of Activity Search Results", ST_TEXTDOMAIN), "base" => "st_search_activity_title", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => array(array("type" => "dropdown", "holder" => "div", "heading" => __("Search Modal", ST_TEXTDOMAIN), "param_name" => "search_modal", "description" => "", "value" => array(__('--Select--', ST_TEXTDOMAIN) => '', __('Yes', ST_TEXTDOMAIN) => '1', __('No', ST_TEXTDOMAIN) => '0')))));
}
if (!function_exists('st_search_activity_title')) {
    function st_search_activity_title($arg = array())
    {
        if (!get_post_type() == 'st_activity' and get_query_var('post_type') != 'st_activity') {
            return;
        }
        $default = array('search_modal' => 1);
        extract(wp_parse_args($arg, $default));
        $object = new STActivity();
        $a = '<h3 class="booking-title">' . balanceTags($object->get_result_string());
        if ($search_modal) {
            $a .= '<small><a class="popup-text" href="#search-dialog" data-effect="mfp-zoom-out">' . __('Change search', ST_TEXTDOMAIN) . '</a></small>';
        }
        $a .= '</h3>';
        return $a;
    }
}
if (st_check_service_available('st_activity')) {
    st_reg_shortcode('st_search_activity_title', 'st_search_activity_title');
}