Restaurant Reservations - Version 2.4.4

Version Description

Download this release

Release Info

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

Code changes from version 2.4.3 to 2.4.4

Files changed (43) hide show
  1. includes/Ajax.class.php +1 -2
  2. includes/Cron.class.php +14 -12
  3. includes/Dashboard.class.php +1 -1
  4. includes/Migration.class.php +3 -1
  5. includes/Permissions.class.php +14 -4
  6. includes/Settings.class.php +13 -14
  7. lib/simple-admin-pages/classes/AdminPage.Menu.class.php +1 -1
  8. lib/simple-admin-pages/classes/AdminPage.Submenu.class.php +1 -1
  9. lib/simple-admin-pages/classes/AdminPage.Themes.class.php +1 -1
  10. lib/simple-admin-pages/classes/AdminPage.class.php +1 -1
  11. lib/simple-admin-pages/classes/AdminPageSection.class.php +1 -1
  12. lib/simple-admin-pages/classes/AdminPageSetting.Address.class.php +1 -1
  13. lib/simple-admin-pages/classes/AdminPageSetting.Checkbox.class.php +1 -1
  14. lib/simple-admin-pages/classes/AdminPageSetting.ColorPicker.class.php +1 -1
  15. lib/simple-admin-pages/classes/AdminPageSetting.Count.class.php +1 -1
  16. lib/simple-admin-pages/classes/AdminPageSetting.Editor.class.php +1 -1
  17. lib/simple-admin-pages/classes/AdminPageSetting.FileUpload.class.php +1 -1
  18. lib/simple-admin-pages/classes/AdminPageSetting.HTML.class.php +1 -1
  19. lib/simple-admin-pages/classes/AdminPageSetting.Image.class.php +1 -1
  20. lib/simple-admin-pages/classes/AdminPageSetting.InfiniteTable.class.php +1 -1
  21. lib/simple-admin-pages/classes/AdminPageSetting.McApiKey.class.php +1 -1
  22. lib/simple-admin-pages/classes/AdminPageSetting.McListMerge.class.php +1 -1
  23. lib/simple-admin-pages/classes/AdminPageSetting.Number.class.php +1 -1
  24. lib/simple-admin-pages/classes/AdminPageSetting.OpeningHours.class.php +1 -1
  25. lib/simple-admin-pages/classes/AdminPageSetting.Ordering.class.php +1 -1
  26. lib/simple-admin-pages/classes/AdminPageSetting.Radio.class.php +1 -1
  27. lib/simple-admin-pages/classes/AdminPageSetting.Scheduler.class.php +1 -1
  28. lib/simple-admin-pages/classes/AdminPageSetting.Select.class.php +1 -1
  29. lib/simple-admin-pages/classes/AdminPageSetting.SelectMenu.class.php +1 -1
  30. lib/simple-admin-pages/classes/AdminPageSetting.SelectPost.class.php +1 -1
  31. lib/simple-admin-pages/classes/AdminPageSetting.SelectTaxonomy.class.php +1 -1
  32. lib/simple-admin-pages/classes/AdminPageSetting.Text.class.php +1 -1
  33. lib/simple-admin-pages/classes/AdminPageSetting.Textarea.class.php +1 -1
  34. lib/simple-admin-pages/classes/AdminPageSetting.Time.class.php +1 -1
  35. lib/simple-admin-pages/classes/AdminPageSetting.Toggle.class.php +1 -1
  36. lib/simple-admin-pages/classes/AdminPageSetting.WarningTip.class.php +1 -1
  37. lib/simple-admin-pages/classes/AdminPageSetting.class.php +6 -4
  38. lib/simple-admin-pages/classes/Library.class.php +4 -4
  39. lib/simple-admin-pages/css/admin-settings.css +4 -0
  40. lib/simple-admin-pages/css/infinite_table.css +0 -3
  41. lib/simple-admin-pages/js/admin-settings.js +10 -6
  42. readme.txt +7 -1
  43. restaurant-reservations.php +25 -2
includes/Ajax.class.php CHANGED
@@ -255,7 +255,6 @@ if ( !class_exists( 'rtbAJAX' ) ) {
255
  // If the restaurant is closed that day
256
  // If Enable Max Reservation not set
257
  if ( ! $hours || ! $max_reservations_enabled ) {
258
-
259
  $finalize_response( $hours );
260
  }
261
 
@@ -473,7 +472,7 @@ if ( !class_exists( 'rtbAJAX' ) ) {
473
  ) {
474
 
475
  // Closed all day
476
- if ( $closing['time'] == 'undefined' ) {
477
  return false;
478
  }
479
 
255
  // If the restaurant is closed that day
256
  // If Enable Max Reservation not set
257
  if ( ! $hours || ! $max_reservations_enabled ) {
 
258
  $finalize_response( $hours );
259
  }
260
 
472
  ) {
473
 
474
  // Closed all day
475
+ if ( ! isset( $closing['time'] ) || $closing['time'] == 'undefined' ) {
476
  return false;
477
  }
478
 
includes/Cron.class.php CHANGED
@@ -134,13 +134,13 @@ class rtbCron {
134
  $notification->prepare_notification();
135
 
136
  do_action( 'rtb_send_notification_before', $notification );
137
- $sent = $notification->send_notification();
138
- do_action( 'rtb_send_notification_after', $notification );
139
 
140
- if ( $sent ) {
141
- $booking->reminder_sent = true;
142
- $booking->insert_post_meta();
143
- }
144
  }
145
  }
146
 
@@ -189,19 +189,21 @@ class rtbCron {
189
  global $rtb_controller;
190
 
191
  $time_interval = $this->get_time_interval( 'time-reminder-user' );
 
192
 
193
- $after_datetime = new DateTime( 'now', wp_timezone() );
194
- $before_datetime = new DateTime( 'now', wp_timezone() );
 
195
 
196
- $after_datetime->setTimestamp( time() - max( $time_interval, 6*3600 ) );
197
- $before_datetime->setTimestamp( time() + $time_interval );
198
 
199
  $args = array(
200
  'post_status' => 'confirmed,',
201
  'post_count' => -1,
202
  'date_query' => array(
203
- 'before' => $before_datetime->format( 'Y-m-d H:i:s' ),
204
- 'after' => $after_datetime->format( 'Y-m-d H:i:s' ),
205
  'column' => 'post_date'
206
  )
207
  );
134
  $notification->prepare_notification();
135
 
136
  do_action( 'rtb_send_notification_before', $notification );
137
+ $sent = $notification->send_notification();
138
+ do_action( 'rtb_send_notification_after', $notification );
139
 
140
+ if ( $sent ) {
141
+ $booking->reminder_sent = true;
142
+ $booking->insert_post_meta();
143
+ }
144
  }
145
  }
