Restaurant Reservations - Version 1.6.3

Version Description

(2016-10-31) = * Fix: Exporting bookings by location (addon). Location query args are now support for rtbQuery objects. * Add: Option to select start of the week for the datepicker

Download this release

Release Info

Developer NateWr
Plugin Icon 128x128 Restaurant Reservations
Version 1.6.3
Comparing to
See all releases

Code changes from version 1.6.2 to 1.6.3

assets/js/booking-form.js CHANGED
@@ -42,6 +42,7 @@ jQuery(document).ready(function ($) {
42
  hiddenName: true,
43
  min: true,
44
  container: 'body',
 
45
 
46
  // Select the value when loaded if a value has been set
47
  onStart: function() {
42
  hiddenName: true,
43
  min: true,
44
  container: 'body',
45
+ firstDay: rtb_pickadate.first_day,
46
 
47
  // Select the value when loaded if a value has been set
48
  onStart: function() {
includes/Query.class.php CHANGED
@@ -192,6 +192,10 @@ class rtbQuery {
192
  $args['end_date'] = sanitize_text_field( $_REQUEST['end_date'] );
193
  }
194
 
 
 
 
 
195
  $this->args = array_merge( $this->args, $args );
196
  }
197
 
192
  $args['end_date'] = sanitize_text_field( $_REQUEST['end_date'] );
193
  }
194
 
195
+ if ( !empty( $_REQUEST['location'] ) ) {
196
+ $args['location'] = absint( $_REQUEST['location'] );
197
+ }
198
+
199
  $this->args = array_merge( $this->args, $args );
200
  }
201
 
includes/Settings.class.php CHANGED
@@ -480,6 +480,22 @@ Sorry, we could not accomodate your booking request. We\'re full or not open at
480
  )
481
  );
482
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
483
  $sap->add_section(
484
  'rtb-settings',
485
  array(
480
  )
481
  );
482
 
483
+ $sap->add_setting(
484
+ 'rtb-settings',
485
+ 'rtb-schedule',
486
+ 'select',
487
+ array(
488
+ 'id' => 'week-start',
489
+ 'title' => __( 'Week Starts On', 'restaurant-reservations' ),
490
+ 'description' => __( 'Select the first day of the week', 'restaurant-reservations' ),
491
+ 'blank_option' => false,
492
+ 'options' => array(
493
+ '0' => __( 'Sunday', 'restaurant-reservations' ),
494
+ '1' => __( 'Monday', 'restaurant-reservations' ),
495
+ )
496
+ )
497
+ );
498
+
499
  $sap->add_section(
500
  'rtb-settings',
501
  array(
includes/WP_List_Table.BookingsTable.class.php CHANGED
@@ -884,10 +884,6 @@ class rtbBookingsTable extends WP_List_Table {
884
  $args['end_date'] = $this->filter_end_date;
885
  }
886
 
887
- if ( !empty( $this->filter_location ) ) {
888
- $args['location'] = $this->filter_location;
889
- }
890
-
891
  $query = new rtbQuery( $args, 'bookings-table' );
892
  $query->parse_request_args();
893
  $query->prepare_args();
884
  $args['end_date'] = $this->filter_end_date;
885
  }
886
 
 
 
 
 
887
  $query = new rtbQuery( $args, 'bookings-table' );
888
  $query->parse_request_args();
889
  $query->prepare_args();
includes/template-functions.php CHANGED
@@ -182,6 +182,7 @@ function rtb_enqueue_assets() {
182
  'late_bookings' => current_user_can( 'manage_bookings' ) ? '' : $rtb_controller->settings->get_setting( 'late-bookings' ),
183
  'date_onload' => $rtb_controller->settings->get_setting( 'date-onload' ),
184
  'time_interval' => $rtb_controller->settings->get_setting( 'time-interval' ),
 
185
  )
186
  );
187
 
