load_by_default( 1 );

if ( !isset( $default ) ) {
return;
}

$tzoffset = get_option( ‘timezone_string’ );
$tzoffset = $tzoffset == ” ? ‘UTC’ : $tzoffset;
$timezone = new DateTimeZone( $tzoffset );
$options = get_option( ‘solidres_plugin’ );
$minDaysBookInAdvance = isset( $options[‘min_days_book_in_advance’] ) ? $options[‘min_days_book_in_advance’] : 0;
$maxDaysBookInAdvance = isset( $options[‘max_days_book_in_advance’] ) ? $options[‘max_days_book_in_advance’] : 0;
$minLengthOfStay = isset( $options[‘min_length_of_stay’] ) ? $options[‘min_length_of_stay’] : 1;
$datePickerMonthNum = ! empty( $options[‘datepicker_month_number’] ) ? $options[‘datepicker_month_number’] : 1;
$weekStartDay = ! empty( $options[‘week_start_day’] ) ? $options[‘week_start_day’] : 1;
$dateFormat = get_option( ‘date_format’, ‘d-m-Y’ );

$dateCheckIn = new DateTime();
if (!isset($checkin)) :
$dateCheckIn->add(new DateInterval(‘P’.($minDaysBookInAdvance).’D’))->setTimezone($timezone);
endif;
$dateCheckOut = new DateTime();
if (!isset($checkout)) :
$dateCheckOut->add(new DateInterval(‘P’.($minDaysBookInAdvance + $minLengthOfStay).’D’))->setTimezone($timezone);
endif;

$jsDateFormat = SR_Utilities::convert_date_format_pattern( $dateFormat );

$defaultCheckinDate = ”;
$defaultCheckoutDate = ”;
if( isset( $checkin ) ) {
$checkin_module = new DateTime( $checkin, $timezone );
$checkout_module = new DateTime( $checkout, $timezone );
$defaultCheckinDate = $checkin_module->format(‘Y-m-d’);
$defaultCheckoutDate = $checkout_module->format(‘Y-m-d’);
}

if (!empty($defaultCheckinDate)) :
$defaultCheckinDateArray = explode(‘-‘, $defaultCheckinDate);
$defaultCheckinDateArray[1] -= 1;
endif;

if (!empty($defaultCheckoutDate)) :
$defaultCheckoutDateArray = explode(‘-‘, $defaultCheckoutDate);
$defaultCheckoutDateArray[1] -= 1;
endif;

echo ‘‘; ?>

“>

“>



getTimestamp() ) : date_i18n( $dateFormat, $dateCheckIn->getTimestamp() );
?>

“>

getTimestamp() ) : date_i18n( $dateFormat, $dateCheckOut->getTimestamp() );
?>

class=”“>



“>

“>

“>

“>


Login Form
Register Form