146
 
189
  global $rtb_controller;
190
 
191
  $time_interval = $this->get_time_interval( 'time-reminder-user' );
192
+ $time_interval = new DateInterval( "PT{$time_interval}S" );
193
 
194
+ $reminder_time_window_start = new DateTime( 'now', wp_timezone() );
195
+ $one_hour = new DateInterval( "PT1H" );
196
+ $reminder_time_window_start->sub( $one_hour );
197
 
198
+ $reminder_time_window_end = new DateTime( 'now', wp_timezone() );
199
+ $reminder_time_window_end->add( $time_interval );
200
 
201
  $args = array(
202
  'post_status' => 'confirmed,',
203
  'post_count' => -1,
204
  'date_query' => array(
205
+ 'after' => $reminder_time_window_start->format( 'Y-m-d H:i:s' ),
206
+ 'before' => $reminder_time_window_end->format( 'Y-m-d H:i:s' ),
207
  'column' => 'post_date'
208
  )
209
  );
includes/Dashboard.class.php CHANGED
@@ -173,7 +173,7 @@ class rtbDashboard {
173
  </div>
174
  </div>
175
 
176
- <?php /*<div class="rtb-dashboard-new-widget-box <?php echo ( ($hideReview != 'Yes' and $Ask_Review_Date < time()) ? 'ewd-widget-box-two-thirds' : 'ewd-widget-box-full' ); ?>">
177
  <div class="rtb-dashboard-new-widget-box-top">What People Are Saying</div>
178
  <div class="rtb-dashboard-new-widget-box-bottom">
179
  <ul class="rtb-dashboard-testimonials">
173
  </div>
174
  </div>
175
 
176
+ <?php /*<div class="rtb-dashboard-new-widget-box ewd-widget-box-full">
177
  <div class="rtb-dashboard-new-widget-box-top">What People Are Saying</div>
178
  <div class="rtb-dashboard-new-widget-box-bottom">
179
  <ul class="rtb-dashboard-testimonials">
includes/Migration.class.php CHANGED
@@ -62,7 +62,9 @@ class rtbMigrationManager {
62
  $settings_page = 'rtb-settings';
63
  $options = get_option( $settings_page );
64
 
65
- if( is_array( $options ) && ! is_array( $options['rtb-payment-gateway'] ) && version_compare( RTB_VERSION, '2.2.11', '>' ) ) {
 
 
66
  $options['rtb-payment-gateway'] = [ $options['rtb-payment-gateway'] ];
67
 
68
  update_option( $settings_page, $options );
62
  $settings_page = 'rtb-settings';
63
  $options = get_option( $settings_page );
64
 
65
+ if ( ! is_array( $options ) || ! array_key_exists( 'rtb-payment-gateway', $options ) ) { return; }
66
+
67
+ if( ! is_array( $options['rtb-payment-gateway'] ) && version_compare( RTB_VERSION, '2.2.11', '>' ) ) {
68
  $options['rtb-payment-gateway'] = [ $options['rtb-payment-gateway'] ];
69
 
70
  update_option( $settings_page, $options );
includes/Permissions.class.php CHANGED
@@ -33,7 +33,14 @@ class rtbPermissions {
33
  public function set_permissions() {
34
  global $rtb_controller;
35
 
36
- if ( get_option( "rtb-permission-level" ) >= 2 ) { return; }
 
 
 
 
 
 
 
37
 
38
  $cffrtb = $rtb_controller->settings->get_setting( 'license-cffrtb' );
39
  $ebfrtb = $rtb_controller->settings->get_setting( 'license-ebfrtb' );
@@ -43,13 +50,16 @@ class rtbPermissions {
43
 
44
  $this->permission_level = ( ( ( is_array($cffrtb) and array_key_exists('status', $cffrtb) ) or ( is_array($ebfrtb) and array_key_exists('status', $ebfrtb) ) or ( is_array($etfrtb) and array_key_exists('status', $etfrtb) ) or get_option("mcfrtb_license_key") ) ? 2 : ( ! empty($bookings_objects) ? 1 : 0 ) );
45
 
46
- update_option( "rtb-permission-level", $this->permission_level );
47
  }
48
 
49
  public function get_permission_level() {
50
- $this->permission_level = get_option( "rtb-permission-level" );
51
 
52
- if ( ! $this->permission_level ) { $this->set_permissions(); }
 
 
 
 
53
  }
54
 
55
  public function check_permission( $permission_type = '' ) {
33
  public function set_permissions() {
34
  global $rtb_controller;
35
 
36
+ if ( is_array( get_option( 'rtb-permission-level' ) ) ) { return; }
37
+
38
+ if ( ! empty( get_option( 'rtb-permission-level' ) ) ) {
39
+
40
+ update_option( 'rtb-permission-level', array( get_option( 'rtb-permission-level' ) ) );
41
+
42
+ return;
43
+ }
44
 
45
  $cffrtb = $rtb_controller->settings->get_setting( 'license-cffrtb' );
46
  $ebfrtb = $rtb_controller->settings->get_setting( 'license-ebfrtb' );
50
 
51
  $this->permission_level = ( ( ( is_array($cffrtb) and array_key_exists('status', $cffrtb) ) or ( is_array($ebfrtb) and array_key_exists('status', $ebfrtb) ) or ( is_array($etfrtb) and array_key_exists('status', $etfrtb) ) or get_option("mcfrtb_license_key") ) ? 2 : ( ! empty($bookings_objects) ? 1 : 0 ) );
52
 
53
+ update_option( "rtb-permission-level", array( $this->permission_level ) );
54
  }
55
 
56
  public function get_permission_level() {
 
57
 
58
+ if ( ! is_array( get_option( 'rtb-permission-level' ) ) ) { $this->set_permissions(); }
59
+
60
+ $permissions_array = get_option( 'rtb-permission-level' );
61
+
62
+ $this->permission_level = is_array( $permissions_array ) ? reset( $permissions_array ) : $permissions_array;
63
  }
64
 
65
  public function check_permission( $permission_type = '' ) {
includes/Settings.class.php CHANGED
@@ -757,7 +757,7 @@ If you were not the one to cancel this booking, please contact us.
757
  require_once( RTB_PLUGIN_DIR . '/lib/simple-admin-pages/simple-admin-pages.php' );
758
  $sap = sap_initialize_library(
759
  $args = array(
760
- 'version' => '2.6.0',
761
  'theme' => 'blue',
762
  'lib_url' => RTB_PLUGIN_URL . '/lib/simple-admin-pages/',
763
  )
@@ -812,7 +812,7 @@ If you were not the one to cancel this booking, please contact us.
812
  'delete' => _x( 'Delete rule', 'Delete a scheduling rule', 'restaurant-reservations' ),
813
  'delete_schedule' => __( 'Delete scheduling rule', 'restaurant-reservations' ),
814
  'never' => _x( 'Never', 'Brief default description of a scheduling rule when no weekdays or weeks are included in the rule', 'restaurant-reservations' ),
815
- 'weekly_always' => _x( 'Every day', 'Brief default description of a scheduling rule when all the weekdays/weeks are included in the rule', 'restaurant-reservations' ),
816
  'monthly_weekdays' => _x( '%s on the %s week of the month', 'Brief default description of a scheduling rule when some weekdays are included on only some weeks of the month. %s should be left alone and will be replaced by a comma-separated list of days and weeks in the following format: M, T, W on the first, second week of the month', 'restaurant-reservations' ),
817
  'monthly_weeks' => _x( '%s week of the month', 'Brief default description of a scheduling rule when some weeks of the month are included but all or no weekdays are selected. %s should be left alone and will be replaced by a comma-separated list of weeks in the following format: First, second week of the month', 'restaurant-reservations' ),
818
  'all_day' => _x( 'All day', 'Brief default description of a scheduling rule when no times are set', 'restaurant-reservations' ),
@@ -1227,7 +1227,7 @@ If you were not the one to cancel this booking, please contact us.
1227
  array(
1228
  'id' => 'captcha-site-key',
1229
  'title' => __( 'Google Site Key', 'restaurant-reservations' ),
1230
- 'description' => __( 'The site key provided to you by Google', 'restaurant-reservations' )
1231
  )
1232
  );
1233
 
@@ -1238,7 +1238,7 @@ If you were not the one to cancel this booking, please contact us.
1238
  array(
1239
  'id' => 'captcha-secret-key',
1240
  'title' => __( 'Google Secret Key', 'restaurant-reservations' ),
1241
- 'description' => __( 'The secret key provided to you by Google', 'restaurant-reservations' )
1242
  )
1243
  );
1244
 
@@ -1588,7 +1588,7 @@ If you were not the one to cancel this booking, please contact us.
1588
  array(
1589
  'id' => 'require-table',
1590
  'title' => __( 'Require Table Selection', 'restaurant-reservations' ),
1591
- 'description' => __( 'Don\'t allow a reservation to be made without a valid table selected, even if all other booking criteria are met (acceptable party size, below max reservations/seats).', 'restaurant-reservations' )
1592
  )
1593
  );
1594
 
@@ -1623,7 +1623,7 @@ If you were not the one to cancel this booking, please contact us.
1623
  'label' => __('Schedule', 'restaurant-reservations' ),
1624
  'required' => true
1625
  )*/
1626
- )
1627
  )
