Restaurant Reservations - Version 1.7.1

Version Description

Download this release

Release Info

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

Code changes from version 1.7 to 1.7.1

includes/Booking.class.php CHANGED
@@ -124,6 +124,16 @@ class rtbBooking {
124
  return apply_filters( 'get_the_date', $date );
125
  }
126
 
 
 
 
 
 
 
 
 
 
 
127
  /**
128
  * Insert a new booking submission into the database
129
  *
124
  return apply_filters( 'get_the_date', $date );
125
  }
126
 
127
+ /**
128
+ * Format a timestamp into a human-readable date
129
+ *
130
+ * @since 1.7.1
131
+ */
132
+ public function format_timestamp( $timestamp ) {
133
+ $time = date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $timestamp );
134
+ return $time;
135
+ }
136
+
137
  /**
138
  * Insert a new booking submission into the database
139
  *
includes/MultipleLocations.class.php CHANGED
@@ -89,6 +89,7 @@ if ( ! class_exists( 'rtbMultipleLocations', false ) ) {
89
  add_filter( 'rtb_notification_email_from_name', array( $this, 'notification_from_name' ), 10, 2 );
90
  add_filter( 'rtb_notification_template_tags', array( $this, 'notification_template_tags' ), 10, 2 );
91
  add_filter( 'rtb_notification_template_tag_descriptions', array( $this, 'notification_template_tag_descriptions' ) );
 
92
  }
93
 
94
  /**
@@ -124,12 +125,13 @@ if ( ! class_exists( 'rtbMultipleLocations', false ) ) {
124
  */
125
  public function save_location( $post_id, $post, $update ) {
126
 
127
-
128
- if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
129
- return $post_id;
130
- }
131
-
132
- if ( !current_user_can( 'edit_post', $post_id ) ) {
 
133
  return $post_id;
134
  }
135
 
