if (!empty($address)) { echo esc_html($address); } ?> </div> <div class="col-md-7 col-sm-7 col-xs-7 text-right"> <div class="package-info"> <i class="fa fa-calendar"> </i> <span class=""><?php STLanguage::st_the_language('holiday_date'); ?> : </span> <?php $type_holiday = get_post_meta(get_the_ID(), 'type_holiday', true); if ($type_holiday == 'daily_holiday') { $day = STHoliday::get_duration_unit(); echo esc_html($day); } else { $check_in = get_post_meta(get_the_ID(), 'check_in', true); $check_out = get_post_meta(get_the_ID(), 'check_out', true); if (!empty($check_in) and !empty($check_out)) { $date = date_i18n(TravelHelper::getDateFormat(), strtotime($check_in)) . ' <i class="fa fa-long-arrow-right"></i> ' . date_i18n(TravelHelper::getDateFormat(), strtotime($check_out)); echo balanceTags($date); } else { st_the_language('holiday_none'); } } ?> </div> </div> </div>
<div class="st_msg console_msg_holiday_type"></div> </div> </div> <div class="col-md-6 data_duration"> <div class="form-group form-group-icon-left"> <label for="duration"><?php _e("Duration", ST_TEXTDOMAIN); ?> :</label> <i class="fa fa-star input-icon input-icon-hightlight"></i> <input id="duration" name="duration" type="text" placeholder="<?php _e("Duration", ST_TEXTDOMAIN); ?> " class="duration form-control number" value="<?php echo STHoliday::get_duration_unit($post_id); ?> "> <div class="st_msg"><?php echo STUser_f::get_msg_html($validator->error('duration'), 'danger'); ?> </div> </div> </div> </div> <!-- <div class="row data_specific_date"> <div class="col-md-6"> <div class="form-group form-group-icon-left"> <label for="check_in"><?php _e("Departure Date", ST_TEXTDOMAIN);
static function get_duration_unit($item_id) { $post_type = get_post_type($item_id); if ($post_type == 'st_tours') { return STTour::get_duration_unit($item_id); } if ($post_type == 'st_holidays') { return STHoliday::get_duration_unit($item_id); } if ($post_type == 'st_cars') { return st()->get_option('cars_price_unit', 'day'); } return "day"; }
</div> <?php if ($type_holiday == 'daily_holiday') { ?> <div class="package-info"> <i class="fa fa-calendar"></i> <span class="head"><?php _e('Duration', ST_TEXTDOMAIN); ?> : </span> <?php $duration_day = get_post_meta(get_the_ID(), 'duration_day', true); if (empty($duration_day)) { $duration_day = ""; } echo STHoliday::get_duration_unit(); ?> </div> <?php } ?> <div class="package-info"> <?php $max_people = get_post_meta(get_the_ID(), 'max_people', true); ?> <i class="fa fa-users"></i> <span class="head"><?php st_the_language('holiday_max_people'); ?> : </span> <?php