1628
  );
1629
 
@@ -1664,7 +1664,7 @@ If you were not the one to cancel this booking, please contact us.
1664
  'label' => __('Combines With', 'restaurant-reservations' ),
1665
  'required' => false
1666
  )
1667
- )
1668
  )
1669
  );
1670
 
@@ -2236,7 +2236,7 @@ If you were not the one to cancel this booking, please contact us.
2236
  'id' => 'rtb-payment-gateway',
2237
  'title' => __( 'Payment Gateway', 'restaurant-reservations' ),
2238
  'description' => __( 'Which payment gateway should be used to accept deposits.', 'restaurant-reservations' ),
2239
- 'options' => $this->payment_gateway_options
2240
  )
2241
  );
2242
  $sap->add_setting(
@@ -2250,7 +2250,7 @@ If you were not the one to cancel this booking, please contact us.
2250
  'options' => array(
2251
  'reservation' => 'Per Reservation',
2252
  'guest' => 'Per Guest'
2253
- )
2254
  )
2255
  );
2256
  $sap->add_setting(
@@ -2260,7 +2260,7 @@ If you were not the one to cancel this booking, please contact us.
2260
  array(
2261
  'id' => 'rtb-deposit-amount',
2262
  'title' => __( 'Deposit Amount', 'restaurant-reservations' ),
2263
- 'description' => __( 'What deposit amount is required (either per reservation or per guest, depending on the setting above)? Minimum is $0.50 in most currencies.', 'restaurant-reservations' )
2264
  )
2265
  );
2266
  $sap->add_setting(
@@ -2272,7 +2272,7 @@ If you were not the one to cancel this booking, please contact us.
2272
  'title' => __( 'Currency', 'restaurant-reservations' ),
2273
  'description' => __( 'Select the currency you accept for your deposits.', 'restaurant-reservations' ),
2274
  'blank_option' => false,
2275
- 'options' => $this->currency_options
2276
  )
2277
  );
2278
  $sap->add_setting(
@@ -2288,7 +2288,7 @@ If you were not the one to cancel this booking, please contact us.
2288
  'time_based' => 'Specific Days/Times (selected below)',
2289
  'size_based' => 'Groups Over a Certain Size (selected below)'
2290
  ),
2291
- 'default' => $this->defaults['rtb-deposit-applicable']
2292
  )
2293
  );
2294
  $sap->add_setting(
@@ -2385,8 +2385,7 @@ If you were not the one to cancel this booking, please contact us.
2385
  array(
2386
  'id' => 'rtb-stripe-currency-symbol',
2387
  'title' => __( 'Stripe Currency Symbol', 'restaurant-reservations' ),
2388
- 'description' => __( 'The currency symbol you\'d like displayed before or after the required deposit amount.', 'restaurant-reservations' ),
2389
- 'placeholder' => $this->defaults['rtb-stripe-currency-symbol']
2390
  )
2391
  );
