Restaurant Reservations - Version 1.2.1

Version Description

This is a minor maintenance update which fixes a couple of small bugs.

Download this release

Release Info

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

Code changes from version 1.2 to 1.2.1

includes/Booking.class.php CHANGED
@@ -143,6 +143,8 @@ class rtbBooking {
143
  */
144
  public function validate_submission() {
145
 
 
 
146
  $this->validation_errors = array();
147
 
148
  // Date
@@ -190,8 +192,6 @@ class rtbBooking {
190
  // Check against valid open dates/times
191
  if ( is_object( $time ) && is_object( $date ) ) {
192
 
193
- global $rtb_controller;
194
-
195
  $request = new DateTime( $date->format( 'Y-m-d' ) . ' ' . $time->format( 'H:i:s' ) );
196
 
197
  $early_bookings = $rtb_controller->settings->get_setting( 'early-bookings' );
143
  */
144
  public function validate_submission() {
145
 
146
+ global $rtb_controller;
147
+
148
  $this->validation_errors = array();
149
 
150
  // Date
192
  // Check against valid open dates/times
193
  if ( is_object( $time ) && is_object( $date ) ) {
194
 
 
 
195
  $request = new DateTime( $date->format( 'Y-m-d' ) . ' ' . $time->format( 'H:i:s' ) );
196
 
197
  $early_bookings = $rtb_controller->settings->get_setting( 'early-bookings' );
includes/WP_List_Table.BookingsTable.class.php CHANGED
@@ -86,7 +86,7 @@ class rtbBookingsTable extends WP_List_Table {
86
 
87
  // Run any bulk action requests
88
  $this->process_bulk_action();
89
-
90
  // Run any quicklink requests
91
  $this->process_quicklink_action();
92
 
@@ -370,6 +370,9 @@ class rtbBookingsTable extends WP_List_Table {
370
  $ids = isset( $_POST['bookings'] ) ? $_POST['bookings'] : false;
371
  $action = isset( $_POST['action'] ) ? $_POST['action'] : false;
372
 
 
 
 
373
  if( empty( $action ) || $action == '-1' ) {
374
  return;
375
  }
@@ -417,7 +420,7 @@ class rtbBookingsTable extends WP_List_Table {
417
  * @since 0.0.1
418
  */
419
  public function process_quicklink_action() {
420
-
421
  if ( empty( $_REQUEST['rtb-quicklink'] ) ) {
422
  return;
423
  }
@@ -425,13 +428,13 @@ class rtbBookingsTable extends WP_List_Table {
425
  if ( !current_user_can( 'manage_bookings' ) ) {
426
  return;
427
  }
428
-
429
  global $rtb_controller;
430
-
431
  $results = array();
432
-
433
  $id = !empty( $_REQUEST['booking'] ) ? $_REQUEST['booking'] : false;
434
-
435
  if ( $_REQUEST['rtb-quicklink'] == 'confirm' ) {
436
  $results[$id] = $rtb_controller->cpts->update_booking_status( $id, 'confirmed' );
437
  $this->last_action = 'set-status-confirmed';
86
 
87
  // Run any bulk action requests
88
  $this->process_bulk_action();
89
+
90
  // Run any quicklink requests
91
  $this->process_quicklink_action();
92
 
370
  $ids = isset( $_POST['bookings'] ) ? $_POST['bookings'] : false;
371
  $action = isset( $_POST['action'] ) ? $_POST['action'] : false;
372
 
373
+ // Check bulk actions selector below the table
374
+ $action = $action == '-1' && isset( $_POST['action2'] ) ? $_POST['action2'] : $action;
375
+
376
  if( empty( $action ) || $action == '-1' ) {
377
  return;
378
  }
420
  * @since 0.0.1
421
  */
422
  public function process_quicklink_action() {
423
+
424
  if ( empty( $_REQUEST['rtb-quicklink'] ) ) {
425
  return;
426
  }
428
  if ( !current_user_can( 'manage_bookings' ) ) {
429
  return;
430
  }
431
+
432
  global $rtb_controller;
433
+
434
  $results = array();
435
+
436
  $id = !empty( $_REQUEST['booking'] ) ? $_REQUEST['booking'] : false;
437
+
438
  if ( $_REQUEST['rtb-quicklink'] == 'confirm' ) {
439
  $results[$id] = $rtb_controller->cpts->update_booking_status( $id, 'confirmed' );
440
  $this->last_action = 'set-status-confirmed';
readme.txt CHANGED
@@ -5,7 +5,7 @@ Plugin URL: http://themeofthecrop.com
5
  Requires at Least: 3.8
6
  Tested Up To: 3.9.1
7
  Tags: restaurant, reservations, bookings, table bookings, restaurant reservation, table reservation
8
- Stable tag: 1.2
9
  License: GPLv2 or later
10
  Donate link: http://themeofthecrop.com
11
 
@@ -31,6 +31,9 @@ This plugin is part of a group of plugins for restaurants. Check out the [Food a
31
 
32
  There is a short guide to using the plugin in the /docs/ folder. It can be accessed by following the Help link listed under the plugin on the Plugins page in your WordPress admin area. Not sure where that is? One of the [screenshots](http://wordpress.org/plugins/restaurant-reservations/screenshots/) for this plugin will show you where to find it.
33
 
 
 
 
34
  = Developers =
35
 
36
  This plugin is packed with hooks so you can extend it, customize it and rebrand it as needed. Development takes place on [GitHub](https://github.com/NateWr/restaurant-reservations), so fork it up.
@@ -56,6 +59,10 @@ This plugin is packed with hooks so you can extend it, customize it and rebrand
56
 
57
  == Changelog ==
58
 
 
 
 
 
59
  = 1.2 (2014-07-17) =
60
  * Add notification template tags for phone number and message
61
  * Add automatic selection of date when page is loaded (option to disable this feature)
@@ -95,6 +102,9 @@ This plugin is packed with hooks so you can extend it, customize it and rebrand
95
 
96
  == Upgrade Notice ==
97
 
 
 
 
98
  = 1.2 =
99
  This update adds new template tags for notification emails, a new option to customize the time interval and more. A new .pot file has been generated, so update your translations. Consult the changelog for further details.
100
 
5
  Requires at Least: 3.8
6
  Tested Up To: 3.9.1
7
  Tags: restaurant, reservations, bookings, table bookings, restaurant reservation, table reservation
8
+ Stable tag: 1.2.1
9
  License: GPLv2 or later
10
  Donate link: http://themeofthecrop.com
11
 
31
 
32
  There is a short guide to using the plugin in the /docs/ folder. It can be accessed by following the Help link listed under the plugin on the Plugins page in your WordPress admin area. Not sure where that is? One of the [screenshots](http://wordpress.org/plugins/restaurant-reservations/screenshots/) for this plugin will show you where to find it.
33
 
34
+ = MailChimp addon beta =
35
+ A commercial addon for this plugin is in development that will allow you to subscribe new reservations to your MailChimp mailing list. The plugin is currently in a short beta period before release. I'm offering a free license to anyone who participates. [Learn more](http://themeofthecrop.com/2014/08/18/mailchimp-restaurant-reservations-ready-beta/).
36
+
37
  = Developers =
38
 
39
  This plugin is packed with hooks so you can extend it, customize it and rebrand it as needed. Development takes place on [GitHub](https://github.com/NateWr/restaurant-reservations), so fork it up.
59
 
60
  == Changelog ==
61
 
62
+ = 1.2.1 (2014-08-01) =
63
+ * Fix: bulk actions below the bookings table don't work
64
+ * Fix: PHP Notice generated during validation
65
+
66
  = 1.2 (2014-07-17) =
67
  * Add notification template tags for phone number and message
68
  * Add automatic selection of date when page is loaded (option to disable this feature)
102
 
103
  == Upgrade Notice ==
104
 
105
+ = 1.2.1 =
106
+ This is a minor maintenance update which fixes a couple of small bugs.
107
+
108
  = 1.2 =
109
  This update adds new template tags for notification emails, a new option to customize the time interval and more. A new .pot file has been generated, so update your translations. Consult the changelog for further details.
110
 
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.2
7
  * Author: Theme of the Crop
8
  * Author URI: http://themeofthecrop.com
9
  * License: GNU General Public License v2.0 or later
@@ -109,7 +109,7 @@ class rtbInit {
109
  * @since 0.0.1
110
  */
111
  public function load_textdomain() {
112
- load_plugin_textdomain( RTB_TEXTDOMAIN, false, plugin_basename( dirname( __FILE__ ) ) . "/languages" );
113
  }
114
 
115
  /**
3
  * Plugin Name: Restaurant Reservations
4
  * Plugin URI: http://themeofthecrop.com
5
  * Description: Accept restaurant reservations and bookings online.
6
+ * Version: 1.2.1
7
  * Author: Theme of the Crop
8
  * Author URI: http://themeofthecrop.com
9
  * License: GNU General Public License v2.0 or later
109
  * @since 0.0.1
110
  */
111
  public function load_textdomain() {
112
+ load_plugin_textdomain( RTB_TEXTDOMAIN, false, plugin_basename( dirname( __FILE__ ) ) . "/languages/" );
113
  }
114
 
115
  /**