Restaurant Reservations - Version 1.7.6

Version Description

Download this release

Release Info

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

Code changes from version 1.7.5 to 1.7.6

assets/img/theme-good-ol-wine.jpg ADDED
Binary file
assets/img/theme-healthy-living.jpg ADDED
Binary file
assets/img/theme-plate.jpg ADDED
Binary file
includes/Addons.class.php CHANGED
@@ -129,7 +129,7 @@ class rtbAddons {
129
  <?php esc_html_e( 'View Theme', 'restaurant-reservations' ); ?>
130
  </a>
131
  <span class="rtb-by">
132
- by <a href="https://themeofthecrop.com/">Theme of the Crop</a>
133
  </span>
134
  </div>
135
  </div>
@@ -148,7 +148,7 @@ class rtbAddons {
148
  <?php esc_html_e( 'View Theme', 'restaurant-reservations' ); ?>
149
  </a>
150
  <span class="rtb-by">
151
- by <a href="https://themeofthecrop.com/">Theme of the Crop</a>
152
  </span>
153
  </div>
154
  </div>
@@ -167,7 +167,7 @@ class rtbAddons {
167
  <?php esc_html_e( 'View Theme', 'restaurant-reservations' ); ?>
168
  </a>
169
  <span class="rtb-by">
170
- by <a href="https://themeofthecrop.com/">Theme of the Crop</a>
171
  </span>
172
  </div>
173
  </div>
@@ -186,7 +186,26 @@ class rtbAddons {
186
  <?php esc_html_e( 'View Theme', 'restaurant-reservations' ); ?>
187
  </a>
188
  <span class="rtb-by">
189
- by <a href="https://themeofthecrop.com/">Theme of the Crop</a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  </span>
191
  </div>
192
  </div>
@@ -267,6 +286,44 @@ class rtbAddons {
267
  </div>
268
  </div>
269
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
270
  </div>
271
  <?php do_action( 'rtb_addons_post' ); ?>
272
  </div>
129
  <?php esc_html_e( 'View Theme', 'restaurant-reservations' ); ?>
130
  </a>
131
  <span class="rtb-by">
132
+ by <a href="https://themeofthecrop.com/<?php echo $url_params; ?>">Theme of the Crop</a>
133
  </span>
134
  </div>
135
  </div>
148
  <?php esc_html_e( 'View Theme', 'restaurant-reservations' ); ?>
149
  </a>
150
  <span class="rtb-by">
151
+ by <a href="https://themeofthecrop.com/<?php echo $url_params; ?>">Theme of the Crop</a>
152
  </span>
153
  </div>
154
  </div>
167
  <?php esc_html_e( 'View Theme', 'restaurant-reservations' ); ?>
168
  </a>
169
  <span class="rtb-by">
170
+ by <a href="https://themeofthecrop.com/<?php echo $url_params; ?>">Theme of the Crop</a>
171
  </span>
172
  </div>
173
  </div>
186
  <?php esc_html_e( 'View Theme', 'restaurant-reservations' ); ?>
187
  </a>
188
  <span class="rtb-by">
189
+ by <a href="https://themeofthecrop.com/<?php echo $url_params; ?>">Theme of the Crop</a>
190
+ </span>
191
+ </div>
192
+ </div>
193
+ </div>
194
+ <div class="addon addon-themes">
195
+ <a href="https://themebeans.com/themes/plate?utm_source=totc_addons_plate&utm_medium=banner&utm_campaign=TOTC%20Addons%20Link%2C%20Plate">
196
+ <img src="<?php echo RTB_PLUGIN_URL . '/assets/img/theme-plate.jpg'; ?>">
197
+ </a>
198
+ <h3><?php esc_html_e( 'Plate', 'restaurant-reservations' ); ?></h3>
199
+ <div class="details">
200
+ <div class="description">
201
+ <?php esc_html_e( 'A delightfully beautiful WordPress theme designed to help you build a stunning restaurant website.', 'restaurant-reservations' ); ?>
202
+ </div>
203
+ <div class="action">
204
+ <a href="https://themebeans.com/themes/plate?utm_source=totc_addons_plate&utm_medium=banner&utm_campaign=TOTC%20Addons%20Link%2C%20Plate" class="button" target="_blank">
205
+ <?php esc_html_e( 'View Theme', 'restaurant-reservations' ); ?>
206
+ </a>
207
+ <span class="rtb-by">
208
+ by <a href="https://themebeans.com?utm_source=totc_addons_plate&utm_medium=banner&utm_campaign=TOTC%20Addons%20Link%2C%20Plate">ThemeBeans</a>
209
  </span>
210
  </div>
211
  </div>
286
  </div>
287
  </div>
288
  </div>
289
+ <div class="addon addon-themes">
290
+ <a href="http://www.anarieldesign.com/themes/wine-and-winery-wordpress-theme/?utm_source=Theme%20of%20the%20Crop&utm_medium=Addon%20List&utm_campaign=Restaurant%20Reservations">
291
+ <img src="<?php echo RTB_PLUGIN_URL . '/assets/img/theme-good-ol-wine.jpg'; ?>">
292
+ </a>
293
+ <h3><?php esc_html_e( "Good Ol' Wine", 'restaurant-reservations' ); ?></h3>
294
+ <div class="details">
295
+ <div class="description">
296
+ <?php esc_html_e( 'A beautiful responsive theme that is suitable for wine enthusiasts, wineries and wine bars.', 'restaurant-reservations' ); ?>
297
+ </div>
298
+ <div class="action">
299
+ <a href="http://www.anarieldesign.com/themes/wine-and-winery-wordpress-theme/?utm_source=Theme%20of%20the%20Crop&utm_medium=Addon%20List&utm_campaign=Restaurant%20Reservations" class="button" target="_blank">
300
+ <?php esc_html_e( 'View Theme', 'restaurant-reservations' ); ?>
301
+ </a>
302
+ <span class="rtb-by">
303
+ by <a href="http://www.anarieldesign.com/">Anariel Design</a>
304
+ </span>
305
+ </div>
306
+ </div>
307
+ </div>
308
+ <div class="addon addon-themes">
309
+ <a href="http://www.anarieldesign.com/themes/simple-and-fresh-blogging-theme/?utm_source=Theme%20of%20the%20Crop&utm_medium=Addon%20List&utm_campaign=Restaurant%20Reservations">
310
+ <img src="<?php echo RTB_PLUGIN_URL . '/assets/img/theme-healthy-living.jpg'; ?>">
311
+ </a>
312
+ <h3><?php esc_html_e( 'Healthy Living', 'restaurant-reservations' ); ?></h3>
313
+ <div class="details">
314
+ <div class="description">
315
+ <?php esc_html_e( 'A modern, clean healthy food blogging theme that can be used for a restaurant as well.', 'restaurant-reservations' ); ?>
316
+ </div>
317
+ <div class="action">
318
+ <a href="http://www.anarieldesign.com/themes/simple-and-fresh-blogging-theme/?utm_source=Theme%20of%20the%20Crop&utm_medium=Addon%20List&utm_campaign=Restaurant%20Reservations" class="button" target="_blank">
319
+ <?php esc_html_e( 'View Theme', 'restaurant-reservations' ); ?>
320
+ </a>
321
+ <span class="rtb-by">
322
+ by <a href="http://www.anarieldesign.com/">Anariel Design</a>
323
+ </span>
324
+ </div>
325
+ </div>
326
+ </div>
327
  </div>
328
  <?php do_action( 'rtb_addons_post' ); ?>
329
  </div>
includes/AdminBookings.class.php CHANGED
@@ -19,7 +19,7 @@ class rtbAdminBookings {
19
  * @see WP_List_table.BookingsTable.class.php
20
  * @since 1.6
21
  */
22
- public $booking_table;
23
 
24
  public function __construct() {
25
 
@@ -528,7 +528,16 @@ class rtbAdminBookings {
528
 
529
  // Add an ID if we're updating the post
530
  if ( !empty( $_POST['ID'] ) ) {
531
- $rtb_controller->request->ID = (int) $_POST['ID'];
 
 
 
 
 
 
 
 
 
532
  }
533
 
534
  // Disable notifications
19
  * @see WP_List_table.BookingsTable.class.php
20
  * @since 1.6
21
  */
22
+ public $bookings_table;
23
 
24
  public function __construct() {
25
 
528
 
529
  // Add an ID if we're updating the post
530
  if ( !empty( $_POST['ID'] ) ) {
531
+ $result = $rtb_controller->request->load_post((int) $_POST['ID']);
532
+ if (!$result) {
533
+ wp_send_json_error(
534
+ array(
535
+ 'error' => 'no_booking_found',
536
+ 'booking' => $rtb_controller->request,
537
+ 'fields' => $this->print_booking_form_fields(),
538
+ )
539
+ );
540
+ }
541
  }
542
 
543
  // Disable notifications
includes/integrations/business-profile.php CHANGED
@@ -186,7 +186,7 @@ add_filter( 'bp_schema_types', 'rtb_bp_schema_types' );
186
  function rtb_bp_food_schema_types() {
187
 
188
  return array(
189
- 'Baker' => __( '--- Baker', 'restaurant-reservations' ),
190
  'BarOrPub' => __( '--- Bar or Pub', 'restaurant-reservations' ),
191
  'Brewery' => __( '--- Brewery', 'restaurant-reservations' ),
192
  'CafeOrCoffeeShop' => __( '--- Cafe or Coffee Shop', 'restaurant-reservations' ),
186
  function rtb_bp_food_schema_types() {
187
 
188
  return array(
189
+ 'Bakery' => __( '--- Bakery', 'restaurant-reservations' ),
190
  'BarOrPub' => __( '--- Bar or Pub', 'restaurant-reservations' ),
191
  'Brewery' => __( '--- Brewery', 'restaurant-reservations' ),
192
  'CafeOrCoffeeShop' => __( '--- Cafe or Coffee Shop', 'restaurant-reservations' ),
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.5\n"
6
  "Report-Msgid-Bugs-To: https://themeofthecrop.com\n"
7
- "POT-Creation-Date: 2017-03-31 14:09:42+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -77,6 +77,8 @@ msgstr ""
77
  #: includes/Addons.class.php:167 includes/Addons.class.php:186
78
  #: includes/Addons.class.php:205 includes/Addons.class.php:224
79
  #: includes/Addons.class.php:243 includes/Addons.class.php:262
 
 
80
  msgid "View Theme"
81
  msgstr ""
82
 
@@ -111,45 +113,75 @@ msgid ""
111
  msgstr ""
112
 
113
  #: includes/Addons.class.php:198
114
- msgid "Auberge"
115
  msgstr ""
116
 
117
  #: includes/Addons.class.php:201
118
  msgid ""
 
 
 
 
 
 
 
 
 
 
119
  "Display a menu of your restaurant, café or bar stylishly with this free "
120
  "mobile-friendly WordPress theme."
121
  msgstr ""
122
 
123
- #: includes/Addons.class.php:217
124
  msgid "Liber"
125
  msgstr ""
126
 
127
- #: includes/Addons.class.php:220
128
  msgid ""
129
  "A responsive theme optimized for restaurants and bars supporting features "
130
  "these websites need."
131
  msgstr ""
132
 
133
- #: includes/Addons.class.php:236
134
  msgid "Brasserie"
135
  msgstr ""
136
 
137
- #: includes/Addons.class.php:239
138
  msgid ""
139
  "A delightfully simple to use and beautifully crafted free theme for any "
140
  "food establishment."
141
  msgstr ""
142
 
143
- #: includes/Addons.class.php:255
144
  msgid "Veggie"
145
  msgstr ""
146
 
147
- #: includes/Addons.class.php:258
148
  msgid ""
149
  "A food blogging and restaurant theme with modern, easy-to-read typography "
150
  "and minimalist design."
151
  msgstr ""
152
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  #: includes/AdminBookings.class.php:86
154
  msgid "Restaurant Bookings"
155
  msgstr ""
@@ -242,29 +274,29 @@ msgstr ""
242
  msgid "The booking could not be retrieved. Please reload the page and try again."
243
  msgstr ""
244
 
245
- #: includes/AdminBookings.class.php:581
246
  msgid ""
247
  "Unable to trash this post. Please try again. If you continue to have "
248
  "trouble, please refresh the page."
249
  msgstr ""
250
 
251
- #: includes/AdminBookings.class.php:623
252
  msgid "Please enter a message before sending the email."
253
  msgstr ""
254
 
255
- #: includes/AdminBookings.class.php:632
256
  msgid "The email could not be sent because some critical information was missing."
257
  msgstr ""
258
 
259
- #: includes/AdminBookings.class.php:644
260
  msgid "There was an error loading the booking and the email was not sent."
261
  msgstr ""
262
 
263
- #: includes/AdminBookings.class.php:684
264
  msgid "You must select at least one column to display."
265
  msgstr ""
266
 
267
- #: includes/AdminBookings.class.php:740
268
  msgid "No IP or email address could be found for this ban request."
269
  msgstr ""
270
 
@@ -1205,7 +1237,7 @@ msgid "Show book a table link"
1205
  msgstr ""
1206
 
1207
  #: includes/integrations/business-profile.php:189
1208
- msgid "--- Baker"
1209
  msgstr ""
1210
 
1211
  #: includes/integrations/business-profile.php:190
@@ -1288,7 +1320,7 @@ msgctxt "Title of addons page in the admin menu"
1288
  msgid "Addons"
1289
  msgstr ""
1290
 
1291
- #: includes/Addons.class.php:290
1292
  msgctxt "restaurant-reservations"
1293
  msgid ""
1294
  "Find out when new addons are available by subscribing to the %smonthly "
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.6\n"
6
  "Report-Msgid-Bugs-To: https://themeofthecrop.com\n"
7
+ "POT-Creation-Date: 2017-05-15 11:21:11+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
77
  #: includes/Addons.class.php:167 includes/Addons.class.php:186
78
  #: includes/Addons.class.php:205 includes/Addons.class.php:224
79
  #: includes/Addons.class.php:243 includes/Addons.class.php:262
80
+ #: includes/Addons.class.php:281 includes/Addons.class.php:300
81
+ #: includes/Addons.class.php:319
82
  msgid "View Theme"
83
  msgstr ""
84
 
113
  msgstr ""
114
 
115
  #: includes/Addons.class.php:198
116
+ msgid "Plate"
117
  msgstr ""
118
 
119
  #: includes/Addons.class.php:201
120
  msgid ""
121
+ "A delightfully beautiful WordPress theme designed to help you build a "
122
+ "stunning restaurant website."
123
+ msgstr ""
124
+
125
+ #: includes/Addons.class.php:217
126
+ msgid "Auberge"
127
+ msgstr ""
128
+
129
+ #: includes/Addons.class.php:220
130
+ msgid ""
131
  "Display a menu of your restaurant, café or bar stylishly with this free "
132
  "mobile-friendly WordPress theme."
133
  msgstr ""
134
 
135
+ #: includes/Addons.class.php:236
136
  msgid "Liber"
137
  msgstr ""
138
 
139
+ #: includes/Addons.class.php:239
140
  msgid ""
141
  "A responsive theme optimized for restaurants and bars supporting features "
142
  "these websites need."
143
  msgstr ""
144
 
145
+ #: includes/Addons.class.php:255
146
  msgid "Brasserie"
147
  msgstr ""
148
 
149
+ #: includes/Addons.class.php:258
150
  msgid ""
151
  "A delightfully simple to use and beautifully crafted free theme for any "
152
  "food establishment."
153
  msgstr ""
154
 
155
+ #: includes/Addons.class.php:274
156
  msgid "Veggie"
157
  msgstr ""
158
 
159
+ #: includes/Addons.class.php:277
160
  msgid ""
161
  "A food blogging and restaurant theme with modern, easy-to-read typography "
162
  "and minimalist design."
163
  msgstr ""
164
 
165
+ #: includes/Addons.class.php:293
166
+ msgid "Good Ol' Wine"
167
+ msgstr ""
168
+
169
+ #: includes/Addons.class.php:296
170
+ msgid ""
171
+ "A beautiful responsive theme that is suitable for wine enthusiasts, "
172
+ "wineries and wine bars."
173
+ msgstr ""
174
+
175
+ #: includes/Addons.class.php:312
176
+ msgid "Healthy Living"
177
+ msgstr ""
178
+
179
+ #: includes/Addons.class.php:315
180
+ msgid ""
181
+ "A modern, clean healthy food blogging theme that can be used for a "
182
+ "restaurant as well."
183
+ msgstr ""
184
+
185
  #: includes/AdminBookings.class.php:86
186
  msgid "Restaurant Bookings"
187
  msgstr ""
274
  msgid "The booking could not be retrieved. Please reload the page and try again."
275
  msgstr ""
276
 
277
+ #: includes/AdminBookings.class.php:590
278
  msgid ""
279
  "Unable to trash this post. Please try again. If you continue to have "
280
  "trouble, please refresh the page."
281
  msgstr ""
282
 
283
+ #: includes/AdminBookings.class.php:632
284
  msgid "Please enter a message before sending the email."
285
  msgstr ""
286
 
287
+ #: includes/AdminBookings.class.php:641
288
  msgid "The email could not be sent because some critical information was missing."
289
  msgstr ""
290
 
291
+ #: includes/AdminBookings.class.php:653
292
  msgid "There was an error loading the booking and the email was not sent."
293
  msgstr ""
294
 
295
+ #: includes/AdminBookings.class.php:693
296
  msgid "You must select at least one column to display."
297
  msgstr ""
298
 
299
+ #: includes/AdminBookings.class.php:749
300
  msgid "No IP or email address could be found for this ban request."
301
  msgstr ""
302
 
1237
  msgstr ""
1238
 
1239
  #: includes/integrations/business-profile.php:189
1240
+ msgid "--- Bakery"
1241
  msgstr ""
1242
 
1243
  #: includes/integrations/business-profile.php:190
1320
  msgid "Addons"
1321
  msgstr ""
1322
 
1323
+ #: includes/Addons.class.php:347
1324
  msgctxt "restaurant-reservations"
1325
  msgid ""
1326
  "Find out when new addons are available by subscribing to the %smonthly "
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",
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.6",
5
  "author": {
6
  "name": "Theme of the Crop",
7
  "url": "https://themeofthecrop.com"
readme.md CHANGED
@@ -3,9 +3,9 @@ Contributors: NateWr
3
  Author URI: https://github.com/NateWr
4
  Plugin URL: https://themeofthecrop.com
5
  Requires at Least: 4.4
6
- Tested Up To: 4.7.3
7
  Tags: restaurant, reservations, bookings, table bookings, restaurant reservation, table reservation
8
- Stable tag: 1.7.5
9
  License: GPLv2 or later
10
  Donate link: https://themeofthecrop.com
11
 
@@ -119,6 +119,10 @@ Find answers to even more questions in the [FAQ](http://doc.themeofthecrop.com/p
119
 
120
  ## Changelog
121
 
 
 
 
 
122
  #### 1.7.5 (2017-03-31)
123
  * Add: #104 Show count of upcoming pending bookings in admin nav menu
124
  * Add: #44 Reject invalid email addresses in booking requests
3
  Author URI: https://github.com/NateWr
4
  Plugin URL: https://themeofthecrop.com
5
  Requires at Least: 4.4
6
+ Tested Up To: 4.9.1
7
  Tags: restaurant, reservations, bookings, table bookings, restaurant reservation, table reservation
8
+ Stable tag: 1.7.6
9
  License: GPLv2 or later
10
  Donate link: https://themeofthecrop.com
11
 
119
 
120
  ## Changelog
121
 
122
+ #### 1.7.6 (2017-05-15)
123
+ * Fix: Prevent IP address from being modified after initial submission
124
+ * Fix: Schema type for Bakery used when integrating with Business Profile
125
+
126
  #### 1.7.5 (2017-03-31)
127
  * Add: #104 Show count of upcoming pending bookings in admin nav menu
128
  * Add: #44 Reject invalid email addresses in booking requests
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.5
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.5' );
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.6
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.6' );
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__ ) );