2392
  $sap->add_setting(
757
  require_once( RTB_PLUGIN_DIR . '/lib/simple-admin-pages/simple-admin-pages.php' );
758
  $sap = sap_initialize_library(
759
  $args = array(
760
+ 'version' => '2.6.1',
761
  'theme' => 'blue',
762
  'lib_url' => RTB_PLUGIN_URL . '/lib/simple-admin-pages/',
763
  )
812
  'delete' => _x( 'Delete rule', 'Delete a scheduling rule', 'restaurant-reservations' ),
813
  'delete_schedule' => __( 'Delete scheduling rule', 'restaurant-reservations' ),
814
  'never' => _x( 'Never', 'Brief default description of a scheduling rule when no weekdays or weeks are included in the rule', 'restaurant-reservations' ),
815
+ 'weekly_always' => _x( 'Every day', 'Brief default description of a scheduling rule when all the weekdays/weeks are included in the rule', 'restaurant-reservations' ),
816
  'monthly_weekdays' => _x( '%s on the %s week of the month', 'Brief default description of a scheduling rule when some weekdays are included on only some weeks of the month. %s should be left alone and will be replaced by a comma-separated list of days and weeks in the following format: M, T, W on the first, second week of the month', 'restaurant-reservations' ),
817
  'monthly_weeks' => _x( '%s week of the month', 'Brief default description of a scheduling rule when some weeks of the month are included but all or no weekdays are selected. %s should be left alone and will be replaced by a comma-separated list of weeks in the following format: First, second week of the month', 'restaurant-reservations' ),
818
  'all_day' => _x( 'All day', 'Brief default description of a scheduling rule when no times are set', 'restaurant-reservations' ),
1227
  array(
1228
  'id' => 'captcha-site-key',
1229
  'title' => __( 'Google Site Key', 'restaurant-reservations' ),
1230
+ 'description' => __( 'The site key provided to you by Google', 'restaurant-reservations' ),
1231
  )
1232
  );
1233
 
1238
  array(
1239
  'id' => 'captcha-secret-key',
1240
  'title' => __( 'Google Secret Key', 'restaurant-reservations' ),
1241
+ 'description' => __( 'The secret key provided to you by Google', 'restaurant-reservations' ),
1242
  )
1243
  );
1244
 
1588
  array(
1589
  'id' => 'require-table',
1590
  'title' => __( 'Require Table Selection', 'restaurant-reservations' ),
1591
+ 'description' => __( 'Don\'t allow a reservation to be made without a valid table selected, even if all other booking criteria are met (acceptable party size, below max reservations/seats).', 'restaurant-reservations' ),
1592
  )
1593
  );
1594
 
1623
  'label' => __('Schedule', 'restaurant-reservations' ),
1624
  'required' => true
1625
  )*/
1626
+ ),
1627
  )
1628
  );
1629
 
1664
  'label' => __('Combines With', 'restaurant-reservations' ),
1665
  'required' => false
1666
  )
1667
+ ),
1668
  )
1669
  );
1670
 
2236
  'id' => 'rtb-payment-gateway',
2237
  'title' => __( 'Payment Gateway', 'restaurant-reservations' ),
2238
  'description' => __( 'Which payment gateway should be used to accept deposits.', 'restaurant-reservations' ),
2239
+ 'options' => $this->payment_gateway_options,
2240
  )
2241
  );
2242
  $sap->add_setting(
2250
  'options' => array(
2251
  'reservation' => 'Per Reservation',
2252
  'guest' => 'Per Guest'
2253
+ ),
2254
  )
2255
  );
2256
  $sap->add_setting(
2260
  array(
2261
  'id' => 'rtb-deposit-amount',
2262
  'title' => __( 'Deposit Amount', 'restaurant-reservations' ),
2263
+ 'description' => __( 'What deposit amount is required (either per reservation or per guest, depending on the setting above)? Minimum is $0.50 in most currencies.', 'restaurant-reservations' ),
2264
  )
2265
  );
2266
  $sap->add_setting(
2272
  'title' => __( 'Currency', 'restaurant-reservations' ),
2273
  'description' => __( 'Select the currency you accept for your deposits.', 'restaurant-reservations' ),
2274
  'blank_option' => false,
2275
+ 'options' => $this->currency_options,
2276
  )
2277
  );
2278
  $sap->add_setting(
2288
  'time_based' => 'Specific Days/Times (selected below)',
2289
  'size_based' => 'Groups Over a Certain Size (selected below)'
2290
  ),
2291
+ 'default' => $this->defaults['rtb-deposit-applicable'],
2292
  )
2293
  );
2294
  $sap->add_setting(
2385
  array(
2386
  'id' => 'rtb-stripe-currency-symbol',
2387
  'title' => __( 'Stripe Currency Symbol', 'restaurant-reservations' ),
2388
+ 'description' => __( 'The currency symbol you\'d like displayed before or after the required deposit amount.', 'restaurant-reservations' )
 
2389
  )
2390
  );
