[peepso_register]
Copyright © 2024 All rights reserved.
[peepso_register]
Helping you find your next stay
[ultimatemember form_id=”332″]
[ultimatemember form_id=”331″]
or connect with
result->properties->property));
// foreach($data as $listing){
// if($listing->pid == $current_url){
//Is the property in the wishlist
$user_id = apply_filters('determine_current_user', false);
wp_set_current_user($user_id);
$user_id = get_current_user_id();
$get_properties_in_wishlist = get_user_meta($user_id, YB_SESSION . $user_id, true) ?: array();//die(json_encode($get_properties_in_wishlist));
$property_in_wishlist = in_array($current_url, $get_properties_in_wishlist);
//Availability calendar data
//$api_aval_dates = YB_AVAILABILITY . '&pid=' . $current_url . '&start=' . date("Y-m-d") . '&month=' . 12;
$available_dates = ApiCalls::apiCall(YB_AVAILABILITY . '&pid=' . $current_url . '&start=' . date("Y-m-d") . '&months=' . 12);
$availability_dates = $minimum_stays_per_given_dates = array();
//echo "Available day " . $api_aval_dates . "
" . json_encode($available_dates->result->days->day[0]);
foreach ($available_dates->result->days->day as $day) {
//sdie("Date available " . json_encode($day->avail));
if ($day->avail == "1" && $day->booked == "0.0") {
$date_aval = (array) $day->date;
array_push($availability_dates, $date_aval[0]);
array_push($minimum_stays_per_given_dates, $day->min_days);
//die("Availability " . json_encode($date_aval));
}
}
//Run an API call to get the min number of guests
$get_min_guests = ApiCalls::apiCall(YB_PROPERTY_DETAILS . '&pid=' . $current_url);
$min_guest_per_property = $get_min_guests->result->properties->property->sleeps->min;
$checkout_date_given = !empty($type_home) ? $minimum_stays_per_given_dates[0] : 1;
$checkout_date = date('Y-m-d', strtotime($availability_dates[0] . ' + '. $minimum_stays_per_given_dates[0].' days'));
$property_detail_call = YB_PROPERTY_DETAILS . '&pid=' . $current_url . '&arrival_date=' . $availability_dates[0] . '&departure_date=' . $checkout_date . '&guests=' . $min_guest_per_property;
$data = ApiCalls::apiCall($property_detail_call);
//die("Start date " . $availability_dates[0] . " End date " . $availability_dates[1] . " Data is ". json_encode($data->result->properties->property));
$listing = $data->result->properties->property;
//die("Availability " . json_encode($availability_dates));
wp_enqueue_script('additional-js', plugins_url('calendar.js', __FILE__));
wp_localize_script('additional-js', 'availability_dates', $availability_dates);
//die("Available dates " . json_encode($availability_dates));
/*if(!empty($availability_data)){
foreach($availability_data as $aval_data){
if($aval_data->pid == $current_url){
$availability_dates = array();
foreach($aval_data->dates->date as $date){
$dates = (array)$date;
$availability_date = array($dates["@attributes"]["value"]);
$availability_dates = array_merge($availability_dates, $availability_date);
}
wp_enqueue_script( 'additional-js', plugins_url('calendar.js', __FILE__) );
wp_localize_script( 'additional-js', 'availability_dates', $availability_dates );
break;
}
}
}*/
//End availability calendar
?>
images->image as $image): if($track_image < 30): ?>
-
= $listing->name ?>
Overview
description->long, 400);
foreach($real_text as $text){
echo $text . "
";
?>
Popular Amenities
amenities->amenity as $amenity) : ?>
";
$track = 1;
endif; ?>
= $amenity->name ?>
coords);
//echo $cords[0] . " " . $cords[1];
?>
Availability Calendar
Available
Unavailable
feedback->entry)) : ?>
Clients' thoughts on = $listing->name ?>
feedback->entry as $feed) : ?>
= $feed->author ?>
( = count($listing->feedback->entry) ?> reviews)
= $feed->feedback ?>
= $listing->name ?>
= $listing->property_type->name?>
= $listing->bedrooms ?> Bedrooms
= $listing->beds ?> Bed
= $listing->baths ?> Bathroom
feedback->entry > 0){ foreach ($listing->feedback->entry as $listing_var) : ?>
( = count($listing->feedback->entry) ?> reviews)
For enquries contact us
help@yourbookng.com
Email
= $get_currency == "gbp" ? "£" : "€" ?>
= round($price_per_night, 2, PHP_ROUND_HALF_UP ) ?>
12/9/2022-18/9/2022
$maxLength)){
$splitText[] = $text;
return $splitText;
}
//Guess sentence completion
$needle = '.';
/*iterate over $text length
as substr_replace deleting it*/
while (strlen($text) > $length){
$end = strpos($text, $needle, $length);
if ($end === false){
//Returns FALSE if the needle (in this case ".") was not found.
$splitText[] = substr($text,0);
$text = '';
break;
}
$end++;
$splitText[] = substr($text,0,$end);
$text = substr_replace($text,'',0,$end);
}
if ($text){
$splitText[] = substr($text,0);
}
return $splitText;
}