Restaurant Reservations - Version 2.5.10

Version Description

(2022-05-02) = - When the booking form reloads after a validation error, the previously-selected table is now automatically re/pre-selected.

Download this release

Release Info

Developer Rustaurius
Plugin Icon 128x128 Restaurant Reservations
Version 2.5.10
Comparing to
See all releases

Code changes from version 2.5.9 to 2.5.10

assets/js/booking-form.js CHANGED
@@ -742,6 +742,12 @@ jQuery(document).ready(function ($) {
742
  if ( response.selected_table != -1 ) {
743
  table_select.val( response.selected_table );
744
  }
 
 
 
 
 
 
745
 
746
  });
747
  }
742
  if ( response.selected_table != -1 ) {
743
  table_select.val( response.selected_table );
744
  }
745
+ else if( '' != table_select.data('selected') ) {
746
+ table_select.val( table_select.data('selected') );
747
+ }
748
+
749
+ // pre-select table if it was selected before and is available
750
+
751
 
752
  });
753
  }
includes/Ajax.class.php CHANGED
@@ -356,7 +356,7 @@ if ( !class_exists( 'rtbAJAX' ) ) {
356
  $args['tax_query'] = $tax_query;
357
  }
358
 
359
- $query = new rtbQuery( $args );
360
  $query->prepare_args();
361
  $bookings = $query->get_bookings();
362
 
356
  $args['tax_query'] = $tax_query;
357
  }
358
 
359
+ $query = new rtbQuery( $args, 'ajax-get-time-slots' );
360
  $query->prepare_args();
361
  $bookings = $query->get_bookings();
362
 
includes/Booking.class.php CHANGED
@@ -460,7 +460,7 @@ class rtbBooking {
460
  <= $request->format( 'U' ) && $request->format( 'U' ) <=
461
  $excp_end_time->format( 'U' )
462
  ) {
463
- // If we reach here, means request is under modified whielist rules
464
  $datetime_is_valid = true;
465
  break;
466
  }
460
  <= $request->format( 'U' ) && $request->format( 'U' ) <=
461
  $excp_end_time->format( 'U' )
462
  ) {
463
+ // If we reach here, means request is under modified whitelist rules
464
  $datetime_is_valid = true;
465
  break;
466
  }
includes/template-functions.php CHANGED
@@ -705,7 +705,6 @@ function rtb_print_form_textarea_field( $slug, $title, $value, $args = array() )
705
  */
