Пример #1
0
		<section id="locations" class="tab-content <?php 
        echo $first_display_tab == 'locations' ? 'initial' : '';
        ?>
">
			<article>
				<?php 
        do_action('byt_show_single_cruise_locations_before');
        ?>
				
				<?php 
        foreach ($cruise_locations as $location_id) {
            $location_obj = new byt_location((int) $location_id);
            $location_title = $location_obj->get_title();
            $location_excerpt = $location_obj->get_excerpt();
            if (!empty($location_title) && !empty($location_excerpt)) {
                BYT_Theme_Utils::render_field("", "", "", BYT_Theme_Utils::render_image('', '', $location_obj->get_main_image(), $location_title, $location_title, false) . $location_excerpt, $location_title);
                BYT_Theme_Utils::render_link_button(get_permalink($location_obj->get_id()), "gradient-button right", "", __('Read more', 'bookyourtravel'));
            }
        }
        ?>
								
				<?php 
        BYT_Theme_Utils::render_tab_extra_fields('cruise_extra_fields', $cruise_extra_fields, 'locations', $cruise_obj);
        ?>
				<?php 
        do_action('byt_show_single_cruise_locations_after');
        ?>
			</article>
		</section>
		<!--//locations-->
		<?php 
Пример #2
0
$enable_accommodations = $byt_theme_globals->enable_accommodations();
$enable_cruises = $byt_theme_globals->enable_cruises();
$enable_tours = $byt_theme_globals->enable_tours();
$enable_car_rentals = $byt_theme_globals->enable_car_rentals();
$price_decimal_places = $byt_theme_globals->get_price_decimal_places();
$default_currency_symbol = $byt_theme_globals->get_default_currency_symbol();
$show_currency_symbol_after = $byt_theme_globals->show_currency_symbol_after();
$show_self_catered_count_in_location_items = $byt_theme_globals->show_self_catered_count_in_location_items();
$show_hotel_count_in_location_items = $byt_theme_globals->show_hotel_count_in_location_items();
$show_cruise_count_in_location_items = $byt_theme_globals->show_cruise_count_in_location_items();
$show_tour_count_in_location_items = $byt_theme_globals->show_tour_count_in_location_items();
$show_car_rental_count_in_location_items = $byt_theme_globals->show_car_rental_count_in_location_items();
$location_id = $post->ID;
$location_obj = new byt_location($post);
$base_id = $location_obj->get_base_id();
$location_image = $location_obj->get_main_image();
if (empty($location_image)) {
    $location_image = BYT_Theme_Utils::get_file_uri('/images/uploads/img.jpg');
}
$hotel_count = $self_catered_count = $cruise_count = $tour_count = $car_rental_count = 0;
if ($show_hotel_count_in_location_items) {
    $hotel_count = (int) $byt_accommodations_post_type->list_accommodations_count(0, -1, 'post_title', 'ASC', $location_id, array(), array(), array(), false, false);
}
if ($show_self_catered_count_in_location_items) {
    $self_catered_count = (int) $byt_accommodations_post_type->list_accommodations_count(0, -1, 'post_title', 'ASC', $location_id, array(), array(), array(), false, true);
}
if ($show_cruise_count_in_location_items) {
    $cruise_count = (int) $byt_cruises_post_type->list_cruises_count(0, -1, 'post_title', 'ASC', $location_id);
}
if ($show_tour_count_in_location_items) {
    $tour_count = (int) $byt_tours_post_type->list_tours_count(0, -1, 'post_title', 'ASC', $location_id);