@@ -198,16 +199,19 @@ function rtb_get_datepicker_rules() {
198
 
199
  global $rtb_controller;
200
 
 
 
 
201
  $disable_rules = array();
202
 
203
  $disabled_weekdays = array(
204
- 'sunday' => 1,
205
- 'monday' => 2,
206
- 'tuesday' => 3,
207
- 'wednesday' => 4,
208
- 'thursday' => 5,
209
- 'friday' => 6,
210
- 'saturday' => 7,
211
  );
212
 
213
  // Determine which weekdays should be disabled
182
  'late_bookings' => current_user_can( 'manage_bookings' ) ? '' : $rtb_controller->settings->get_setting( 'late-bookings' ),
183
  'date_onload' => $rtb_controller->settings->get_setting( 'date-onload' ),
184
  'time_interval' => $rtb_controller->settings->get_setting( 'time-interval' ),
185
+ 'first_day' => $rtb_controller->settings->get_setting( 'week-start' ),
186
  )
187
  );
188
 
199
 
200
  global $rtb_controller;
201
 
202
+ // First day of the week
203
+ $first_day = (int) $rtb_controller->settings->get_setting( 'week-start' );
204
+
205
  $disable_rules = array();
206
 
207
  $disabled_weekdays = array(
208
+ 'sunday' => ( 1 - $first_day ) === 0 ? 7 : 1,
209
+ 'monday' => 2 - $first_day,
210
+ 'tuesday' => 3 - $first_day,
211
+ 'wednesday' => 4 - $first_day,
212
+ 'thursday' => 5 - $first_day,
213
+ 'friday' => 6 - $first_day,
214
+ 'saturday' => 7 - $first_day,
215
  );
216
 
217
  // Determine which weekdays should be disabled
languages/restaurant-reservations-de_DE.mo CHANGED
Binary file
languages/restaurant-reservations-de_DE.po CHANGED
@@ -3,8 +3,8 @@ msgstr ""
3
  "Project-Id-Version: Restaurant Reservations 1.2.3\n"
4
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/restaurant-"
5
  "reservations\n"
6
- "POT-Creation-Date: 2016-06-20 15:58+0200\n"
7
- "PO-Revision-Date: 2016-06-20 16:13+0200\n"
8
  "Last-Translator: Roland Stumpp <support@mediaoffice.de>\n"
9
  "Language-Team: mediaOffice GbR <support@mediaoffice.de>\n"
10
  "Language: de\n"
@@ -371,7 +371,7 @@ msgstr ""
371
  #: includes/MultipleLocations.class.php:375
372
  #: includes/MultipleLocations.class.php:419
373
  msgid "Location"
374
- msgstr "Standort"
375
 
376
  #: includes/MultipleLocations.class.php:327
377
  msgid "Please select a location for your booking."
@@ -954,7 +954,7 @@ msgstr "Alle"
954
 
955
  #: includes/WP_List_Table.BookingsTable.class.php:242
956
  msgid "Between dates"
957
- msgstr "Zwischen Daten:"
958
 
959
  #: includes/WP_List_Table.BookingsTable.class.php:254
960
  msgid "Start Date:"
@@ -1015,15 +1015,15 @@ msgstr "Löschen"
1015
 
1016
  #: includes/WP_List_Table.BookingsTable.class.php:523
1017
  msgid "Set To Confirmed"
1018
- msgstr "Auf \"Bestätigt\" gestellt"
1019
 
1020
  #: includes/WP_List_Table.BookingsTable.class.php:524
1021
  msgid "Set To Pending Review"
1022
- msgstr "Auf \"Unbestätigt\" gestellt"
1023
 
1024
  #: includes/WP_List_Table.BookingsTable.class.php:525
1025
  msgid "Set To Closed"
1026
- msgstr "Auf \"Abgelehnt\" gestellt"
1027
 
1028
  #: includes/WP_List_Table.BookingsTable.class.php:639
1029
  msgid "%d booking deleted successfully."
@@ -1079,7 +1079,7 @@ msgstr "Es werden nur Reservierungen von heute angezeigt."
1079
 
1080
  #: includes/WP_List_Table.BookingsTable.class.php:792
1081
  msgid "Only upcoming bookings are being shown."