706
  if ( !function_exists( 'rtb_print_form_select_field' ) ) {
707
  function rtb_print_form_select_field( $slug, $title, $value, $args ) {
708
-
709
  $slug = esc_attr( $slug );
710
  $value = is_array( $value ) ? array_map( 'esc_attr', $value ) : esc_attr( $value );
711
  $options = is_array( $args['options'] ) ? $args['options'] : array();
@@ -721,7 +720,7 @@ function rtb_print_form_select_field( $slug, $title, $value, $args ) {
721
  <label for="rtb-<?php echo $slug; ?>">
722
  <?php echo $title; ?>
723
  </label>
724
- <select name="rtb-<?php echo $slug; ?>" id="rtb-<?php echo $slug; ?>"<?php echo $required; ?> <?php echo ( isset( $args['disabled'] ) and $args['disabled'] ) ? 'disabled' : ''; ?>>
725
  <?php if ( $empty_option ) { ?> <option></option> <?php } ?>
726
  <?php foreach ( $options as $opt_value => $opt_label ) : ?>
727
  <option value="<?php echo esc_attr( $opt_value ); ?>" <?php ! is_array( $value ) ? selected( $opt_value, $value ) : false; ?>><?php echo esc_attr( $opt_label ); ?></option>
705
  */
706
  if ( !function_exists( 'rtb_print_form_select_field' ) ) {
707
  function rtb_print_form_select_field( $slug, $title, $value, $args ) {
 
708
  $slug = esc_attr( $slug );
709
  $value = is_array( $value ) ? array_map( 'esc_attr', $value ) : esc_attr( $value );
710
  $options = is_array( $args['options'] ) ? $args['options'] : array();
720
  <label for="rtb-<?php echo $slug; ?>">
721
  <?php echo $title; ?>
722
  </label>
723
+ <select name="rtb-<?php echo $slug; ?>" id="rtb-<?php echo $slug; ?>"<?php echo $required; ?> <?php echo ( isset( $args['disabled'] ) and $args['disabled'] ) ? 'disabled' : ''; ?> data-selected="<?php echo ! is_array( $value ) && ! empty( $value ) ? $value : ''; ?>">
724
  <?php if ( $empty_option ) { ?> <option></option> <?php } ?>
725
  <?php foreach ( $options as $opt_value => $opt_label ) : ?>
726
  <option value="<?php echo esc_attr( $opt_value ); ?>" <?php ! is_array( $value ) ? selected( $opt_value, $value ) : false; ?>><?php echo esc_attr( $opt_label ); ?></option>
languages/restaurant-reservations-fr_FR.mo CHANGED
Binary file
languages/restaurant-reservations-fr_FR.po CHANGED
@@ -3,7 +3,7 @@ msgstr ""
3
  "Project-Id-Version: Restaurant Reservations 1.4\n"
4
  "Report-Msgid-Bugs-To: https://themeofthecrop.com\n"
5
  "POT-Creation-Date: 2018-04-27 15:19:32+00:00\n"
6
- "PO-Revision-Date: 2018-06-12 17:15+0200\n"
7
  "Last-Translator: Pierre-Yves QUEMENER <contact@py-conseil.bzh>\n"
8
  "Language-Team: \n"
9
  "Language: fr_FR\n"
@@ -12,7 +12,7 @@ msgstr ""
12
  "Content-Transfer-Encoding: 8bit\n"
13
  "Plural-Forms: nplurals=2; plural=n > 1;\n"
14
  "X-Poedit-SourceCharset: UTF-8\n"
15
- "X-Generator: Poedit 2.0.8\n"
16
  "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
17
  "__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
18
  "_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
@@ -294,7 +294,7 @@ msgid ""
294
  "This booking has been sent to the %sTrash%s where it can not be edited. Set "
295
  "the booking to Pending or Confirmed to edit it."
296
  msgstr ""
297
- "Cette réservation a été envoyée à la % sCorbeille% s où elle ne peut être "
298
  "modifié. Passer la réservation en attente ou en confirmé pour l'éditer."
299
 
300
  #: includes/AdminBookings.class.php:528
@@ -387,17 +387,19 @@ msgstr "Désolé, les réservations ne peuvent être effectuées pour le jour m
387
  #: includes/Booking.class.php:273
388
  msgid "Sorry, bookings must be made more than %s days in advance."
389
  msgstr ""
390
- "Désolé, les réservations doivent être effectuées plus de% jours à l'avance."
391
 
392
  #: includes/Booking.class.php:275
393
  msgid "Sorry, bookings must be made more than %s hours in advance."
394
  msgstr ""
395
- "Désolé, les réservations doivent être effectuées plus de% heures à l'avance."
 
396
 
397
  #: includes/Booking.class.php:277
398
  msgid "Sorry, bookings must be made more than %s minutes in advance."
399
  msgstr ""
400
- "Désolé, les réservations doivent être effectuées plus de% minutes à l'avance."
 
401
 
402
  #: includes/Booking.class.php:317
403
  msgid "Sorry, no bookings are being accepted then."
@@ -508,8 +510,8 @@ msgstr "Toutes les réservations"
508
  #: includes/CustomPostTypes.class.php:103
509
  msgid "Confirmed <span class=\"count\">(%s)</span>"
510
  msgid_plural "Confirmed <span class=\"count\">(%s)</span>"
511
- msgstr[0] "Confirmée <span class = \"count\"> (% s) </ span>"
512
- msgstr[1] "Confirmées <span class = \"count\"> (% s) </ span>"
513
 
514
  #: includes/CustomPostTypes.class.php:114
515
  msgid "Closed <span class=\"count\">(%s)</span>"
@@ -723,8 +725,8 @@ msgid ""
723
  "in notification messages, modify your general %sWordPress Settings%s."
724
  msgstr ""
725
  "Définir comment l'horaire est formaté sur le formulaire de réservation. "
726
- "%Règles de format%s. Pour changer le format d'horaire dans les messages de "
727
- "notification, modifier vos %réglages Wordpress%s généraux."
728
 
729
  #: includes/Settings.class.php:360
730
  msgid "Language"
@@ -1966,7 +1968,7 @@ msgctxt ""
1966
  "Indicates which booking status is currently being filtered in the list of "
1967
  "bookings."
1968
  msgid "You're viewing bookings that have been marked as %s."
1969
- msgstr "Vous consultez les réservations qui ont été marquées en % s."
1970
 
1971
  #: includes/WP_List_Table.BookingsTable.class.php:813
1972
  msgctxt ""
3
  "Project-Id-Version: Restaurant Reservations 1.4\n"
4
  "Report-Msgid-Bugs-To: https://themeofthecrop.com\n"
5
  "POT-Creation-Date: 2018-04-27 15:19:32+00:00\n"
6
+ "PO-Revision-Date: 2022-04-27 13:45-0400\n"
7
  "Last-Translator: Pierre-Yves QUEMENER <contact@py-conseil.bzh>\n"
8
  "Language-Team: \n"
9
  "Language: fr_FR\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
  "Plural-Forms: nplurals=2; plural=n > 1;\n"
14
  "X-Poedit-SourceCharset: UTF-8\n"
15
+ "X-Generator: Poedit 3.0.1\n"
16
  "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
17
  "__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
18
  "_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
294
  "This booking has been sent to the %sTrash%s where it can not be edited. Set "
295
  "the booking to Pending or Confirmed to edit it."
296
  msgstr ""
297
+ "Cette réservation a été envoyée à la %sCorbeille%s où elle ne peut être "
298
  "modifié. Passer la réservation en attente ou en confirmé pour l'éditer."
299
 
300
  #: includes/AdminBookings.class.php:528
387
  #: includes/Booking.class.php:273
388
  msgid "Sorry, bookings must be made more than %s days in advance."
389
  msgstr ""
390
+ "Désolé, les réservations doivent être effectuées plus de %s jours à l'avance."
391
 
392
  #: includes/Booking.class.php:275
393
  msgid "Sorry, bookings must be made more than %s hours in advance."
394
  msgstr ""
395
+ "Désolé, les réservations doivent être effectuées plus de %s heures à "
396
+ "l'avance."
397
 
398
  #: includes/Booking.class.php:277
399
  msgid "Sorry, bookings must be made more than %s minutes in advance."
400
  msgstr ""
401
+ "Désolé, les réservations doivent être effectuées plus de %s minutes à "
402
+ "l'avance."
403
 
404
  #: includes/Booking.class.php:317
405
  msgid "Sorry, no bookings are being accepted then."
510
  #: includes/CustomPostTypes.class.php:103
511
  msgid "Confirmed <span class=\"count\">(%s)</span>"
512
  msgid_plural "Confirmed <span class=\"count\">(%s)</span>"
513
+ msgstr[0] "Confirmée <span class = \"count\"> (%s) </ span>"
514
+ msgstr[1] "Confirmées <span class = \"count\"> (%s) </ span>"
515
 
516
  #: includes/CustomPostTypes.class.php:114
517
  msgid "Closed <span class=\"count\">(%s)</span>"
725
  "in notification messages, modify your general %sWordPress Settings%s."
726
  msgstr ""
727
  "Définir comment l'horaire est formaté sur le formulaire de réservation. "
728
+ "%sRègles de format%s. Pour changer le format d'horaire dans les messages de "
729
+ "notification, modifier vos %sréglages Wordpress%s généraux."
730
 
731
  #: includes/Settings.class.php:360
732
  msgid "Language"
1968
  "Indicates which booking status is currently being filtered in the list of "
1969
  "bookings."
1970
  msgid "You're viewing bookings that have been marked as %s."
1971
+ msgstr "Vous consultez les réservations qui ont été marquées en %s."
1972
 
1973
  #: includes/WP_List_Table.BookingsTable.class.php:813
1974
  msgctxt ""
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: FiveStarPlugins
3
  Requires at Least: 4.4
4
  Tested Up To: 5.9
5
  Tags: reservation, reservations, restaurant reservations, reservation form, restaurant booking, restaurant reservation form, restaurant booking form, restaurant booking system, reservation system, online reservations, online restaurant booking, dinner reservations, restaurant form, gutenberg reservations, gutenberg restaurant reservations, gutenberg restaurant booking, mobile reservations, responsive reservations, table reservations, open table, book table, reserve table, easy reservations, simple reservations, quick restaurant reservations, custom reservation form, custom restaurant reservations
6
- Stable tag: 2.5.9
7
  License: GPLv3
8
  License URI:http://www.gnu.org/licenses/gpl-3.0.html
9
  Donate Link: https://www.etoilewebdesign.com/plugin-donations/
@@ -199,6 +199,9 @@ Find answers to even more questions in the [FAQ](http://doc.fivestarplugins.com/
199
 
200
  == Changelog ==
201
 
 
 
 
202
  = 2.5.9 (2022-04-19) =
203
  - Fixed an issue in which date range filtering (on the admin Bookings screen) was setting an incorrect date for the "Upcoming" export filtering option.
204
  - Added a filter that lets you specify your own values for the Time Interval setting. Filter is: rtb_setting_time_interval_options
3
  Requires at Least: 4.4
4
  Tested Up To: 5.9
5
  Tags: reservation, reservations, restaurant reservations, reservation form, restaurant booking, restaurant reservation form, restaurant booking form, restaurant booking system, reservation system, online reservations, online restaurant booking, dinner reservations, restaurant form, gutenberg reservations, gutenberg restaurant reservations, gutenberg restaurant booking, mobile reservations, responsive reservations, table reservations, open table, book table, reserve table, easy reservations, simple reservations, quick restaurant reservations, custom reservation form, custom restaurant reservations
6
+ Stable tag: 2.5.10
7
  License: GPLv3
8
  License URI:http://www.gnu.org/licenses/gpl-3.0.html
9
  Donate Link: https://www.etoilewebdesign.com/plugin-donations/
199
 
200
  == Changelog ==
201
 
202
+ = 2.5.10 (2022-05-02) =
203
+ - When the booking form reloads after a validation error, the previously-selected table is now automatically re/pre-selected.
204
+
205
  = 2.5.9 (2022-04-19) =
206
  - Fixed an issue in which date range filtering (on the admin Bookings screen) was setting an incorrect date for the "Upcoming" export filtering option.
207
  - Added a filter that lets you specify your own values for the Time Interval setting. Filter is: rtb_setting_time_interval_options
restaurant-reservations.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Five Star Restaurant Reservations - WordPress Booking Plugin
4
  * Plugin URI: http://www.fivestarplugins.com/plugins/five-star-restaurant-reservations/
5
  * Description: Restaurant reservations made easy. Accept bookings online. Quickly confirm or reject reservations, send email notifications, set booking times and more.
6
- * Version: 2.5.9
7
  * Author: FiveStarPlugins
8
  * Author URI: https://profiles.wordpress.org/fivestarplugins/
9
  * Text Domain: restaurant-reservations
@@ -39,7 +39,7 @@ class rtbInit {
39
  public function __construct() {
40
 
41
  // Common strings
42
- define( 'RTB_VERSION', '2.5.9' );
43
  define( 'RTB_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
44
  define( 'RTB_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
45
  define( 'RTB_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
3
  * Plugin Name: Five Star Restaurant Reservations - WordPress Booking Plugin
4
  * Plugin URI: http://www.fivestarplugins.com/plugins/five-star-restaurant-reservations/
5
  * Description: Restaurant reservations made easy. Accept bookings online. Quickly confirm or reject reservations, send email notifications, set booking times and more.
6
+ * Version: 2.5.10
7
  * Author: FiveStarPlugins
8
  * Author URI: https://profiles.wordpress.org/fivestarplugins/
9
  * Text Domain: restaurant-reservations
39
  public function __construct() {
40
 
41
  // Common strings
42
+ define( 'RTB_VERSION', '2.5.10' );
43
  define( 'RTB_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
44
  define( 'RTB_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
45
  define( 'RTB_PLUGIN_FNAME', plugin_basename( __FILE__ ) );