예제 #1
0
$accommodation_min_price = number_format($byt_accommodations_post_type->get_accommodation_min_price($accommodation_id), $price_decimal_places, ".", "");
$accommodation_description_html = BYT_Theme_Utils::strip_tags_and_shorten($accommodation_obj->get_description(), 100) . '<a href="' . esc_url($accommodation_obj->get_permalink()) . '">' . __('More info', 'bookyourtravel') . '</a>';
if (empty($display_mode) || $display_mode == 'card') {
    ?>
<!--accommodation item-->
	<article class="accommodation_item <?php 
    echo esc_attr($accommodation_class);
    ?>
">
		<div>
			<figure>
				<a href="<?php 
    echo esc_url($accommodation_obj->get_permalink());
    ?>
" title="<?php 
    echo esc_attr($accommodation_obj->get_title());
    ?>
">
					<img src="<?php 
    echo esc_url($accommodation_image);
    ?>
" alt="<?php 
    echo esc_attr($accommodation_obj->get_title());
    ?>
" />
				</a>
			</figure>
			<div class="details">
				<h2>
					<?php 
    echo $accommodation_obj->get_title();
    echo $accommodation_is_reservation_only;
    ?>
;
		window.accommodationIsPricePerPerson = <?php 
    echo $accommodation_is_price_per_person;
    ?>
;
		window.accommodationCountChildrenStayFree = <?php 
    echo $accommodation_count_children_stay_free;
    ?>
;
		<?php 
    if ($is_self_catered) {
        ?>
		window.accommodationMaxCount =  <?php 
        echo $max_count;
        ?>
;
		window.accommodationMaxChildCount = <?php 
        echo $max_child_count;
        ?>
;
		<?php 
    }
    ?>
		window.accommodationMinDaysStay = <?php 
    echo $min_days_stay;
    ?>
;
		window.entityLatitude = <?php 
    echo json_encode($accommodation_latitude);
예제 #3
0
                    $accommodation_obj = new byt_accommodation($vacancy_result->accommodation_id);
                    $is_self_catered = $accommodation_obj->get_is_self_catered();
                    $is_price_per_person = $accommodation_obj->get_is_price_per_person();
                    $room_type_obj = null;
                    if (!$is_self_catered) {
                        $room_type_obj = new byt_room_type($vacancy_result->room_type_id);
                    }
                    ?>
				
				<article class="bookings vacancies">
					<h1>
						<a href="<?php 
                    echo esc_url($accommodation_obj->get_permalink());
                    ?>
"><?php 
                    echo $accommodation_obj->get_title();
                    ?>
</a>
						<span></span>
					</h1>
					<div class="b-info">
						<table>
							<tr>
								<th><?php 
                    _e('Vacancy Id', 'bookyourtravel');
                    ?>
:</th>
								<td>
									<?php 
                    echo $vacancy_result->Id;
                    ?>