1082
- msgstr "Es werden nur zukünfitige Reservierungen angezeigt."
1083
 
1084
  #: includes/WP_Widget.BookingFormWidget.class.php:25
1085
  msgid "Booking Form"
@@ -1234,7 +1234,7 @@ msgid ""
1234
  "newsletter%s or following %sTheme of the Crop%s on Twitter."
1235
  msgstr ""
1236
  "Sei informiert wenn neue ADDONS verfügbar sind und abonniere den "
1237
- "%sMonatlichen Newsletter%S oder werde Follower von %sTheme of the Crop%s auf "
1238
  "Twitter."
1239
 
1240
  #: includes/Settings.class.php:92
@@ -1280,7 +1280,7 @@ msgstr "Abgelehnt"
1280
  #: includes/MultipleLocations.class.php:101
1281
  msgctxt "Name for grouping bookings"
1282
  msgid "Location"
1283
- msgstr "Standort"
1284
 
1285
  #: includes/Settings.class.php:93
1286
  msgctxt ""
3
  "Project-Id-Version: Restaurant Reservations 1.2.3\n"
4
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/restaurant-"
5
  "reservations\n"
6
+ "POT-Creation-Date: 2016-08-20 13:00+0200\n"
7
+ "PO-Revision-Date: 2016-08-20 13:00+0200\n"
8
  "Last-Translator: Roland Stumpp <support@mediaoffice.de>\n"
9
  "Language-Team: mediaOffice GbR <support@mediaoffice.de>\n"
10
  "Language: de\n"
371
  #: includes/MultipleLocations.class.php:375
372
  #: includes/MultipleLocations.class.php:419
373
  msgid "Location"
374
+ msgstr "Ort"
375
 
376
  #: includes/MultipleLocations.class.php:327
377
  msgid "Please select a location for your booking."
954
 
955
  #: includes/WP_List_Table.BookingsTable.class.php:242
956
  msgid "Between dates"
957
+ msgstr "Lege ein Anfang und ein Enddatum fest:"
958
 
959
  #: includes/WP_List_Table.BookingsTable.class.php:254
960
  msgid "Start Date:"
1015
 
1016
  #: includes/WP_List_Table.BookingsTable.class.php:523
1017
  msgid "Set To Confirmed"
1018
+ msgstr "Reservierung bestätigen"
1019
 
1020
  #: includes/WP_List_Table.BookingsTable.class.php:524
1021
  msgid "Set To Pending Review"
1022
+ msgstr "Reservierung auf Unbestätigt setzen"
1023
 
1024
  #: includes/WP_List_Table.BookingsTable.class.php:525
1025
  msgid "Set To Closed"
1026
+ msgstr "Reservierung absagen - ausgebucht!"
1027
 
1028
  #: includes/WP_List_Table.BookingsTable.class.php:639
1029
  msgid "%d booking deleted successfully."
1079
 
1080
  #: includes/WP_List_Table.BookingsTable.class.php:792
1081
  msgid "Only upcoming bookings are being shown."
1082
+ msgstr "Es werden nur zukünftige Reservierungen angezeigt."
1083
 
1084
  #: includes/WP_Widget.BookingFormWidget.class.php:25
1085
  msgid "Booking Form"
1234
  "newsletter%s or following %sTheme of the Crop%s on Twitter."
1235
  msgstr ""
1236
  "Sei informiert wenn neue ADDONS verfügbar sind und abonniere den "
1237
+ "%sMonatlichen Newsletter%s oder werde Follower von %sTheme of the Crop%s auf "
1238
  "Twitter."
1239
 
1240
  #: includes/Settings.class.php:92
1280
  #: includes/MultipleLocations.class.php:101
1281
  msgctxt "Name for grouping bookings"
1282
  msgid "Location"
1283
+ msgstr "Ort"
1284
 
1285
  #: includes/Settings.class.php:93
1286
  msgctxt ""
package.json CHANGED
@@ -7,9 +7,9 @@
7
  "url": "http://themeofthecrop.com"
8
  },