@@ -137,16 +139,17 @@ if ( ! class_exists( 'rtbMultipleLocations', false ) ) {
137
 
138
  // Create a new term for this location
139
  if ( !$term_id ) {
 
140
  $term = wp_insert_term(
141
  sanitize_text_field( $post->post_title ),
142
  $this->location_taxonomy
143
  );
 
144
  if ( !is_a( $term, 'WP_Error' ) ) {
145
  update_post_meta( $post_id, $this->location_taxonomy, $term['term_id'] );
 
146
  }
147
 
148
- $term_id = $term['term_id'];
149
-
150
  // Update the term for this location
151
  } else {
152
  wp_update_term(
@@ -159,36 +162,34 @@ if ( ! class_exists( 'rtbMultipleLocations', false ) ) {
159
  );
160
  }
161
 
162
- // Save post and and term meta data
163
- if ( !isset( $_POST['rtb_location_meta_nonce'] ) || !wp_verify_nonce( $_POST['rtb_location_meta_nonce'], 'rtb_location_meta' ) ) {
164
- return $post_id;
165
- }
166
-
167
  if ( !empty( $_POST['rtb_append_booking_form'] ) ) {
168
  update_post_meta( $post_id, 'rtb_append_booking_form', true );
169
  } else {
170
  delete_post_meta( $post_id, 'rtb_append_booking_form' );
171
  }
172
 
173
- if ( !empty( $_POST['rtb_reply_to_name'] ) ) {
174
- $reply_to_name = sanitize_text_field( $_POST['rtb_reply_to_name'] );
175
- update_term_meta( $term_id, 'rtb_reply_to_name', $reply_to_name );
176
- } else {
177
- delete_term_meta( $term_id, 'rtb_reply_to_name' );
178
- }
179
 
180
- if ( !empty( $_POST['rtb_reply_to_address'] ) ) {
181
- $reply_to_address = sanitize_email( $_POST['rtb_reply_to_address'] );
182
- update_term_meta( $term_id, 'rtb_reply_to_address', $reply_to_address );
183
- } else {
184
- delete_term_meta( $term_id, 'rtb_reply_to_address' );
185
- }
186
 
187
- if ( !empty( $_POST['rtb_admin_email_address'] ) ) {
188
- $email = sanitize_email( $_POST['rtb_admin_email_address'] );
189
- update_term_meta( $term_id, 'rtb_admin_email_address', $email );
190
- } else {
191
- delete_term_meta( $term_id, 'rtb_admin_email_address' );
 
 
 
 
 
 
 
 
192
  }
193
 
194
  return $post_id;
@@ -206,7 +207,7 @@ if ( ! class_exists( 'rtbMultipleLocations', false ) ) {
206
  public function delete_location( $post_id ) {
207
 
208
  if ( !current_user_can( 'delete_posts' ) ) {
209
- return;
210
  }
211
 
212
  $term_id = get_post_meta( $post_id, $this->location_taxonomy, true );
@@ -226,10 +227,10 @@ if ( ! class_exists( 'rtbMultipleLocations', false ) ) {
226
  // historical data.
227
  if ( count( $query->bookings ) ) {
228
  add_term_meta( $term_id, 'rtb_location_removed', true );
229
- return;
 
230
  }
231
 
232
- wp_delete_term( $term_id, $this->location_taxonomy );
233
  }
234
 
235
  /**
@@ -682,5 +683,73 @@ if ( ! class_exists( 'rtbMultipleLocations', false ) ) {
682
  $descriptions
683
  );
684
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
685
  }
686
  }
89
  add_filter( 'rtb_notification_email_from_name', array( $this, 'notification_from_name' ), 10, 2 );
90
  add_filter( 'rtb_notification_template_tags', array( $this, 'notification_template_tags' ), 10, 2 );
91
  add_filter( 'rtb_notification_template_tag_descriptions', array( $this, 'notification_template_tag_descriptions' ) );
92
+ add_action( 'admin_init', array( $this, 'fix_autodraft_term_error' ) );
93
  }
94
 
95
  /**
125
  */
126
  public function save_location( $post_id, $post, $update ) {
127
 
128
+ if (
129
+ $post->post_status === 'auto-draft' ||
130
+ ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) ||
131
+ !current_user_can( 'edit_post', $post_id ) ||
132
+ !isset( $_POST['rtb_location_meta_nonce'] ) ||
133
+ !wp_verify_nonce( $_POST['rtb_location_meta_nonce'], 'rtb_location_meta' )
134
+ ) {
135
  return $post_id;
136
  }
137
 
139
 
140
  // Create a new term for this location
141
  if ( !$term_id ) {
142
+
143
  $term = wp_insert_term(
144
  sanitize_text_field( $post->post_title ),
145
  $this->location_taxonomy
146
  );
147
+
148
  if ( !is_a( $term, 'WP_Error' ) ) {
149
  update_post_meta( $post_id, $this->location_taxonomy, $term['term_id'] );
150
+ $term_id = $term['term_id'];
151
  }
152
 
 
 
153
  // Update the term for this location
154
  } else {
155
  wp_update_term(
162
  );
163
  }
164
 
 
 
 
 
 
165
  if ( !empty( $_POST['rtb_append_booking_form'] ) ) {
166
  update_post_meta( $post_id, 'rtb_append_booking_form', true );
167
  } else {
168
  delete_post_meta( $post_id, 'rtb_append_booking_form' );
169
  }
170
 
171
+ if ( $term_id ) {
 
 
 
 
 
172
 
173
+ if ( !empty( $_POST['rtb_reply_to_name'] ) ) {
174
+ $reply_to_name = sanitize_text_field( $_POST['rtb_reply_to_name'] );
175
+ update_term_meta( $term_id, 'rtb_reply_to_name', $reply_to_name );
176
+ } else {
177
+ delete_term_meta( $term_id, 'rtb_reply_to_name' );
178
+ }
179
 
180
+ if ( !empty( $_POST['rtb_reply_to_address'] ) ) {
181
+ $reply_to_address = sanitize_email( $_POST['rtb_reply_to_address'] );
182
+ update_term_meta( $term_id, 'rtb_reply_to_address', $reply_to_address );
183
+ } else {
184
+ delete_term_meta( $term_id, 'rtb_reply_to_address' );
185
+ }
186
+
187
+ if ( !empty( $_POST['rtb_admin_email_address'] ) ) {
188
+ $email = sanitize_email( $_POST['rtb_admin_email_address'] );
189
+ update_term_meta( $term_id, 'rtb_admin_email_address', $email );
190
+ } else {
191
+ delete_term_meta( $term_id, 'rtb_admin_email_address' );
192
+ }
193
  }
194
 
195
  return $post_id;
207
  public function delete_location( $post_id ) {
208
 
209
  if ( !current_user_can( 'delete_posts' ) ) {
210
+ return $post_id;
211
  }
212
 
213
  $term_id = get_post_meta( $post_id, $this->location_taxonomy, true );
227
  // historical data.
228
  if ( count( $query->bookings ) ) {
229
  add_term_meta( $term_id, 'rtb_location_removed', true );
230
+ } else {
231
+ wp_delete_term( $term_id, $this->location_taxonomy );
232
  }
233
 
 
234
  }
235
 
236
  /**
683
  $descriptions
684
  );
685
  }
686
+
687
+ /**
688
+ * Removes Auto-Draft locations that were added due to a bug in v1.7
689
+ *
690
+ * Version 1.7 introduced a bug which caused a location term to be
691
+ * created if the location Add New page was loaded. This term
692
+ * corresponded to an auto-draft post object and will be removed when
693
+ * that object is removed. This provides a one-time fix in v1.7.1
694
+ *
695
+ * @see https://github.com/NateWr/restaurant-reservations/issues/91
696
+ * @see https://developer.wordpress.org/reference/functions/wp_delete_auto_drafts/
697
+ * @since 1.7.1
698
+ */
699
+ public function fix_autodraft_term_error() {
700
+
701
+ if ( get_option( 'rtb_autodraft_terms_fixed', false ) ) {
702
+ return;
703
+ }
704
+
705
+ global $wpdb;
706
+
707
+ if ( !$wpdb ) {
708
+ return;
709
+ }
710
+
711
+ $old_posts = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_status = 'auto-draft' AND post_type = '$this->post_type';" );
712
+ foreach ( (array) $old_posts as $delete ) {
713
+ // Force delete.
714
+ wp_delete_post( $delete, true );
715
+ }
716
+
717
+ // Set the `rtb_location_removed` term meta on any terms that are
718
+ // no longer attached to posts
719
+ global $wp_version;
720
+ if ( version_compare( $wp_version, '3.9', '>=' ) ) {
721
+ $live_terms = $wpdb->get_col( "SELECT meta_value FROM $wpdb->postmeta WHERE meta_key='$this->location_taxonomy';" );
722
+ $all_terms = get_terms( array(
723
+ 'taxonomy' => $this->location_taxonomy,
724
+ 'hide_empty' => false,
725
+ 'meta_query' => array(
726
+ array(
727
+ 'compare' => 'NOT EXISTS',
728
+ 'key' => 'rtb_location_removed',
729
+ )
730
+ )
731
+ ) );
732
+ if ( is_array( $all_terms ) ) {
733
+ foreach( $all_terms as $term ) {
734
+ if ( !in_array( $term->term_id, $live_terms ) ) {
735
+ $query = new rtbQuery( array( 'location' => $term->term_id ), 'delete-location-term-check' );
736
+ $query->prepare_args();
737
+ $query->get_bookings();
738
+
739
+ // Don't delete taxonomy terms if there are bookings assigned to
740
+ // this location, so the booking associations can remain as
741
+ // historical data.
742
+ if ( count( $query->bookings ) ) {
743
+ add_term_meta( $term->term_id, 'rtb_location_removed', true );
744
+ } else {
745
+ wp_delete_term( $term->term_id, $this->location_taxonomy );
746
+ }
747
+ }
748
+ }
749
+ }
750
+ }
751
+
752
+ update_option( 'rtb_autodraft_terms_fixed', true );
753
+ }
754
  }
755
  }
includes/Query.class.php CHANGED
@@ -227,6 +227,8 @@ class rtbQuery {
227
 
228
  $this->bookings = $bookings;
229
 
 
 
230
  return $this->bookings;
231
  }
232
 
227
 
228
  $this->bookings = $bookings;
229
 
230
+ wp_reset_query();
231
+
232
  return $this->bookings;
233
  }
234
 
includes/WP_List_Table.BookingsTable.class.php CHANGED
@@ -466,7 +466,7 @@ class rtbBookingsTable extends WP_List_Table {
466
 
467
  case 'submitted-by' :
468
  $ip = !empty( $booking->ip ) ? $booking->ip : __( 'Unknown IP', 'restaurant-reservations' );
469
- $date_submission = isset( $booking->date_submission ) ? $booking->format_date( $booking->date_submission ) : __( 'Unknown Date', 'restaurant-reservations' );
470
  $value = sprintf( esc_html__( 'Request from %s on %s.', 'restaurant-reservations' ), $ip, $date_submission );
471
  $value .= '<div class="actions">';
472
  $value .= '<a href="#" data-action="ban" data-email="' . esc_attr( $booking->email ) . '" data-id="' . absint( $booking->ID ) . '" data-ip="' . $ip . '">';
466
 
467
  case 'submitted-by' :
468
  $ip = !empty( $booking->ip ) ? $booking->ip : __( 'Unknown IP', 'restaurant-reservations' );
469
+ $date_submission = isset( $booking->date_submission ) ? $booking->format_timestamp( $booking->date_submission ) : __( 'Unknown Date', 'restaurant-reservations' );
470
  $value = sprintf( esc_html__( 'Request from %s on %s.', 'restaurant-reservations' ), $ip, $date_submission );
471
  $value .= '<div class="actions">';
472
  $value .= '<a href="#" data-action="ban" data-email="' . esc_attr( $booking->email ) . '" data-id="' . absint( $booking->ID ) . '" data-ip="' . $ip . '">';
languages/restaurant-reservations.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the GNU General Public License v2.0 or later.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Restaurant Reservations 1.7\n"
6
  "Report-Msgid-Bugs-To: https://themeofthecrop.com\n"
7
- "POT-Creation-Date: 2016-12-05 13:47:46+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -139,87 +139,87 @@ msgstr ""
139
  msgid "Invalid"
140
  msgstr ""
141
 
142
- #: includes/Booking.class.php:182
143
  msgid "Please enter the date you would like to book."
144
  msgstr ""
145
 
146
- #: includes/Booking.class.php:192
147
  msgid ""
148
  "The date you entered is not valid. Please select from one of the dates in "
149
  "the calendar."
150
  msgstr ""
151
 
152
- #: includes/Booking.class.php:203
153
  msgid "Please enter the time you would like to book."
154
  msgstr ""
155
 
156
- #: includes/Booking.class.php:213
157
  msgid ""
158
  "The time you entered is not valid. Please select from one of the times "
159
  "provided."
160
  msgstr ""
161
 
162
- #: includes/Booking.class.php:233
163
  msgid "Sorry, bookings can not be made more than %s days in advance."
164
  msgstr ""
165
 
166
- #: includes/Booking.class.php:244
167
  msgid "Sorry, bookings can not be made in the past."
168
  msgstr ""
169
 
170
- #: includes/Booking.class.php:253
171
  msgid "Sorry, bookings can not be made for the same day."
172
  msgstr ""
173
 
174
- #: includes/Booking.class.php:261
175
  msgid "Sorry, bookings must be made more than %s days in advance."
176
  msgstr ""
177
 
178
- #: includes/Booking.class.php:263
179
  msgid "Sorry, bookings must be made more than %s hours in advance."
180
  msgstr ""
181
 
182
- #: includes/Booking.class.php:265
183
  msgid "Sorry, bookings must be made more than %s minutes in advance."
184
  msgstr ""
185
 
186
- #: includes/Booking.class.php:305
187
  msgid "Sorry, no bookings are being accepted then."
188
  msgstr ""
189
 
190
- #: includes/Booking.class.php:357
191
  msgid "Sorry, no bookings are being accepted on that date."
192
  msgstr ""
193
 
194
- #: includes/Booking.class.php:363
195
  msgid "Sorry, no bookings are being accepted at that time."
196
  msgstr ""
197
 
198
- #: includes/Booking.class.php:385
199
  msgid "Please enter a name for this booking."
200
  msgstr ""
201
 
202
- #: includes/Booking.class.php:395
203
  msgid "Please let us know how many people will be in your party."
204
  msgstr ""
205
 
206
- #: includes/Booking.class.php:405
207
  msgid "We only accept bookings for parties of up to %d people."
208
  msgstr ""
209
 
210
- #: includes/Booking.class.php:413
211
  msgid "We only accept bookings for parties of more than %d people."
212
  msgstr ""
213
 
214
- #: includes/Booking.class.php:424
215
  msgid "Please enter an email address so we can confirm your booking."
216
  msgstr ""
217
 
218
- #: includes/Booking.class.php:446
219
  msgid "Please complete this field to request a booking."
220
  msgstr ""
221
 
222
- #: includes/Booking.class.php:458
223
  msgid ""
224
  "Your booking has been rejected. Please call us if you would like to make a "
225
  "booking."
@@ -309,58 +309,58 @@ msgid ""
309
  "and try again."
310
  msgstr ""
311
 
312
- #: includes/MultipleLocations.class.php:303
313
- #: includes/MultipleLocations.class.php:406
314
  msgid "Location"
315
  msgstr ""
316
 
317
- #: includes/MultipleLocations.class.php:358
318
  msgid "Please select a location for your booking."
319
  msgstr ""
320
 
321
- #: includes/MultipleLocations.class.php:365
322
  msgid "The location you selected is not valid. Please select another location."
323
  msgstr ""
324
 
325
- #: includes/MultipleLocations.class.php:474
326
  msgid "Reservations"
327
  msgstr ""
328
 
329
- #: includes/MultipleLocations.class.php:541
330
  msgid "Show booking form with this location."
331
  msgstr ""
332
 
333
- #: includes/MultipleLocations.class.php:547 includes/Settings.class.php:550
334
  msgid "Reply-To Name"
335
  msgstr ""
336
 
337
- #: includes/MultipleLocations.class.php:551
338
  msgid ""
339
  "The name which should appear in the Reply-To field of a user notification "
340
  "email."
341
  msgstr ""
342
 
343
- #: includes/MultipleLocations.class.php:557 includes/Settings.class.php:562
344
  msgid "Reply-To Email Address"
345
  msgstr ""
346
 
347
- #: includes/MultipleLocations.class.php:561 includes/Settings.class.php:563
348
  msgid ""
349
  "The email address which should appear in the Reply-To field of a user "
350
  "notification email."
351
  msgstr ""
352
 
353
- #: includes/MultipleLocations.class.php:568
354
  msgid "Admin Notification Email Address"
355
  msgstr ""
356
 
357
- #: includes/MultipleLocations.class.php:572
358
  msgid ""
359
  "The email address where admin notifications for bookings at this location "
360
  "should be sent."
361
  msgstr ""
362
 
363
- #: includes/MultipleLocations.class.php:681
364
  msgid "Location for which this booking was made."
365
  msgstr ""
366
 
@@ -1180,7 +1180,7 @@ msgctxt "Booking status for a closed booking"
1180
  msgid "Closed"
1181
  msgstr ""
1182
 
1183
- #: includes/MultipleLocations.class.php:102
1184
  msgctxt "Name for grouping bookings"
1185
  msgid "Location"
1186
  msgstr ""
2
  # This file is distributed under the GNU General Public License v2.0 or later.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Restaurant Reservations 1.7.1\n"
6
  "Report-Msgid-Bugs-To: https://themeofthecrop.com\n"
7
+ "POT-Creation-Date: 2016-12-14 16:51:35+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
139
  msgid "Invalid"
140
  msgstr ""
141
 
142
+ #: includes/Booking.class.php:192
143
  msgid "Please enter the date you would like to book."
144
  msgstr ""
145
 
146
+ #: includes/Booking.class.php:202
147
  msgid ""
148
  "The date you entered is not valid. Please select from one of the dates in "
149
  "the calendar."
150
  msgstr ""
151
 
152
+ #: includes/Booking.class.php:213
153
  msgid "Please enter the time you would like to book."
154
  msgstr ""
155
 
156
+ #: includes/Booking.class.php:223
157
  msgid ""
158
  "The time you entered is not valid. Please select from one of the times "
159
  "provided."
160
  msgstr ""
161
 
162
+ #: includes/Booking.class.php:243
163
  msgid "Sorry, bookings can not be made more than %s days in advance."
164
  msgstr ""
165
 
166
+ #: includes/Booking.class.php:254
167
  msgid "Sorry, bookings can not be made in the past."
168
  msgstr ""
169
 
170
+ #: includes/Booking.class.php:263
171
  msgid "Sorry, bookings can not be made for the same day."
172
  msgstr ""
173
 
174
+ #: includes/Booking.class.php:271
175
  msgid "Sorry, bookings must be made more than %s days in advance."
176
  msgstr ""
177
 
178
+ #: includes/Booking.class.php:273
179
  msgid "Sorry, bookings must be made more than %s hours in advance."
180
  msgstr ""
181
 
182
+ #: includes/Booking.class.php:275
183
  msgid "Sorry, bookings must be made more than %s minutes in advance."
184
  msgstr ""
185
 
186
+ #: includes/Booking.class.php:315
187
  msgid "Sorry, no bookings are being accepted then."
188
  msgstr ""
189
 
190
+ #: includes/Booking.class.php:367
191
  msgid "Sorry, no bookings are being accepted on that date."
192
  msgstr ""
193
 
194
+ #: includes/Booking.class.php:373
195
  msgid "Sorry, no bookings are being accepted at that time."
196
  msgstr ""
197
 
198
+ #: includes/Booking.class.php:395
199
  msgid "Please enter a name for this booking."
200
  msgstr ""
201
 
202
+ #: includes/Booking.class.php:405
203
  msgid "Please let us know how many people will be in your party."
204
  msgstr ""
205
 
206
+ #: includes/Booking.class.php:415
207
  msgid "We only accept bookings for parties of up to %d people."
208
  msgstr ""
209
 
210
+ #: includes/Booking.class.php:423
211
  msgid "We only accept bookings for parties of more than %d people."
212
  msgstr ""
213
 
214
+ #: includes/Booking.class.php:434
215
  msgid "Please enter an email address so we can confirm your booking."
216
  msgstr ""
217
 
218
+ #: includes/Booking.class.php:456
219
  msgid "Please complete this field to request a booking."
220
  msgstr ""
221
 
222
+ #: includes/Booking.class.php:468
223
  msgid ""
224
  "Your booking has been rejected. Please call us if you would like to make a "
225
  "booking."
309
  "and try again."
310
  msgstr ""
311
 
312
+ #: includes/MultipleLocations.class.php:304
313
+ #: includes/MultipleLocations.class.php:407
314
  msgid "Location"
315
  msgstr ""
316
 
317
+ #: includes/MultipleLocations.class.php:359
318
  msgid "Please select a location for your booking."
319
  msgstr ""
320
 
321
+ #: includes/MultipleLocations.class.php:366
322
  msgid "The location you selected is not valid. Please select another location."
323
  msgstr ""
324
 
325
+ #: includes/MultipleLocations.class.php:475
326
  msgid "Reservations"
327
  msgstr ""
328
 
329
+ #: includes/MultipleLocations.class.php:542
330
  msgid "Show booking form with this location."
331
  msgstr ""
332
 
333
+ #: includes/MultipleLocations.class.php:548 includes/Settings.class.php:550
334
  msgid "Reply-To Name"
335
  msgstr ""
336
 
337
+ #: includes/MultipleLocations.class.php:552
338
  msgid ""
339
  "The name which should appear in the Reply-To field of a user notification "
340
  "email."
341
  msgstr ""
342
 
343
+ #: includes/MultipleLocations.class.php:558 includes/Settings.class.php:562
344
  msgid "Reply-To Email Address"
345
  msgstr ""
346
 
347
+ #: includes/MultipleLocations.class.php:562 includes/Settings.class.php:563
348
  msgid ""
349
  "The email address which should appear in the Reply-To field of a user "
350
  "notification email."
351
  msgstr ""
352
 
353
+ #: includes/MultipleLocations.class.php:569
354
  msgid "Admin Notification Email Address"
355
  msgstr ""
356
 
357
+ #: includes/MultipleLocations.class.php:573
358
  msgid ""
359
  "The email address where admin notifications for bookings at this location "
360
  "should be sent."
361
  msgstr ""
362
 
363
+ #: includes/MultipleLocations.class.php:682
364
  msgid "Location for which this booking was made."
365
  msgstr ""
366
 
1180
  msgid "Closed"
1181
  msgstr ""
1182
 
1183
+ #: includes/MultipleLocations.class.php:103
1184
  msgctxt "Name for grouping bookings"
1185
  msgid "Location"
1186
  msgstr ""
package.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "name": "restaurant-reservations",
3
  "description": "Accept restaurant reservations and bookings online.",
4
- "version": "1.7",
5
  "author": {
6
  "name": "Theme of the Crop",
7
  "url": "https://themeofthecrop.com"
1
  {
2
  "name": "restaurant-reservations",
3
  "description": "Accept restaurant reservations and bookings online.",
4
+ "version": "1.7.1",
5
  "author": {
6
  "name": "Theme of the Crop",
7
  "url": "https://themeofthecrop.com"
readme.md CHANGED
@@ -7,11 +7,11 @@ Plugin URL: https://themeofthecrop.com
7
  <br/>
8
  Requires at Least: 4.4
9
  <br/>
10
- Tested Up To: 4.6
11
  <br/>
12
  Tags: restaurant, reservations, bookings, table bookings, restaurant reservation, table reservation
13
  <br/>
14
- Stable tag: 1.7
15
  <br/>
16
  License: GPLv2 or later
17
  <br/>
@@ -39,7 +39,7 @@ Accept restaurant reservations and table bookings online. Quickly confirm or rej
39
 
40
  ## How to use
41
 
42
- Read the [User Guide](http://doc.themeofthecrop.com/plugins/restaurant-reservations/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations) for quicks tips on how to get started taking reservations.
43
 
44
  ### Addons
45
  [Custom Fields for Restaurant Reservations](https://themeofthecrop.com/plugins/custom-fields-restaurant-reservations/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations) - Add custom fields and edit your booking form with ease.
@@ -125,6 +125,11 @@ Find answers to even more questions in the [FAQ](http://doc.themeofthecrop.com/p
125
 
126
  ## Changelog
127
 
 
 
 
 
 
128
  #### 1.7 (2016-12-05)
129
  * Add: Allow customer banning by email and IP address
130
  * Add: HTML5 required and aria-required attributes where appropriate
@@ -323,6 +328,9 @@ Find answers to even more questions in the [FAQ](http://doc.themeofthecrop.com/p
323
 
324
  ## Upgrade Notice
325
 
 
 
 
326
  #### 1.7
327
  This update adds new features for banning bookings from no-shows and preventing blocked times from appearing in the time picker. New options for min party size and same-day bookings have been added. Bookings Managers can now edit bookings in the past.
328
 
7
  <br/>
8
  Requires at Least: 4.4
9
  <br/>
10
+ Tested Up To: 4.7
11
  <br/>
12
  Tags: restaurant, reservations, bookings, table bookings, restaurant reservation, table reservation
13
  <br/>
14
+ Stable tag: 1.7.1
15
  <br/>
16
  License: GPLv2 or later
17
  <br/>
39
 
40
  ## How to use
41
 
42
+ Read the [User Guide](http://doc.themeofthecrop.com/plugins/restaurant-reservations/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations) for quick tips on how to get started taking reservations.
43
 
44
  ### Addons
45
  [Custom Fields for Restaurant Reservations](https://themeofthecrop.com/plugins/custom-fields-restaurant-reservations/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations) - Add custom fields and edit your booking form with ease.
125
 
126
  ## Changelog
127
 
128
+ #### 1.7.1 (2016-12-14)
129
+ * Fix: Submitted by date and time in the bookings list
130
+ * Fix: Fatal error when creating a new location with the Business Profile plugin
131
+ * Fix: Remove or archive unexpected "Auto Draft" that was created in some circumstances
132
+
133
  #### 1.7 (2016-12-05)
134
  * Add: Allow customer banning by email and IP address
135
  * Add: HTML5 required and aria-required attributes where appropriate
328
 
329
  ## Upgrade Notice
330
 
331
+ #### 1.7.1
332
+ This update fixes a critical bug introduced in v1.7 if you use bookings with the multi-location features of Business Profile. You are encouraged to update as soon as possible.
333
+
334
  #### 1.7
335
  This update adds new features for banning bookings from no-shows and preventing blocked times from appearing in the time picker. New options for min party size and same-day bookings have been added. Bookings Managers can now edit bookings in the past.
336
 
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.7
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.7' );
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.7.1
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.7.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__ ) );