function st_rental_detail_map($attr) { if (is_singular('st_rental')) { $default = array('number' => '12', 'range' => '20', 'show_circle' => 'no'); extract($dump = wp_parse_args($attr, $default)); $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); $class = new STRental(); $data = $class->get_near_by(get_the_ID(), $range, $number); $location_center = '[' . $lat . ',' . $lng . ']'; $data_map = array(); $data_map[0]['id'] = get_the_ID(); $data_map[0]['name'] = get_the_title(); $data_map[0]['post_type'] = get_post_type(); $data_map[0]['lat'] = $lat; $data_map[0]['lng'] = $lng; $data_map[0]['icon_mk'] = get_template_directory_uri() . '/img/mk-single.png'; $data_map[0]['content_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop/rental', false, array('post_type' => ''))); $data_map[0]['content_adv_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop-adv/rental', false, array('post_type' => ''))); $stt = 1; global $post; if (!empty($data)) { foreach ($data as $post) { setup_postdata($post); $map_lat = get_post_meta(get_the_ID(), 'map_lat', true); $map_lng = get_post_meta(get_the_ID(), 'map_lng', true); if (!empty($map_lat) and !empty($map_lng) and is_numeric($map_lat) and is_numeric($map_lng)) { $post_type = get_post_type(); $data_map[$stt]['id'] = get_the_ID(); $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; $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/rental', false, array('post_type' => ''))); $data_map[$stt]['content_adv_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop-adv/rental', false, array('post_type' => ''))); $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); $data_tmp['data_tmp'] = $data_tmp; $html = '<div class="map_single">' . st()->load_template('hotel/elements/detail', 'map', $data_tmp) . '</div>'; return $html; } }
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; }
function update_sale_price($post_id) { if (get_post_type($post_id) == $this->post_type) { $price = STRental::get_price($post_id); update_post_meta($post_id, 'sale_price', $price); } }
function st_list_rental_related($attr, $content = false) { $data_vc = STRental::get_taxonomy_and_id_term_tour(); $param = array('title' => '', 'sort_taxonomy' => '', 'posts_per_page' => 3, 'orderby' => 'ID', 'order' => 'DESC', 'font_size' => '3', 'number_of_row' => 1); $param = array_merge($param, $data_vc['list_id_vc']); $data = shortcode_atts($param, $attr, 'st_list_rental_related'); extract($data); $page = STInput::request('paged'); if (!$page) { $page = get_query_var('paged'); } $query = array('post_type' => 'st_rental', 'posts_per_page' => $posts_per_page, 'post_status' => 'publish', 'paged' => $page, 'order' => $order, 'orderby' => $orderby, 'post__not_in' => array(get_the_ID())); if (!empty($sort_taxonomy)) { if (isset($attr["id_term_" . $sort_taxonomy])) { $terms_post = wp_get_post_terms(get_the_ID(), $sort_taxonomy, array('fields' => 'ids')); $id_term = $attr["id_term_" . $sort_taxonomy]; $id_term = explode(',', $id_term); $terms = array(); foreach ($id_term as $key => $value) { if (in_array($value, $terms_post)) { $terms[] = $value; } } if ($terms) { $query['tax_query'] = array(array('taxonomy' => $sort_taxonomy, 'field' => 'id', 'terms' => $terms)); } } } query_posts($query); $r = "<div class='list_rental_related'>" . st()->load_template('vc-elements/st-list-rental/loop-list', 'true', array()) . "</div>"; wp_reset_query(); if (!empty($title) and !empty($r)) { $r = '<h' . $font_size . '>' . $title . '</h' . $font_size . '>' . $r; } return $r; }
<?php while ($query->have_posts()) { $query->the_post(); $info_room = $info_room[0]; $price = STRental::get_price($info_room->ID); $price = TravelHelper::format_money($price); $date = date('l d M', strtotime(get_post_meta($info_room->ID, 'sale_price_from', true))) . " - " . date('l d M', strtotime(get_post_meta($info_room->ID, 'sale_price_to', true))); $txt = '<div class="text-center text-white"> <h2 class="text-uc mb20">' . STLanguage::st_get_language('last_minute_deal') . '</h2>'; $view_star_review = st()->get_option('view_star_review', 'review'); if ($view_star_review == 'review') { $txt .= ' <ul class="icon-list list-inline-block mb0 last-minute-rating"> ' . TravelHelper::rate_to_string(STReview::get_avg_rate()) . ' </ul>'; } elseif ($view_star_review == 'star') { $txt .= '<ul class="icon-list list-inline-block mb0 last-minute-rating">'; $star = STHotel::getStar(); $txt .= TravelHelper::rate_to_string($star); $txt .= '</ul>'; } $txt .= '<h5 class="last-minute-title">' . get_the_title() . ' - ' . $info_room->post_title . ' </h5> <p class="last-minute-date">' . $date . '</p> <p class="mb20"> <b>' . $price . '</b> / ' . STLanguage::st_get_language('night') . ' </p> <a href="' . get_the_permalink() . '" class="btn btn-lg btn-white btn-ghost"> ' . STLanguage::st_get_language('book_now') . '<i class="fa fa-angle-right"></i> </a> </div>';
<?php if ($address = get_post_meta(get_the_ID(), 'address', TRUE)) { ?> <p class="mb0"> <small> <?php echo esc_html($address); ?> </small> </p> <?php } ?> <?php $is_sale = STRental::is_sale(); $orgin_price = STRental::get_orgin_price(); $price = STRental::get_price(); $show_price = st()->get_option('show_price_free'); ?> <?php $features = get_post_meta(get_the_ID(), 'fetures', true); if (!empty($features)) { ?> <?php echo '<ul class="booking-item-features booking-item-features-rentals booking-item-features-sign clearfix mt5 mb5">'; foreach ($features as $key => $value) { $d = array('icon' => '', 'title' => ''); $value = wp_parse_args($value, $d); echo '<li rel="tooltip" data-placement="top" title="" data-original-title="' . $value['title'] . '"><i class="' . TravelHelper::handle_icon($value['icon']) . '"></i>'; if ($value['number']) { echo '<span class="booking-item-feature-sign">x ' . $value['number'] . '</span>'; }
* */ $default = array('align' => 'right'); if (isset($attr)) { extract(wp_parse_args($attr, $default)); } else { extract($default); } $new_price = STRental::get_price(); $is_sale = STRental::is_sale(); $show_price = st()->get_option('show_price_free'); ?> <p class="booking-item-header-price"> <?php if ($is_sale) { echo "<span class='booking-item-old-price'>" . TravelHelper::format_money(STRental::get_orgin_price()) . "</span>"; } ?> <?php if ($show_price == 'on' || $new_price) { ?> <span class="text-lg"><?php echo TravelHelper::format_money($new_price); ?> </span>/<?php st_the_language('rental_night'); ?> </p> <?php }
<?php extract($data); if (!$number_of_row) { $number_of_row = 4; } $col = 12 / $number_of_row; $price = STRental::get_orgin_price(); $is_sale = STRental::is_sale(); $price_sale = STRental::get_price(); ?> <!-- start loop rental --> <div <?php post_class('col-md-' . $col . ' style_box'); ?> > <?php echo STFeatured::get_featured(); ?> <div class="thumb"> <header class="thumb-header"> <a class="hover-img" href="<?php the_permalink(); ?> "> <?php if (has_post_thumbnail() and get_the_post_thumbnail()) { the_post_thumbnail(array(400, 300, 'bfi_thumb' => true)); } else { echo st_get_default_image();
static function ajax_submit_form() { //Add to cart then submit form $item_id = STInput::post('item_id'); if (!$item_id) { $return = array('status' => false, 'message' => __('Please choose an item', ST_TEXTDOMAIN)); } else { $post_type = get_post_type($item_id); $number_room = STInput::post('number_room') ? STInput::post('number_room') : false; if (!$number_room) { $number_room = STInput::post('room_num_search') ? STInput::post('room_num_search') : 1; } self::destroy_cart(); $validate = true; switch ($post_type) { case "st_hotel": $hotel = new STHotel(); $validate = $hotel->do_add_to_cart(array('item_id' => STInput::post('item_id'), 'number_room' => $number_room, 'price' => STInput::post('price'), 'check_in' => STInput::post('check_in'), 'check_out' => STInput::post('check_out'), 'room_num_search' => STInput::post('room_num_search'), 'room_num_config' => STInput::post('room_num_config'), 'room_id' => STInput::post('room_id'))); break; case "st_cars": $car = new STCars(); $validate = $car->do_add_to_cart(); break; case "st_activity": $class = new STActivity(); $validate = $class->do_add_to_cart(); break; case "st_tours": $class = new STTour(); $validate = $class->do_add_to_cart(); break; case "st_rental": $class = new STRental(); $validate = $class->do_add_to_cart(); break; } if ($validate) { $return = self::booking_form_submit($item_id); } else { $return = array('status' => false, 'message' => STTemplate::get_message_content()); STTemplate::clear(); } } echo json_encode($return); die; }
<?php /** * @package WordPress * @subpackage Traveler * @since 1.0 * * Rental review detail * * Created by ShineTheme * */ $rental = new STRental(); ?> <div class="mt20"> <div class="row"> <div class="col-md-8"> <?php $total = get_comments_number(); ?> <h4 class="lh1em"><?php st_the_language('rental_traveler_rating'); ?> </h4> <ul class="list booking-item-raiting-list"> <?php $rate_exe = STReview::count_review_by_rate(null, 5); ?> <li> <div class="booking-item-raiting-list-title"><?php
<?php /** * @package WordPress * @subpackage Traveler * @since 1.0 * * Rental nearby * * Created by ShineTheme * */ $object = new STRental(); $nearby_posts = $object->get_near_by(); $default = array('show_title' => true, 'class' => ''); if (isset($arg)) { extract(wp_parse_args($arg, $default)); } else { extract($default); } if ($show_title) { ?> <h4><?php printf(st_get_language('rental_properties_near_d'), '<span class="title_nearby">' . get_the_title() . '</span>'); ?> </h4> <?php } if ($nearby_posts and !empty($nearby_posts)) { global $post; echo "<ul class='booking-list {$class}' >";
function st_rental_room_review() { if (get_post_type() == 'rental_room') { if (comments_open() and st()->get_option('rental_review') == 'on') { ob_start(); comments_template('/reviews/reviews.php'); return @ob_get_clean(); } } } st_reg_shortcode('st_rental_room_review', 'st_rental_room_review'); } /** * ST Room rental facility * @since 1.1.4 **/ if (function_exists('vc_map')) { vc_map(array('name' => __("ST Rental Room Facility", ST_TEXTDOMAIN), 'base' => 'st_rental_room_facility', 'content_element' => true, 'icon' => 'icon-st', 'category' => 'Hotel', 'show_settings_on_create' => true, 'params' => array(array('type' => 'checkbox', 'heading' => __('Choose taxonomies', ST_TEXTDOMAIN), 'param_name' => 'choose_taxonomies', 'description' => __('Will be shown in layout', ST_TEXTDOMAIN), 'value' => STRental::listTaxonomy())))); } if (!function_exists('st_rental_room_facility_ft')) { function st_rental_room_facility_ft($attr, $content = null) { $default = array('choose_taxonomies' => ''); $attr = wp_parse_args($attr, $default); if (get_post_type() == 'rental_room') { return st()->load_template('vc-elements/st-rental-room/st_rental_room_facility', false, array('args' => $attr)); } return false; } st_reg_shortcode('st_rental_room_facility', 'st_rental_room_facility_ft'); }
echo balanceTags($hotel->get_cart_item_html($key)); break; case "st_cars": $cars = new STCars(); echo balanceTags($cars->get_cart_item_html($key)); break; case "st_tours": $tours = new STTour(); echo balanceTags($tours->get_cart_item_html($key)); break; case "st_holidays": $holidays = new STHoliday(); echo balanceTags($holidays->get_cart_item_html($key)); break; case "st_rental": $object = new STRental(); echo balanceTags($object->get_cart_item_html($key)); break; case "st_activity": $object = new STActivity(); echo balanceTags($object->get_cart_item_html($key)); break; } } } } ?> <!-- <div class="booking-item-coupon p10"> <form method="post" action="<?php the_permalink(); ?>
for ($i = 0; $i <= $child_max; $i++) { echo "<option " . selected($i, $old) . " value='{$i}'>{$i}</option>"; } ?> </select> </div> </div> </div> </div> <div class="gap gap-small"></div> <?php if (!$st_is_booking_modal) { ?> <?php echo STRental::rental_external_booking_submit(); ?> <?php } else { ?> <a href="#rental_booking_<?php the_ID(); ?> " class="btn btn-primary btn_booking_modal" data-target=#rental_booking_<?php the_ID(); ?> data-effect="mfp-zoom-out" ><?php st_the_language('rental_book_now'); ?> </a> <?php
static function ajax_submit_form() { //Add to cart then submit form $item_id = STInput::post('item_id'); $sc = STInput::request('sc', ''); if (!$item_id) { $name = ''; if ($sc == 'add-hotel-booking') { $name = __('Hotel', ST_TEXTDOMAIN); } elseif ($sc == 'add-rental-booking') { $name = __('Rental', ST_TEXTDOMAIN); } elseif ($sc == 'add-car-booking') { $name = __('Car', ST_TEXTDOMAIN); } elseif ($sc == 'add-tour-booking') { $name = __('Tour', ST_TEXTDOMAIN); } elseif ($sc == 'add-holiday-booking') { $name = __('Holiday', ST_TEXTDOMAIN); } elseif ($sc == 'add-activity-booking') { $name = __('Activity', ST_TEXTDOMAIN); } $return = array('status' => false, 'message' => sprintf(__('Please choose a %s item ', ST_TEXTDOMAIN), $name)); } else { $post_type = get_post_type($item_id); $number_room = STInput::post('number_room') ? STInput::post('number_room') : false; if (!$number_room) { $number_room = STInput::post('room_num_search') ? STInput::post('room_num_search') : 1; } self::destroy_cart(); $validate = true; switch ($post_type) { case "st_hotel": $hotel = new STHotel(); $validate = $hotel->do_add_to_cart(); break; case "st_cars": $car = new STCars(); $validate = $car->do_add_to_cart(); break; case "st_activity": $class = new STActivity(); $validate = $class->do_add_to_cart(); break; case "st_tours": $class = new STTour(); $validate = $class->do_add_to_cart(); break; case "st_holidays": $class = new STHoliday(); $validate = $class->do_add_to_cart(); break; case "st_rental": $class = new STRental(); $validate = $class->do_add_to_cart(); break; } if ($validate) { $return = self::booking_form_submit($item_id); } else { $return = array('status' => false, 'message' => STTemplate::get_message_content()); STTemplate::clear(); } } echo json_encode($return); die; }
function st_search_list_half_map($attr, $content = false) { $post_type = STInput::request('post_type'); $zoom = STInput::request('zoom'); $number = STInput::request('number', 8); $style_map = STInput::request('style_map'); $query = array('post_type' => $post_type, 'posts_per_page' => $number, 'post_status' => 'publish', 's' => ''); $map_lat_center = 0; $map_lng_center = 0; $location_center = '[0,0]'; $address_center = ''; /*if(STInput::request( 'location_name' )) { $ids_location = TravelerObject::_get_location_by_name( STInput::get( 'location_name' ) ); if(!empty( $ids_location )) { $_REQUEST['location_name'] = implode(',',$ids_location); $map_lat_center = get_post_meta( $ids_location[ 0 ] , 'map_lat' , true ); $map_lng_center = get_post_meta( $ids_location[ 0 ] , 'map_lng' , true ); $location_center = '[' . $map_lat_center . ',' . $map_lng_center . ']'; $address_center = get_the_title( $ids_location[ 0 ] ); } }*/ if (STInput::request('pick-up')) { $ids_location = TravelerObject::_get_location_by_name(STInput::get('pick-up')); if (!empty($ids_location)) { $_REQUEST['pick-up'] = implode(',', $ids_location); $map_lat_center = get_post_meta($ids_location[0], 'map_lat', true); $map_lng_center = get_post_meta($ids_location[0], 'map_lng', true); $location_center = '[' . $map_lat_center . ',' . $map_lng_center . ']'; $address_center = get_the_title($ids_location[0]); } } if (STInput::request('location_id')) { $map_lat_center = get_post_meta(STInput::request('location_id'), 'map_lat', true); $map_lng_center = get_post_meta(STInput::request('location_id'), 'map_lng', true); $location_center = '[' . $map_lat_center . ',' . $map_lng_center . ']'; $address_center = get_the_title(STInput::request('location_id')); } if (STInput::request('location_id_pick_up')) { $map_lat_center = get_post_meta(STInput::request('location_id_pick_up'), 'map_lat', true); $map_lng_center = get_post_meta(STInput::request('location_id_pick_up'), 'map_lng', true); $location_center = '[' . $map_lat_center . ',' . $map_lng_center . ']'; $address_center = get_the_title(STInput::request('location_id_pick_up')); } $data_map = array(); global $wp_query, $st_search_query; switch ($post_type) { case "st_hotel": $hotel = new STHotel(); add_action('pre_get_posts', array($hotel, 'change_search_hotel_arg')); break; case "st_rental": $rental = new STRental(); add_action('pre_get_posts', array($rental, 'change_search_arg')); break; case "st_cars": $cars = new STCars(); add_action('pre_get_posts', array($cars, 'change_search_cars_arg')); break; case "st_tours": $tour = new STTour(); //add_action( 'pre_get_posts' , array( $tour , 'change_search_tour_arg' ) ); st()->tour->alter_search_query(); break; case "st_holidays": $holiday = new STHoliday(); //add_action( 'pre_get_posts' , array( $holiday , 'change_search_holiday_arg' ) ); st()->holiday->alter_search_query(); break; case "st_activity": $activity = new STActivity(); add_action('pre_get_posts', array($activity, 'change_search_activity_arg')); break; } query_posts($query); $stt = 0; while (have_posts()) { the_post(); $map_lat = get_post_meta(get_the_ID(), 'map_lat', true); $map_lng = get_post_meta(get_the_ID(), 'map_lng', true); if (!empty($map_lat) and !empty($map_lng)) { $post_type = get_post_type(); $data_map[$stt]['id'] = get_the_ID(); $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; $post_type_name = get_post_type_object($post_type); $post_type_name->label; switch ($post_type) { case "st_hotel": $data_map[$stt]['icon_mk'] = st()->get_option('st_hotel_icon_map_marker', 'http://maps.google.com/mapfiles/marker_black.png'); $data_map[$stt]['content_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop/hotel', false, array('post_type' => $post_type_name->label))); $data_map[$stt]['content_adv_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop-adv/hotel', false, array('post_type' => $post_type_name->label))); break; case "st_rental": $data_map[$stt]['icon_mk'] = st()->get_option('st_rental_icon_map_marker', 'http://maps.google.com/mapfiles/marker_brown.png'); $data_map[$stt]['content_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop/rental', false, array('post_type' => $post_type_name->label))); $data_map[$stt]['content_adv_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop-adv/rental', false, array('post_type' => $post_type_name->label))); break; case "st_cars": $data_map[$stt]['icon_mk'] = st()->get_option('st_cars_icon_map_marker', 'http://maps.google.com/mapfiles/marker_green.png'); $data_map[$stt]['content_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop/car', false, array('post_type' => $post_type_name->label))); $data_map[$stt]['content_adv_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop-adv/car', false, array('post_type' => $post_type_name->label))); break; case "st_tours": $data_map[$stt]['icon_mk'] = st()->get_option('st_tours_icon_map_marker', 'http://maps.google.com/mapfiles/marker_purple.png'); $data_map[$stt]['content_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop/tour', false, array('post_type' => $post_type_name->label))); $data_map[$stt]['content_adv_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop-adv/tour', false, array('post_type' => $post_type_name->label))); break; case "st_holidays": $data_map[$stt]['icon_mk'] = st()->get_option('st_holidays_icon_map_marker', 'http://maps.google.com/mapfiles/marker_purple.png'); $data_map[$stt]['content_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop/holiday', false, array('post_type' => $post_type_name->label))); $data_map[$stt]['content_adv_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop-adv/holiday', false, array('post_type' => $post_type_name->label))); break; case "st_activity": $data_map[$stt]['icon_mk'] = st()->get_option('st_activity_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/activity', false, array('post_type' => $post_type_name->label))); $data_map[$stt]['content_adv_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop-adv/activity', false, array('post_type' => $post_type_name->label))); break; } $stt++; } } $st_search_query = $wp_query; switch ($post_type) { case "st_hotel": $hotel->remove_alter_search_query(); break; case "st_rental": $rental->remove_alter_search_query(); break; case "st_cars": $cars->remove_alter_search_query(); break; case "st_tours": //remove_action( 'pre_get_posts' , array( $tour , 'change_search_tour_arg' ) ); st()->tour->remove_alter_search_query(); break; case "st_holidays": //remove_action( 'pre_get_posts' , array( $holiday , 'change_search_holiday_arg' ) ); st()->holiday->remove_alter_search_query(); break; case "st_activity": $activity->remove_alter_search_query(); break; } if (!empty($_REQUEST['st_test'])) { } wp_reset_query(); if ($location_center == '[,]' or $location_center == '[0,0]') { $location_center = '[21.289374,15.644531]'; $data_map = ""; $zoom = "3"; } $data_tmp = array('location_center' => $location_center, 'zoom' => $zoom, 'data_map' => $data_map, 'style_map' => $style_map, 'number' => $number, 'address_center' => $address_center, 'map_lat_center' => $map_lat_center, 'map_lng_center' => $map_lng_center); echo json_encode($data_tmp); die; }
* Rental loop * * Created by ShineTheme * */ $query = new WP_Query($query); if (!isset($style)) { $style = 'list'; } if ($style == 'list') { if ($query->have_posts()) { echo '<ul class="booking-list loop-hotel style_list">'; while ($query->have_posts()) { $query->the_post(); $hotel = new STHotel(get_the_ID()); $object = new STRental(); $custom_feild = $object->get_custom_fields(); $link = st_get_link_with_search(get_permalink(), array('start', 'end', 'room_num_search', 'adult_num'), $_GET); $thumb_url = wp_get_attachment_url(get_post_thumbnail_id(get_the_ID())); ?> <li <?php post_class('booking-item'); ?> > <?php echo STFeatured::get_featured(); ?> <div class="row"> <div class="col-md-3"> <div class="booking-item-img-wrap st-popup-gallery"> <a href="<?php
function st_vc_all_post_type_content_search($attr, $content = false) { $default = array('st_style' => 1, 'st_number' => 5); $attr = wp_parse_args($attr, $default); extract($attr); if (!is_page_template('template-search-all-post-type.php')) { return ""; } $html = ''; global $wp_query, $st_search_query; $data_post_type = STInput::request('data_post_type', 'all'); if ($data_post_type == 'all') { $data_post_type = array('st_hotel', 'st_rental', 'st_cars', 'st_tours', 'st_holidays', 'st_activity'); } else { $data_post_type = array($data_post_type); } /////////////////////////////// ////// Hotel ////////////////////////////// if (st_check_service_available('st_hotel') and in_array('st_hotel', $data_post_type)) { $hotel = new STHotel(); add_action('pre_get_posts', array($hotel, 'change_search_hotel_arg')); query_posts(array('post_type' => 'st_hotel', 's' => '', 'paged' => get_query_var('paged'), 'posts_per_page' => $st_number)); $st_search_query = $wp_query; $html .= st()->load_template('search/search-all-post-type/content', 'all-post-type', array('attr' => $attr)); $html .= '<br>'; remove_action('pre_get_posts', array($hotel, 'change_search_hotel_arg')); $hotel->remove_alter_search_query(); wp_reset_query(); } /////////////////////////////// ////// Rental ////////////////////////////// if (st_check_service_available('st_rental') and in_array('st_rental', $data_post_type)) { $rental = new STRental(); add_action('pre_get_posts', array($rental, 'change_search_arg')); query_posts(array('post_type' => 'st_rental', 's' => '', 'paged' => get_query_var('paged'), 'posts_per_page' => $st_number)); $st_search_query = $wp_query; $html .= st()->load_template('search/search-all-post-type/content', 'all-post-type', array('attr' => $attr)); $html .= '<br>'; remove_action('pre_get_posts', array($rental, 'change_search_arg')); $rental->remove_alter_search_query(); wp_reset_query(); } /////////////////////////////// ////// Activity ////////////////////////////// if (st_check_service_available('st_activity') and in_array('st_activity', $data_post_type)) { $activity = new STActivity(); add_action('pre_get_posts', array($activity, 'change_search_activity_arg')); query_posts(array('post_type' => 'st_activity', 's' => '', 'paged' => get_query_var('paged'), 'posts_per_page' => $st_number)); $st_search_query = $wp_query; $html .= st()->load_template('search/search-all-post-type/content', 'all-post-type', array('attr' => $attr)); $html .= '<br>'; remove_action('pre_get_posts', array($activity, 'change_search_activity_arg')); $activity->remove_alter_search_query(); wp_reset_query(); } /////////////////////////////// ////// Cars ////////////////////////////// if (st_check_service_available('st_cars') and in_array('st_cars', $data_post_type)) { $cars = new STCars(); add_action('pre_get_posts', array($cars, 'change_search_cars_arg')); query_posts(array('post_type' => 'st_cars', 's' => '', 'paged' => get_query_var('paged'), 'posts_per_page' => $st_number)); $st_search_query = $wp_query; $html .= st()->load_template('search/search-all-post-type/content', 'all-post-type', array('attr' => $attr)); $html .= '<br>'; remove_action('pre_get_posts', array($cars, 'change_search_cars_arg')); $cars->remove_alter_search_query(); wp_reset_query(); } /////////////////////////////// ////// Tours ////////////////////////////// if (st_check_service_available('st_tours') and in_array('st_tours', $data_post_type)) { $tours = new STTour(); $tours->alter_search_query(); add_action('pre_get_posts', array($tours, 'change_search_tour_arg')); query_posts(array('post_type' => 'st_tours', 's' => '', 'paged' => get_query_var('paged'), 'posts_per_page' => $st_number)); $st_search_query = $wp_query; $html .= st()->load_template('search/search-all-post-type/content', 'all-post-type', array('attr' => $attr)); $html .= '<br>'; $tours->remove_alter_search_query(); wp_reset_query(); } /////////////////////////////// ////// Holidays ////////////////////////////// if (st_check_service_available('st_holidays') and in_array('st_holidays', $data_post_type)) { $holidays = new STHoliday(); $holidays->alter_search_query(); add_action('pre_get_posts', array($holidays, 'change_search_holiday_arg')); query_posts(array('post_type' => 'st_holidays', 's' => '', 'paged' => get_query_var('paged'), 'posts_per_page' => $st_number)); $st_search_query = $wp_query; $html .= st()->load_template('search/search-all-post-type/content', 'all-post-type', array('attr' => $attr)); $html .= '<br>'; $holidays->remove_alter_search_query(); wp_reset_query(); } return $html; }
* @package WordPress * @subpackage Traveler * @since 1.0 * * Search custom rental * * Created by ShineTheme * */ if (!st_check_service_available('st_rental')) { wp_redirect(home_url()); die; } get_header(); global $wp_query, $st_search_query; $object = new STRental(); add_action('pre_get_posts', array($object, 'change_search_arg')); query_posts(array('post_type' => 'st_rental', 's' => get_query_var('s'), 'paged' => get_query_var('paged'))); $st_search_query = $wp_query; remove_action('pre_get_posts', array($object, 'change_search_arg')); $result_string = ''; echo st()->load_template('search-loading'); $layout = STInput::get('layout'); if (!$layout) { $layout = st()->get_option('rental_search_layout'); } $layout_class = get_post_meta($layout, 'layout_size', true); if (!$layout_class) { $layout_class = "container"; } ?>
* Rental result * * Created by ShineTheme * */ $default = array('style' => 'list'); global $wp_query; if (isset($arg)) { extract(wp_parse_args($arg, $default)); } else { extract($default); } if (STInput::get('style')) { $style = STInput::get('style'); } $object = new STRental(); $allOrderby = $object->getOrderby(); ?> <div class="nav-drop booking-sort"> </div> <div class="sort_top"> <div class="row"> <div class="col-md-10 col-sm-9"> <ul class="nav nav-pills"> <?php $active = STInput::request('orderby'); if (!empty($allOrderby) and is_array($allOrderby)) { $i = 0; foreach ($allOrderby as $key => $value) { $i++;
?> <h3><?php printf(st_get_language('tour_you_are_booking_for_d'), get_the_title()); ?> </h3> <div id="booking_modal_<?php echo get_the_ID(); ?> " class="booking_modal_form"> <?php wp_nonce_field('submit_form_order', 'travel_order'); ?> <?php ?> <input type="hidden" name="item_id" value="<?php echo get_the_ID(); ?> "> <input name="price" value="<?php echo STRental::get_price(); ?> " type="hidden"> <input name="number" type="hidden" min="1" value="1"> <?php echo st()->load_template('check_out/check_out'); ?> </div>
<?php /** * @package WordPress * @subpackage Traveler * @since 1.0 * * Rental search form * * Created by ShineTheme * */ $st_style_search = "style_2"; $object = new STRental(); $fields = $object->get_search_fields(); ?> <h3><?php st_the_language('rental_search_for_vacation_rentals'); ?> </h3> <form role="search" method="get" class="search" action=""> <input type="hidden" name="s" value=""> <input type="hidden" name="post_type" value="st_rental"> <input type="hidden" name="layout" value="<?php echo STInput::get('layout'); ?> "> <input type="hidden" name="style" value="<?php echo STInput::get('style'); ?> ">
<?php /** * @package WordPress * @subpackage Traveler * @since 1.1.5 * * Hotel search Map * * Created by ShineTheme * */ if (!class_exists('STRental')) { return false; } $rental = new STRental(); $fields = $rental->get_search_fields(); if (!isset($field_size)) { $field_size = 'md'; } ?> <form id="hotel_search_half_map" method="get" class="search filter_search_map" action="<?php echo home_url(); ?> "> <h2><?php echo esc_html($title); ?> </h2> <input type="hidden" name="post_type" value="st_rental">
$link = add_query_arg(array('location_id' => get_the_ID(), 'pick-up' => get_the_title()), get_the_permalink($page_search)); } else { //$link = home_url(esc_url('?s=&post_type=st_hotel&location_id='.get_the_ID())); //$link = home_url(esc_url('?s=&post_type=st_hotel&location_id='.get_the_ID()."&pick-up=".get_the_title())); $link = add_query_arg(array('s' => '', 'post_type' => 'st_hotel', 'location_id' => get_the_ID(), 'pick-up' => get_the_title()), home_url('/')); } if ($offer <= 1) { $offer_string = sprintf(__('%d Hotel from %s/night', ST_TEXTDOMAIN), $offer, $min_price); } else { $offer_string = sprintf(__('%d Hotels from %s/night', ST_TEXTDOMAIN), $offer, $min_price); } echo '<li><a href="' . $link . '"><i class="fa fa-building-o"></i> ' . $offer_string . '</a></li>'; } } } $rental = new STRental(); if ($rental->is_available() && TravelHelper::checkTableDuplicate('st_rental')) { $info = new STLocation(); $info = $info->get_info_by_post_type(get_the_ID(), 'st_rental'); $min_price = $info['min_max_price']['price_min']; $min_price = TravelHelper::format_money($min_price); if (empty($min_price) or !$min_price) { $min_price = __("Free", ST_TEXTDOMAIN); } if (is_array($info) && count($info)) { $offer = $info['offers']; if (!empty($offer)) { $page_search = st_get_page_search_result('st_rental'); if (!empty($page_search) and get_post_type($page_search) == 'page') { //$link = add_query_arg(array('location_id'=>get_the_ID()),get_the_permalink($page_search)); $link = add_query_arg(array('location_id' => get_the_ID(), 'pick-up' => get_the_title()), get_the_permalink($page_search));
if (!empty($min_price) and !empty($offer)) { $page_search = st_get_page_search_result('st_hotel'); if (!empty($page_search)) { $link = add_query_arg(array('location_id' => get_the_ID()), get_the_permalink($page_search)); } else { $link = home_url(esc_url('?s=&post_type=st_hotel&location_id=' . get_the_ID())); } if ($offer < 2) { $offer = $offer . " " . __("Hotel from", ST_TEXTDOMAIN); } else { $offer = $offer . " " . __("Hotels from", ST_TEXTDOMAIN); } echo '<li><a href="' . $link . '"><i class="fa fa-building-o"></i> ' . $offer . ' ' . $min_price . '/' . STLanguage::st_get_language('night') . '</a></li>'; } } $rental = new STRental(); if ($rental->is_available()) { $min_price = get_post_meta(get_the_ID(), 'min_price_rental', true); $min_price = TravelHelper::format_money($min_price); $offer = get_post_meta(get_the_ID(), 'offer_st_rental', true); if (!empty($min_price) and !empty($offer)) { $page_search = st_get_page_search_result('st_rental'); if (!empty($page_search)) { $link = add_query_arg(array('location_id' => get_the_ID()), get_the_permalink($page_search)); } else { $link = home_url(esc_url('?s=&post_type=st_rental&location_id=' . get_the_ID())); } if ($offer < 2) { $offer = $offer . " " . __("Rental from", ST_TEXTDOMAIN); } else { $offer = $offer . " " . __("Rentals from", ST_TEXTDOMAIN);
function st_list_map($attr, $content = false) { $data = shortcode_atts(array('title' => '', 'type' => 'normal', 'st_list_location' => '', 'st_type' => 'st_hotel', 'zoom' => '13', 'height' => '500', 'number' => '12', 'fit_bounds' => 'no', 'style_map' => 'normal', 'custom_code_style' => '', 'show_search_box' => 'yes', 'show_data_list_map' => 'yes', 'range_km' => 'no', 'max_range_km' => '20', 'range_km_col' => '6'), $attr, 'st_list_map'); extract($data); $data_map = array(); $html = ''; //if(!empty( $ids )) { $map_lat_center = 0; $map_lng_center = 0; if ($type == "normal") { $ids = $st_list_location; if (empty($ids)) { return ''; } $_SESSION['el_st_type'] = $st_type; $_SESSION['el_location_id'] = $st_list_location; $st_list_map = new st_list_map(); add_filter('posts_where', array($st_list_map, '_get_query_where')); add_filter('posts_join', array($st_list_map, '_get_query_join')); $query = array('post_type' => explode(',', $st_type), 'posts_per_page' => $number, 'post_status' => 'publish'); $map_lat = get_post_meta($ids, 'map_lat', true); $map_lng = get_post_meta($ids, 'map_lng', true); $location_center = '[' . $map_lat . ',' . $map_lng . ']'; global $wp_query; query_posts($query); remove_filter('posts_where', array($st_list_map, '_get_query_where')); remove_filter('posts_join', array($st_list_map, '_get_query_join')); unset($_SESSION['el_st_type']); unset($_SESSION['el_location_id']); } if ($type == "page_search") { $location_center = '[0,0]'; $address_center = ''; if (STInput::request('pick-up')) { $ids_location = TravelerObject::_get_location_by_name(STInput::get('pick-up')); if (!empty($ids_location)) { $_REQUEST['pick-up'] = implode(',', $ids_location); $map_lat_center = get_post_meta($ids_location[0], 'map_lat', true); $map_lng_center = get_post_meta($ids_location[0], 'map_lng', true); $location_center = '[' . $map_lat_center . ',' . $map_lng_center . ']'; $address_center = get_the_title($ids_location[0]); } } if (STInput::request('location_id')) { $map_lat_center = get_post_meta(STInput::request('location_id'), 'map_lat', true); $map_lng_center = get_post_meta(STInput::request('location_id'), 'map_lng', true); $location_center = '[' . $map_lat_center . ',' . $map_lng_center . ']'; $address_center = get_the_title(STInput::request('location_id')); } if (STInput::request('location_id_pick_up')) { $map_lat_center = get_post_meta(STInput::request('location_id_pick_up'), 'map_lat', true); $map_lng_center = get_post_meta(STInput::request('location_id_pick_up'), 'map_lng', true); $location_center = '[' . $map_lat_center . ',' . $map_lng_center . ']'; $address_center = get_the_title(STInput::request('location_id_pick_up')); } global $wp_query, $st_search_query; switch ($st_type) { case "st_hotel": $hotel = new STHotel(); add_action('pre_get_posts', array($hotel, 'change_search_hotel_arg')); break; case "st_rental": $rental = new STRental(); add_action('pre_get_posts', array($rental, 'change_search_arg')); break; case "st_cars": $cars = new STCars(); add_action('pre_get_posts', array($cars, 'change_search_cars_arg')); break; case "st_tours": $tour = new STTour(); //add_action( 'pre_get_posts' , array( $tour , 'change_search_tour_arg' ) ); st()->tour->alter_search_query(); break; case "st_holidays": $holiday = new STHoliday(); //add_action( 'pre_get_posts' , array( $holiday , 'change_search_holiday_arg' ) ); st()->holiday->alter_search_query(); break; case "st_activity": $activity = new STActivity(); add_action('pre_get_posts', array($activity, 'change_search_activity_arg')); break; } $query = array('post_type' => $st_type, 'posts_per_page' => $number, 'post_status' => 'publish', 's' => ''); query_posts($query); } $stt = 0; while (have_posts()) { the_post(); $map_lat = get_post_meta(get_the_ID(), 'map_lat', true); $map_lng = get_post_meta(get_the_ID(), 'map_lng', true); if (!empty($map_lat) and !empty($map_lng) and is_numeric($map_lat) and is_numeric($map_lng)) { $post_type = get_post_type(); $data_map[$stt]['id'] = get_the_ID(); $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; $post_type_name = get_post_type_object($post_type); $post_type_name->label; switch ($post_type) { case "st_hotel": $data_map[$stt]['icon_mk'] = st()->get_option('st_hotel_icon_map_marker', 'http://maps.google.com/mapfiles/marker_black.png'); $data_map[$stt]['content_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop/hotel', false, array('post_type' => $post_type_name->label))); $data_map[$stt]['content_adv_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop-adv/hotel', false, array('post_type' => $post_type_name->label))); break; case "st_rental": $data_map[$stt]['icon_mk'] = st()->get_option('st_rental_icon_map_marker', 'http://maps.google.com/mapfiles/marker_brown.png'); $data_map[$stt]['content_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop/rental', false, array('post_type' => $post_type_name->label))); $data_map[$stt]['content_adv_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop-adv/rental', false, array('post_type' => $post_type_name->label))); break; case "st_cars": $data_map[$stt]['icon_mk'] = st()->get_option('st_cars_icon_map_marker', 'http://maps.google.com/mapfiles/marker_green.png'); $data_map[$stt]['content_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop/car', false, array('post_type' => $post_type_name->label))); $data_map[$stt]['content_adv_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop-adv/car', false, array('post_type' => $post_type_name->label))); break; case "st_tours": $data_map[$stt]['icon_mk'] = st()->get_option('st_tours_icon_map_marker', 'http://maps.google.com/mapfiles/marker_purple.png'); $data_map[$stt]['content_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop/tour', false, array('post_type' => $post_type_name->label))); $data_map[$stt]['content_adv_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop-adv/tour', false, array('post_type' => $post_type_name->label))); break; case "st_holidays": $data_map[$stt]['icon_mk'] = st()->get_option('st_holidays_icon_map_marker', 'http://maps.google.com/mapfiles/marker_purple.png'); $data_map[$stt]['content_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop/holiday', false, array('post_type' => $post_type_name->label))); $data_map[$stt]['content_adv_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop-adv/holiday', false, array('post_type' => $post_type_name->label))); break; case "st_activity": $data_map[$stt]['icon_mk'] = st()->get_option('st_activity_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/activity', false, array('post_type' => $post_type_name->label))); $data_map[$stt]['content_adv_html'] = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', st()->load_template('vc-elements/st-list-map/loop-adv/activity', false, array('post_type' => $post_type_name->label))); break; } $stt++; } } if ($type == "page_search") { $st_search_query = $wp_query; switch ($post_type) { case "st_hotel": $hotel->remove_alter_search_query(); break; case "st_rental": $rental->remove_alter_search_query(); break; case "st_cars": $cars->remove_alter_search_query(); break; case "st_tours": //remove_action( 'pre_get_posts' , array( $tour , 'change_search_tour_arg' ) ); st()->tour->remove_alter_search_query(); break; case "st_holidays": //remove_action( 'pre_get_posts' , array( $holiday , 'change_search_holiday_arg' ) ); st()->holiday->remove_alter_search_query(); break; case "st_activity": $activity->remove_alter_search_query(); break; } } wp_reset_query(); if (empty($location_center) or $location_center == '[,]') { $location_center = '[0,0]'; } $data_tmp = array('location_center' => $location_center, 'zoom' => $zoom, 'data_map' => $data_map, 'height' => $height, 'style_map' => $style_map, 'st_type' => $st_type, 'number' => $number, 'fit_bounds' => $fit_bounds, 'title' => $title, 'show_search_box' => $show_search_box, 'show_data_list_map' => $show_data_list_map, 'range_km' => $range_km, 'max_range_km' => $max_range_km, 'range_km_col' => $range_km_col); $data_tmp['data_tmp'] = $data_tmp; $html = st()->load_template('vc-elements/st-list-map/html', '', $data_tmp); // } return $html; }
/** * @since 1.1.0 * @param string post type * @param string type (null or option_tree) **/ static function st_get_field_search($post_type, $type = '') { $list_field = array(); if (!empty($post_type)) { switch ($post_type) { case "st_hotel": $data_field = STHotel::get_search_fields_name(); break; case "st_rental": $data_field = STRental::get_search_fields_name(); break; case "st_cars": $data_field = STCars::get_search_fields_name(); break; case "st_tours": $data_field = STTour::get_search_fields_name(); break; case "st_activity": $data_field = STActivity::get_search_fields_name(); break; case "st_rental": $data_field = STRental::get_search_fields_name(); break; default: $data_field = apply_filters('st_search_fields_name', array(), $post_type); break; } if (!empty($data_field) and is_array($data_field) and $type == '') { foreach ($data_field as $k => $v) { $list_field[$v['label']] = $v['value']; } return $list_field; } if (!empty($data_field) and is_array($data_field) and $type == 'option_tree') { foreach ($data_field as $k => $v) { $list_field[] = array('label' => $v['label'], 'value' => $v['value']); } return $list_field; } } else { return false; } }
</span> <small> <?php st_the_language('avg/night'); ?> </small> </p> <?php } ?> <?php if (get_post_type($hotel_id) == 'st_rental') { ?> <?php $is_sale = STRental::is_sale($hotel_id); $orgin_price = STRental::get_orgin_price($hotel_id); $price = STRental::get_price($hotel_id); $show_price = st()->get_option('show_price_free'); ?> <?php $features = get_post_meta($hotel_id, 'fetures', true); if (!empty($features)) { ?> <?php echo '<ul class="booking-item-features booking-item-features-rentals booking-item-features-sign clearfix mt5 mb5">'; foreach ($features as $key => $value) { $d = array('icon' => '', 'title' => ''); $value = wp_parse_args($value, $d); echo '<li rel="tooltip" data-placement="top" title="" data-original-title="' . $value['title'] . '"><i class="' . TravelHelper::handle_icon($value['icon']) . '"></i>'; if ($value['number']) { echo '<span class="booking-item-feature-sign">x ' . $value['number'] . '</span>'; }
$st_style = '1'; } $style = STInput::request('style'); if (!empty($style)) { $st_style = $style; } $obj = get_post_type_object($query->query['post_type']); $rs_string = ""; switch ($query->query['post_type']) { case "st_hotel": $class = new STHotel(); $rs_string .= $class->get_result_string(); $page_search = st()->get_option('hotel_search_result_page'); break; case "st_rental": $class = new STRental(); $rs_string .= $class->get_result_string(); $page_search = st()->get_option('rental_search_result_page'); break; case "st_cars": $class = new STCars(); $rs_string .= $class->get_result_string(); $page_search = st()->get_option('cars_search_result_page'); break; case "st_tours": $class = new STTour(); $rs_string .= $class->get_result_string(); $page_search = st()->get_option('tours_search_result_page'); break; case "st_holidays": $class = new STHoliday();
st_the_language('holiday_from'); ?> </span> <?php echo STHoliday::get_price_html($post_id, false, '<br>'); ?> <span class="info_price"></span> </div> <?php break; case 'st_rental': $is_sale = STRental::is_sale($post_id); $orgin_price = STRental::get_orgin_price($post_id); $price = STRental::get_price($post_id); $show_price = st()->get_option('show_price_free'); ?> <div <?php if ($layout == 'layout2') { echo 'class="list-location-2"'; } ?> > <span class="booking-item-price-from"><?php _e("From", ST_TEXTDOMAIN); ?> </span> <?php if ($is_sale) { echo "<span class='booking-item-old-price'>" . TravelHelper::format_money($orgin_price) . "</span>";