PluginProbe
WP Directory Kit / 1.5.9
WP Directory Kit v1.5.9
1.5.9 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 All 37 releases
← All changes | elementor-extensions/class-contact-form.php +7 -5 1.3.3 → 1.5.9 View file →
@@ -273,17 +273,19 @@
273 273 </a></div>';
274 274 } else {
275 275 $calendar = $calendar[0];
276 276
277 - if(intval(wdk_get_option('wdk_bookings_max_guests')) > 0) {
277 + if(!empty($calendar->guests)) {
278 + $options = range(1, intval($calendar->guests));
279 + } elseif(intval(wdk_get_option('wdk_bookings_max_guests')) > 0) {
278 280 $options = range(1, intval(wdk_get_option('wdk_bookings_max_guests')));
279 - } else {
281 + } else {
280 282 $options = range(1, 10);
281 283 }
282 284
283 285 if(empty($calendar->is_guests_disabled)) {
284 286
285 - if($settings['booking_hide_count_childs_field'] != 'yes') {
287 + if($settings['booking_hide_count_childs_field'] != 'yes' && !empty($calendar->is_children_acceptable) ) {
286 288 $output ='<div class="elementinvader_addons_for_elementor_f_group elementinvader_addons_for_elementor_f_group_el_guests" style="width: 50%;-webkit-flex: 0 0 50%;flex: 0 0 50%;">';
287 289 } else {
288 290 $output ='<div class="elementinvader_addons_for_elementor_f_group elementinvader_addons_for_elementor_f_group_el_guests" style="width: 100%;-webkit-flex: 0 0 100%;flex: 0 0 100%;">';
289 291 }
@@ -299,9 +301,9 @@
299 301 }
300 302 $output .='</select>
301 303 </div>';
302 304
303 - if($settings['booking_hide_count_childs_field'] != 'yes') {
305 + if($settings['booking_hide_count_childs_field'] != 'yes' && !empty($calendar->is_children_acceptable)) {
304 306 $output .='<div class="elementinvader_addons_for_elementor_f_group elementinvader_addons_for_elementor_f_group_el_guests" style="width: 50%;-webkit-flex: 0 0 50%;flex: 0 0 50%;">';
305 307 $output .='<select name="guests_number_childs" id="guests_number_childs" type="select" class="elementinvader_addons_for_elementor_f_field" value="'.wmvc_show_data('guests_number', $_GET).'">';
306 308 $output .= '<option value="">'.esc_html__('Childs','wpdirectorykit').'</option>';
307 309 foreach ($options as $key => $option){
@@ -381,9 +383,9 @@
381 383 }
382 384 }
383 385 }
384 386
385 - if ($settings['booking_hide_if_pets_allowed_field'] != 'yes') {
387 + if ($settings['booking_hide_if_pets_allowed_field'] != 'yes' && wmvc_show_data('is_pets_acceptable',$calendar, false)) {
386 388 $this->content ['wlisting_fields'] .='<div class="elementinvader_addons_for_elementor_f_group checkbox elementinvader_addons_for_elementor_f_group_el_pets" style="width: 100%;-webkit-flex: 0 0 100%;flex: 0 0 100%;">
387 389 <label for="pets_allowed">
388 390 <input name="pets_allowed" id="pets_allowed" type="checkbox" class="elementinvader_addons_for_elementor_f_field_checkbox" value="yes" placeholder="'.esc_attr__('Pets allowed', 'wpdirectorykit').'" >
389 391 '.esc_html__('Pets', 'wpdirectorykit').'