9
  "devDependencies": {
10
- "grunt": "~0.4.2",
11
- "grunt-contrib-jshint": "~0.6.0",
12
- "grunt-contrib-watch": "~0.4.3",
13
- "grunt-wp-i18n": "~0.4.9"
14
  }
15
  }
7
  "url": "http://themeofthecrop.com"
8
  },
9
  "devDependencies": {
10
+ "grunt": "~1.0.0",
11
+ "grunt-contrib-jshint": "~1.0.0",
12
+ "grunt-contrib-watch": "~1.0.0",
13
+ "grunt-wp-i18n": "~0.5.4"
14
  }
15
  }
readme.txt CHANGED
@@ -5,7 +5,7 @@ Plugin URL: https://themeofthecrop.com
5
  Requires at Least: 4.4
6
  Tested Up To: 4.6
7
  Tags: restaurant, reservations, bookings, table bookings, restaurant reservation, table reservation
8
- Stable tag: 1.6.2
9
  License: GPLv2 or later
10
  Donate link: https://themeofthecrop.com
11
 
@@ -116,8 +116,12 @@ Find answers to even more questions in the [FAQ](http://doc.themeofthecrop.com/p
116
 
117
  == Changelog ==
118
 
 
 
 
 
119
  = 1.6.2 (2016-08-20) =
120
- * Fix: Broken time picker introduced in 1.6.2
121
 
122
  = 1.6.1 (2016-08-19) =
123
  * Fix: Support location post ids in booking form shortcode
5
  Requires at Least: 4.4
6
  Tested Up To: 4.6
7
  Tags: restaurant, reservations, bookings, table bookings, restaurant reservation, table reservation
8
+ Stable tag: 1.6.3
9
  License: GPLv2 or later
10
  Donate link: https://themeofthecrop.com
11
 
116
 
117
  == Changelog ==
118
 
119
+ = 1.6.3 (2016-10-31) =
120
+ * Fix: Exporting bookings by location (addon). Location query args are now support for rtbQuery objects.
121
+ * Add: Option to select start of the week for the datepicker
122
+
123
  = 1.6.2 (2016-08-20) =
124
+ * Fix: Broken time picker introduced in 1.6.1
125
 
126
  = 1.6.1 (2016-08-19) =
127
  * Fix: Support location post ids in booking form shortcode
restaurant-reservations.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Restaurant Reservations
4
  * Plugin URI: http://themeofthecrop.com
5
  * Description: Accept restaurant reservations and bookings online.
6
- * Version: 1.6.2
7
  * Author: Theme of the Crop
8
  * Author URI: http://themeofthecrop.com
9
  * License: GNU General Public License v2.0 or later
@@ -47,7 +47,7 @@ class rtbInit {
47
  public function __construct() {
48
 
49
  // Common strings
50
- define( 'RTB_VERSION', '1.6.1' );
51
  define( 'RTB_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
52
  define( 'RTB_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
53
  define( 'RTB_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
3
  * Plugin Name: Restaurant Reservations
4
  * Plugin URI: http://themeofthecrop.com
5
  * Description: Accept restaurant reservations and bookings online.
6
+ * Version: 1.6.3
7
  * Author: Theme of the Crop
8
  * Author URI: http://themeofthecrop.com
9
  * License: GNU General Public License v2.0 or later
47
  public function __construct() {
48
 
49
  // Common strings
50
+ define( 'RTB_VERSION', '1.6.3' );
51
  define( 'RTB_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
52
  define( 'RTB_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
53
  define( 'RTB_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
screenshot-1.png CHANGED
Binary file
screenshot-10.png CHANGED
Binary file
screenshot-11.png ADDED
Binary file
screenshot-12.png ADDED
Binary file
screenshot-2.png CHANGED
Binary file
screenshot-3.png CHANGED
Binary file
screenshot-4.png CHANGED
Binary file
screenshot-5.png CHANGED
Binary file
screenshot-6.png CHANGED
Binary file
screenshot-7.png CHANGED
Binary file
screenshot-8.png CHANGED
Binary file
screenshot-9.png CHANGED
Binary file