2391
  $sap->add_setting(
lib/simple-admin-pages/classes/AdminPage.Menu.class.php CHANGED
@@ -8,7 +8,7 @@
8
  * @package Simple Admin Pages
9
  */
10
 
11
- class sapAdminPageMenu_2_6_0 extends sapAdminPage_2_6_0 {
12
 
13
  public $setup_function = 'add_menu_page'; // WP function to register the page
14
 
8
  * @package Simple Admin Pages
9
  */
10
 
11
+ class sapAdminPageMenu_2_6_1 extends sapAdminPage_2_6_1 {
12
 
13
  public $setup_function = 'add_menu_page'; // WP function to register the page
14
 
lib/simple-admin-pages/classes/AdminPage.Submenu.class.php CHANGED
@@ -8,7 +8,7 @@
8
  * @package Simple Admin Pages
9
  */
10
 
11
- class sapAdminPageSubmenu_2_6_0 extends sapAdminPage_2_6_0 {
12
 
13
  public $setup_function = 'add_submenu_page'; // WP function to register the page
14
 
8
  * @package Simple Admin Pages
9
  */
10
 
11
+ class sapAdminPageSubmenu_2_6_1 extends sapAdminPage_2_6_1 {
12
 
13
  public $setup_function = 'add_submenu_page'; // WP function to register the page
14
 
lib/simple-admin-pages/classes/AdminPage.Themes.class.php CHANGED
@@ -8,7 +8,7 @@
8
  * @package Simple Admin Pages
9
  */
10
 
11
- class sapAdminPageThemes_2_6_0 extends sapAdminPage_2_6_0 {
12
 
13
  public $setup_function = 'add_theme_page'; // WP function to register the page
14
 
8
  * @package Simple Admin Pages
9
  */
10
 
11
+ class sapAdminPageThemes_2_6_1 extends sapAdminPage_2_6_1 {
12
 
13
  public $setup_function = 'add_theme_page'; // WP function to register the page
14
 
lib/simple-admin-pages/classes/AdminPage.class.php CHANGED
@@ -7,7 +7,7 @@
7
  * @package Simple Admin Pages
8
  */
9
 
10
- class sapAdminPage_2_6_0 {
11
 
12
  public $title;
13
  public $menu_title;
7
  * @package Simple Admin Pages
8
  */
9
 
10
+ class sapAdminPage_2_6_1 {
11
 
12
  public $title;
13
  public $menu_title;
lib/simple-admin-pages/classes/AdminPageSection.class.php CHANGED
@@ -7,7 +7,7 @@
7
  * @package Simple Admin Pages
8
  */
9
 
10
- class sapAdminPageSection_2_6_0 {
11
 
12
  // Page defaults
13
  public $id; // unique id for this section
7
  * @package Simple Admin Pages
8
  */
9
 
10
+ class sapAdminPageSection_2_6_1 {
11
 
12
  // Page defaults
13
  public $id; // unique id for this section
lib/simple-admin-pages/classes/AdminPageSetting.Address.class.php CHANGED
@@ -7,7 +7,7 @@
7
  * @package Simple Admin Pages
8
  */
9
 
10
- class sapAdminPageSettingAddress_2_6_0 extends sapAdminPageSetting_2_6_0 {
11
 
12
  /*
13
  * Size of this textarea
7
  * @package Simple Admin Pages
8
  */
9
 
10
+ class sapAdminPageSettingAddress_2_6_1 extends sapAdminPageSetting_2_6_1 {
11
 
12
  /*
13
  * Size of this textarea
lib/simple-admin-pages/classes/AdminPageSetting.Checkbox.class.php CHANGED
@@ -19,7 +19,7 @@
19
  * @package Simple Admin Pages
20
  */
21
 
22
- class sapAdminPageSettingCheckbox_2_6_0 extends sapAdminPageSetting_2_6_0 {
23
 
24
  //public $sanitize_callback = 'sanitize_text_field';
25
 
19
  * @package Simple Admin Pages
20
  */
21
 
22
+ class sapAdminPageSettingCheckbox_2_6_1 extends sapAdminPageSetting_2_6_1 {
23
 
24
  //public $sanitize_callback = 'sanitize_text_field';
25
 
lib/simple-admin-pages/classes/AdminPageSetting.ColorPicker.class.php CHANGED
@@ -7,7 +7,7 @@
7
  * @package Simple Admin Pages
8
  */
9
 
10
- class sapAdminPageSettingColorPicker_2_6_0 extends sapAdminPageSetting_2_6_0 {
11
 
12
  public $sanitize_callback = 'sanitize_text_field';
13
 
7
  * @package Simple Admin Pages
8
  */
9
 
10
+ class sapAdminPageSettingColorPicker_2_6_1 extends sapAdminPageSetting_2_6_1 {
11
 
12
  public $sanitize_callback = 'sanitize_text_field';
13
 
lib/simple-admin-pages/classes/AdminPageSetting.Count.class.php CHANGED
@@ -24,7 +24,7 @@
24
  * @package Simple Admin Pages
25
  */
26
 
27
- class sapAdminPageSettingCount_2_6_0 extends sapAdminPageSetting_2_6_0 {
28
 
29
  public $sanitize_callback = 'sanitize_text_field';
30
 
24
  * @package Simple Admin Pages
25
  */
26
 
27
+ class sapAdminPageSettingCount_2_6_1 extends sapAdminPageSetting_2_6_1 {
28
 
29
  public $sanitize_callback = 'sanitize_text_field';
30
 
lib/simple-admin-pages/classes/AdminPageSetting.Editor.class.php CHANGED
@@ -7,7 +7,7 @@
7
  * @package Simple Admin Pages
8
  */
9
 
10
- class sapAdminPageSettingEditor_2_6_0 extends sapAdminPageSetting_2_6_0 {
11
 
12
  public $sanitize_callback = 'wp_kses_post';
13
 
7
  * @package Simple Admin Pages
8
  */
9
 
10
+ class sapAdminPageSettingEditor_2_6_1 extends sapAdminPageSetting_2_6_1 {
11
 
12
  public $sanitize_callback = 'wp_kses_post';
13
 
lib/simple-admin-pages/classes/AdminPageSetting.FileUpload.class.php CHANGED
@@ -15,7 +15,7 @@
15
  * @package Simple Admin Pages
16
  */
17
 
18
- class sapAdminPageSettingFileUpload_2_6_0 extends sapAdminPageSetting_2_6_0 {
19
 
20
  public $sanitize_callback = 'esc_url_raw';
21
 
15
  * @package Simple Admin Pages
16
  */
17
 
18
+ class sapAdminPageSettingFileUpload_2_6_1 extends sapAdminPageSetting_2_6_1 {
19
 
20
  public $sanitize_callback = 'esc_url_raw';
21
 
lib/simple-admin-pages/classes/AdminPageSetting.HTML.class.php CHANGED
@@ -14,7 +14,7 @@
14
  * @package Simple Admin Pages
15
  */
16
 
17
- class sapAdminPageSettingHTML_2_6_0 extends sapAdminPageSetting_2_6_0 {
18
 
19
  public $sanitize_callback = 'sanitize_text_field';
20
 
14
  * @package Simple Admin Pages
15
  */
16
 
17
+ class sapAdminPageSettingHTML_2_6_1 extends sapAdminPageSetting_2_6_1 {
18
 
19
  public $sanitize_callback = 'sanitize_text_field';
20
 
lib/simple-admin-pages/classes/AdminPageSetting.Image.class.php CHANGED
@@ -7,7 +7,7 @@
7
  * @package Simple Admin Pages
8
  */
9
 
10
- class sapAdminPageSettingImage_2_6_0 extends sapAdminPageSetting_2_6_0 {
11
 
12
  public $sanitize_callback = 'absint';
13
 
7
  * @package Simple Admin Pages
8
  */
9
 
10
+ class sapAdminPageSettingImage_2_6_1 extends sapAdminPageSetting_2_6_1 {
11
 
12
  public $sanitize_callback = 'absint';
13
 
lib/simple-admin-pages/classes/AdminPageSetting.InfiniteTable.class.php CHANGED
@@ -24,7 +24,7 @@
24
  * @package Simple Admin Pages
25
  */
26
 
27
- class sapAdminPageSettingInfiniteTable_2_6_0 extends sapAdminPageSetting_2_6_0 {
28
 
29
  public $sanitize_callback = 'sanitize_textarea_field';
30
 
24
  * @package Simple Admin Pages
25
  */
26
 
27
+ class sapAdminPageSettingInfiniteTable_2_6_1 extends sapAdminPageSetting_2_6_1 {
28
 
29
  public $sanitize_callback = 'sanitize_textarea_field';
30
 
lib/simple-admin-pages/classes/AdminPageSetting.McApiKey.class.php CHANGED
@@ -14,7 +14,7 @@
14
  *
15
  */
16
 
17
- class mcfrtbAdminPageSettingMcApiKey_2_6_0 {
18
 
19
  /**
20
  * Scripts and styles to load for this component
14
  *
15
  */
16
 
17
+ class mcfrtbAdminPageSettingMcApiKey_2_6_1 {
18
 
19
  /**
20
  * Scripts and styles to load for this component
lib/simple-admin-pages/classes/AdminPageSetting.McListMerge.class.php CHANGED
@@ -14,7 +14,7 @@
14
  *
15
  */
16
 
17
- class mcfrtbAdminPageSettingMcListMerge_2_6_0 {
18
 
19
  /**
20
  * Scripts and styles to load for this component
14
  *
15
  */
16
 
17
+ class mcfrtbAdminPageSettingMcListMerge_2_6_1 {
18
 
19
  /**
20
  * Scripts and styles to load for this component
lib/simple-admin-pages/classes/AdminPageSetting.Number.class.php CHANGED
@@ -7,7 +7,7 @@
7
  * @package Simple Admin Pages
8
  */
9
 
10
- class sapAdminPageSettingNumber_2_6_0 extends sapAdminPageSetting_2_6_0 {
11
 
12
  public $sanitize_callback = 'sanitize_text_field';
13
 
7
  * @package Simple Admin Pages
8
  */
9
 
10
+ class sapAdminPageSettingNumber_2_6_1 extends sapAdminPageSetting_2_6_1 {
11
 
12
  public $sanitize_callback = 'sanitize_text_field';
13
 
lib/simple-admin-pages/classes/AdminPageSetting.OpeningHours.class.php CHANGED
@@ -25,7 +25,7 @@
25
  * @package Simple Admin Pages
26
  */
27
 
28
- class sapAdminPageSettingOpeningHours_2_6_0 extends sapAdminPageSetting_2_6_0 {
29
 
30
  public $sanitize_callback = 'sanitize_text_field';
31
 
25
  * @package Simple Admin Pages
26
  */
27
 
28
+ class sapAdminPageSettingOpeningHours_2_6_1 extends sapAdminPageSetting_2_6_1 {
29
 
30
  public $sanitize_callback = 'sanitize_text_field';
31
 
lib/simple-admin-pages/classes/AdminPageSetting.Ordering.class.php CHANGED
@@ -18,7 +18,7 @@
18
  * @package Simple Admin Pages
19
  */
20
 
21
- class sapAdminPageSettingOrdering_2_6_0 extends sapAdminPageSetting_2_6_0 {
22
 
23
  public $sanitize_callback = 'sanitize_text_field';
24
 
18
  * @package Simple Admin Pages
19
  */
20
 
21
+ class sapAdminPageSettingOrdering_2_6_1 extends sapAdminPageSetting_2_6_1 {
22
 
23
  public $sanitize_callback = 'sanitize_text_field';
24
 
lib/simple-admin-pages/classes/AdminPageSetting.Radio.class.php CHANGED
@@ -19,7 +19,7 @@
19
  * @package Simple Admin Pages
20
  */
21
 
22
- class sapAdminPageSettingRadio_2_6_0 extends sapAdminPageSetting_2_6_0 {
23
 
24
  public $sanitize_callback = 'sanitize_text_field';
25
 
19
  * @package Simple Admin Pages
20
  */
21
 
22
+ class sapAdminPageSettingRadio_2_6_1 extends sapAdminPageSetting_2_6_1 {
23
 
24
  public $sanitize_callback = 'sanitize_text_field';
25
 
lib/simple-admin-pages/classes/AdminPageSetting.Scheduler.class.php CHANGED
@@ -10,7 +10,7 @@
10
  * @package Simple Admin Pages
11
  */
12
 
13
- class sapAdminPageSettingScheduler_2_6_0 extends sapAdminPageSetting_2_6_0 {
14
 
15
  public $sanitize_callback = 'sanitize_text_field';
16
 
10
  * @package Simple Admin Pages
11
  */
12
 
13
+ class sapAdminPageSettingScheduler_2_6_1 extends sapAdminPageSetting_2_6_1 {
14
 
15
  public $sanitize_callback = 'sanitize_text_field';
16
 
lib/simple-admin-pages/classes/AdminPageSetting.Select.class.php CHANGED
@@ -21,7 +21,7 @@
21
  * @package Simple Admin Pages
22
  */
23
 
24
- class sapAdminPageSettingSelect_2_6_0 extends sapAdminPageSetting_2_6_0 {
25
 
26
  public $sanitize_callback = 'sanitize_text_field';
27
 
21
  * @package Simple Admin Pages
22
  */
23
 
24
+ class sapAdminPageSettingSelect_2_6_1 extends sapAdminPageSetting_2_6_1 {
25
 
26
  public $sanitize_callback = 'sanitize_text_field';
27
 
lib/simple-admin-pages/classes/AdminPageSetting.SelectMenu.class.php CHANGED
@@ -17,7 +17,7 @@
17
  * @package Simple Admin Pages
18
  */
19
 
20
- class sapAdminPageSettingSelectMenu_2_6_0 extends sapAdminPageSetting_2_6_0 {
21
 
22
  public $sanitize_callback = 'intval';
23
 
17
  * @package Simple Admin Pages
18
  */
19
 
20
+ class sapAdminPageSettingSelectMenu_2_6_1 extends sapAdminPageSetting_2_6_1 {
21
 
22
  public $sanitize_callback = 'intval';
23
 
lib/simple-admin-pages/classes/AdminPageSetting.SelectPost.class.php CHANGED
@@ -17,7 +17,7 @@
17
  * @package Simple Admin Pages
18
  */
19
 
20
- class sapAdminPageSettingSelectPost_2_6_0 extends sapAdminPageSetting_2_6_0 {
21
 
22
  public $sanitize_callback = 'intval';
23
 
17
  * @package Simple Admin Pages
18
  */
19
 
20
+ class sapAdminPageSettingSelectPost_2_6_1 extends sapAdminPageSetting_2_6_1 {
21
 
22
  public $sanitize_callback = 'intval';
23
 
lib/simple-admin-pages/classes/AdminPageSetting.SelectTaxonomy.class.php CHANGED
@@ -19,7 +19,7 @@
19
  * @package Simple Admin Pages
20
  */
21
 
22
- class sapAdminPageSettingSelectTaxonomy_2_6_0 extends sapAdminPageSetting_2_6_0 {
23
 
24
  public $sanitize_callback = 'intval';
25
 
19
  * @package Simple Admin Pages
20
  */
21
 
22
+ class sapAdminPageSettingSelectTaxonomy_2_6_1 extends sapAdminPageSetting_2_6_1 {
23
 
24
  public $sanitize_callback = 'intval';
25
 
lib/simple-admin-pages/classes/AdminPageSetting.Text.class.php CHANGED
@@ -7,7 +7,7 @@
7
  * @package Simple Admin Pages
8
  */
9
 
10
- class sapAdminPageSettingText_2_6_0 extends sapAdminPageSetting_2_6_0 {
11
 
12
  public $sanitize_callback = 'sanitize_text_field';
13
 
7
  * @package Simple Admin Pages
8
  */
9
 
10
+ class sapAdminPageSettingText_2_6_1 extends sapAdminPageSetting_2_6_1 {
11
 
12
  public $sanitize_callback = 'sanitize_text_field';
13
 
lib/simple-admin-pages/classes/AdminPageSetting.Textarea.class.php CHANGED
@@ -9,7 +9,7 @@
9
  * @todo textareas should have an option to swap new lines for <br>s
10
  */
11
 
12
- class sapAdminPageSettingTextarea_2_6_0 extends sapAdminPageSetting_2_6_0 {
13
 
14
  /*
15
  * Size of this textarea
9
  * @todo textareas should have an option to swap new lines for <br>s
10
  */
11
 
12
+ class sapAdminPageSettingTextarea_2_6_1 extends sapAdminPageSetting_2_6_1 {
13
 
14
  /*
15
  * Size of this textarea
lib/simple-admin-pages/classes/AdminPageSetting.Time.class.php CHANGED
@@ -7,7 +7,7 @@
7
  * @package Simple Admin Pages
8
  */
9
 
10
- class sapAdminPageSettingTime_2_2_1 extends sapAdminPageSetting_2_2_1 {
11
 
12
  public $sanitize_callback = 'sanitize_text_field';
13
 
7
  * @package Simple Admin Pages
8
  */
9
 
10
+ class sapAdminPageSettingTime_2_6_1 extends sapAdminPageSetting_2_6_1 {
11
 
12
  public $sanitize_callback = 'sanitize_text_field';
13
 
lib/simple-admin-pages/classes/AdminPageSetting.Toggle.class.php CHANGED
@@ -17,7 +17,7 @@
17
  * @package Simple Admin Pages
18
  */
19
 
20
- class sapAdminPageSettingToggle_2_6_0 extends sapAdminPageSetting_2_6_0 {
21
 
22
  public $sanitize_callback = 'sanitize_text_field';
23
 
17
  * @package Simple Admin Pages
18
  */
19
 
20
+ class sapAdminPageSettingToggle_2_6_1 extends sapAdminPageSetting_2_6_1 {
21
 
22
  public $sanitize_callback = 'sanitize_text_field';
23
 
lib/simple-admin-pages/classes/AdminPageSetting.WarningTip.class.php CHANGED
@@ -7,7 +7,7 @@
7
  * @package Simple Admin Pages
8
  */
9
 
10
- class sapAdminPageSettingWarningTip_2_6_0 extends sapAdminPageSetting_2_6_0 {
11
 
12
  public $sanitize_callback = 'sanitize_text_field';
13
 
7
  * @package Simple Admin Pages
8
  */
9
 
10
+ class sapAdminPageSettingWarningTip_2_6_1 extends sapAdminPageSetting_2_6_1 {
11
 
12
  public $sanitize_callback = 'sanitize_text_field';
13
 
lib/simple-admin-pages/classes/AdminPageSetting.class.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Simple Admin Pages
17
  */
18
 
19
- abstract class sapAdminPageSetting_2_6_0 {
20
 
21
  // Page defaults
22
  public $id; // used in form fields and database to track and store setting
@@ -252,10 +252,12 @@ abstract class sapAdminPageSetting_2_6_0 {
252
 
253
  $this->conditional_display = in_array( $this->conditional_on_value, $option_group_value[ $this->conditional_on ] );
254
  }
 
255
 
256
- $this->conditional_display = $this->conditional_on_value == $option_group_value[ $this->conditional_on ] ? true : false;
 
257
 
258
- if ( $this->conditional_display ) { return; }
259
 
260
  if ( ! empty( $this->args['class'] ) ) {
261
 
@@ -303,7 +305,7 @@ abstract class sapAdminPageSetting_2_6_0 {
303
  */
304
  public function display_description() {
305
 
306
- if ( empty( $this->description ) or empty( $this->conditional_display ) ) { return; }
307
 
308
  ?>
309
 
16
  * @package Simple Admin Pages
17
  */
18
 
19
+ abstract class sapAdminPageSetting_2_6_1 {
20
 
21
  // Page defaults
22
  public $id; // used in form fields and database to track and store setting
252
 
253
  $this->conditional_display = in_array( $this->conditional_on_value, $option_group_value[ $this->conditional_on ] );
254
  }
255
+ else {
256
 
257
+ $this->conditional_display = $this->conditional_on_value == $option_group_value[ $this->conditional_on ] ? true : false;
258
+ }
259
 
260
+ if ( ! empty( $this->conditional_display ) ) { return; }
261
 
262
  if ( ! empty( $this->args['class'] ) ) {
263
 
305
  */
306
  public function display_description() {
307
 
308
+ if ( empty( $this->description ) ) { return; }
309
 
310
  ?>
311
 
lib/simple-admin-pages/classes/Library.class.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- if ( !class_exists( 'sapLibrary_2_6_0' ) ) {
3
  /**
4
  * This library class loads and provides access to the correct version of the
5
  * Simple Admin Pages library.
@@ -7,10 +7,10 @@ if ( !class_exists( 'sapLibrary_2_6_0' ) ) {
7
  * @since 1.0
8
  * @package Simple Admin Pages
9
  */
10
- class sapLibrary_2_6_0 {
11
 
12
  // Version of the library
13
- private $version = '2.6.0';
14
 
15
  // A full URL to the library which is used to correctly link scripts and
16
  // stylesheets.
@@ -49,7 +49,7 @@ class sapLibrary_2_6_0 {
49
  public function __construct( $args ) {
50
 
51
  if ( ! defined( 'SAP_VERSION' ) ) {
52
- define( 'SAP_VERSION', '2.6.0' );
53
  }
54
 
55
  // If no URL path to the library is passed, we won't be able to add the
1
  <?php
2
+ if ( !class_exists( 'sapLibrary_2_6_1' ) ) {
3
  /**
4
  * This library class loads and provides access to the correct version of the
5
  * Simple Admin Pages library.
7
  * @since 1.0
8
  * @package Simple Admin Pages
9
  */
10
+ class sapLibrary_2_6_1 {
11
 
12
  // Version of the library
13
+ private $version = '2.6.1';
14
 
15
  // A full URL to the library which is used to correctly link scripts and
16
  // stylesheets.
49
  public function __construct( $args ) {
50
 
51
  if ( ! defined( 'SAP_VERSION' ) ) {
52
+ define( 'SAP_VERSION', '2.6.1' );
53
  }
54
 
55
  // If no URL path to the library is passed, we won't be able to add the
lib/simple-admin-pages/css/admin-settings.css CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  /************************/
2
  /***** OPTIONS PAGE *****/
3
  /************************/
1
+ .sap-hidden {
2
+ display: none;
3
+ }
4
+
5
  /************************/
6
  /***** OPTIONS PAGE *****/
7
  /************************/
lib/simple-admin-pages/css/infinite_table.css CHANGED
@@ -1,3 +0,0 @@
1
- .sap-hidden {
2
- display: none;
3
- }
 
 
 
lib/simple-admin-pages/js/admin-settings.js CHANGED
@@ -37,15 +37,19 @@ jQuery(document).ready(function() {
37
  jQuery( 'fieldset[data-conditional_on]' ).each( function() {
38
 
39
  var option = jQuery( this );
40
- var option_name = jQuery( 'input[name="option_page"]' ).val() + '[' + option.data( 'conditional_on' ) + ']'; console.log( option_name );
41
-
42
- jQuery( '[name="' + option_name + '"]' ).on( 'change', function() {
43
 
44
- if ( jQuery( this ).val() == option.data( 'conditional_on_value' ) ) {
 
 
 
 
45
 
46
  option.parent().parent().removeClass( 'sap-hidden' );
47
  }
48
- else {
49
 
50
  option.parent().parent().addClass( 'sap-hidden' );
51
  }
@@ -65,7 +69,7 @@ function EWD_SAP_hexToRgb(hex) {
65
  //OPTIONS PAGE YES/NO TOGGLE SWITCHES
66
  jQuery(document).ready(function($){
67
  $('.sap-admin-option-toggle').on('change', function() {
68
- var Input_Name = $(this).data('inputname'); console.log(Input_Name);
69
  if ($(this).is(':checked')) {
70
  $('input[name="' + Input_Name + '"][value="1"]').prop('checked', true).trigger('change');
71
  $('input[name="' + Input_Name + '"][value=""]').prop('checked', false);
37
  jQuery( 'fieldset[data-conditional_on]' ).each( function() {
38
 
39
  var option = jQuery( this );
40
+ var option_name = jQuery( 'input[name="option_page"]' ).val() + '[' + option.data( 'conditional_on' ) + ']';
41
+
42
+ jQuery( '[name="' + option_name + '"], [name="' + option_name + '[]"]' ).on( 'change', function() {
43
 
44
+ var option_value = jQuery( this ).attr( 'type' ) != 'checkbox' ? jQuery( this ).val() :
45
+ ( ( option.data( 'conditional_on_value' ) == 1 || option.data( 'conditional_on_value' ) == '' ) ? jQuery( this ).is( ':checked' ) :
46
+ ( jQuery( this ).is( ':checked' ) ? option.data( 'conditional_on_value' ) : false ) );
47
+
48
+ if ( option_value == option.data( 'conditional_on_value' ) ) {
49
 
50
  option.parent().parent().removeClass( 'sap-hidden' );
51
  }
52
+ else {
53
 
54
  option.parent().parent().addClass( 'sap-hidden' );
55
  }
69
  //OPTIONS PAGE YES/NO TOGGLE SWITCHES
70
  jQuery(document).ready(function($){
71
  $('.sap-admin-option-toggle').on('change', function() {
72
+ var Input_Name = $(this).data('inputname');
73
  if ($(this).is(':checked')) {
74
  $('input[name="' + Input_Name + '"][value="1"]').prop('checked', true).trigger('change');
75
  $('input[name="' + Input_Name + '"][value=""]').prop('checked', false);
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: FiveStarPlugins
3
  Requires at Least: 4.4
4
  Tested Up To: 5.8
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.4.2
7
  License: GPLv3
8
  License URI:http://www.gnu.org/licenses/gpl-3.0.html
9
  Donate Link: https://www.etoilewebdesign.com/plugin-donations/
@@ -197,6 +197,12 @@ Find answers to even more questions in the [FAQ](http://doc.fivestarplugins.com/
197
 
198
  == Changelog ==
199
 
 
 
 
 
 
 
200
  = 2.4.3 (2021-10-19) =
201
  - Changes the type of a few settings, to use the 'select' type instead of the 'count' type
202
  - Fix for a settings formatting issue
3
  Requires at Least: 4.4
4
  Tested Up To: 5.8
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.4.3
7
  License: GPLv3
8
  License URI:http://www.gnu.org/licenses/gpl-3.0.html
9
  Donate Link: https://www.etoilewebdesign.com/plugin-donations/
197
 
198
  == Changelog ==
199
 
200
+ = 2.4.3 (2021-11-05) =
201
+ - Updates the SAP library to version 2.6.1
202
+ - Fix for redirects after booking not working correctly
203
+ - Fix for reminder emails being sent after the booking time under certain circumstances
204
+ - Fix for multiple locations showing as available to book at midnight only when they are closed for the day
205
+
206
  = 2.4.3 (2021-10-19) =
207
  - Changes the type of a few settings, to use the 'select' type instead of the 'count' type
208
  - Fix for a settings formatting issue
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.4.3
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.4.3' );
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__ ) );
@@ -49,6 +49,9 @@ class rtbInit {
49
  // Initialize the plugin
50
  add_action( 'init', array( $this, 'load_textdomain' ) );
51
 
 
 
 
52
  // Set up empty request object
53
  $this->request = new stdClass();
54
  $this->request->raw_input = array();
@@ -506,6 +509,26 @@ class rtbInit {
506
  }
507
  }
508
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
509
  }
510
  } // endif;
511
 
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.4.4
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.4.4' );
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__ ) );
49
  // Initialize the plugin
50
  add_action( 'init', array( $this, 'load_textdomain' ) );
51
 
52
+ add_action( 'init', array( $this, 'output_buffer_start' ) );
53
+ add_action( 'shutdown', array( $this, 'output_buffer_end' ) );
54
+
55
  // Set up empty request object
56
  $this->request = new stdClass();
57
  $this->request->raw_input = array();
509
  }
510
  }
511
 
512
+ /**
513
+ * Handle the codebase combination
514
+ * @since 2.0
515
+ */
516
+ public function output_buffer_start()
517
+ {
518
+ ob_start();
519
+ }
520
+
521
+ /**
522
+ * Handle the codebase combination
523
+ * @since 2.0
524
+ */
525
+ public function output_buffer_end()
526
+ {
527
+ if( count(ob_list_handlers()) ) {
528
+ ob_end_flush();
529
+ }
530
+ }
531
+
532
  }
533
  } // endif;
534