Example #1
0
<?php

if (function_exists('vc_map')) {
    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;
    }
Example #2
0
<?php

if (!st_check_service_available('st_cars')) {
    return;
}
if (function_exists('vc_map') and class_exists('TravelerObject')) {
    $list_taxonomy = st_list_taxonomy('st_cars');
    $list_taxonomy = array_merge(array("---Select---" => ""), $list_taxonomy);
    $list_location = TravelerObject::get_list_location();
    $list_location_data[__('-- Select --', ST_TEXTDOMAIN)] = '';
    if (!empty($list_location)) {
        foreach ($list_location as $k => $v) {
            $list_location_data[$v['title']] = $v['id'];
        }
    }
    $param = array(array("type" => "textfield", "holder" => "div", "heading" => __("List ID in Car", ST_TEXTDOMAIN), "param_name" => "st_ids", "description" => __("Ids separated by commas", ST_TEXTDOMAIN), 'value' => ""), array("type" => "textfield", "holder" => "div", "heading" => __("Number cars", ST_TEXTDOMAIN), "param_name" => "st_number_cars", "description" => "", 'value' => 4), array("type" => "dropdown", "holder" => "div", "heading" => __("Order By", ST_TEXTDOMAIN), "param_name" => "st_orderby", "description" => "", 'edit_field_class' => 'vc_col-sm-6', 'value' => function_exists('st_get_list_order_by') ? st_get_list_order_by(array(__('Sale', ST_TEXTDOMAIN) => 'sale', __('Featured', ST_TEXTDOMAIN) => 'featured')) : array()), array("type" => "dropdown", "holder" => "div", "heading" => __("Order", ST_TEXTDOMAIN), "param_name" => "st_order", 'value' => array(__('--Select--', ST_TEXTDOMAIN) => '', __('Asc', ST_TEXTDOMAIN) => 'asc', __('Desc', ST_TEXTDOMAIN) => 'desc'), 'edit_field_class' => 'vc_col-sm-6'), array("type" => "dropdown", "holder" => "div", "heading" => __("Items per row", ST_TEXTDOMAIN), "param_name" => "st_cars_of_row", 'edit_field_class' => 'vc_col-sm-12', "value" => array(__('--Select--', ST_TEXTDOMAIN) => '', __('Four', ST_TEXTDOMAIN) => 4, __('Three', ST_TEXTDOMAIN) => 3, __('Two', ST_TEXTDOMAIN) => 2)), array("type" => "dropdown", "holder" => "div", "heading" => __("Sort By Taxonomy", ST_TEXTDOMAIN), "param_name" => "sort_taxonomy", "description" => "", "value" => $list_taxonomy));
    $data_vc = STCars::get_taxonomy_and_id_term_car();
    $param = array_merge($param, $data_vc['list_vc']);
    vc_map(array("name" => __("ST List of Cars", ST_TEXTDOMAIN), "base" => "st_list_cars", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => $param));
}
if (!function_exists('st_vc_list_cars')) {
    function st_vc_list_cars($attr, $content = false)
    {
        $data_vc = STCars::get_taxonomy_and_id_term_car();
        $param = array('st_ids' => '', 'taxonomy' => '', 'st_number_cars' => 4, 'st_order' => '', 'st_orderby' => '', 'st_cars_of_row' => 4, 'sort_taxonomy' => '', 'st_location' => '');
        $param = array_merge($param, $data_vc['list_id_vc']);
        $data = wp_parse_args($attr, $param);
        extract($data);
        $query = array('post_type' => 'st_cars', 'posts_per_page' => $st_number_cars, 'order' => $st_order, 'orderby' => $st_orderby);
        if (!empty($st_ids)) {
            $query['post__in'] = explode(',', $st_ids);
<?php

if (function_exists('vc_map')) {
    vc_map(array("name" => __("ST List of Location", ST_TEXTDOMAIN), "base" => "st_list_location", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => array(array("type" => "textfield", "holder" => "div", "heading" => __("List ID in Loaction", ST_TEXTDOMAIN), "param_name" => "st_ids", "description" => __("Ids separated by commas", ST_TEXTDOMAIN), 'value' => ""), array("type" => "dropdown", "holder" => "div", "heading" => __("Type", ST_TEXTDOMAIN), "param_name" => "st_type", "description" => "", 'value' => array(__('Hotel Name', ST_TEXTDOMAIN) => 'st_hotel', __('Car', ST_TEXTDOMAIN) => 'st_cars', __('Tour', ST_TEXTDOMAIN) => 'st_tours', __('Rental', ST_TEXTDOMAIN) => 'st_rental', __('Activities', ST_TEXTDOMAIN) => 'st_activity')), array("type" => "dropdown", "holder" => "div", "heading" => __("Show Only Featured Location", ST_TEXTDOMAIN), "param_name" => "is_featured", "description" => __("Show Only Featured Location", ST_TEXTDOMAIN), 'value' => array(__("No", ST_TEXTDOMAIN) => 'no', __("Yes", ST_TEXTDOMAIN) => 'yes'), 'edit_field_class' => 'vc_col-sm-6'), array("type" => "textfield", "holder" => "div", "heading" => __("Number Location", ST_TEXTDOMAIN), "param_name" => "st_number", "description" => "", 'value' => 4, 'edit_field_class' => 'vc_col-sm-6'), array("type" => "dropdown", "holder" => "div", "heading" => __("Items per row", ST_TEXTDOMAIN), "param_name" => "st_col", "description" => "", "value" => array(__('Four', ST_TEXTDOMAIN) => '4', __('Three', ST_TEXTDOMAIN) => '3', __('Two', ST_TEXTDOMAIN) => '2')), array("type" => "dropdown", "holder" => "div", "heading" => __("Style location", ST_TEXTDOMAIN), "param_name" => "st_style", "value" => array(__('Normal', ST_TEXTDOMAIN) => 'normal', __('Curved', ST_TEXTDOMAIN) => 'curved')), array("type" => "dropdown", "holder" => "div", "heading" => __("Show Logo", ST_TEXTDOMAIN), "param_name" => "st_show_logo", 'edit_field_class' => 'vc_col-sm-6', "value" => array(__('Yes', ST_TEXTDOMAIN) => 'yes', __('No', ST_TEXTDOMAIN) => 'no')), array("type" => "dropdown", "holder" => "div", "heading" => __("Logo Position", ST_TEXTDOMAIN), "param_name" => "st_logo_position", 'edit_field_class' => 'vc_col-sm-6', "value" => array(__('Left', ST_TEXTDOMAIN) => 'left', __('Right', ST_TEXTDOMAIN) => 'right')), array("type" => "dropdown", "holder" => "div", "heading" => __("Order By", ST_TEXTDOMAIN), "param_name" => "st_orderby", "description" => "", 'edit_field_class' => 'vc_col-sm-6', 'value' => function_exists('st_get_list_order_by') ? st_get_list_order_by(array(__('Sale', ST_TEXTDOMAIN) => 'sale', __('Rate', ST_TEXTDOMAIN) => 'rate', __('Min Price', ST_TEXTDOMAIN) => 'price')) : array()), array("type" => "dropdown", "holder" => "div", "heading" => __("Order", ST_TEXTDOMAIN), "param_name" => "st_order", 'value' => array(__('Asc', ST_TEXTDOMAIN) => 'asc', __('Desc', ST_TEXTDOMAIN) => 'desc'), 'edit_field_class' => 'vc_col-sm-6', "description" => __("", ST_TEXTDOMAIN)))));
}
if (!function_exists('st_vc_list_location')) {
    function st_vc_list_location($attr, $content = false)
    {
        $data = shortcode_atts(array('st_ids' => "", 'st_type' => 'st_hotel', 'is_featured' => 'no', 'st_number' => 0, 'st_col' => 4, 'st_style' => '', 'st_show_logo' => '', 'st_logo_position' => '', 'st_orderby' => '', 'st_order' => ''), $attr, 'st_list_location');
        extract($data);
        $query = array('post_type' => 'location', 'posts_per_page' => $st_number, 'order' => $st_order, 'orderby' => $st_orderby);
        if (!empty($st_ids)) {
            $query['post__in'] = explode(',', $st_ids);
        }
        if ($st_orderby == 'price') {
            $query['meta_key'] = 'min_price_' . $st_type . '';
            $query['orderby'] = 'meta_value';
        }
        if ($st_orderby == 'sale') {
            $query['meta_key'] = 'total_sale_number';
            $query['orderby'] = 'meta_value';
        }
        if ($st_orderby == 'rate') {
            $query['meta_key'] = 'review_' . $st_type . '';
            $query['orderby'] = 'meta_value';
        }
        if ($is_featured == 'yes') {
            $query['orderby'] = 'meta_value_num';
            $query['meta_query'] = array(array('key' => 'is_featured', 'value' => 'on', 'compare' => '='));
        }
        query_posts($query);
Example #4
0
 * create a vc_tab and get Shinetheme element into here 
 */
if (function_exists('vc_map')) {
    /**
     * @since 1.1.3
     * St location information slider 
     */
    vc_map(array("name" => __("ST Location slider ", ST_TEXTDOMAIN), "base" => "st_location_slider", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => array(array("type" => "attach_images", "holder" => "div", "heading" => __("Gallery slider ", ST_TEXTDOMAIN), "param_name" => "st_location_list_image"))));
    if (!function_exists('st_location_infomation_func')) {
        function st_location_infomation_func($attr)
        {
            return STLocation::get_slider($attr['st_location_list_image']);
        }
        st_reg_shortcode('st_location_slider', 'st_location_infomation_func');
    }
    $params = array(array("type" => "dropdown", "holder" => "div", "heading" => __("Style", ST_TEXTDOMAIN), "param_name" => "st_location_style", "description" => "Default style", 'value' => array(__('List', ST_TEXTDOMAIN) => 'list', __('Grid', ST_TEXTDOMAIN) => 'grid')), array("type" => "textfield", "holder" => "div", "heading" => __("Count item to display", ST_TEXTDOMAIN), "param_name" => "st_location_num", "description" => "Number of items display", 'value' => 4), array("type" => "dropdown", "holder" => "div", "heading" => __("Order By", ST_TEXTDOMAIN), "param_name" => "st_location_orderby", "description" => "", 'value' => st_get_list_order_by()), array("type" => "dropdown", "holder" => "div", "heading" => __("Order", ST_TEXTDOMAIN), "param_name" => "st_location_order", 'value' => array(__('Asc', ST_TEXTDOMAIN) => 'asc', __('Desc', ST_TEXTDOMAIN) => 'desc'), "description" => __("", ST_TEXTDOMAIN)));
    vc_map(array("name" => __("ST Location list car ", ST_TEXTDOMAIN), "base" => "st_location_list_car", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => $params));
    vc_map(array("name" => __("ST Location list hotel ", ST_TEXTDOMAIN), "base" => "st_location_list_hotel", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => $params));
    vc_map(array("name" => __("ST Location list rental ", ST_TEXTDOMAIN), "base" => "st_location_list_rental", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => $params));
    vc_map(array("name" => __("ST Location list activity ", ST_TEXTDOMAIN), "base" => "st_location_list_activity", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => $params));
    vc_map(array("name" => __("ST Location list tour ", ST_TEXTDOMAIN), "base" => "st_location_list_tour", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => $params));
    if (!function_exists('st_location_list_car_func')) {
        function st_location_list_car_func($attr)
        {
            $data = shortcode_atts(array('st_location_style' => "", 'st_location_num' => "", 'st_location_orderby' => "", 'st_location_order' => ""), $attr, 'st_location_list_car');
            extract($data);
            $return;
            $query = array('post_type' => 'st_cars', 'meta_key' => 'id_location', 'meta_value' => get_the_ID(), 'posts_per_page' => $st_location_num, 'order' => $st_location_order, 'orderby' => $st_location_orderby);
            if (STInput::request('style')) {
                $st_location_style = STInput::request('style');
            }
<?php

if (function_exists('vc_map')) {
    $list_taxonomy = st_list_taxonomy('st_tours');
    $list_taxonomy = array_merge(array("---Select---" => ""), $list_taxonomy);
    $list_location = TravelerObject::get_list_location();
    $list_location_data[__('-- Select --', ST_TEXTDOMAIN)] = '';
    if (!empty($list_location)) {
        foreach ($list_location as $k => $v) {
            $list_location_data[$v['title']] = $v['id'];
        }
    }
    $params = array(array("type" => "textfield", "holder" => "div", "heading" => __("List ID in Tour", ST_TEXTDOMAIN), "param_name" => "st_ids", "description" => __("Ids separated by commas", ST_TEXTDOMAIN), 'value' => ""), array("type" => "textfield", "holder" => "div", "heading" => __("Number tour", ST_TEXTDOMAIN), "param_name" => "st_number_tour", "description" => "", 'value' => 4), array("type" => "dropdown", "holder" => "div", "heading" => __("Order By", ST_TEXTDOMAIN), "param_name" => "st_orderby", "description" => "", 'edit_field_class' => 'vc_col-sm-6', 'value' => function_exists('st_get_list_order_by') ? st_get_list_order_by(array(__('Price', ST_TEXTDOMAIN) => 'sale', __('Rate', ST_TEXTDOMAIN) => 'rate', __('Discount rate', ST_TEXTDOMAIN) => 'discount', __('Last Minute Deal', ST_TEXTDOMAIN) => 'last_minute_deal')) : array()), array("type" => "dropdown", "holder" => "div", "heading" => __("Order", ST_TEXTDOMAIN), "param_name" => "st_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" => __("Style Tour", ST_TEXTDOMAIN), "param_name" => "st_style", "description" => "", 'value' => array(__('Style 1', ST_TEXTDOMAIN) => 'style_1', __('Style 2', ST_TEXTDOMAIN) => 'style_2', __('Style 3', ST_TEXTDOMAIN) => 'style_3', __('Style 4', ST_TEXTDOMAIN) => 'style_4')), array("type" => "dropdown", "holder" => "div", "heading" => __("Number tour of row", ST_TEXTDOMAIN), "param_name" => "st_tour_of_row", 'edit_field_class' => 'vc_col-sm-12', "value" => array(__('Four', ST_TEXTDOMAIN) => '4', __('Three', ST_TEXTDOMAIN) => '3', __('Two', ST_TEXTDOMAIN) => '2')), array("type" => "dropdown", "holder" => "div", "heading" => __("Only in Featured Location", ST_TEXTDOMAIN), "param_name" => "only_featured_location", 'edit_field_class' => 'vc_col-sm-12', "value" => array(__('No', ST_TEXTDOMAIN) => 'no', __('Yes', ST_TEXTDOMAIN) => 'yes')), array("type" => "dropdown", "holder" => "div", "heading" => __("Location", ST_TEXTDOMAIN), "param_name" => "st_location", "description" => __("Location", ST_TEXTDOMAIN), 'value' => $list_location_data), array("type" => "dropdown", "holder" => "div", "heading" => __("Sort By Taxonomy", ST_TEXTDOMAIN), "param_name" => "sort_taxonomy", "description" => "", "value" => $list_taxonomy));
    $data_vc = STTour::get_taxonomy_and_id_term_tour();
    $params = array_merge($params, $data_vc['list_vc']);
    vc_map(array("name" => __("ST List Tour", ST_TEXTDOMAIN), "base" => "st_list_tour", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => $params));
}
if (!function_exists('st_vc_list_tour')) {
    function st_vc_list_tour($attr, $content = false)
    {
        $data_vc = STTour::get_taxonomy_and_id_term_tour();
        $param = array('st_ids' => '', 'st_number_tour' => 0, 'st_order' => '', 'st_orderby' => '', 'st_tour_of_row' => '', 'st_style' => '', 'only_featured_location' => '', 'st_location' => '', 'sort_taxonomy' => '');
        $param = array_merge($param, $data_vc['list_id_vc']);
        $data = shortcode_atts($param, $attr, 'st_list_tour');
        extract($data);
        $page = STInput::request('paged');
        if (!$page) {
            $page = get_query_var('paged');
        }
        $query = array('post_type' => 'st_tours', 'posts_per_page' => $st_number_tour, 'paged' => $page, 'order' => $st_order, 'orderby' => $st_orderby);
        if (!empty($st_ids)) {
Example #6
0
<?php

if (!st_check_service_available('st_holidays')) {
    return;
}
if (function_exists('vc_map') and class_exists('TravelerObject')) {
    $list_taxonomy = st_list_taxonomy('st_holidays');
    $list_taxonomy = array_merge(array("---Select---" => ""), $list_taxonomy);
    $list_location = TravelerObject::get_list_location();
    $list_location_data[__('-- Select --', ST_TEXTDOMAIN)] = '';
    if (!empty($list_location)) {
        foreach ($list_location as $k => $v) {
            $list_location_data[$v['title']] = $v['id'];
        }
    }
    $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" => "textfield", "holder" => "div", "heading" => __("List ID in Holiday", ST_TEXTDOMAIN), "param_name" => "st_ids", "description" => __("Ids separated by commas", ST_TEXTDOMAIN), 'value' => ""), array("type" => "textfield", "holder" => "div", "heading" => __("Number holiday", ST_TEXTDOMAIN), "param_name" => "st_number_holiday", "description" => "", 'value' => 4), array("type" => "dropdown", "holder" => "div", "heading" => __("Order By", ST_TEXTDOMAIN), "param_name" => "st_orderby", "description" => "", 'edit_field_class' => 'vc_col-sm-6', 'value' => function_exists('st_get_list_order_by') ? st_get_list_order_by(array(__('Price', ST_TEXTDOMAIN) => 'sale', __('Rate', ST_TEXTDOMAIN) => 'rate', __('Discount rate', ST_TEXTDOMAIN) => 'discount', __('Last Minute Deal', ST_TEXTDOMAIN) => 'last_minute_deal')) : array()), array("type" => "dropdown", "holder" => "div", "heading" => __("Order", ST_TEXTDOMAIN), "param_name" => "st_order", 'value' => array(__('--Select--', ST_TEXTDOMAIN) => '', __('Asc', ST_TEXTDOMAIN) => 'asc', __('Desc', ST_TEXTDOMAIN) => 'desc'), 'edit_field_class' => 'vc_col-sm-6'), array("type" => "dropdown", "holder" => "div", "heading" => __("Style Holiday", ST_TEXTDOMAIN), "param_name" => "st_style", "description" => "", 'value' => array(__('--Select--', ST_TEXTDOMAIN) => '', __('Style 1', ST_TEXTDOMAIN) => 'style_1', __('Style 2', ST_TEXTDOMAIN) => 'style_2', __('Style 3', ST_TEXTDOMAIN) => 'style_3', __('Style 4', ST_TEXTDOMAIN) => 'style_4')), array("type" => "dropdown", "holder" => "div", "heading" => __("Items per row", ST_TEXTDOMAIN), "param_name" => "st_holiday_of_row", 'edit_field_class' => 'vc_col-sm-12', "value" => array(__('--Select--', ST_TEXTDOMAIN) => '', __('Four', ST_TEXTDOMAIN) => '4', __('Three', ST_TEXTDOMAIN) => '3', __('Two', ST_TEXTDOMAIN) => '2')), array("type" => "dropdown", "holder" => "div", "heading" => __("Only in Featured Location", ST_TEXTDOMAIN), "param_name" => "only_featured_location", "value" => array(__('--Select--', ST_TEXTDOMAIN) => '', __('No', ST_TEXTDOMAIN) => 'no', __('Yes', ST_TEXTDOMAIN) => 'yes')), array("type" => "dropdown", "holder" => "div", "heading" => __("Location", ST_TEXTDOMAIN), "param_name" => "st_location", "description" => __("Location", ST_TEXTDOMAIN), 'value' => $list_location_data, "dependency" => array("element" => "only_featured_location", "value" => "no")), array("type" => "dropdown", "holder" => "div", "heading" => __("Sort By Taxonomy", ST_TEXTDOMAIN), "param_name" => "sort_taxonomy", "description" => "", "value" => $list_taxonomy));
    $data_vc = STHoliday::get_taxonomy_and_id_term_holiday();
    $params = array_merge($params, $data_vc['list_vc']);
    vc_map(array("name" => __("ST List Holiday", ST_TEXTDOMAIN), "base" => "st_list_holiday", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => $params));
}
if (!function_exists('st_vc_list_holiday')) {
    function st_vc_list_holiday($attr, $content = false)
    {
        $data_vc = STHoliday::get_taxonomy_and_id_term_holiday();
        $param = array('st_ids' => '', 'st_number_holiday' => 4, 'st_order' => '', 'st_orderby' => '', 'st_holiday_of_row' => '', 'st_style' => 'style_1', 'only_featured_location' => 'no', 'st_location' => '', 'sort_taxonomy' => '', 'title' => '', 'font_size' => '3');
        $param = array_merge($param, $data_vc['list_id_vc']);
        $data = shortcode_atts($param, $attr, 'st_list_holiday');
        extract($data);
        $page = STInput::request('paged');
        if (!$page) {
            $page = get_query_var('paged');
<?php

if (!st_check_service_available('st_activity')) {
    return;
}
if (function_exists('vc_map') and class_exists('TravelerObject')) {
    $list_taxonomy = st_list_taxonomy('st_activity');
    $list_taxonomy = array_merge(array("---Select---" => ""), $list_taxonomy);
    $list_location = TravelerObject::get_list_location();
    $list_location_data[__('-- Select --', ST_TEXTDOMAIN)] = '';
    if (!empty($list_location)) {
        foreach ($list_location as $k => $v) {
            $list_location_data[$v['title']] = $v['id'];
        }
    }
    $params = array(array("type" => "textfield", "holder" => "div", "heading" => __("List ID in Activity", ST_TEXTDOMAIN), "param_name" => "st_ids", "description" => __("Ids separated by commas", ST_TEXTDOMAIN), 'value' => ""), array("type" => "textfield", "holder" => "div", "heading" => __("Number", ST_TEXTDOMAIN), "param_name" => "st_number", "description" => "", 'value' => 4, 'edit_field_class' => 'vc_col-sm-3'), array("type" => "dropdown", "holder" => "div", "heading" => __("Order By", ST_TEXTDOMAIN), "param_name" => "st_orderby", "description" => "", 'edit_field_class' => 'vc_col-sm-3', 'value' => function_exists('st_get_list_order_by') ? st_get_list_order_by(array(__('Price', ST_TEXTDOMAIN) => 'sale', __('Rate', ST_TEXTDOMAIN) => 'rate', __('Discount rate', ST_TEXTDOMAIN) => 'discount')) : array()), array("type" => "dropdown", "holder" => "div", "heading" => __("Order", ST_TEXTDOMAIN), "param_name" => "st_order", 'value' => array(__('--Select--', ST_TEXTDOMAIN) => '', __('Asc', ST_TEXTDOMAIN) => 'asc', __('Desc', ST_TEXTDOMAIN) => 'desc'), 'edit_field_class' => 'vc_col-sm-3'), array("type" => "dropdown", "holder" => "div", "heading" => __("Number of row", ST_TEXTDOMAIN), "param_name" => "st_of_row", 'edit_field_class' => 'vc_col-sm-3', "value" => array(__('--Select--', ST_TEXTDOMAIN) => '', __('Four', ST_TEXTDOMAIN) => '4', __('Three', ST_TEXTDOMAIN) => '3', __('Two', ST_TEXTDOMAIN) => '2')), array("type" => "dropdown", "holder" => "div", "heading" => __("Only in Featured Location", ST_TEXTDOMAIN), "param_name" => "only_featured_location", "value" => array(__('--Select--', ST_TEXTDOMAIN) => '', __('No', ST_TEXTDOMAIN) => 'no', __('Yes', ST_TEXTDOMAIN) => 'yes')), array("type" => "dropdown", "holder" => "div", "heading" => __("Location", ST_TEXTDOMAIN), "param_name" => "st_location", "description" => __("Location", ST_TEXTDOMAIN), 'value' => $list_location_data, "dependency" => array("element" => "only_featured_location", "value" => "no")), array("type" => "dropdown", "holder" => "div", "heading" => __("Sort By Taxonomy", ST_TEXTDOMAIN), "param_name" => "sort_taxonomy", "description" => "", "value" => $list_taxonomy));
    $data_vc = STActivity::get_taxonomy_and_id_term_activity();
    $params = array_merge($params, $data_vc['list_vc']);
    vc_map(array("name" => __("ST List of Activities", ST_TEXTDOMAIN), "base" => "st_list_activity", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => $params));
}
if (!function_exists('st_vc_list_activity')) {
    function st_vc_list_activity($attr, $content = false)
    {
        $data_vc = STActivity::get_taxonomy_and_id_term_activity();
        $param = array('st_ids' => "", 'st_number' => 4, 'st_order' => '', 'st_orderby' => '', 'st_of_row' => 4, 'only_featured_location' => 'no', 'st_location' => '', 'sort_taxonomy' => '');
        $param = array_merge($param, $data_vc['list_id_vc']);
        $data = shortcode_atts($param, $attr, 'st_list_activity');
        extract($data);
        $page = STInput::request('paged');
        if (!$page) {
            $page = get_query_var('paged');
<?php

if (function_exists('vc_map')) {
    $list_location = TravelerObject::get_list_location();
    $list_location_data[__('-- Select --', ST_TEXTDOMAIN)] = '';
    if (!empty($list_location)) {
        foreach ($list_location as $k => $v) {
            $list_location_data[$v['title']] = $v['id'];
        }
    }
    vc_map(array("name" => __("ST List of Hotels", ST_TEXTDOMAIN), "base" => "st_list_hotel", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => array(array("type" => "textfield", "holder" => "div", "heading" => __("List ID in Hotel", ST_TEXTDOMAIN), "param_name" => "st_ids", "description" => __("Ids separated by commas", ST_TEXTDOMAIN), 'value' => ""), array("type" => "textfield", "holder" => "div", "heading" => __("Number hotel", ST_TEXTDOMAIN), "param_name" => "st_number_ht", "description" => "", 'value' => 4), array("type" => "dropdown", "holder" => "div", "heading" => __("Order By", ST_TEXTDOMAIN), "param_name" => "st_orderby", "description" => "", 'edit_field_class' => 'vc_col-sm-6', 'value' => function_exists('st_get_list_order_by') ? st_get_list_order_by(array(__('Sale', ST_TEXTDOMAIN) => 'sale', __('Rate', ST_TEXTDOMAIN) => 'rate', __('Discount rate', ST_TEXTDOMAIN) => 'discount')) : array()), array("type" => "dropdown", "holder" => "div", "heading" => __("Order", ST_TEXTDOMAIN), "param_name" => "st_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" => __("Style hotel", ST_TEXTDOMAIN), "param_name" => "st_style_ht", "description" => "", 'value' => array(__('BG Last Minute Deal', ST_TEXTDOMAIN) => 'bg_last_minute_deal', __('Last Minute Deals', ST_TEXTDOMAIN) => 'last_minute_deals', __('Hot Deals', ST_TEXTDOMAIN) => 'hot-deals', __('Grid', ST_TEXTDOMAIN) => 'grid', __('Grid Style 2', ST_TEXTDOMAIN) => 'grid2')), array("type" => "dropdown", "holder" => "div", "heading" => __("Number Hotel of row", ST_TEXTDOMAIN), "param_name" => "st_ht_of_row", 'edit_field_class' => 'vc_col-sm-12', "description" => __('Noticed: the field "Number Hotel of row" only applicable to "Last Minute Deal" style', ST_TEXTDOMAIN), "value" => array(__('Four', ST_TEXTDOMAIN) => '4', __('Three', ST_TEXTDOMAIN) => '3', __('Two', ST_TEXTDOMAIN) => '2')), array("type" => "dropdown", "holder" => "div", "heading" => __("Only in Featured Location", ST_TEXTDOMAIN), "param_name" => "only_featured_location", 'edit_field_class' => 'vc_col-sm-12', "value" => array(__('No', ST_TEXTDOMAIN) => 'no', __('Yes', ST_TEXTDOMAIN) => 'yes')), array("type" => "dropdown", "holder" => "div", "heading" => __("Location", ST_TEXTDOMAIN), "param_name" => "st_location", "description" => __("Location", ST_TEXTDOMAIN), 'value' => $list_location_data))));
}
if (!function_exists('st_vc_list_hotel')) {
    function st_vc_list_hotel($attr, $content = false)
    {
        $data = shortcode_atts(array('st_ids' => "", 'st_number_ht' => 0, 'st_order' => '', 'st_orderby' => '', 'st_ht_of_row' => '', 'st_style_ht' => '', 'only_featured_location' => 'no', 'st_location' => ''), $attr, 'st_list_hotel');
        extract($data);
        $query = array('post_type' => 'st_hotel', 'posts_per_page' => $st_number_ht, 'order' => $st_order, 'orderby' => $st_orderby);
        if (!empty($st_ids)) {
            $query['post__in'] = explode(',', $st_ids);
        }
        if ($st_style_ht == 'bg_last_minute_deal') {
            $query = array('post_type' => 'hotel_room', 'posts_per_page' => 1, 'meta_key' => 'sale_price_from', 'order' => 'desc', 'orderby' => 'meta_value', 'meta_query' => array('key' => 'is_sale_schedule', 'value' => 'on', 'compare' => "="));
            $post = query_posts($query);
            $data['info_room'] = $post;
            wp_reset_query();
            if (!empty($post)) {
                $id_hotel = get_post_meta($post[0]->ID, "room_parent", true);
                $query = array('post_type' => 'st_hotel', 'posts_per_page' => 1, 'post__in' => array($id_hotel));
            } else {
                /*$query=array(
<?php

if (function_exists('vc_map')) {
    $list_location = TravelerObject::get_list_location();
    $list_location_data[__('-- Select --', ST_TEXTDOMAIN)] = '';
    if (!empty($list_location)) {
        foreach ($list_location as $k => $v) {
            $list_location_data[$v['title']] = $v['id'];
        }
    }
    vc_map(array("name" => __("ST List of Rentals", ST_TEXTDOMAIN), "base" => "st_list_rental", "content_element" => true, "icon" => "icon-st", "category" => "Shinetheme", "params" => array(array("type" => "textfield", "holder" => "div", "heading" => __("List ID in Rental", ST_TEXTDOMAIN), "param_name" => "st_ids", "description" => __("Ids separated by commas", ST_TEXTDOMAIN), 'value' => ""), array("type" => "textfield", "holder" => "div", "heading" => __("Number", ST_TEXTDOMAIN), "param_name" => "number", "description" => "", 'value' => 4), array("type" => "dropdown", "holder" => "div", "heading" => __("Order By", ST_TEXTDOMAIN), "param_name" => "st_orderby", "description" => "", 'edit_field_class' => 'vc_col-sm-6', 'value' => function_exists('st_get_list_order_by') ? st_get_list_order_by(array(__('Sale', ST_TEXTDOMAIN) => 'sale', __('Featured', ST_TEXTDOMAIN) => 'featured')) : array()), array("type" => "dropdown", "holder" => "div", "heading" => __("Order", ST_TEXTDOMAIN), "param_name" => "st_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" => __("Number of row", ST_TEXTDOMAIN), "param_name" => "number_of_row", 'edit_field_class' => 'vc_col-sm-12', "description" => __('', ST_TEXTDOMAIN), "value" => array(__('Four', ST_TEXTDOMAIN) => '4', __('Three', ST_TEXTDOMAIN) => '3', __('Two', ST_TEXTDOMAIN) => '2')), array("type" => "dropdown", "holder" => "div", "heading" => __("Location", ST_TEXTDOMAIN), "param_name" => "st_location", "description" => __("Location", ST_TEXTDOMAIN), 'value' => $list_location_data))));
}
if (!function_exists('st_vc_list_rental')) {
    function st_vc_list_rental($attr, $content = false)
    {
        $data = shortcode_atts(array('st_ids' => '', 'taxonomy' => '', 'number' => 0, 'st_order' => '', 'st_orderby' => '', 'number_of_row' => 4, 'st_location' => ''), $attr, 'st_list_rental');
        extract($data);
        $query = array('post_type' => 'st_rental', 'posts_per_page' => $number, 'order' => $st_order, 'orderby' => $st_orderby);
        if (!empty($st_ids)) {
            $query['post__in'] = explode(',', $st_ids);
        }
        if ($st_orderby == 'sale') {
            $query['meta_key'] = 'price';
            $query['orderby'] = 'meta_value';
        }
        if ($st_orderby == 'featured') {
            $query['meta_key'] = 'cars_set_as_featured';
            $query['orderby'] = 'meta_value';
        }
        if (!empty($st_location)) {
            $query['meta_query'] = array('key' => 'id_location', 'value' => $st_location, 'compare' => "=");