Restaurant Reservations - Version 1.7

Version Description

Download this release

Release Info

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

Code changes from version 1.6.3 to 1.7

Gruntfile.js CHANGED
@@ -5,6 +5,8 @@ module.exports = function(grunt) {
5
  // Project configuration.
6
  grunt.initConfig({
7
 
 
 
8
  // Configure JSHint
9
  jshint: {
10
  test: {
@@ -24,33 +26,46 @@ module.exports = function(grunt) {
24
  makepot: {
25
  target: {
26
  options: {
27
- cwd: '', // Directory of files to internationalize.
28
- domainPath: 'languages', // Where to save the POT file.
29
- exclude: [], // List of files or directories to ignore.
30
- include: [], // List of files or directories to include.
31
- i18nToolsPath: '/media/Storage/projects/wordpress/trunk/tools/i18n', // Path to the i18n tools directory.
32
- mainFile: 'restaurant-reservations/restaurant-reservations.php', // Main project file.
33
- potComments: '', // The copyright at the beginning of the POT file.
34
- potFilename: '', // Name of the POT file.
35
- potHeaders: {
36
- poedit: true, // Includes common Poedit headers.
37
- 'x-poedit-keywordslist': true // Include a list of all possible gettext functions.
38
- }, // Headers to add to the generated POT file.
39
- processPot: null, // A callback function for manipulating the POT file.
40
- type: 'wp-plugin', // Type of project (wp-plugin or wp-theme).
41
- updateTimestamp: true // Whether the POT-Creation-Date should be updated without other changes.
42
  }
43
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  }
45
 
46
  });
47
 
48
  // Load tasks
 
49
  grunt.loadNpmTasks('grunt-contrib-jshint');
50
  grunt.loadNpmTasks('grunt-contrib-watch');
51
  grunt.loadNpmTasks('grunt-wp-i18n');
52
 
53
  // Default task(s).
54
  grunt.registerTask('default', ['watch']);
 
 
55
 
56
  };
5
  // Project configuration.
6
  grunt.initConfig({
7
 
8
+ pkg: grunt.file.readJSON('package.json'),
9
+
10
  // Configure JSHint
11
  jshint: {
12
  test: {
26
  makepot: {
27
  target: {
28
  options: {
29
+ processPot: function( pot, options ) {
30
+ pot.headers['report-msgid-bugs-to'] = 'https://themeofthecrop.com';
31
+ return pot;
32
+ },
33
+ type: 'wp-plugin',
 
 
 
 
 
 
 
 
 
 
34
  }
35
  }
36
+ },
37
+
38
+ // Build a package for distribution
39
+ compress: {
40
+ main: {
41
+ options: {
42
+ archive: 'restaurant-reservations-<%= pkg.version %>.zip'
43
+ },
44
+ files: [
45
+ {
46
+ src: [
47
+ '*', '**/*',
48
+ '!restaurant-reservations-<%= pkg.version %>.zip',
49
+ '!.*', '!Gruntfile.js', '!package.json', '!node_modules', '!node_modules/**/*',
50
+ '!**/.*', '!**/Gruntfile.js', '!**/package.json', '!**/node_modules', '!**/node_modules/**/*',
51
+ ],
52
+ dest: 'restaurant-reservations/',
53
+ }
54
+ ]
55
+ }
56
  }
57
 
58
  });
59
 
60
  // Load tasks
61
+ grunt.loadNpmTasks('grunt-contrib-compress');
62
  grunt.loadNpmTasks('grunt-contrib-jshint');
63
  grunt.loadNpmTasks('grunt-contrib-watch');
64
  grunt.loadNpmTasks('grunt-wp-i18n');
65
 
66
  // Default task(s).
67
  grunt.registerTask('default', ['watch']);
68
+ grunt.registerTask('build', ['jshint']);
69
+ grunt.registerTask('package', ['build', 'compress']);
70
 
71
  };
assets/addons-backup.json DELETED
@@ -1,29 +0,0 @@
1
- [
2
- {
3
- "id":"custom-fields-for-rtb",
4
- "title":"Custom Fields for Restaurant Reservations",
5
- "url":"http:\/\/themeofthecrop.com\/plugin\/custom-fields-restaurant-reservations\/",
6
- "price":"$30",
7
- "img":"https:\/\/themeofthecrop.com\/promo\/plugins\/custom-fields-for-rtb.png",
8
- "status":"released",
9
- "description":"Add custom fields and edit your booking form with ease."
10
- },
11
- {
12
- "id":"mailchimp-for-rtb",
13
- "title":"MailChimp for Restaurant Reservations",
14
- "url":"http:\/\/themeofthecrop.com\/plugin\/mailchimp-restaurant-reservations\/",
15
- "price":"$20",
16
- "img":"https:\/\/themeofthecrop.com\/promo\/plugins\/mailchimp-for-rtb.png",
17
- "status":"released",
18
- "description":"Subscribe emails from new restaurant reservations to your MailChimp mailing list. <strong>Use a different mailing list provider? Let me know <a href=\"http:\/\/themeofthecrop.com\/2015\/12\/17\/suggest-next-mailing-list-integration\/?utm_source=Plugin&utm_medium=Addon%20List&utm_campaign=Restaurant%20Reservations\">which one</a>.</strong>"
19
- },
20
- {
21
- "id":"export-bookings-for-rtb",
22
- "title":"Export Bookings for Restaurant Reservations",
23
- "url":"http:\/\/themeofthecrop.com\/plugin\/export-bookings-for-restaurant-reservations\/",
24
- "price":"$20",
25
- "img":"https:\/\/themeofthecrop.com\/promo\/plugins\/export-bookings-for-rtb.png",
26
- "status":"released",
27
- "description":"Export your restaurant reservations to PDF and Excel/CSV files."
28
- }
29
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/admin.css CHANGED
@@ -355,7 +355,7 @@
355
  width: 100%;
356
  height: 100%;
357
  background: rgba(0, 0, 0, 0.8);
358
- z-index: 3;
359
  overflow-y: auto;
360
  cursor: pointer;
361
  visibility: hidden;
@@ -445,6 +445,12 @@
445
  -webkit-transition: opacity .25s ease-in-out;
446
  }
447
 
 
 
 
 
 
 
448
  .rtb-admin-modal .action-status {
449
  display: inline-block;
450
  float: right;
@@ -541,6 +547,23 @@
541
  #rtb-error-modal .rtb-error-msg {
542
  margin-bottom: 1em;
543
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
544
  /* Hide the outer scrollbar when the modal is open */
545
  .rtb-hide-body-scroll {
546
  overflow: hidden !important;
@@ -561,60 +584,35 @@
561
  }
562
 
563
  /* Addons Page */
564
- #rtb-addons {
565
  margin-top: 2em;
566
  }
567
 
568
- #rtb-addons .rtb-loading {
569
- line-height: 10em;
570
- font-size: 2em;
571
- text-align: center;
572
- text-transform: uppercase;
573
- font-weight: bold;
574
- background: #eee;
575
- background: rgba(0,0,0,0.1);
576
- color: #777;
577
- color: rgba(0,0,0,0.54);
578
- }
579
-
580
- #rtb-addons .rtb-loading .spinner {
581
- float: none;
582
- visibility: visible;
583
  display: inline-block;
584
- }
585
-
586
- #rtb-addons .error {
587
- padding: 0.25em 0.5em;
588
- background: #f50;
589
- color: #fff;
590
- }
591
-
592
- #rtb-addons .error a {
593
- color: #fff;
594
- }
595
-
596
- #rtb-addons .addon {
597
  margin-bottom: 20px;
598
  padding: 20px;
599
  background: #fff;
600
- min-height: 128px;
601
  border-radius: 3px;
602
- display: none;
 
 
603
  }
604
 
605
- #rtb-addons img {
606
  float: left;
607
- width: 128px;
608
- height: 128px;
609
  margin: 0 20px 20px 0;
610
  }
611
 
612
- #rtb-addons .action {
613
  margin-top: 2em;
614
  }
615
 
616
- #rtb-addons .soon,
617
- #rtb-addons .installed {
618
  line-height: 28px;
619
  display: inline-block;
620
  padding: 0 0.75em;
@@ -622,26 +620,39 @@
622
  box-shadow: 0 1px 0 #ccc;
623
  }
624
 
625
- #rtb-addons .soon {
626
  background: #F0F05E;
627
  }
628
 
629
- #rtb-addons .installed {
630
  background: #81F05E;
631
  }
632
 
 
 
 
 
 
 
 
 
 
 
 
 
633
  @media screen and (max-width: 600px) {
634
 
635
- #rtb-addons .addon {
636
  text-align: center;
637
  }
638
 
639
- #rtb-addons img {
640
  float: none;
641
  margin: 0;
642
  }
643
  }
644
 
 
645
  /* License page */
646
  .rtb-license-setting .status {
647
  display: inline-block;
355
  width: 100%;
356
  height: 100%;
357
  background: rgba(0, 0, 0, 0.8);
358
+ z-index: 9999;
359
  overflow-y: auto;
360
  cursor: pointer;
361
  visibility: hidden;
445
  -webkit-transition: opacity .25s ease-in-out;
446
  }
447
 
448
+ .rtb-admin-modal .button-link {
449
+ display: inline-block;
450
+ margin-top: 1em;
451
+ line-height: 26px;
452
+ }
453
+
454
  .rtb-admin-modal .action-status {
455
  display: inline-block;
456
  float: right;
547
  #rtb-error-modal .rtb-error-msg {
548
  margin-bottom: 1em;
549
  }
550
+
551
+ .rtb-ban-form .intro {
552
+ margin-top: 0;
553
+ font-weight: bold;
554
+ }
555
+
556
+ .rtb-ban-form .intro span {
557
+ color: #a55;
558
+ }
559
+
560
+ .rtb-ban-form .button-primary {
561
+ display: block;
562
+ width: 100%;
563
+ margin-top: 2em;
564
+ margin-bottom: 2em;
565
+ }
566
+
567
  /* Hide the outer scrollbar when the modal is open */
568
  .rtb-hide-body-scroll {
569
  overflow: hidden !important;
584
  }
585
 
586
  /* Addons Page */
587
+ .rtb-addons {
588
  margin-top: 2em;
589
  }
590
 
591
+ .rtb-addons .addon {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
592
  display: inline-block;
 
 
 
 
 
 
 
 
 
 
 
 
 
593
  margin-bottom: 20px;
594
  padding: 20px;
595
  background: #fff;
596
+ min-height: 150px;
597
  border-radius: 3px;
598
+ max-width: 40em;
599
+ margin-right: 20px;
600
+ vertical-align: top;
601
  }
602
 
603
+ .rtb-addons img {
604
  float: left;
605
+ width: 150px;
606
+ height: 150px;
607
  margin: 0 20px 20px 0;
608
  }
609
 
610
+ .rtb-addons .action {
611
  margin-top: 2em;
612
  }
613
 
614
+ .rtb-addons .soon,
615
+ .rtb-addons .installed {
616
  line-height: 28px;
617
  display: inline-block;
618
  padding: 0 0.75em;
620
  box-shadow: 0 1px 0 #ccc;
621
  }
622
 
623
+ .rtb-addons .soon {
624
  background: #F0F05E;
625
  }
626
 
627
+ .rtb-addons .installed {
628
  background: #81F05E;
629
  }
630
 
631
+ .rtb-addons .addon-themes .action .button {
632
+ background: #D24C2B;
633
+ color: #fff;
634
+ border-color: #a53216;
635
+ box-shadow: 0 1px 0 #cc3712;
636
+ }
637
+
638
+ .rtb-addons .addon-themes .action .button:hover,
639
+ .rtb-addons .addon-themes .action .button:focus {
640
+ background: #ff5126;
641
+ }
642
+
643
  @media screen and (max-width: 600px) {
644
 
645
+ .rtb-addons .addon {
646
  text-align: center;
647
  }
648
 
649
+ .rtb-addons img {
650
  float: none;
651
  margin: 0;
652
  }
653
  }
654
 
655
+
656
  /* License page */
657
  .rtb-license-setting .status {
658
  display: inline-block;
assets/img/custom-fields.png ADDED
Binary file
assets/img/export-bookings.png ADDED
Binary file
assets/img/mailchimp.png ADDED
Binary file
assets/img/themes.png ADDED
Binary file
assets/js/admin.js CHANGED
@@ -16,7 +16,7 @@ jQuery(document).ready(function ($) {
16
  hiddenName: true,
17
 
18
  onStart: function() {
19
- if ( input.val() !== '' ) {
20
  var date = new Date( input.val() );
21
  if ( Object.prototype.toString.call( date ) === "[object Date]" ) {
22
  this.set( 'select', date );
@@ -56,6 +56,9 @@ jQuery(document).ready(function ($) {
56
 
57
  } else if ( target.data( 'action' ) == 'email') {
58
  rtb_toggle_email_modal( true, target.data( 'id'), target.data( 'email' ), target.data( 'name' ) );
 
 
 
59
  }
60
 
61
  e.preventDefault();
@@ -87,24 +90,29 @@ jQuery(document).ready(function ($) {
87
  /**
88
  * Modals for the admin page
89
  */
90
- var rtb_booking_modal = $( '#rtb-booking-modal' );
91
- var rtb_booking_modal_fields = rtb_booking_modal.find( '#rtb-booking-form-fields' );
92
- var rtb_booking_modal_submit = rtb_booking_modal.find( 'button' );
93
- var rtb_booking_modal_cancel = rtb_booking_modal.find( '#rtb-cancel-booking-modal' );
94
- var rtb_booking_modal_action_status = rtb_booking_modal.find( '.action-status' );
95
- var rtb_email_modal = $( '#rtb-email-modal' );
96
- var rtb_email_modal_submit = rtb_email_modal.find( 'button' );
97
- var rtb_email_modal_cancel = rtb_email_modal.find( '#rtb-cancel-email-modal' );
98
- var rtb_email_modal_action_status = rtb_email_modal.find( '.action-status' );
99
- var rtb_column_modal = $( '#rtb-column-modal' );
100
- var rtb_column_modal_submit = rtb_column_modal.find( 'button' );
101
- var rtb_column_modal_cancel = rtb_column_modal.find( '#rtb-cancel-column-modal' );
102
- var rtb_column_modal_action_status = rtb_column_modal.find( '.action-status' );
103
- var rtb_details_modal = $( '#rtb-details-modal' );
104
- var rtb_details_modal_close = rtb_details_modal.find( '#rtb-close-details-modal' );
105
- var rtb_details_modal_cancel = rtb_details_modal.find( '#rtb-cancel-details-modal' );
106
- var rtb_booking_modal_error = $( '#rtb-error-modal' );
107
- var rtb_booking_modal_error_msg = rtb_booking_modal_error.find( '.rtb-error-msg' );
 
 
 
 
 
108
 
109
  /**
110
  * Show or hide the booking form modal
@@ -210,7 +218,11 @@ jQuery(document).ready(function ($) {
210
  rtb_details_modal.find( '.actions' ).click( function(e) {
211
  var target = $( e.target );
212
  rtb_toggle_details_modal( false );
213
- rtb_toggle_email_modal( true, target.data( 'id'), target.data( 'email' ), target.data( 'name' ) );
 
 
 
 
214
  });
215
 
216
  } else {
@@ -222,6 +234,36 @@ jQuery(document).ready(function ($) {
222
  }
223
  }
224
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
225
  /**
226
  * Initialize form field events
227
  */
@@ -391,6 +433,17 @@ jQuery(document).ready(function ($) {
391
  }
392
  });
393
 
 
 
 
 
 
 
 
 
 
 
 
394
  // Close modals when ESC is keyed
395
  $(document).keyup( function(e) {
396
  if ( e.which == '27' ) {
@@ -399,6 +452,7 @@ jQuery(document).ready(function ($) {
399
  rtb_toggle_column_modal( false );
400
  rtb_toggle_details_modal( false );
401
  rtb_toggle_booking_form_error_modal( false );
 
402
  }
403
  });
404
 
@@ -577,119 +631,88 @@ jQuery(document).ready(function ($) {
577
  });
578
  });
579
 
580
- // Show the addons
581
- if ( $( '#rtb-addons' ).length ) {
582
-
583
- var rtbAddons = {
584
-
585
- el: $( '#rtb-addons' ),
586
-
587
- load: function() {
588
-
589
- var params = {
590
- action: 'rtb-addons',
591
- nonce: rtb_addons.nonce
592
- };
593
-
594
- var data = $.param( params );
595
-
596
- // Send Ajax request
597
- var jqxhr = $.post( ajaxurl, data, function( r ) {
598
-
599
- rtbAddons.el.find( '.rtb-loading' ).fadeOut( '250', function() {
600
- if ( r.success ) {
601
- rtbAddons.showAddons( r );
602
- } else {
603
- rtbAddons.showError( r );
604
- }
605
- });
606
-
607
 
608
- });
609
- },
610
 
611
- showAddons: function( r ) {
 
 
612
 
613
- if ( typeof r.data == 'undefined' || !r.data.length ) {
614
- rtbAddons.showError();
615
- return false;
616
- }
 
 
 
 
 
617
 
618
- for( var i in r.data ) {
619
- rtbAddons.el.append( rtbAddons.getAddonHTML( r.data[i] ) );
620
- rtbAddons.el.find( '.addon.' + r.data[i].id ).fadeIn();
621
- }
622
- },
623
 
624
- showError: function( r ) {
 
 
 
 
 
 
625
 
626
- if ( typeof r.data == 'undefined' || typeof r.data.msg == 'undefined' ) {
627
- rtbAddons.el.html( '<span class="error">' + rtb_addons.strings.error_unknown + '</span>' );
628
- } else {
629
- rtbAddons.el.html( '<span class="error">' + r.data.msg + '</span>' );
630
- }
631
 
632
- },
633
 
634
- getAddonHTML: function( addon ) {
635
 
636
- if ( typeof addon.id === 'undefined' && typeof addon.title === 'undefined' ) {
637
- return;
 
 
638
  }
639
 
640
- // Set campaign parameters for addons
641
- addon.url += '?utm_source=Plugin&utm_medium=Addon%20List&utm_campaign=Restaurant%20Reservations';
642
-
643
- var html = '<div class="addon ' + addon.id + '">';
644
 
645
- if ( typeof addon.url !== 'undefined' && typeof addon.img !== 'undefined' ) {
646
- html += '<a href="' + addon.url + '"><img src="' + addon.img + '"></a>';
647
- } else if ( typeof addon.img !== 'undefind' ) {
648
- html += '<img src="' + addon.img + '">';
649
- }
650
-
651
- html += '<h3>' + addon.title + '</h3>';
652
 
653
- html += '<div class="details">';
654
 
655
- if ( typeof addon.description !== 'undefined' ) {
656
- html += '<div class="description">' + addon.description + '</div>';
 
 
657
  }
658
 
659
- if ( typeof addon.status !== 'undefined' ) {
660
-
661
- html += '<div class="action">';
662
-
663
- if ( addon.status === 'released' && typeof addon.url !== 'undefined' ) {
664
- html += '<a href="' + addon.url + '" class="button button-primary" target="_blank">';
665
-
666
- if ( typeof addon.price !== 'undefined' && addon.price.length ) {
667
- html += rtb_addons.strings.learn_more;
668
- } else {
669
- html += rtb_addons.strings.free;
670
- }
671
-
672
- html += '</a>';
673
-
674
- } else if ( addon.status === 'installed' ) {
675
- html += '<span class="installed">' + rtb_addons.strings.installed + '</span>';
676
-
677
- } else {
678
- html += '<span class="soon">' + rtb_addons.strings.coming_soon + '</span>';
679
- }
680
-
681
- html += '</div>'; // .action
682
  }
683
 
684
- html += '</div>'; // .details
685
 
686
- html += '</div>'; // .addon
687
-
688
- return html;
 
689
  }
690
- };
691
-
692
- rtbAddons.load();
693
  }
694
 
 
 
 
 
 
 
 
 
 
 
695
  });
16
  hiddenName: true,
17
 
18
  onStart: function() {
19
+ if ( input.val() !== '' ) {
20
  var date = new Date( input.val() );
21
  if ( Object.prototype.toString.call( date ) === "[object Date]" ) {
22
  this.set( 'select', date );
56
 
57
  } else if ( target.data( 'action' ) == 'email') {
58
  rtb_toggle_email_modal( true, target.data( 'id'), target.data( 'email' ), target.data( 'name' ) );
59
+
60
+ } else if ( target.data( 'action' ) == 'ban') {
61
+ rtb_toggle_ban_modal( true, target.data( 'id'), target.data( 'email' ), target.data( 'ip' ) );
62
  }
63
 
64
  e.preventDefault();
90
  /**
91
  * Modals for the admin page
92
  */
93
+ var rtb_booking_modal = $( '#rtb-booking-modal' ),
94
+ rtb_booking_modal_fields = rtb_booking_modal.find( '#rtb-booking-form-fields' ),
95
+ rtb_booking_modal_submit = rtb_booking_modal.find( 'button' ),
96
+ rtb_booking_modal_cancel = rtb_booking_modal.find( '#rtb-cancel-booking-modal' ),
97
+ rtb_booking_modal_action_status = rtb_booking_modal.find( '.action-status' ),
98
+ rtb_email_modal = $( '#rtb-email-modal' ),
99
+ rtb_email_modal_submit = rtb_email_modal.find( 'button' ),
100
+ rtb_email_modal_cancel = rtb_email_modal.find( '#rtb-cancel-email-modal' ),
101
+ rtb_email_modal_action_status = rtb_email_modal.find( '.action-status' ),
102
+ rtb_column_modal = $( '#rtb-column-modal' ),
103
+ rtb_column_modal_submit = rtb_column_modal.find( 'button' ),
104
+ rtb_column_modal_cancel = rtb_column_modal.find( '#rtb-cancel-column-modal' ),
105
+ rtb_column_modal_action_status = rtb_column_modal.find( '.action-status' ),
106
+ rtb_details_modal = $( '#rtb-details-modal' ),
107
+ rtb_details_modal_close = rtb_details_modal.find( '#rtb-close-details-modal' ),
108
+ rtb_details_modal_cancel = rtb_details_modal.find( '#rtb-cancel-details-modal' ),
109
+ rtb_booking_modal_error = $( '#rtb-error-modal' ),
110
+ rtb_booking_modal_error_msg = rtb_booking_modal_error.find( '.rtb-error-msg' ),
111
+ rtb_ban_modal = $( '#rtb-ban-modal' ),
112
+ rtb_ban_modal_submit_email = rtb_ban_modal.find( '#rtb-ban-modal-email-btn' ),
113
+ rtb_ban_modal_submit_ip = rtb_ban_modal.find( '#rtb-ban-modal-ip-btn' ),
114
+ rtb_ban_modal_cancel = rtb_ban_modal.find( '#rtb-cancel-ban-modal' ),
115
+ rtb_ban_modal_action_status = rtb_ban_modal.find( '.action-status' );
116
 
117
  /**
118
  * Show or hide the booking form modal
218
  rtb_details_modal.find( '.actions' ).click( function(e) {
219
  var target = $( e.target );
220
  rtb_toggle_details_modal( false );
221
+ if ( target.data( 'action' ) == 'email') {
222
+ rtb_toggle_email_modal( true, target.data( 'id'), target.data( 'email' ), target.data( 'name' ) );
223
+ } else if ( target.data( 'action' ) == 'ban') {
224
+ rtb_toggle_ban_modal( true, target.data( 'id'), target.data( 'email' ), target.data( 'ip' ) );
225
+ }
226
  });
227
 
228
  } else {
234
  }
235
  }
236
 
237
+ /**
238
+ * Show or hide the ban ip/email form modal
239
+ */
240
+ function rtb_toggle_ban_modal( show, id, email, ip ) {
241
+
242
+ if ( show ) {
243
+ rtb_ban_modal.scrollTop( 0 ).addClass( 'is-visible' );
244
+ rtb_ban_modal.find( '#rtb-ban-modal-email' ).text( email );
245
+ rtb_ban_modal.find( '#rtb-ban-modal-ip' ).text( ip );
246
+ if ( rtb_admin.banned_emails.indexOf( email ) > -1 ) {
247
+ rtb_ban_modal_submit_email.prop( 'disabled', true );
248
+ }
249
+ if ( rtb_admin.banned_ips.indexOf( ip ) > -1 ) {
250
+ rtb_ban_modal_submit_ip.prop( 'disabled', true );
251
+ }
252
+
253
+ $( 'body' ).addClass( 'rtb-hide-body-scroll' );
254
+
255
+ } else {
256
+ rtb_ban_modal.removeClass( 'is-visible' );
257
+ rtb_ban_modal.find( '#rtb-ban-modal-email' ).text( '' );
258
+ rtb_ban_modal.find( '#rtb-ban-modal-ip' ).text( '' );
259
+ rtb_ban_modal_submit_email.prop( 'disabled', false );
260
+ rtb_ban_modal_submit_ip.prop( 'disabled', false );
261
+ rtb_ban_modal_cancel.prop( 'disabled', false );
262
+
263
+ $( 'body' ).removeClass( 'rtb-hide-body-scroll' );
264
+ }
265
+ }
266
+
267
  /**
268
  * Initialize form field events
269
  */
433
  }
434
  });
435
 
436
+ // Close ban modal when background or cancel button is clicked
437
+ rtb_ban_modal.click( function(e) {
438
+ if ( $(e.target).is( rtb_ban_modal ) ) {
439
+ rtb_toggle_ban_modal( false );
440
+ }
441
+
442
+ if ( $(e.target).is( rtb_ban_modal_cancel ) && rtb_ban_modal_cancel.prop( 'disabled' ) !== true ) {
443
+ rtb_toggle_ban_modal( false );
444
+ }
445
+ });
446
+
447
  // Close modals when ESC is keyed
448
  $(document).keyup( function(e) {
449
  if ( e.which == '27' ) {
452
  rtb_toggle_column_modal( false );
453
  rtb_toggle_details_modal( false );
454
  rtb_toggle_booking_form_error_modal( false );
455
+ rtb_toggle_ban_modal( false );
456
  }
457
  });
458
 
631
  });
632
  });
633
 
634
+ // Shared function for banning emails and IPs
635
+ function rtb_ban_modal_submit( e, type ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
636
 
637
+ e.preventDefault();
638
+ e.stopPropagation();
639
 
640
+ if ( $(this).prop( 'disabled' ) === true ) {
641
+ return;
642
+ }
643
 
644
+ // Loading
645
+ if ( type === 'email' ) {
646
+ rtb_ban_modal_submit_email.prop( 'disabled', true );
647
+ } else if ( type === 'ip' ) {
648
+ rtb_ban_modal_submit_ip.prop( 'disabled', true );
649
+ }
650
+ rtb_ban_modal_cancel.prop( 'disabled', true );
651
+ rtb_ban_modal_action_status.addClass( 'is-visible' );
652
+ rtb_show_action_status( rtb_ban_modal_action_status, 'loading' );
653
 
654
+ var params = {};
 
 
 
 
655
 
656
+ params.action = 'rtb-admin-ban-modal';
657
+ params.nonce = rtb_admin.nonce;
658
+ if ( type === 'email' ) {
659
+ params.email = rtb_ban_modal.find( '#rtb-ban-modal-email' ).text();
660
+ } else if ( type === 'ip' ) {
661
+ params.ip = rtb_ban_modal.find( '#rtb-ban-modal-ip' ).text();
662
+ }
663
 
664
+ var data = $.param( params );
 
 
 
 
665
 
666
+ var jqhxr = $.post( ajaxurl, data, function( r ) {
667
 
668
+ if ( r.success ) {
669
 
670
+ if ( type === 'email' ) {
671
+ rtb_admin.banned_emails.push( params.email );
672
+ } else if ( type === 'ip' ) {
673
+ rtb_admin.banned_ips.push( params.ip );
674
  }
675
 
676
+ rtb_show_action_status( rtb_ban_modal_action_status, r.success );
 
 
 
677
 
678
+ // Hide result status icon after a few seconds
679
+ setTimeout( function() {
680
+ rtb_ban_modal.find( '.action-status' ).removeClass( 'is-visible' );
681
+ }, 1000 );
 
 
 
682
 
683
+ } else {
684
 
685
+ if ( typeof r.data == 'undefined' || typeof r.data.error == 'undefined' ) {
686
+ rtb_toggle_booking_form_error_modal( true, rtb_admin.strings.error_unspecified );
687
+ } else {
688
+ rtb_toggle_booking_form_error_modal( true, r.data.msg );
689
  }
690
 
691
+ rtb_ban_modal_cancel.prop( 'disabled', false );
692
+ if ( type === 'email' ) {
693
+ rtb_ban_modal_submit_email.prop( 'disabled', false );
694
+ } else if ( type === 'ip' ) {
695
+ rtb_ban_modal_submit_ip.prop( 'disabled', false );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
696
  }
697
 
698
+ rtb_show_action_status( rtb_ban_modal_action_status, false );
699
 
700
+ // Hide result status icon after a few seconds
701
+ setTimeout( function() {
702
+ rtb_ban_modal.find( '.action-status' ).removeClass( 'is-visible' );
703
+ }, 4000 );
704
  }
705
+ });
 
 
706
  }
707
 
708
+ // Submit ban email form modal
709
+ rtb_ban_modal_submit_email.click( function(e) {
710
+ rtb_ban_modal_submit( e, 'email' );
711
+ });
712
+
713
+ // Submit ban ip form modal
714
+ rtb_ban_modal_submit_ip.click( function(e) {
715
+ rtb_ban_modal_submit( e, 'ip' );
716
+ });
717
+
718
  });
assets/js/booking-form.js CHANGED
@@ -40,7 +40,7 @@ jQuery(document).ready(function ($) {
40
  format: rtb_pickadate.date_format,
41
  formatSubmit: 'yyyy/mm/dd',
42
  hiddenName: true,
43
- min: true,
44
  container: 'body',
45
  firstDay: rtb_pickadate.first_day,
46
 
@@ -112,10 +112,14 @@ jQuery(document).ready(function ($) {
112
  rtb_booking_form.datepicker.set( 'disable', disable_dates );
113
  }
114
 
115
- rtb_pickadate.late_bookings = parseInt( rtb_pickadate.late_bookings, 10 );
116
- if ( rtb_pickadate.late_bookings >= 1440 ) {
117
- var min = Math.floor( rtb_pickadate.late_bookings / 1440 );
118
- rtb_booking_form.datepicker.set( 'min', min );
 
 
 
 
119
  }
120
 
121
  // If no date has been set, select today's date if it's a valid
@@ -161,15 +165,16 @@ jQuery(document).ready(function ($) {
161
  return;
162
  }
163
 
164
- selected_date = new Date( rtb_booking_form.datepicker.get( 'select', 'yyyy/mm/dd' ) );
165
- var selected_date_year = selected_date.getFullYear();
166
- var selected_date_month = selected_date.getMonth();
167
- var selected_date_date = selected_date.getDate();
 
168
 
169
  // Declaring the first element true inverts the timepicker settings. All
170
  // times subsequently declared are valid. Any time that doesn't fall
171
  // within those declarations is invalid.
172
- // See: http://amsul.ca/pickadate.js/time.htm#disable-times-all
173
  var valid_times = [ rtb_booking_form.get_outer_time_range() ];
174
 
175
  // Check if this date is an exception to the rules
@@ -209,6 +214,8 @@ jQuery(document).ready(function ($) {
209
  excp_end_time = [ 24, 0 ]; // End of the day
210
  }
211
 
 
 
212
  valid_times.push( { from: excp_start_time, to: excp_end_time, inverted: true } );
213
  }
214
  }
@@ -269,6 +276,8 @@ jQuery(document).ready(function ($) {
269
  rule_end_time = [ 24, 0 ]; // End of the day
270
  }
271
 
 
 
272
  valid_times.push( { from: rule_start_time, to: rule_end_time, inverted: true } );
273
 
274
  }
@@ -337,6 +346,43 @@ jQuery(document).ready(function ($) {
337
  }
338
  };
339
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
340
 
341
  rtb_booking_form.init();
342
  });
40
  format: rtb_pickadate.date_format,
41
  formatSubmit: 'yyyy/mm/dd',
42
  hiddenName: true,
43
+ min: !rtb_pickadate.allow_past,
44
  container: 'body',
45
  firstDay: rtb_pickadate.first_day,
46
 
112
  rtb_booking_form.datepicker.set( 'disable', disable_dates );
113
  }
114
 
115
+ if ( typeof rtb_pickadate.late_bookings === 'string' && rtb_pickadate.late_bookings == 'same_day' ) {
116
+ rtb_booking_form.datepicker.set( 'min', 1 );
117
+ } else if ( typeof rtb_pickadate.late_bookings === 'number' && rtb_pickadate.late_bookings % 1 === 0 ) {
118
+ rtb_pickadate.late_bookings = parseInt( rtb_pickadate.late_bookings, 10 );
119
+ if ( rtb_pickadate.late_bookings >= 1440 ) {
120
+ var min = Math.floor( rtb_pickadate.late_bookings / 1440 );
121
+ rtb_booking_form.datepicker.set( 'min', min );
122
+ }
123
  }
124
 
125
  // If no date has been set, select today's date if it's a valid
165
  return;
166
  }
167
 
168
+ var selected_date = new Date( rtb_booking_form.datepicker.get( 'select', 'yyyy/mm/dd' ) ),
169
+ selected_date_year = selected_date.getFullYear(),
170
+ selected_date_month = selected_date.getMonth(),
171
+ selected_date_date = selected_date.getDate(),
172
+ current_date = new Date();
173
 
174
  // Declaring the first element true inverts the timepicker settings. All
175
  // times subsequently declared are valid. Any time that doesn't fall
176
  // within those declarations is invalid.
177
+ // See: http://amsul.ca/pickadate.js/time/#disable-times-all
178
  var valid_times = [ rtb_booking_form.get_outer_time_range() ];
179
 
180
  // Check if this date is an exception to the rules
214
  excp_end_time = [ 24, 0 ]; // End of the day
215
  }
216
 
217
+ excp_start_time = rtb_booking_form.get_earliest_time( excp_start_time, selected_date, current_date );
218
+
219
  valid_times.push( { from: excp_start_time, to: excp_end_time, inverted: true } );
220
  }
221
  }
276
  rule_end_time = [ 24, 0 ]; // End of the day
277
  }
278
 
279
+ rule_start_time = rtb_booking_form.get_earliest_time( rule_start_time, selected_date, current_date );
280
+
281
  valid_times.push( { from: rule_start_time, to: rule_end_time, inverted: true } );
282
 
283
  }
346
  }
347
  };
348
 
349
+ /**
350
+ * Get the earliest valid time
351
+ *
352
+ * This checks the valid time for the day and, if a current day, applies
353
+ * any late booking restrictions. It also ensures that times in the past
354
+ * are not availabe.
355
+ *
356
+ * @param array start_time
357
+ * @param array selected_date
358
+ * @param array current_date
359
+ */
360
+ rtb_booking_form.get_earliest_time = function( start_time, selected_date, current_date ) {
361
+
362
+ // Only make adjustments for current day selections
363
+ if ( selected_date.getDate() !== current_date.getDate() ) {
364
+ return start_time;
365
+ }
366
+
367
+ // Get the number of minutes after midnight to compare
368
+ var start_minutes = ( start_time[0] * 60 ) + start_time[1],
369
+ current_minutes = ( current_date.getHours() * 60 ) + current_date.getMinutes(),
370
+ late_booking_minutes;
371
+
372
+ start_minutes = start_minutes > current_minutes ? start_minutes : current_minutes;
373
+
374
+ if ( typeof rtb_pickadate.late_bookings === 'number' && rtb_pickadate.late_bookings % 1 === 0 ) {
375
+ late_booking_minutes = current_minutes + rtb_pickadate.late_bookings;
376
+ if ( late_booking_minutes > start_minutes ) {
377
+ start_minutes = late_booking_minutes;
378
+ }
379
+ }
380
+
381
+ start_time = [ Math.floor( start_minutes / 60 ), start_minutes % 60 ];
382
+
383
+ return start_time;
384
+ };
385
+
386
 
387
  rtb_booking_form.init();
388
  });
includes/Addons.class.php CHANGED
@@ -9,105 +9,13 @@ if ( !class_exists( 'rtbAddons' ) ) {
9
  */
10
  class rtbAddons {
11
 
12
- /**
13
- * API endpoint to retrieve addons list
14
- */
15
- public $api_url;
16
-
17
- /**
18
- * Plugin slug to retrieve addons for
19
- */
20
- public $plugin;
21
-
22
- public function __construct( $args ) {
23
-
24
- $this->parse_args( $args );
25
-
26
- if ( $this->check_config() ) {
27
-
28
- // Add the admin menu
29
- add_action( 'admin_menu', array( $this, 'add_menu_page' ), 100 );
30
-
31
- // Send addon data to the javascript
32
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_assets' ) );
33
-
34
- // Receive ajax calls to fetch addons
35
- add_action( 'wp_ajax_nopriv_rtb-addons' , array( $this , 'ajax_nopriv_get_addons' ) );
36
- add_action( 'wp_ajax_rtb-addons', array( $this, 'ajax_get_addons' ) );
37
 
38
- // Add a newsletter subscription prompt above the addons
39
- add_action( 'rtb_addons_pre', array( $this, 'add_subscribe_pompt' ) );
40
 
41
- }
42
- }
43
-
44
- /**
45
- * Parse the arguments passed in the construction and assign them to
46
- * internal variables.
47
- */
48
- private function parse_args( $args ) {
49
- foreach ( $args as $key => $val ) {
50
- switch ( $key ) {
51
-
52
- case 'api_url' :
53
- $this->{$key} = esc_url( $val );
54
-
55
- case 'plugin' :
56
- $this->{$key} = esc_attr( $val );
57
-
58
- default :
59
- $this->{$key} = $val;
60
-
61
- }
62
- }
63
-
64
- do_action( $this->plugin . '_addons_parse_args' );
65
- }
66
-
67
- /**
68
- * Check that we have everything we need to render the addons page
69
- */
70
- public function check_config() {
71
-
72
- if ( !empty( $this->api_url ) && !empty( $this->plugin ) ) {
73
- return true;
74
- }
75
-
76
- return false;
77
- }
78
-
79
- /**
80
- * Send addon data to the javascript
81
- */
82
- public function enqueue_admin_assets() {
83
-
84
- // Use the page reference in $admin_page_hooks because
85
- // it changes in SOME hooks when it is translated.
86
- // https://core.trac.wordpress.org/ticket/18857
87
- global $admin_page_hooks;
88
-
89
- $screen = get_current_screen();
90
- if ( empty( $screen ) || empty( $admin_page_hooks['rtb-bookings'] ) ) {
91
- return;
92
- }
93
-
94
- if ( $screen->base == $admin_page_hooks['rtb-bookings'] . '_page_rtb-addons' ) {
95
- wp_localize_script(
96
- 'rtb-admin',
97
- 'rtb_addons',
98
- array(
99
- 'nonce' => wp_create_nonce( 'rtb-addons' ),
100
- 'strings' => array(
101
- 'loading' => __( 'Loading', 'restaurant-reservations' ),
102
- 'error_unknown' => _x( 'An unknown error occured.', 'Error message when retrieving list of addons', 'restaurant-reservations' ),
103
- 'installed' => _x( 'Already Installed', 'Label for an addon that is already installed and activated.', 'restaurant-reservations' ),
104
- 'coming_soon' => _x( 'Coming Soon', 'Label for an addon that is not yet released.', 'restaurant-reservations' ),
105
- 'free' => _x( 'Free', 'Label for an addon that is free.', 'restaurant-reservations' ),
106
- 'learn_more' => _x( 'Get It', 'Label for an addon that is released.', 'restaurant-reservations' ),
107
- )
108
- )
109
- );
110
- }
111
  }
112
 
113
  /**
@@ -131,16 +39,77 @@ class rtbAddons {
131
  */
132
  public function show_admin_addons_page() {
133
 
134
- // @todo check for transient and only call the api if its missing
 
135
  ?>
136
 
137
  <div class="wrap">
138
  <h1><?php _e( 'Addons for Restaurant Reservations', 'restaurant-reservations' ); ?></h1>
139
  <?php do_action( 'rtb_addons_pre' ); ?>
140
- <div id="rtb-addons">
141
- <div class="rtb-loading">
142
- <div class="spinner"></div>
143
- Loading
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  </div>
145
  </div>
146
  <?php do_action( 'rtb_addons_post' ); ?>
@@ -149,64 +118,6 @@ class rtbAddons {
149
  <?php
150
  }
151
 
152
- /**
153
- * Handle ajax request for addons from logged out user
154
- */
155
- public function ajax_nopriv_get_addons() {
156
-
157
- wp_send_json_error(
158
- array(
159
- 'error' => 'loggedout',
160
- 'msg' => __( 'You have been logged out. Please login again to retrieve the addons.', 'restaurant-reservations' ),
161
- )
162
- );
163
- }
164
-
165
- /**
166
- * Handle ajax request for addons
167
- */
168
- public function ajax_get_addons() {
169
-
170
- $url = $this->api_url . $this->plugin;
171
-
172
- if ( !check_ajax_referer( 'rtb-addons', 'nonce' ) || !current_user_can( 'manage_options' )) {
173
- wp_send_json_error(
174
- array(
175
- 'error' => 'nopriv',
176
- 'msg' => __( 'You do not have permission to access this page. Please login to an administrator account if you have one.', 'restaurant-reservations' ),
177
- )
178
- );
179
- }
180
-
181
- if ( function_exists( 'curl_init' ) && function_exists( 'curl_setop' ) ) {
182
- $ch = curl_init();
183
- curl_setopt( $ch, CURLOPT_URL, $url );
184
- curl_setopt( $ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json' ) );
185
- curl_setopt( $ch, CURLOPT_USERAGENT, 'PHP-MCAPI/2.0' );
186
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
187
- curl_setopt( $ch, CURLOPT_TIMEOUT, 10 );
188
- $result = curl_exec($ch);
189
- curl_close($ch);
190
-
191
- } elseif ( ini_get( 'allow_url_fopen' ) ) {
192
- $result = @file_get_contents( $url );
193
- } else {
194
- $result = @file_get_contents( RTB_PLUGIN_DIR . '/assets/addons-backup.json' );
195
- }
196
-
197
- if ( $result ) {
198
- // @todo set a transient with this data to reduce calls
199
- wp_send_json_success( json_decode( $result ) );
200
- } else {
201
- wp_send_json_error(
202
- array(
203
- 'error' => 'apifailed',
204
- 'msg' => __( 'The addons list could not be retrieved. Please <a href="">try again</a>. If the problem persists over time, please report it on the <a href="http://wordpress.org/support/plugin/restaurant-reservations" target="_blank">support forums</a>.', 'restaurant-reservations' ),
205
- )
206
- );
207
- }
208
- }
209
-
210
  /**
211
  * Add a prompt for users to subscribe to the Theme of the Crop mailing list
212
  * below the addons list.
@@ -218,7 +129,17 @@ class rtbAddons {
218
  ?>
219
 
220
  <p>
221
- <?php echo sprintf( esc_html_x( 'Find out when new addons are available by subscribing to the %smonthly newsletter%s or following %sTheme of the Crop%s on Twitter.', 'restaurant-reservations' ), '<a href="http://themeofthecrop.com/about/mailing-list/?utm_source=Plugin&utm_medium=Addon%20List&utm_campaign=Restaurant%20Reservations">', '</a>', '<a href="http://twitter.com/themeofthecrop">', '</a>' ); ?>
 
 
 
 
 
 
 
 
 
 
222
  </p>
223
 
224
  <?php
9
  */
10
  class rtbAddons {
11
 
12
+ public function __construct( ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
+ // Add the admin menu
15
+ add_action( 'admin_menu', array( $this, 'add_menu_page' ), 100 );
16
 
17
+ // Add a newsletter subscription prompt above the addons
18
+ add_action( 'rtb_addons_pre', array( $this, 'add_subscribe_pompt' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  }
20
 
21
  /**
39
  */
40
  public function show_admin_addons_page() {
41
 
42
+ // Set campaign parameters for addon URLs
43
+ $url_params = '?utm_source=Plugin&utm_medium=Addon%20List&utm_campaign=Restaurant%20Reservations';
44
  ?>
45
 
46
  <div class="wrap">
47
  <h1><?php _e( 'Addons for Restaurant Reservations', 'restaurant-reservations' ); ?></h1>
48
  <?php do_action( 'rtb_addons_pre' ); ?>
49
+ <div class="rtb-addons">
50
+ <div class="addon addon-custom-fields">
51
+ <a href="https://themeofthecrop.com/plugins/restaurant-reservations/custom-fields/<?php echo $url_params; ?>">
52
+ <img src="<?php echo RTB_PLUGIN_URL . '/assets/img/custom-fields.png'; ?>">
53
+ </a>
54
+ <h3><?php echo esc_html( 'Custom Fields', 'restaurant-reservations' ); ?></h3>
55
+ <div class="details">
56
+ <div class="description">
57
+ <?php echo esc_html( 'Plan your dinner service better by asking for special seating requests, dietary needs and more when customers book online.', 'restaurant-reservations' ); ?>
58
+ </div>
59
+ <div class="action">
60
+ <a href="https://themeofthecrop.com/plugins/restaurant-reservations/custom-fields/<?php echo $url_params; ?>" class="button button-primary" target="_blank">
61
+ <?php echo esc_html( 'Learn More', 'restaurant-reservations' ); ?>
62
+ </a>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ <div class="addon addon-export-bookings">
67
+ <a href="https://themeofthecrop.com/plugins/restaurant-reservations/export-bookings/<?php echo $url_params; ?>">
68
+ <img src="<?php echo RTB_PLUGIN_URL . '/assets/img/export-bookings.png'; ?>">
69
+ </a>
70
+ <h3><?php echo esc_html( 'Export Bookings', 'restaurant-reservations' ); ?></h3>
71
+ <div class="details">
72
+ <div class="description">
73
+ <?php echo esc_html( 'Easily print your bookings in a PDF or export them to an Excel/CSV file so you can analyze patterns, cull customer data and import bookings into other services.' ); ?>
74
+ </div>
75
+ <div class="action">
76
+ <a href="https://themeofthecrop.com/plugins/restaurant-reservations/export-bookings/<?php echo $url_params; ?>" class="button button-primary" target="_blank">
77
+ <?php echo esc_html( 'Learn More', 'restaurant-reservations' ); ?>
78
+ </a>
79
+ </div>
80
+ </div>
81
+ </div>
82
+ <div class="addon addon-mailchimp">
83
+ <a href="https://themeofthecrop.com/plugins/restaurant-reservations/mailchimp/<?php echo $url_params; ?>">
84
+ <img src="<?php echo RTB_PLUGIN_URL . '/assets/img/mailchimp.png'; ?>">
85
+ </a>
86
+ <h3><?php echo esc_html( 'MailChimp', 'restaurant-reservations' ); ?></h3>
87
+ <div class="details">
88
+ <div class="description">
89
+ <?php echo esc_html( 'Subscribe requests to your MailChimp mailing list and watch your subscription rates grow effortlessly.' ); ?>
90
+ </div>
91
+ <div class="action">
92
+ <a href="https://themeofthecrop.com/plugins/restaurant-reservations/mailchimp/<?php echo $url_params; ?>" class="button button-primary" target="_blank">
93
+ <?php echo esc_html( 'Learn More', 'restaurant-reservations' ); ?>
94
+ </a>
95
+ </div>
96
+ </div>
97
+ </div>
98
+ <div class="addon addon-themes">
99
+ <a href="https://themeofthecrop.com/themes/<?php echo $url_params; ?>">
100
+ <img src="<?php echo RTB_PLUGIN_URL . '/assets/img/themes.png'; ?>">
101
+ </a>
102
+ <h3><?php echo esc_html( 'Restaurant WordPress Themes', 'restaurant-reservations' ); ?></h3>
103
+ <div class="details">
104
+ <div class="description">
105
+ <?php echo esc_html( 'Find the best WordPress restaurant themes that integrate beautifully with your reservations plugin.' ); ?>
106
+ </div>
107
+ <div class="action">
108
+ <a href="https://themeofthecrop.com/themes/<?php echo $url_params; ?>" class="button" target="_blank">
109
+ <?php echo esc_html( 'View Themes', 'restaurant-reservations' ); ?>
110
+ </a>
111
+ </div>
112
+ </div>
113
  </div>
114
  </div>
115
  <?php do_action( 'rtb_addons_post' ); ?>
118
  <?php
119
  }
120
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  /**
122
  * Add a prompt for users to subscribe to the Theme of the Crop mailing list
123
  * below the addons list.
129
  ?>
130
 
131
  <p>
132
+ <?php
133
+ echo sprintf(
134
+ esc_html_x( 'Find out when new addons are available by subscribing to the %smonthly newsletter%s, liking %sTheme of the Crop%s on Facebook, or following %sTheme of the Crop%s on Twitter.', 'restaurant-reservations' ),
135
+ '<a target="_blank" href="https://themeofthecrop.com/about/mailing-list/?utm_source=Plugin&utm_medium=Addon%20List&utm_campaign=Restaurant%20Reservations">',
136
+ '</a>',
137
+ '<a target="_blank" href="https://www.facebook.com/themeofthecrop/">',
138
+ '</a>',
139
+ '<a target="_blank" href="http://twitter.com/themeofthecrop">',
140
+ '</a>'
141
+ );
142
+ ?>
143
  </p>
144
 
145
  <?php
includes/AdminBookings.class.php CHANGED
@@ -38,6 +38,8 @@ class rtbAdminBookings {
38
  add_action( 'wp_ajax_rtb-admin-email-modal', array( $this, 'email_modal_ajax' ) );
39
  add_action( 'wp_ajax_nopriv_rtb-admin-column-modal' , array( $this , 'nopriv_ajax' ) );
40
  add_action( 'wp_ajax_rtb-admin-column-modal', array( $this, 'column_modal_ajax' ) );
 
 
41
 
42
  // Validate post status and notification fields
43
  add_action( 'rtb_validate_booking_submission', array( $this, 'validate_admin_fields' ) );
@@ -270,6 +272,39 @@ class rtbAdminBookings {
270
  </div>
271
  </div>
272
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
273
  <!-- Restaurant Reservations error message modal -->
274
  <div id="rtb-error-modal" class="rtb-admin-modal">
275
  <div class="rtb-error rtb-container">
@@ -616,7 +651,9 @@ class rtbAdminBookings {
616
  $email->message = $message;
617
  $email->set_booking( $booking );
618
  if ( $email->prepare_notification() ) {
 
619
  $email->send_notification();
 
620
  }
621
 
622
  // Store email in postmeta for log
@@ -656,6 +693,55 @@ class rtbAdminBookings {
656
  wp_send_json_success();
657
  }
658
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
659
  /**
660
  * Validate post status and notification fields
661
  * @since 1.3
38
  add_action( 'wp_ajax_rtb-admin-email-modal', array( $this, 'email_modal_ajax' ) );
39
  add_action( 'wp_ajax_nopriv_rtb-admin-column-modal' , array( $this , 'nopriv_ajax' ) );
40
  add_action( 'wp_ajax_rtb-admin-column-modal', array( $this, 'column_modal_ajax' ) );
41
+ add_action( 'wp_ajax_nopriv_rtb-admin-ban-modal' , array( $this , 'nopriv_ajax' ) );
42
+ add_action( 'wp_ajax_rtb-admin-ban-modal', array( $this, 'ban_modal_ajax' ) );
43
 
44
  // Validate post status and notification fields
45
  add_action( 'rtb_validate_booking_submission', array( $this, 'validate_admin_fields' ) );
272
  </div>
273
  </div>
274
 
275
+ <!-- Restaurant Reservations ban email/ip modal -->
276
+ <div id="rtb-ban-modal" class="rtb-admin-modal">
277
+ <div class="rtb-ban-form rtb-container">
278
+ <div class="rtb-ban-msg">
279
+ <p class="intro">
280
+ <?php
281
+ printf(
282
+ __( 'Ban future bookings from the email address %s or the IP address %s?', 'restaurant-reservations' ),
283
+ '<span id="rtb-ban-modal-email"></span>',
284
+ '<span id="rtb-ban-modal-ip"></span>'
285
+ );
286
+ ?>
287
+ </p>
288
+ <p>
289
+ <?php
290
+ esc_html_e( 'It is recommended to ban by email address instead of IP. Only ban by IP address to block a malicious user who is using different email addresses to avoid a previous ban.', 'restaurant-reservations' );
291
+ ?>
292
+ </p>
293
+ </div>
294
+ <button class="button button-primary" id="rtb-ban-modal-email-btn">Ban Email</button>
295
+ <button class="button button-primary" id="rtb-ban-modal-ip-btn">Ban IP</button>
296
+ <a href="#" id="rtb-cancel-ban-modal" class="button"><?php _e( 'Close', 'restaurant-reservations' ); ?></a>
297
+ <a class="button-link" href="<?php echo esc_url( admin_url( '/admin.php?page=rtb-settings' ) ); ?>" target="_blank">
298
+ <?php esc_html_e( 'View all bans', 'restaurant-reservations' ); ?>
299
+ </a>
300
+ <div class="action-status">
301
+ <span class="spinner loading"></span>
302
+ <span class="dashicons dashicons-no-alt error"></span>
303
+ <span class="dashicons dashicons-yes success"></span>
304
+ </div>
305
+ </div>
306
+ </div>
307
+
308
  <!-- Restaurant Reservations error message modal -->
309
  <div id="rtb-error-modal" class="rtb-admin-modal">
310
  <div class="rtb-error rtb-container">
651
  $email->message = $message;
652
  $email->set_booking( $booking );
653
  if ( $email->prepare_notification() ) {
654
+ do_action( 'rtb_send_notification_before', $email );
655
  $email->send_notification();
656
+ do_action( 'rtb_send_notification_after', $email );
657
  }
658
 
659
  // Store email in postmeta for log
693
  wp_send_json_success();
694
  }
695
 
696
+ /**
697
+ * Handle ajax requests to ban by IP or email address
698
+ *
699
+ * @since 1.3.1
700
+ */
701
+ public function ban_modal_ajax() {
702
+
703
+ global $rtb_controller;
704
+
705
+ // Authenticate request
706
+ if ( !check_ajax_referer( 'rtb-admin', 'nonce' ) || !current_user_can( 'manage_bookings' ) ) {
707
+ $this->nopriv_ajax();
708
+ }
709
+
710
+ // Ban an email address
711
+ if ( isset( $_POST['email'] ) && !empty( $_POST['email'] ) ) {
712
+ $email = trim( sanitize_text_field( $_POST['email'] ) );
713
+ $banned_emails = preg_split( '/\r\n|\r|\n/', (string) $rtb_controller->settings->get_setting( 'ban-emails' ) );
714
+
715
+ if ( !in_array( $email, $banned_emails ) ) {
716
+ $banned_emails[] = $email;
717
+ $rtb_controller->settings->settings['ban-emails'] = join( "\n", $banned_emails );
718
+ update_option( 'rtb-settings', $rtb_controller->settings->settings );
719
+ }
720
+
721
+ wp_send_json_success();
722
+
723
+ // Ban an IP address
724
+ } elseif ( isset( $_POST['ip'] ) && !empty( $_POST['ip'] ) ) {
725
+ $ip = trim( sanitize_text_field( $_POST['ip'] ) );
726
+ $banned_ips = preg_split( '/\r\n|\r|\n/', (string) $rtb_controller->settings->get_setting( 'ban-ips' ) );
727
+
728
+ if ( !in_array( $ip, $banned_ips ) ) {
729
+ $banned_ips[] = $ip;
730
+ $rtb_controller->settings->settings['ban-ips'] = join( "\n", $banned_ips );
731
+ update_option( 'rtb-settings', $rtb_controller->settings->settings );
732
+ }
733
+
734
+ wp_send_json_success();
735
+ }
736
+
737
+ wp_send_json_error(
738
+ array(
739
+ 'error' => 'no_data',
740
+ 'msg' => __( 'No IP or email address could be found for this ban request.', 'restaurant-reservations' ),
741
+ )
742
+ );
743
+ }
744
+
745
  /**
746
  * Validate post status and notification fields
747
  * @since 1.3
includes/Booking.class.php CHANGED
@@ -80,6 +80,7 @@ class rtbBooking {
80
  'phone' => '',
81
  'date_submission' => '',
82
  'logs' => array(),
 
83
  );
84
 
85
  $meta_defaults = apply_filters( 'rtb_booking_metadata_defaults', $meta_defaults );
@@ -95,6 +96,7 @@ class rtbBooking {
95
  $this->phone = $meta['phone'];
96
  $this->date_submission = $meta['date_submission'];
97
  $this->logs = $meta['logs'];
 
98
  }
99
 
100
  /**
@@ -243,6 +245,15 @@ class rtbBooking {
243
  );
244
  }
245
 
 
 
 
 
 
 
 
 
 
246
  } else {
247
  $late_bookings_seconds = $late_bookings * 60; // Late bookings allowance in seconds
248
  if ( $request->format( 'U' ) < ( current_time( 'timestamp' ) + $late_bookings_seconds ) ) {
@@ -264,7 +275,7 @@ class rtbBooking {
264
 
265
  // Check against scheduling exception rules
266
  $exceptions = $rtb_controller->settings->get_setting( 'schedule-closed' );
267
- if ( empty( $this->validation_errors ) && !empty( $exceptions ) ) {
268
  $exception_is_active = false;
269
  $datetime_is_valid = false;
270
  foreach( $exceptions as $exception ) {
@@ -298,7 +309,7 @@ class rtbBooking {
298
 
299
  // Check against weekly scheduling rules
300
  $rules = $rtb_controller->settings->get_setting( 'schedule-open' );
301
- if ( empty( $exception_is_active ) && empty( $this->validation_errors ) && !empty( $rules ) ) {
302
  $request_weekday = strtolower( $request->format( 'l' ) );
303
  $time_is_valid = null;
304
  $day_is_valid = null;
@@ -394,6 +405,14 @@ class rtbBooking {
394
  'message' => sprintf( __( 'We only accept bookings for parties of up to %d people.', 'restaurant-reservations' ), $party_size ),
395
  );
396
  }
 
 
 
 
 
 
 
 
397
  }
398
 
399
  // Email/Phone
@@ -429,6 +448,22 @@ class rtbBooking {
429
  }
430
  }
431
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
432
  do_action( 'rtb_validate_booking_submission', $this );
433
 
434
  }
@@ -482,6 +517,64 @@ class rtbBooking {
482
  return false;
483
  }
484
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
485
  /**
486
  * Add a log entry to the booking
487
  *
@@ -534,6 +627,7 @@ class rtbBooking {
534
  'email' => $this->email,
535
  'phone' => $this->phone,
536
  'date_submission' => current_time( 'timestamp' ),
 
537
  );
538
 
539
  if ( !empty( $this->logs ) ) {
80
  'phone' => '',
81
  'date_submission' => '',
82
  'logs' => array(),
83
+ 'ip' => '',
84
  );
85
 
86
  $meta_defaults = apply_filters( 'rtb_booking_metadata_defaults', $meta_defaults );
96
  $this->phone = $meta['phone'];
97
  $this->date_submission = $meta['date_submission'];
98
  $this->logs = $meta['logs'];
99
+ $this->ip = $meta['ip'];
100
  }
101
 
102
  /**
245
  );
246
  }
247
 
248
+ } elseif ( $late_bookings === 'same_day' ) {
249
+ if ( $request->format( 'Y-m-d' ) == current_time( 'Y-m-d' ) ) {
250
+ $this->validation_errors[] = array(
251
+ 'field' => 'time',
252
+ 'error_msg' => 'Booking request made on same day',
253
+ 'message' => __( 'Sorry, bookings can not be made for the same day.', 'restaurant-reservations' ),
254
+ );
255
+ }
256
+
257
  } else {
258
  $late_bookings_seconds = $late_bookings * 60; // Late bookings allowance in seconds
259
  if ( $request->format( 'U' ) < ( current_time( 'timestamp' ) + $late_bookings_seconds ) ) {
275
 
276
  // Check against scheduling exception rules
277
  $exceptions = $rtb_controller->settings->get_setting( 'schedule-closed' );
278
+ if ( empty( $this->validation_errors ) && !empty( $exceptions ) && !current_user_can( 'manage_bookings' ) ) {
279
  $exception_is_active = false;
280
  $datetime_is_valid = false;
281
  foreach( $exceptions as $exception ) {
309
 
310
  // Check against weekly scheduling rules
311
  $rules = $rtb_controller->settings->get_setting( 'schedule-open' );
312
+ if ( empty( $exception_is_active ) && empty( $this->validation_errors ) && !empty( $rules ) && !current_user_can( 'manage_bookings' ) ) {
313
  $request_weekday = strtolower( $request->format( 'l' ) );
314
  $time_is_valid = null;
315
  $day_is_valid = null;
405
  'message' => sprintf( __( 'We only accept bookings for parties of up to %d people.', 'restaurant-reservations' ), $party_size ),
406
  );
407
  }
408
+ $party_size_min = $rtb_controller->settings->get_setting( 'party-size-min' );
409
+ if ( !empty( $party_size_min ) && $party_size_min > $this->party ) {
410
+ $this->validation_errors[] = array(
411
+ 'field' => 'party',
412
+ 'post_variable' => $this->party,
413
+ 'message' => sprintf( __( 'We only accept bookings for parties of more than %d people.', 'restaurant-reservations' ), $party_size_min ),
414
+ );
415
+ }
416
  }
417
 
418
  // Email/Phone
448
  }
449
  }
450
 
451
+ // Check if the email or IP is banned
452
+ if ( !current_user_can( 'manage_bookings' ) ) {
453
+ $ip = $_SERVER['REMOTE_ADDR'];
454
+ if ( !$this->is_valid_ip( $ip ) || !$this->is_valid_email( $this->email ) ) {
455
+ $this->validation_errors[] = array(
456
+ 'field' => 'date',
457
+ 'post_variable' => $ip,
458
+ 'message' => __( 'Your booking has been rejected. Please call us if you would like to make a booking.', 'restaurant-reservations' ),
459
+ );
460
+ } elseif ( empty( $this->ip ) ) {
461
+ $this->ip = sanitize_text_field( $ip );
462
+ }
463
+ } elseif ( empty( $this->ip ) ) {
464
+ $this->ip = sanitize_text_field( $_SERVER['REMOTE_ADDR'] );
465
+ }
466
+
467
  do_action( 'rtb_validate_booking_submission', $this );
468
 
469
  }
517
  return false;
518
  }
519
 
520
+ /**
521
+ * Check if an IP address has been banned
522
+ *
523
+ * @param string $ip
524
+ * @return bool
525
+ * @since 1.7
526
+ */
527
+ public function is_valid_ip( $ip = null ) {
528
+
529
+ if ( is_null( $ip ) ) {
530
+ $ip = isset( $this->ip ) ? $this->ip : null;
531
+ if ( is_null( $ip ) ) {
532
+ return false;
533
+ }
534
+ }
535
+
536
+ global $rtb_controller;
537
+
538
+ $banned_ips = array_filter( explode( "\n", $rtb_controller->settings->get_setting( 'ban-ips' ) ) );
539
+
540
+ foreach( $banned_ips as $banned_ip ) {
541
+ if ( $ip == trim( $banned_ip ) ) {
542
+ return false;
543
+ }
544
+ }
545
+
546
+ return true;
547
+ }
548
+
549
+ /**
550
+ * Check if an email address has been banned
551
+ *
552
+ * @param string $email
553
+ * @return bool
554
+ * @since 1.7
555
+ */
556
+ public function is_valid_email( $email = null ) {
557
+
558
+ if ( is_null( $email ) ) {
559
+ $email = isset( $this->email ) ? $this->email : null;
560
+ if ( is_null( $email ) ) {
561
+ return false;
562
+ }
563
+ }
564
+
565
+ global $rtb_controller;
566
+
567
+ $banned_emails = array_filter( explode( "\n", $rtb_controller->settings->get_setting( 'ban-emails' ) ) );
568
+
569
+ foreach( $banned_emails as $banned_email ) {
570
+ if ( $email == trim( $banned_email ) ) {
571
+ return false;
572
+ }
573
+ }
574
+
575
+ return true;
576
+ }
577
+
578
  /**
579
  * Add a log entry to the booking
580
  *
627
  'email' => $this->email,
628
  'phone' => $this->phone,
629
  'date_submission' => current_time( 'timestamp' ),
630
+ 'ip' => $this->ip,
631
  );
632
 
633
  if ( !empty( $this->logs ) ) {
includes/Compatibility.class.php CHANGED
@@ -15,9 +15,10 @@ class rtbCompatibility {
15
  */
16
  public function __construct() {
17
 
18
- // Preserve this defined constant in case anyone relied on it
19
  // to check if the plugin was active
20
  define( 'RTB_TEXTDOMAIN', 'rtbdomain' );
 
21
 
22
  // Load a .mo file for an old textdomain if one exists
23
  add_filter( 'load_textdomain_mofile', array( $this, 'load_old_textdomain' ), 10, 2 );
15
  */
16
  public function __construct() {
17
 
18
+ // Preserve defined constants in case anyone relied on them
19
  // to check if the plugin was active
20
  define( 'RTB_TEXTDOMAIN', 'rtbdomain' );
21
+ define( 'RTB_LOAD_FRONTEND_ASSETS', apply_filters( 'rtb-load-frontend-assets', true ) );
22
 
23
  // Load a .mo file for an old textdomain if one exists
24
  add_filter( 'load_textdomain_mofile', array( $this, 'load_old_textdomain' ), 10, 2 );
includes/MultipleLocations.class.php CHANGED
@@ -81,7 +81,6 @@ if ( ! class_exists( 'rtbMultipleLocations', false ) ) {
81
  add_filter( 'rtb_query_args', array( $this, 'modify_query' ), 10, 2 );
82
  add_filter( 'rtb_bookings_all_table_columns', array( $this, 'add_location_column' ) );
83
  add_filter( 'rtb_bookings_table_column', array( $this, 'print_location_column' ), 10, 3 );
84
- add_filter( 'rtb_bookings_table_column_details', array( $this, 'add_details_column_items' ), 10, 2 );
85
  add_action( 'edit_form_after_title', array( $this, 'add_meta_nonce' ) );
86
  add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
87
  add_filter( 'the_content', array( $this, 'append_to_content' ) );
@@ -431,32 +430,6 @@ if ( ! class_exists( 'rtbMultipleLocations', false ) ) {
431
  return $location->name;
432
  }
433
 
434
- /**
435
- * Add the location to the details column if the column has been
436
- * hidden
437
- *
438
- * @since 1.6
439
- */
440
- public function add_details_column_items( $details, $booking ) {
441
-
442
- global $rtb_controller;
443
-
444
- $visible_columns = $rtb_controller->bookings->bookings_table->get_columns();
445
- if ( !isset( $visible_columns['location'] ) ) {
446
-
447
- $value = $rtb_controller->bookings->bookings_table->column_default( $booking, 'location' );
448
-
449
- if ( !empty( $value ) ) {
450
- $details[] = array(
451
- 'label' => __( 'Location', 'restaurant-reservations' ),
452
- 'value' => $value,
453
- );
454
- }
455
- }
456
-
457
- return $details;
458
- }
459
-
460
  /**
461
  * Modify queries to add location taxonomy parameters
462
  *
81
  add_filter( 'rtb_query_args', array( $this, 'modify_query' ), 10, 2 );
82
  add_filter( 'rtb_bookings_all_table_columns', array( $this, 'add_location_column' ) );
83
  add_filter( 'rtb_bookings_table_column', array( $this, 'print_location_column' ), 10, 3 );
 
84
  add_action( 'edit_form_after_title', array( $this, 'add_meta_nonce' ) );
85
  add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
86
  add_filter( 'the_content', array( $this, 'append_to_content' ) );
430
  return $location->name;
431
  }
432
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
433
  /**
434
  * Modify queries to add location taxonomy parameters
435
  *
includes/Notifications.class.php CHANGED
@@ -171,7 +171,9 @@ class rtbNotifications {
171
  if ( $event == $notification->event ) {
172
  $notification->set_booking( $this->booking );
173
  if ( $notification->prepare_notification() ) {
 
174
  $notification->send_notification();
 
175
  }
176
  }
177
  }
171
  if ( $event == $notification->event ) {
172
  $notification->set_booking( $this->booking );
173
  if ( $notification->prepare_notification() ) {
174
+ do_action( 'rtb_send_notification_before', $notification );
175
  $notification->send_notification();
176
+ do_action( 'rtb_send_notification_after', $notification );
177
  }
178
  }
179
  }
includes/Settings.class.php CHANGED
@@ -90,8 +90,8 @@ class rtbSettings {
90
  $this->defaults = array(
91
 
92
  'success-message' => _x( 'Thanks, your booking request is waiting to be confirmed. Updates will be sent to the email address you provided.', 'restaurant-reservations' ),
93
- 'date-format' => _x( 'mmmm d, yyyy', 'Default date format for display. Must match formatting rules at http://amsul.ca/pickadate.js/date.htm#formatting-rules', 'restaurant-reservations' ),
94
- 'time-format' => _x( 'h:i A', 'Default time format for display. Must match formatting rules at http://amsul.ca/pickadate.js/time.htm#formats', 'restaurant-reservations' ),
95
  'time-interval' => _x( '30', 'Default interval in minutes when selecting a time.', 'restaurant-reservations' ),
96
 
97
  // Email address where admin notifications should be sent
@@ -262,6 +262,19 @@ Sorry, we could not accomodate your booking request. We\'re full or not open at
262
  )
263
  );
264
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  $sap->add_setting(
266
  'rtb-settings',
267
  'rtb-general',
@@ -294,7 +307,7 @@ Sorry, we could not accomodate your booking request. We\'re full or not open at
294
  array(
295
  'id' => 'date-format',
296
  'title' => __( 'Date Format', 'restaurant-reservations' ),
297
- 'description' => sprintf( __( 'Define how the date is formatted on the booking form. %sFormatting rules%s. This only changes the format on the booking form. To change the date format in notification messages, modify your general %sWordPress Settings%s.', 'restaurant-reservations' ), '<a href="http://amsul.ca/pickadate.js/date.htm#formatting-rules">', '</a>', '<a href="' . admin_url( 'options-general.php' ) . '">', '</a>' ),
298
  'placeholder' => $this->defaults['date-format'],
299
  )
300
  );
@@ -306,13 +319,13 @@ Sorry, we could not accomodate your booking request. We\'re full or not open at
306
  array(
307
  'id' => 'time-format',
308
  'title' => __( 'Time Format', 'restaurant-reservations' ),
309
- 'description' => sprintf( __( 'Define how the time is formatted on the booking form. %sFormatting rules%s. This only changes the format on the booking form. To change the time format in notification messages, modify your general %sWordPress Settings%s.', 'restaurant-reservations' ), '<a href="http://amsul.ca/pickadate.js/time.htm#formatting-rules">', '</a>', '<a href="' . admin_url( 'options-general.php' ) . '">', '</a>' ),
310
  'placeholder' => $this->defaults['time-format'],
311
  )
312
  );
313
 
314
  // Add i8n setting for pickadate if the frontend assets are to be loaded
315
- if ( RTB_LOAD_FRONTEND_ASSETS ) {
316
  $sap->add_setting(
317
  'rtb-settings',
318
  'rtb-general',
@@ -326,6 +339,28 @@ Sorry, we could not accomodate your booking request. We\'re full or not open at
326
  );
327
  }
328
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
329
  $sap->add_section(
330
  'rtb-settings',
331
  array(
@@ -434,13 +469,14 @@ Sorry, we could not accomodate your booking request. We\'re full or not open at
434
  'description' => __( 'Select how late customers can make their booking. (Administrators and Booking Managers are not restricted by this setting.)', 'restaurant-reservations' ),
435
  'blank_option' => false,
436
  'options' => array(
437
- '' => __( 'Up to the last minute', 'restaurant-reservations' ),
438
- '15' => __( 'At least 15 minutes in advance', 'restaurant-reservations' ),
439
- '30' => __( 'At least 30 minutes in advance', 'restaurant-reservations' ),
440
- '45' => __( 'At least 45 minutes in advance', 'restaurant-reservations' ),
441
- '60' => __( 'At least 1 hour in advance', 'restaurant-reservations' ),
442
- '240' => __( 'At least 4 hours in advance', 'restaurant-reservations' ),
443
- '1440' => __( 'At least 1 day in advance', 'restaurant-reservations' ),
 
444
  )
445
  )
446
  );
@@ -693,11 +729,13 @@ Sorry, we could not accomodate your booking request. We\'re full or not open at
693
  * Get options for the party size setting
694
  * @since 1.3
695
  */
696
- public function get_party_size_setting_options() {
697
 
698
- $options = array(
699
- '' => __( 'Any size', 'restaurant-reservations' ),
700
- );
 
 
701
 
702
  $max = apply_filters( 'rtb_party_size_upper_limit', 100 );
703
 
@@ -715,10 +753,12 @@ Sorry, we could not accomodate your booking request. We\'re full or not open at
715
  public function get_form_party_options() {
716
 
717
  $party_size = (int) $this->get_setting( 'party-size' );
 
718
 
 
719
  $max = empty( $party_size ) ? apply_filters( 'rtb_party_size_upper_limit', 100 ) : (int) $this->get_setting( 'party-size' );
720
 
721
- for ( $i = 1; $i <= $max; $i++ ) {
722
  $options[$i] = $i;
723
  }
724
 
90
  $this->defaults = array(
91
 
92
  'success-message' => _x( 'Thanks, your booking request is waiting to be confirmed. Updates will be sent to the email address you provided.', 'restaurant-reservations' ),
93
+ 'date-format' => _x( 'mmmm d, yyyy', 'Default date format for display. Must match formatting rules at http://amsul.ca/pickadate.js/date/#formats', 'restaurant-reservations' ),
94
+ 'time-format' => _x( 'h:i A', 'Default time format for display. Must match formatting rules at http://amsul.ca/pickadate.js/time/#formats', 'restaurant-reservations' ),
95
  'time-interval' => _x( '30', 'Default interval in minutes when selecting a time.', 'restaurant-reservations' ),
96
 
97
  // Email address where admin notifications should be sent
262
  )
263
  );
264
 
265
+ $sap->add_setting(
266
+ 'rtb-settings',
267
+ 'rtb-general',
268
+ 'select',
269
+ array(
270
+ 'id' => 'party-size-min',
271
+ 'title' => __( 'Min Party Size', 'restaurant-reservations' ),
272
+ 'description' => __( 'Set a minimum allowed party size for bookings.', 'restaurant-reservations' ),
273
+ 'blank_option' => false,
274
+ 'options' => $this->get_party_size_setting_options( false ),
275
+ )
276
+ );
277
+
278
  $sap->add_setting(
279
  'rtb-settings',
280
  'rtb-general',
307
  array(
308
  'id' => 'date-format',
309
  'title' => __( 'Date Format', 'restaurant-reservations' ),
310
+ 'description' => sprintf( __( 'Define how the date is formatted on the booking form. %sFormatting rules%s. This only changes the format on the booking form. To change the date format in notification messages, modify your general %sWordPress Settings%s.', 'restaurant-reservations' ), '<a href="http://amsul.ca/pickadate.js/date/#formats">', '</a>', '<a href="' . admin_url( 'options-general.php' ) . '">', '</a>' ),
311
  'placeholder' => $this->defaults['date-format'],
312
  )
313
  );
319
  array(
320
  'id' => 'time-format',
321
  'title' => __( 'Time Format', 'restaurant-reservations' ),
322
+ 'description' => sprintf( __( 'Define how the time is formatted on the booking form. %sFormatting rules%s. This only changes the format on the booking form. To change the time format in notification messages, modify your general %sWordPress Settings%s.', 'restaurant-reservations' ), '<a href="http://amsul.ca/pickadate.js/time/#formats">', '</a>', '<a href="' . admin_url( 'options-general.php' ) . '">', '</a>' ),
323
  'placeholder' => $this->defaults['time-format'],
324
  )
325
  );
326
 
327
  // Add i8n setting for pickadate if the frontend assets are to be loaded
328
+ if ( apply_filters( 'rtb-load-frontend-assets', true ) ) {
329
  $sap->add_setting(
330
  'rtb-settings',
331
  'rtb-general',
339
  );
340
  }
341
 
342
+ $sap->add_setting(
343
+ 'rtb-settings',
344
+ 'rtb-general',
345
+ 'textarea',
346
+ array(
347
+ 'id' => 'ban-emails',
348
+ 'title' => __( 'Banned Email Addresses', 'restaurant-reservations' ),
349
+ 'description' => __( 'You can block bookings from specific email addresses. Enter each email address on a separate line.', 'restaurant-reservations' ),
350
+ )
351
+ );
352
+
353
+ $sap->add_setting(
354
+ 'rtb-settings',
355
+ 'rtb-general',
356
+ 'textarea',
357
+ array(
358
+ 'id' => 'ban-ips',
359
+ 'title' => __( 'Banned IP Addresses', 'restaurant-reservations' ),
360
+ 'description' => __( 'You can block bookings from specific IP addresses. Enter each IP address on a separate line. Be aware that many internet providers rotate their IP address assignments, so an IP address may accidentally refer to a different user. Also, if you block an IP address used by a public connection, such as cafe WIFI, a public library, or a university network, you may inadvertantly block several people.', 'restaurant-reservations' ),
361
+ )
362
+ );
363
+
364
  $sap->add_section(
365
  'rtb-settings',
366
  array(
469
  'description' => __( 'Select how late customers can make their booking. (Administrators and Booking Managers are not restricted by this setting.)', 'restaurant-reservations' ),
470
  'blank_option' => false,
471
  'options' => array(
472
+ '' => __( 'Up to the last minute', 'restaurant-reservations' ),
473
+ '15' => __( 'At least 15 minutes in advance', 'restaurant-reservations' ),
474
+ '30' => __( 'At least 30 minutes in advance', 'restaurant-reservations' ),
475
+ '45' => __( 'At least 45 minutes in advance', 'restaurant-reservations' ),
476
+ '60' => __( 'At least 1 hour in advance', 'restaurant-reservations' ),
477
+ '240' => __( 'At least 4 hours in advance', 'restaurant-reservations' ),
478
+ '1440' => __( 'At least 24 hours in advance', 'restaurant-reservations' ),
479
+ 'same_day' => __( 'Block same-day bookings', 'restaurant-reservations' ),
480
  )
481
  )
482
  );
729
  * Get options for the party size setting
730
  * @since 1.3
731
  */
732
+ public function get_party_size_setting_options( $max = true ) {
733
 
734
+ $options = array();
735
+
736
+ if ( $max ) {
737
+ $options[''] = __( 'Any size', 'restaurant-reservations' );
738
+ }
739
 
740
  $max = apply_filters( 'rtb_party_size_upper_limit', 100 );
741
 
753
  public function get_form_party_options() {
754
 
755
  $party_size = (int) $this->get_setting( 'party-size' );
756
+ $party_size_min = (int) $this->get_setting( 'party-size-min' );
757
 
758
+ $min = empty( $party_size_min ) ? 1 : (int) $this->get_setting( 'party-size-min' );
759
  $max = empty( $party_size ) ? apply_filters( 'rtb_party_size_upper_limit', 100 ) : (int) $this->get_setting( 'party-size' );
760
 
761
+ for ( $i = $min; $i <= $max; $i++ ) {
762
  $options[$i] = $i;
763
  }
764
 
includes/WP_List_Table.BookingsTable.class.php CHANGED
@@ -323,6 +323,7 @@ class rtbBookingsTable extends WP_List_Table {
323
  }
324
 
325
  $all_default_columns = $this->get_all_default_columns();
 
326
 
327
  global $rtb_controller;
328
  $visible_columns = $rtb_controller->settings->get_setting( 'bookings-table-columns' );
@@ -333,9 +334,9 @@ class rtbBookingsTable extends WP_List_Table {
333
  $columns['cb'] = $all_default_columns['cb'];
334
  $columns['date'] = $all_default_columns['date'];
335
 
336
- foreach( $all_default_columns as $key => $column ) {
337
  if ( in_array( $key, $visible_columns ) ) {
338
- $columns[$key] = $all_default_columns[$key];
339
  }
340
  }
341
  $columns['details'] = $all_default_columns['details'];
@@ -374,6 +375,7 @@ class rtbBookingsTable extends WP_List_Table {
374
  */
375
  public function get_all_columns() {
376
  $columns = $this->get_all_default_columns();
 
377
  return apply_filters( 'rtb_bookings_all_table_columns', $columns );
378
  }
379
 
@@ -394,6 +396,7 @@ class rtbBookingsTable extends WP_List_Table {
394
  * @since 0.0.1
395
  */
396
  public function column_default( $booking, $column_name ) {
 
397
  switch ( $column_name ) {
398
  case 'date' :
399
  $value = $booking->format_date( $booking->date );
@@ -407,21 +410,26 @@ class rtbBookingsTable extends WP_List_Table {
407
  }
408
 
409
  break;
 
410
  case 'party' :
411
  $value = $booking->party;
412
  break;
 
413
  case 'name' :
414
  $value = $booking->name;
415
  break;
 
416
  case 'email' :
417
  $value = $booking->email;
418
  $value .= '<div class="actions">';
419
  $value .= '<a href="#" data-id="' . esc_attr( $booking->ID ) . '" data-action="email" data-email="' . esc_attr( $booking->email ) . '" data-name="' . $booking->name . '">' . __( 'Send Email', 'restaurant-reservations' ) . '</a>';
420
  $value .= '</div>';
421
  break;
 
422
  case 'phone' :
423
  $value = $booking->phone;
424
  break;
 
425
  case 'status' :
426
  global $rtb_controller;
427
  if ( !empty( $rtb_controller->cpts->booking_statuses[$booking->post_status] ) ) {
@@ -432,6 +440,7 @@ class rtbBookingsTable extends WP_List_Table {
432
  $value = $booking->post_status;
433
  }
434
  break;
 
435
  case 'details' :
436
  $value = '';
437
 
@@ -454,6 +463,18 @@ class rtbBookingsTable extends WP_List_Table {
454
  $value .= '</ul></div>';
455
  }
456
  break;
 
 
 
 
 
 
 
 
 
 
 
 
457
  default:
458
  $value = isset( $booking->$column_name ) ? $booking->$column_name : '';
459
  break;
@@ -485,29 +506,22 @@ class rtbBookingsTable extends WP_List_Table {
485
  */
486
  public function add_details_column_items( $details, $booking ) {
487
  global $rtb_controller;
488
- $visible_columns = $this->get_all_columns();
489
- $default_columns = $this->get_all_default_columns();
490
-
491
- $detail_columns = array_diff( $visible_columns, $default_columns );
492
 
493
- // Columns which can't be hidden
494
- unset( $default_columns['cb'] );
495
- unset( $default_columns['details'] );
496
- unset( $default_columns['date'] );
497
 
498
- if ( !empty( $detail_columns ) ) {
499
- foreach( $detail_columns as $key => $label ) {
500
-
501
- $value = $this->column_default( $booking, $key );
502
- if ( empty( $value ) ) {
503
- continue;
504
- }
505
 
506
- $details[] = array(
507
- 'label' => $label,
508
- 'value' => $value,
509
- );
510
  }
 
 
 
 
 
511
  }
512
 
513
  return $details;
@@ -887,6 +901,12 @@ class rtbBookingsTable extends WP_List_Table {
887
  $query = new rtbQuery( $args, 'bookings-table' );
888
  $query->parse_request_args();
889
  $query->prepare_args();
 
 
 
 
 
 
890
  $query->args = apply_filters( 'rtb_bookings_table_query_args', $query->args );
891
 
892
  $this->bookings = $query->get_bookings();
323
  }
324
 
325
  $all_default_columns = $this->get_all_default_columns();
326
+ $all_columns = $this->get_all_columns();
327
 
328
  global $rtb_controller;
329
  $visible_columns = $rtb_controller->settings->get_setting( 'bookings-table-columns' );
334
  $columns['cb'] = $all_default_columns['cb'];
335
  $columns['date'] = $all_default_columns['date'];
336
 
337
+ foreach( $all_columns as $key => $column ) {
338
  if ( in_array( $key, $visible_columns ) ) {
339
+ $columns[$key] = $all_columns[$key];
340
  }
341
  }
342
  $columns['details'] = $all_default_columns['details'];
375
  */
376
  public function get_all_columns() {
377
  $columns = $this->get_all_default_columns();
378
+ $columns['submitted-by'] = __( 'Submitted By', 'restaurant-reservations' );
379
  return apply_filters( 'rtb_bookings_all_table_columns', $columns );
380
  }
381
 
396
  * @since 0.0.1
397
  */
398
  public function column_default( $booking, $column_name ) {
399
+
400
  switch ( $column_name ) {
401
  case 'date' :
402
  $value = $booking->format_date( $booking->date );
410
  }
411
 
412
  break;
413
+
414
  case 'party' :
415
  $value = $booking->party;
416
  break;
417
+
418
  case 'name' :
419
  $value = $booking->name;
420
  break;
421
+
422
  case 'email' :
423
  $value = $booking->email;
424
  $value .= '<div class="actions">';
425
  $value .= '<a href="#" data-id="' . esc_attr( $booking->ID ) . '" data-action="email" data-email="' . esc_attr( $booking->email ) . '" data-name="' . $booking->name . '">' . __( 'Send Email', 'restaurant-reservations' ) . '</a>';
426
  $value .= '</div>';
427
  break;
428
+
429
  case 'phone' :
430
  $value = $booking->phone;
431
  break;
432
+
433
  case 'status' :
434
  global $rtb_controller;
435
  if ( !empty( $rtb_controller->cpts->booking_statuses[$booking->post_status] ) ) {
440
  $value = $booking->post_status;
441
  }
442
  break;
443
+
444
  case 'details' :
445
  $value = '';
446
 
463
  $value .= '</ul></div>';
464
  }
465
  break;
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 . '">';
473
+ $value .= __( 'Ban Customer', 'restaurant-reservations' );
474
+ $value .= '</a>';
475
+ $value .= '</div>';
476
+ break;
477
+
478
  default:
479
  $value = isset( $booking->$column_name ) ? $booking->$column_name : '';
480
  break;
506
  */
507
  public function add_details_column_items( $details, $booking ) {
508
  global $rtb_controller;
509
+ $visible_columns = $this->get_columns();
510
+ $all_columns = $this->get_all_columns();
 
 
511
 
512
+ $detail_columns = array_diff( $all_columns, $visible_columns );
 
 
 
513
 
514
+ foreach( $detail_columns as $key => $label ) {
 
 
 
 
 
 
515
 
516
+ $value = $this->column_default( $booking, $key );
517
+ if ( empty( $value ) ) {
518
+ continue;
 
519
  }
520
+
521
+ $details[] = array(
522
+ 'label' => $label,
523
+ 'value' => $value,
524
+ );
525
  }
526
 
527
  return $details;
901
  $query = new rtbQuery( $args, 'bookings-table' );
902
  $query->parse_request_args();
903
  $query->prepare_args();
904
+
905
+ // Sort all bookings by newest first if no specific orderby is in play
906
+ if ( $query->args['date_range'] == 'all' && !isset( $_REQUEST['orderby'] ) ) {
907
+ $query->args['order'] = 'DESC';
908
+ }
909
+
910
  $query->args = apply_filters( 'rtb_bookings_table_query_args', $query->args );
911
 
912
  $this->bookings = $query->get_bookings();
includes/integrations/business-profile.php CHANGED
@@ -14,7 +14,7 @@ function rtb_bp_maybe_enable_bp_locations( $post_type ) {
14
  }
15
 
16
  global $bpfwp_controller;
17
- if ( isset( $bpfwp_controller ) && isset( $bpfwp_controller->cpts ) ) {
18
  return $bpfwp_controller->cpts->location_cpt_slug;
19
  }
20
 
14
  }
15
 
16
  global $bpfwp_controller;
17
+ if ( isset( $bpfwp_controller ) && isset( $bpfwp_controller->cpts ) && $bpfwp_controller->settings->get_setting( 'multiple-locations' ) ) {
18
  return $bpfwp_controller->cpts->location_cpt_slug;
19
  }
20
 
includes/template-functions.php CHANGED
@@ -110,7 +110,11 @@ function rtb_print_booking_form( $args = array() ) {
110
  <?php
111
  foreach( $contents['fields'] as $slug => $field ) {
112
 
113
- $args = empty( $field['callback_args'] ) ? null : $field['callback_args'];
 
 
 
 
114
 
115
  call_user_func( $field['callback'], $slug, $field['title'], $field['request_input'], $args );
116
  }
@@ -172,17 +176,21 @@ function rtb_enqueue_assets() {
172
  wp_localize_script(
173
  'rtb-booking-form',
174
  'rtb_pickadate',
175
- array(
176
- 'date_format' => $rtb_controller->settings->get_setting( 'date-format' ),
177
- 'time_format' => $rtb_controller->settings->get_setting( 'time-format' ),
178
- 'disable_dates' => rtb_get_datepicker_rules(),
179
- 'schedule_open' => $rtb_controller->settings->get_setting( 'schedule-open' ),
180
- 'schedule_closed' => $rtb_controller->settings->get_setting( 'schedule-closed' ),
181
- 'early_bookings' => current_user_can( 'manage_bookings' ) ? '' : $rtb_controller->settings->get_setting( 'early-bookings' ),
182
- 'late_bookings' => current_user_can( 'manage_bookings' ) ? '' : $rtb_controller->settings->get_setting( 'late-bookings' ),
183
- 'date_onload' => $rtb_controller->settings->get_setting( 'date-onload' ),
184
- 'time_interval' => $rtb_controller->settings->get_setting( 'time-interval' ),
185
- 'first_day' => $rtb_controller->settings->get_setting( 'week-start' ),
 
 
 
 
186
  )
187
  );
188
 
@@ -191,7 +199,7 @@ function rtb_enqueue_assets() {
191
 
192
  /**
193
  * Get rules for datepicker date ranges
194
- * See: http://amsul.ca/pickadate.js/date.htm#disable-dates
195
  * @since 0.0.1
196
  */
197
  if ( !function_exists( 'rtb_get_datepicker_rules' ) ) {
@@ -269,6 +277,7 @@ function rtb_print_form_text_field( $slug, $title, $value, $args = array() ) {
269
  $type = empty( $args['input_type'] ) ? 'text' : esc_attr( $args['input_type'] );
270
  $classes = isset( $args['classes'] ) ? $args['classes'] : array();
271
  $classes[] = 'rtb-text';
 
272
 
273
  ?>
274
 
@@ -277,7 +286,7 @@ function rtb_print_form_text_field( $slug, $title, $value, $args = array() ) {
277
  <label for="rtb-<?php echo $slug; ?>">
278
  <?php echo $title; ?>
279
  </label>
280
- <input type="<?php echo $type; ?>" name="rtb-<?php echo $slug; ?>" id="rtb-<?php echo $slug; ?>" value="<?php echo $value; ?>">
281
  </div>
282
 
283
  <?php
@@ -297,6 +306,7 @@ function rtb_print_form_textarea_field( $slug, $title, $value, $args = array() )
297
  $value = preg_replace('/\<br(\s*)?\/?\>/i', '', $value);
298
  $classes = isset( $args['classes'] ) ? $args['classes'] : array();
299
  $classes[] = 'rtb-textarea';
 
300
 
301
  ?>
302
 
@@ -305,7 +315,7 @@ function rtb_print_form_textarea_field( $slug, $title, $value, $args = array() )
305
  <label for="rtb-<?php echo $slug; ?>">
306
  <?php echo $title; ?>
307
  </label>
308
- <textarea name="rtb-<?php echo $slug; ?>" id="rtb-<?php echo $slug; ?>"><?php echo $value; ?></textarea>
309
  </div>
310
 
311
  <?php
@@ -325,6 +335,7 @@ function rtb_print_form_select_field( $slug, $title, $value, $args ) {
325
  $options = is_array( $args['options'] ) ? $args['options'] : array();
326
  $classes = isset( $args['classes'] ) ? $args['classes'] : array();
327
  $classes[] = 'rtb-select';
 
328
 
329
  ?>
330
 
@@ -333,7 +344,7 @@ function rtb_print_form_select_field( $slug, $title, $value, $args ) {
333
  <label for="rtb-<?php echo $slug; ?>">
334
  <?php echo $title; ?>
335
  </label>
336
- <select name="rtb-<?php echo $slug; ?>" id="rtb-<?php echo $slug; ?>">
337
  <?php foreach ( $options as $opt_value => $opt_label ) : ?>
338
  <option value="<?php echo esc_attr( $opt_value ); ?>" <?php selected( $opt_value, $value ); ?>><?php echo esc_attr( $opt_label ); ?></option>
339
  <?php endforeach; ?>
@@ -348,7 +359,6 @@ function rtb_print_form_select_field( $slug, $title, $value, $args ) {
348
  /**
349
  * Print a checkbox form field
350
  *
351
- * @uses rtb_print_form_tick_field
352
  * @since 1.3.1
353
  */
354
  if ( !function_exists( 'rtb_print_form_checkbox_field' ) ) {
@@ -382,7 +392,6 @@ function rtb_print_form_checkbox_field( $slug, $title, $value, $args ) {
382
  /**
383
  * Print a radio button form field
384
  *
385
- * @uses rtb_print_form_tick_field
386
  * @since 1.3.1
387
  */
388
  if ( !function_exists( 'rtb_print_form_radio_field' ) ) {
@@ -393,6 +402,7 @@ function rtb_print_form_radio_field( $slug, $title, $value, $args ) {
393
  $options = is_array( $args['options'] ) ? $args['options'] : array();
394
  $classes = isset( $args['classes'] ) ? $args['classes'] : array();
395
  $classes[] = 'rtb-radio';
 
396
 
397
  ?>
398
 
@@ -403,7 +413,7 @@ function rtb_print_form_radio_field( $slug, $title, $value, $args ) {
403
  </label>
404
  <?php foreach ( $options as $opt_value => $opt_label ) : ?>
405
  <label>
406
- <input type="radio" name="rtb-<?php echo $slug; ?>" id="rtb-<?php echo $slug; ?>" value="<?php echo esc_attr( $opt_value ); ?>" <?php checked( $opt_value, $value ); ?>>
407
  <?php echo $opt_label; ?>
408
  </label>
409
  <?php endforeach; ?>
@@ -425,13 +435,14 @@ function rtb_print_form_confirm_field( $slug, $title, $value, $args ) {
425
  $value = esc_attr( $value );
426
  $classes = isset( $args['classes'] ) ? $args['classes'] : array();
427
  $classes[] = 'rtb-confirm';
 
428
 
429
  ?>
430
 
431
  <div <?php echo rtb_print_element_class( $slug, $classes ); ?>>
432
  <?php echo rtb_print_form_error( $slug ); ?>
433
  <label for="rtb-<?php echo $slug; ?>">
434
- <input type="checkbox" name="rtb-<?php echo $slug; ?>" id="rtb-<?php echo $slug; ?>" value="1" <?php checked( $value, 1 ); ?>>
435
  <?php echo $title; ?>
436
  </label>
437
  </div>
110
  <?php
111
  foreach( $contents['fields'] as $slug => $field ) {
112
 
113
+ $args = empty( $field['callback_args'] ) ? array() : $field['callback_args'];
114
+
115
+ if ( !empty( $field['required'] ) ) {
116
+ $args = array_merge( $args, array( 'required' => $field['required'] ) );
117
+ }
118
 
119
  call_user_func( $field['callback'], $slug, $field['title'], $field['request_input'], $args );
120
  }
176
  wp_localize_script(
177
  'rtb-booking-form',
178
  'rtb_pickadate',
179
+ apply_filters(
180
+ 'rtb_pickadate_args',
181
+ array(
182
+ 'date_format' => $rtb_controller->settings->get_setting( 'date-format' ),
183
+ 'time_format' => $rtb_controller->settings->get_setting( 'time-format' ),
184
+ 'disable_dates' => rtb_get_datepicker_rules(),
185
+ 'schedule_open' => $rtb_controller->settings->get_setting( 'schedule-open' ),
186
+ 'schedule_closed' => $rtb_controller->settings->get_setting( 'schedule-closed' ),
187
+ 'early_bookings' => is_admin() && current_user_can( 'manage_bookings' ) ? '' : $rtb_controller->settings->get_setting( 'early-bookings' ),
188
+ 'late_bookings' => is_admin() && current_user_can( 'manage_bookings' ) ? '' : $rtb_controller->settings->get_setting( 'late-bookings' ),
189
+ 'date_onload' => $rtb_controller->settings->get_setting( 'date-onload' ),
190
+ 'time_interval' => $rtb_controller->settings->get_setting( 'time-interval' ),
191
+ 'first_day' => $rtb_controller->settings->get_setting( 'week-start' ),
192
+ 'allow_past' => is_admin() && current_user_can( 'manage_bookings' ),
193
+ )
194
  )
195
  );
196
 
199
 
200
  /**
201
  * Get rules for datepicker date ranges
202
+ * See: http://amsul.ca/pickadate.js/date/#disable-dates
203
  * @since 0.0.1
204
  */
205
  if ( !function_exists( 'rtb_get_datepicker_rules' ) ) {
277
  $type = empty( $args['input_type'] ) ? 'text' : esc_attr( $args['input_type'] );
278
  $classes = isset( $args['classes'] ) ? $args['classes'] : array();
279
  $classes[] = 'rtb-text';
280
+ $required = isset( $args['required'] ) && $args['required'] ? ' required aria-required="true"' : '';
281
 
282
  ?>
283
 
286
  <label for="rtb-<?php echo $slug; ?>">
287
  <?php echo $title; ?>
288
  </label>
289
+ <input type="<?php echo $type; ?>" name="rtb-<?php echo $slug; ?>" id="rtb-<?php echo $slug; ?>" value="<?php echo $value; ?>"<?php echo $required; ?>>
290
  </div>
291
 
292
  <?php
306
  $value = preg_replace('/\<br(\s*)?\/?\>/i', '', $value);
307
  $classes = isset( $args['classes'] ) ? $args['classes'] : array();
308
  $classes[] = 'rtb-textarea';
309
+ $required = isset( $args['required'] ) && $args['required'] ? ' required aria-required="true"' : '';
310
 
311
  ?>
312
 
315
  <label for="rtb-<?php echo $slug; ?>">
316
  <?php echo $title; ?>
317
  </label>
318
+ <textarea name="rtb-<?php echo $slug; ?>" id="rtb-<?php echo $slug; ?>"<?php echo $required; ?>><?php echo $value; ?></textarea>
319
  </div>
320
 
321
  <?php
335
  $options = is_array( $args['options'] ) ? $args['options'] : array();
336
  $classes = isset( $args['classes'] ) ? $args['classes'] : array();
337
  $classes[] = 'rtb-select';
338
+ $required = isset( $args['required'] ) && $args['required'] ? ' required aria-required="true"' : '';
339
 
340
  ?>
341
 
344
  <label for="rtb-<?php echo $slug; ?>">
345
  <?php echo $title; ?>
346
  </label>
347
+ <select name="rtb-<?php echo $slug; ?>" id="rtb-<?php echo $slug; ?>"<?php echo $required; ?>>
348
  <?php foreach ( $options as $opt_value => $opt_label ) : ?>
349
  <option value="<?php echo esc_attr( $opt_value ); ?>" <?php selected( $opt_value, $value ); ?>><?php echo esc_attr( $opt_label ); ?></option>
350
  <?php endforeach; ?>
359
  /**
360
  * Print a checkbox form field
361
  *
 
362
  * @since 1.3.1
363
  */
364
  if ( !function_exists( 'rtb_print_form_checkbox_field' ) ) {
392
  /**
393
  * Print a radio button form field
394
  *
 
395
  * @since 1.3.1
396
  */
397
  if ( !function_exists( 'rtb_print_form_radio_field' ) ) {
402
  $options = is_array( $args['options'] ) ? $args['options'] : array();
403
  $classes = isset( $args['classes'] ) ? $args['classes'] : array();
404
  $classes[] = 'rtb-radio';
405
+ $required = isset( $args['required'] ) && $args['required'] ? ' required aria-required="true"' : '';
406
 
407
  ?>
408
 
413
  </label>
414
  <?php foreach ( $options as $opt_value => $opt_label ) : ?>
415
  <label>
416
+ <input type="radio" name="rtb-<?php echo $slug; ?>" id="rtb-<?php echo $slug; ?>" value="<?php echo esc_attr( $opt_value ); ?>" <?php checked( $opt_value, $value ); ?><?php echo $required; ?>>
417
  <?php echo $opt_label; ?>
418
  </label>
419
  <?php endforeach; ?>
435
  $value = esc_attr( $value );
436
  $classes = isset( $args['classes'] ) ? $args['classes'] : array();
437
  $classes[] = 'rtb-confirm';
438
+ $required = isset( $args['required'] ) && $args['required'] ? ' required aria-required="true"' : '';
439
 
440
  ?>
441
 
442
  <div <?php echo rtb_print_element_class( $slug, $classes ); ?>>
443
  <?php echo rtb_print_form_error( $slug ); ?>
444
  <label for="rtb-<?php echo $slug; ?>">
445
+ <input type="checkbox" name="rtb-<?php echo $slug; ?>" id="rtb-<?php echo $slug; ?>" value="1" <?php checked( $value, 1 ); ?><?php echo $required; ?>>
446
  <?php echo $title; ?>
447
  </label>
448
  </div>
languages/restaurant-reservations.pot CHANGED
@@ -1,231 +1,230 @@
1
- # Copyright (C) 2016 Restaurant Reservations
2
- # This file is distributed under the same license as the Restaurant Reservations package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Restaurant Reservations 1.6\n"
6
- "Report-Msgid-Bugs-To: "
7
- "https://wordpress.org/support/plugin/restaurant-reservations\n"
8
- "POT-Creation-Date: 2016-06-20 07:16:22+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
- "X-Generator: grunt-wp-i18n 0.4.9\n"
16
- "X-Poedit-KeywordsList: "
17
- "__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
18
- "attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
19
- "Language: en\n"
20
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
21
- "X-Poedit-Country: United States\n"
22
- "X-Poedit-SourceCharset: UTF-8\n"
23
- "X-Poedit-Basepath: ../\n"
24
- "X-Poedit-SearchPath-0: .\n"
25
- "X-Poedit-Bookmarks: \n"
26
- "X-Textdomain-Support: yes\n"
27
-
28
- #: includes/Addons.class.php:101
29
- #: includes/WP_List_Table.BookingsTable.class.php:400
30
- msgid "Loading"
31
- msgstr ""
32
 
33
- #: includes/Addons.class.php:138
34
  msgid "Addons for Restaurant Reservations"
35
  msgstr ""
36
 
37
- #: includes/Addons.class.php:160
38
- msgid "You have been logged out. Please login again to retrieve the addons."
39
- msgstr ""
40
-
41
- #: includes/Addons.class.php:176
42
- msgid ""
43
- "You do not have permission to access this page. Please login to an "
44
- "administrator account if you have one."
45
- msgstr ""
46
-
47
- #: includes/Addons.class.php:204
48
- msgid ""
49
- "The addons list could not be retrieved. Please <a href=\"\">try again</a>. "
50
- "If the problem persists over time, please report it on the <a "
51
- "href=\"http://wordpress.org/support/plugin/restaurant-reservations\" "
52
- "target=\"_blank\">support forums</a>."
53
- msgstr ""
54
-
55
- #: includes/AdminBookings.class.php:84
56
  msgid "Restaurant Bookings"
57
  msgstr ""
58
 
59
- #: includes/AdminBookings.class.php:85 includes/CustomPostTypes.class.php:42
60
  msgid "Add New"
61
  msgstr ""
62
 
63
- #: includes/AdminBookings.class.php:123 includes/AdminBookings.class.php:225
64
  msgid "Columns"
65
  msgstr ""
66
 
67
- #: includes/AdminBookings.class.php:163 restaurant-reservations.php:235
68
  msgid "Add Booking"
69
  msgstr ""
70
 
71
- #: includes/AdminBookings.class.php:166 includes/AdminBookings.class.php:207
72
- #: includes/AdminBookings.class.php:252
73
  msgid "Cancel"
74
  msgstr ""
75
 
76
- #: includes/AdminBookings.class.php:187 includes/AdminBookings.class.php:204
77
- #: includes/WP_List_Table.BookingsTable.class.php:419
78
  msgid "Send Email"
79
  msgstr ""
80
 
81
- #: includes/AdminBookings.class.php:194
82
  msgid "Subject"
83
  msgstr ""
84
 
85
- #: includes/AdminBookings.class.php:198 includes/Settings.class.php:830
86
- #: includes/WP_List_Table.BookingsTable.class.php:441
87
  msgid "Message"
88
  msgstr ""
89
 
90
- #: includes/AdminBookings.class.php:249
91
  msgid "Update"
92
  msgstr ""
93
 
94
- #: includes/AdminBookings.class.php:268 includes/AdminBookings.class.php:277
 
95
  msgid "Close"
96
  msgstr ""
97
 
98
- #: includes/AdminBookings.class.php:343
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  msgid "Booking Status"
100
  msgstr ""
101
 
102
- #: includes/AdminBookings.class.php:351
103
  msgid "Send notifications"
104
  msgstr ""
105
 
106
- #: includes/AdminBookings.class.php:356
107
  msgid "Learn more"
108
  msgstr ""
109
 
110
- #: includes/AdminBookings.class.php:357
111
  msgid ""
112
  "When adding a booking or changing a booking's status with this form, no "
113
  "email notifications will be sent. Check this option if you want to send "
114
  "email notifications."
115
  msgstr ""
116
 
117
- #: includes/AdminBookings.class.php:411
118
  msgid "You have been logged out. Please %slogin again%s."
119
  msgstr ""
120
 
121
- #: includes/AdminBookings.class.php:447
122
  msgid ""
123
  "This booking has been sent to the %sTrash%s where it can not be edited. Set "
124
  "the booking to Pending or Confirmed to edit it."
125
  msgstr ""
126
 
127
- #: includes/AdminBookings.class.php:464
128
  msgid "The booking could not be retrieved. Please reload the page and try again."
129
  msgstr ""
130
 
131
- #: includes/AdminBookings.class.php:546
132
  msgid ""
133
  "Unable to trash this post. Please try again. If you continue to have "
134
  "trouble, please refresh the page."
135
  msgstr ""
136
 
137
- #: includes/AdminBookings.class.php:588
138
  msgid "Please enter a message before sending the email."
139
  msgstr ""
140
 
141
- #: includes/AdminBookings.class.php:597
142
  msgid "The email could not be sent because some critical information was missing."
143
  msgstr ""
144
 
145
- #: includes/AdminBookings.class.php:609
146
  msgid "There was an error loading the booking and the email was not sent."
147
  msgstr ""
148
 
149
- #: includes/AdminBookings.class.php:647
150
  msgid "You must select at least one column to display."
151
  msgstr ""
152
 
 
 
 
 
153
  #: includes/AdminPageSettingLicenseKey.class.php:193
154
  msgid "Invalid"
155
  msgstr ""
156
 
157
- #: includes/Booking.class.php:180
158
  msgid "Please enter the date you would like to book."
159
  msgstr ""
160
 
161
- #: includes/Booking.class.php:190
162
  msgid ""
163
  "The date you entered is not valid. Please select from one of the dates in "
164
  "the calendar."
165
  msgstr ""
166
 
167
- #: includes/Booking.class.php:201
168
  msgid "Please enter the time you would like to book."
169
  msgstr ""
170
 
171
- #: includes/Booking.class.php:211
172
  msgid ""
173
  "The time you entered is not valid. Please select from one of the times "
174
  "provided."
175
  msgstr ""
176
 
177
- #: includes/Booking.class.php:231
178
  msgid "Sorry, bookings can not be made more than %s days in advance."
179
  msgstr ""
180
 
181
- #: includes/Booking.class.php:242
182
  msgid "Sorry, bookings can not be made in the past."
183
  msgstr ""
184
 
185
- #: includes/Booking.class.php:250
 
 
 
 
186
  msgid "Sorry, bookings must be made more than %s days in advance."
187
  msgstr ""
188
 
189
- #: includes/Booking.class.php:252
190
  msgid "Sorry, bookings must be made more than %s hours in advance."
191
  msgstr ""
192
 
193
- #: includes/Booking.class.php:254
194
  msgid "Sorry, bookings must be made more than %s minutes in advance."
195
  msgstr ""
196
 
197
- #: includes/Booking.class.php:294
198
  msgid "Sorry, no bookings are being accepted then."
199
  msgstr ""
200
 
201
- #: includes/Booking.class.php:346
202
  msgid "Sorry, no bookings are being accepted on that date."
203
  msgstr ""
204
 
205
- #: includes/Booking.class.php:352
206
  msgid "Sorry, no bookings are being accepted at that time."
207
  msgstr ""
208
 
209
- #: includes/Booking.class.php:374
210
  msgid "Please enter a name for this booking."
211
  msgstr ""
212
 
213
- #: includes/Booking.class.php:384
214
  msgid "Please let us know how many people will be in your party."
215
  msgstr ""
216
 
217
- #: includes/Booking.class.php:394
218
  msgid "We only accept bookings for parties of up to %d people."
219
  msgstr ""
220
 
221
- #: includes/Booking.class.php:405
 
 
 
 
222
  msgid "Please enter an email address so we can confirm your booking."
223
  msgstr ""
224
 
225
- #: includes/Booking.class.php:427
226
  msgid "Please complete this field to request a booking."
227
  msgstr ""
228
 
 
 
 
 
 
 
229
  #: includes/CustomPostTypes.class.php:38 includes/CustomPostTypes.class.php:40
230
  #: includes/CustomPostTypes.class.php:41
231
  #: includes/WP_List_Table.BookingsTable.class.php:113
@@ -241,7 +240,7 @@ msgstr ""
241
  msgid "Add New Booking"
242
  msgstr ""
243
 
244
- #: includes/CustomPostTypes.class.php:44 restaurant-reservations.php:236
245
  msgid "Edit Booking"
246
  msgstr ""
247
 
@@ -310,58 +309,61 @@ msgid ""
310
  "and try again."
311
  msgstr ""
312
 
313
- #: includes/MultipleLocations.class.php:272
314
- #: includes/MultipleLocations.class.php:375
315
- #: includes/MultipleLocations.class.php:419
316
  msgid "Location"
317
  msgstr ""
318
 
319
- #: includes/MultipleLocations.class.php:327
320
  msgid "Please select a location for your booking."
321
  msgstr ""
322
 
323
- #: includes/MultipleLocations.class.php:334
324
  msgid "The location you selected is not valid. Please select another location."
325
  msgstr ""
326
 
327
- #: includes/MultipleLocations.class.php:469
328
  msgid "Reservations"
329
  msgstr ""
330
 
331
- #: includes/MultipleLocations.class.php:536
332
  msgid "Show booking form with this location."
333
  msgstr ""
334
 
335
- #: includes/MultipleLocations.class.php:542 includes/Settings.class.php:498
336
  msgid "Reply-To Name"
337
  msgstr ""
338
 
339
- #: includes/MultipleLocations.class.php:546
340
  msgid ""
341
  "The name which should appear in the Reply-To field of a user notification "
342
  "email."
343
  msgstr ""
344
 
345
- #: includes/MultipleLocations.class.php:552 includes/Settings.class.php:510
346
  msgid "Reply-To Email Address"
347
  msgstr ""
348
 
349
- #: includes/MultipleLocations.class.php:556 includes/Settings.class.php:511
350
  msgid ""
351
  "The email address which should appear in the Reply-To field of a user "
352
  "notification email."
353
  msgstr ""
354
 
355
- #: includes/MultipleLocations.class.php:563
356
  msgid "Admin Notification Email Address"
357
  msgstr ""
358
 
359
- #: includes/MultipleLocations.class.php:567
360
  msgid ""
361
  "The email address where admin notifications for bookings at this location "
362
  "should be sent."
363
  msgstr ""
364
 
 
 
 
 
365
  #: includes/Notification.class.php:88
366
  msgid "View pending bookings"
367
  msgstr ""
@@ -393,425 +395,477 @@ msgid ""
393
  msgstr ""
394
 
395
  #: includes/Settings.class.php:271
396
- msgid "Max Party Size"
397
  msgstr ""
398
 
399
  #: includes/Settings.class.php:272
400
- msgid "Set a maximum allowed party size for bookings."
401
  msgstr ""
402
 
403
  #: includes/Settings.class.php:284
404
- msgid "Success Message"
405
  msgstr ""
406
 
407
  #: includes/Settings.class.php:285
 
 
 
 
 
 
 
 
408
  msgid "Enter the message to display when a booking request is made."
409
  msgstr ""
410
 
411
- #: includes/Settings.class.php:296
412
  msgid "Date Format"
413
  msgstr ""
414
 
415
- #: includes/Settings.class.php:297
416
  msgid ""
417
  "Define how the date is formatted on the booking form. %sFormatting rules%s. "
418
  "This only changes the format on the booking form. To change the date format "
419
  "in notification messages, modify your general %sWordPress Settings%s."
420
  msgstr ""
421
 
422
- #: includes/Settings.class.php:308
423
  msgid "Time Format"
424
  msgstr ""
425
 
426
- #: includes/Settings.class.php:309
427
  msgid ""
428
  "Define how the time is formatted on the booking form. %sFormatting rules%s. "
429
  "This only changes the format on the booking form. To change the time format "
430
  "in notification messages, modify your general %sWordPress Settings%s."
431
  msgstr ""
432
 
433
- #: includes/Settings.class.php:322
434
  msgid "Language"
435
  msgstr ""
436
 
437
- #: includes/Settings.class.php:323
438
  msgid ""
439
  "Select a language to use for the booking form datepicker if it is different "
440
  "than your WordPress language setting."
441
  msgstr ""
442
 
443
- #: includes/Settings.class.php:333
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
444
  msgid "Booking Schedule"
445
  msgstr ""
446
 
447
- #: includes/Settings.class.php:340
448
  msgid "Add new scheduling rule"
449
  msgstr ""
450
 
451
- #: includes/Settings.class.php:354
452
  msgid "Delete scheduling rule"
453
  msgstr ""
454
 
455
- #: includes/Settings.class.php:371
456
  msgid "Schedule"
457
  msgstr ""
458
 
459
- #: includes/Settings.class.php:372
460
  msgid "Define the weekly schedule during which you accept bookings."
461
  msgstr ""
462
 
463
- #: includes/Settings.class.php:397
464
  msgid "Exceptions"
465
  msgstr ""
466
 
467
- #: includes/Settings.class.php:398
468
  msgid ""
469
  "Define special opening hours for holidays, events or other needs. Leave the "
470
  "time empty if you're closed all day."
471
  msgstr ""
472
 
473
- #: includes/Settings.class.php:413
474
  msgid "Early Bookings"
475
  msgstr ""
476
 
477
- #: includes/Settings.class.php:414
478
  msgid ""
479
  "Select how early customers can make their booking. (Administrators and "
480
  "Booking Managers are not restricted by this setting.)"
481
  msgstr ""
482
 
483
- #: includes/Settings.class.php:417
484
  msgid "Any time"
485
  msgstr ""
486
 
487
- #: includes/Settings.class.php:418
488
  msgid "Up to 1 day in advance"
489
  msgstr ""
490
 
491
- #: includes/Settings.class.php:419
492
  msgid "Up to 1 week in advance"
493
  msgstr ""
494
 
495
- #: includes/Settings.class.php:420
496
  msgid "Up to 2 weeks in advance"
497
  msgstr ""
498
 
499
- #: includes/Settings.class.php:421
500
  msgid "Up to 30 days in advance"
501
  msgstr ""
502
 
503
- #: includes/Settings.class.php:422
504
  msgid "Up to 90 days in advance"
505
  msgstr ""
506
 
507
- #: includes/Settings.class.php:433
508
  msgid "Late Bookings"
509
  msgstr ""
510
 
511
- #: includes/Settings.class.php:434
512
  msgid ""
513
  "Select how late customers can make their booking. (Administrators and "
514
  "Booking Managers are not restricted by this setting.)"
515
  msgstr ""
516
 
517
- #: includes/Settings.class.php:437
518
  msgid "Up to the last minute"
519
  msgstr ""
520
 
521
- #: includes/Settings.class.php:438
522
  msgid "At least 15 minutes in advance"
523
  msgstr ""
524
 
525
- #: includes/Settings.class.php:439
526
  msgid "At least 30 minutes in advance"
527
  msgstr ""
528
 
529
- #: includes/Settings.class.php:440
530
  msgid "At least 45 minutes in advance"
531
  msgstr ""
532
 
533
- #: includes/Settings.class.php:441
534
  msgid "At least 1 hour in advance"
535
  msgstr ""
536
 
537
- #: includes/Settings.class.php:442
538
  msgid "At least 4 hours in advance"
539
  msgstr ""
540
 
541
- #: includes/Settings.class.php:443
542
- msgid "At least 1 day in advance"
543
  msgstr ""
544
 
545
- #: includes/Settings.class.php:454
 
 
 
 
546
  msgid "Date Pre-selection"
547
  msgstr ""
548
 
549
- #: includes/Settings.class.php:455
550
  msgid ""
551
  "When the booking form is loaded, should it automatically attempt to select "
552
  "a valid date?"
553
  msgstr ""
554
 
555
- #: includes/Settings.class.php:458
556
  msgid "Select today if valid"
557
  msgstr ""
558
 
559
- #: includes/Settings.class.php:459
560
  msgid "Select today or next valid date"
561
  msgstr ""
562
 
563
- #: includes/Settings.class.php:460
564
  msgid "Leave empty"
565
  msgstr ""
566
 
567
- #: includes/Settings.class.php:471
568
  msgid "Time Interval"
569
  msgstr ""
570
 
571
- #: includes/Settings.class.php:472
572
  msgid "Select the number of minutes between each available time."
573
  msgstr ""
574
 
575
- #: includes/Settings.class.php:475
576
  msgid "Every 30 minutes"
577
  msgstr ""
578
 
579
- #: includes/Settings.class.php:476
580
  msgid "Every 15 minutes"
581
  msgstr ""
582
 
583
- #: includes/Settings.class.php:477
584
  msgid "Every 10 minutes"
585
  msgstr ""
586
 
587
- #: includes/Settings.class.php:478
588
  msgid "Every 5 minutes"
589
  msgstr ""
590
 
591
- #: includes/Settings.class.php:487
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
592
  msgid "Notifications"
593
  msgstr ""
594
 
595
- #: includes/Settings.class.php:499
596
  msgid ""
597
  "The name which should appear in the Reply-To field of a user notification "
598
  "email"
599
  msgstr ""
600
 
601
- #: includes/Settings.class.php:522
602
  msgid "Admin Notification"
603
  msgstr ""
604
 
605
- #: includes/Settings.class.php:523
606
  msgid ""
607
  "Send an email notification to an administrator when a new booking is "
608
  "requested."
609
  msgstr ""
610
 
611
- #: includes/Settings.class.php:533
612
  msgid "Admin Email Address"
613
  msgstr ""
614
 
615
- #: includes/Settings.class.php:534
616
  msgid "The email address where admin notifications should be sent."
617
  msgstr ""
618
 
619
- #: includes/Settings.class.php:543
620
  msgid "Email Templates"
621
  msgstr ""
622
 
623
- #: includes/Settings.class.php:545
624
  msgid ""
625
  "Adjust the messages that are emailed to users and admins during the booking "
626
  "process."
627
  msgstr ""
628
 
629
- #: includes/Settings.class.php:555
630
  msgid "Template Tags"
631
  msgstr ""
632
 
633
- #: includes/Settings.class.php:557
634
  msgid ""
635
  "Use the following tags to automatically add booking information to the "
636
  "emails. Tags labeled with an asterisk (*) can be used in the email subject "
637
  "as well."
638
  msgstr ""
639
 
640
- #: includes/Settings.class.php:568
641
  msgid "Admin Notification Subject"
642
  msgstr ""
643
 
644
- #: includes/Settings.class.php:569
645
  msgid "The email subject for admin notifications."
646
  msgstr ""
647
 
648
- #: includes/Settings.class.php:580
649
  msgid "Admin Notification Email"
650
  msgstr ""
651
 
652
- #: includes/Settings.class.php:581
653
  msgid ""
654
  "Enter the email an admin should receive when an initial booking request is "
655
  "made."
656
  msgstr ""
657
 
658
- #: includes/Settings.class.php:592
659
  msgid "New Request Email Subject"
660
  msgstr ""
661
 
662
- #: includes/Settings.class.php:593
663
  msgid ""
664
  "The email subject a user should receive when they make an initial booking "
665
  "request."
666
  msgstr ""
667
 
668
- #: includes/Settings.class.php:604
669
  msgid "New Request Email"
670
  msgstr ""
671
 
672
- #: includes/Settings.class.php:605
673
  msgid ""
674
  "Enter the email a user should receive when they make an initial booking "
675
  "request."
676
  msgstr ""
677
 
678
- #: includes/Settings.class.php:616
679
  msgid "Confirmed Email Subject"
680
  msgstr ""
681
 
682
- #: includes/Settings.class.php:617
683
  msgid ""
684
  "The email subject a user should receive when their booking has been "
685
  "confirmed."
686
  msgstr ""
687
 
688
- #: includes/Settings.class.php:628
689
  msgid "Confirmed Email"
690
  msgstr ""
691
 
692
- #: includes/Settings.class.php:629
693
  msgid "Enter the email a user should receive when their booking has been confirmed."
694
  msgstr ""
695
 
696
- #: includes/Settings.class.php:640
697
  msgid "Rejected Email Subject"
698
  msgstr ""
699
 
700
- #: includes/Settings.class.php:641
701
  msgid ""
702
  "The email subject a user should receive when their booking has been "
703
  "rejected."
704
  msgstr ""
705
 
706
- #: includes/Settings.class.php:652
707
  msgid "Rejected Email"
708
  msgstr ""
709
 
710
- #: includes/Settings.class.php:653
711
  msgid "Enter the email a user should receive when their booking has been rejected."
712
  msgstr ""
713
 
714
- #: includes/Settings.class.php:664
715
  msgid "Admin Update Subject"
716
  msgstr ""
717
 
718
- #: includes/Settings.class.php:665
719
  msgid ""
720
  "The email subject a user should receive when an admin sends them a custom "
721
  "email message from the %sbookings panel%s."
722
  msgstr ""
723
 
724
- #: includes/Settings.class.php:683
725
  msgid "Any size"
726
  msgstr ""
727
 
728
- #: includes/Settings.class.php:771
729
  #: includes/integrations/business-profile.php:100
730
  msgid "Book a table"
731
  msgstr ""
732
 
733
- #: includes/Settings.class.php:774
734
- #: includes/WP_List_Table.BookingsTable.class.php:357
735
  msgid "Date"
736
  msgstr ""
737
 
738
- #: includes/Settings.class.php:780
739
  msgid "Time"
740
  msgstr ""
741
 
742
- #: includes/Settings.class.php:786
743
- #: includes/WP_List_Table.BookingsTable.class.php:358
744
  msgid "Party"
745
  msgstr ""
746
 
747
- #: includes/Settings.class.php:799
748
  msgid "Contact Details"
749
  msgstr ""
750
 
751
- #: includes/Settings.class.php:802
752
- #: includes/WP_List_Table.BookingsTable.class.php:359
753
  msgid "Name"
754
  msgstr ""
755
 
756
- #: includes/Settings.class.php:808
757
- #: includes/WP_List_Table.BookingsTable.class.php:360
758
  msgid "Email"
759
  msgstr ""
760
 
761
- #: includes/Settings.class.php:817
762
- #: includes/WP_List_Table.BookingsTable.class.php:361
763
  msgid "Phone"
764
  msgstr ""
765
 
766
- #: includes/Settings.class.php:825
767
  msgid "Add a Message"
768
  msgstr ""
769
 
770
- #: includes/Settings.class.php:875
771
  msgid "Email of the user who made the booking"
772
  msgstr ""
773
 
774
- #: includes/Settings.class.php:876
775
  msgid "* Name of the user who made the booking"
776
  msgstr ""
777
 
778
- #: includes/Settings.class.php:877
779
  msgid "* Number of people booked"
780
  msgstr ""
781
 
782
- #: includes/Settings.class.php:878
783
  msgid "* Date and time of the booking"
784
  msgstr ""
785
 
786
- #: includes/Settings.class.php:879
787
  msgid "Phone number if supplied with the request"
788
  msgstr ""
789
 
790
- #: includes/Settings.class.php:880
791
  msgid "Message added to the request"
792
  msgstr ""
793
 
794
- #: includes/Settings.class.php:881
795
  msgid "A link to the admin panel showing pending bookings"
796
  msgstr ""
797
 
798
- #: includes/Settings.class.php:882
799
  msgid "A link to confirm this booking. Only include this in admin notifications"
800
  msgstr ""
801
 
802
- #: includes/Settings.class.php:883
803
  msgid "A link to reject this booking. Only include this in admin notifications"
804
  msgstr ""
805
 
806
- #: includes/Settings.class.php:884
807
  msgid "The name of this website"
808
  msgstr ""
809
 
810
- #: includes/Settings.class.php:885
811
  msgid "A link to this website"
812
  msgstr ""
813
 
814
- #: includes/Settings.class.php:886
815
  msgid "Current date and time"
816
  msgstr ""
817
 
@@ -869,90 +923,114 @@ msgid "Closed"
869
  msgstr ""
870
 
871
  #: includes/WP_List_Table.BookingsTable.class.php:285
872
- #: includes/WP_List_Table.BookingsTable.class.php:405
873
  msgid "Trash"
874
  msgstr ""
875
 
876
- #: includes/WP_List_Table.BookingsTable.class.php:362
877
  msgid "Status"
878
  msgstr ""
879
 
880
- #: includes/WP_List_Table.BookingsTable.class.php:363
881
  msgid "Details"
882
  msgstr ""
883
 
884
- #: includes/WP_List_Table.BookingsTable.class.php:404
 
 
 
 
 
 
 
 
885
  msgid "Edit"
886
  msgstr ""
887
 
888
- #: includes/WP_List_Table.BookingsTable.class.php:522
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
889
  msgid "Delete"
890
  msgstr ""
891
 
892
- #: includes/WP_List_Table.BookingsTable.class.php:523
893
  msgid "Set To Confirmed"
894
  msgstr ""
895
 
896
- #: includes/WP_List_Table.BookingsTable.class.php:524
897
  msgid "Set To Pending Review"
898
  msgstr ""
899
 
900
- #: includes/WP_List_Table.BookingsTable.class.php:525
901
  msgid "Set To Closed"
902
  msgstr ""
903
 
904
- #: includes/WP_List_Table.BookingsTable.class.php:639
905
  msgid "%d booking deleted successfully."
906
  msgid_plural "%d bookings deleted successfully."
907
  msgstr[0] ""
908
  msgstr[1] ""
909
 
910
- #: includes/WP_List_Table.BookingsTable.class.php:642
911
  msgid "%d booking confirmed."
912
  msgid_plural "%d bookings confirmed."
913
  msgstr[0] ""
914
  msgstr[1] ""
915
 
916
- #: includes/WP_List_Table.BookingsTable.class.php:645
917
  msgid "%d booking set to pending."
918
  msgid_plural "%d bookings set to pending."
919
  msgstr[0] ""
920
  msgstr[1] ""
921
 
922
- #: includes/WP_List_Table.BookingsTable.class.php:648
923
  msgid "%d booking closed."
924
  msgid_plural "%d bookings closed."
925
  msgstr[0] ""
926
  msgstr[1] ""
927
 
928
- #: includes/WP_List_Table.BookingsTable.class.php:660
929
  msgid "%d booking had errors and could not be processed."
930
  msgid_plural "%d bookings had errors and could not be processed."
931
  msgstr[0] ""
932
  msgstr[1] ""
933
 
934
- #: includes/WP_List_Table.BookingsTable.class.php:712
935
- #: includes/WP_List_Table.BookingsTable.class.php:733
936
  msgid "All Locations"
937
  msgstr ""
938
 
939
- #: includes/WP_List_Table.BookingsTable.class.php:740
940
  msgid "Inactive Locations"
941
  msgstr ""
942
 
943
- #: includes/WP_List_Table.BookingsTable.class.php:749
944
  msgid "Switch"
945
  msgstr ""
946
 
947
- #: includes/WP_List_Table.BookingsTable.class.php:781
948
  msgid "You're viewing bookings that have been moved to the trash."
949
  msgstr ""
950
 
951
- #: includes/WP_List_Table.BookingsTable.class.php:790
952
  msgid "Only today's bookings are being shown."
953
  msgstr ""
954
 
955
- #: includes/WP_List_Table.BookingsTable.class.php:792
956
  msgid "Only upcoming bookings are being shown."
957
  msgstr ""
958
 
@@ -1005,7 +1083,7 @@ msgstr ""
1005
  msgid "--- Winery"
1006
  msgstr ""
1007
 
1008
- #: includes/template-functions.php:126
1009
  msgid "Request Booking"
1010
  msgstr ""
1011
 
@@ -1013,36 +1091,21 @@ msgstr ""
1013
  msgid "You do not have sufficient permissions to access this page."
1014
  msgstr ""
1015
 
1016
- #: node_modules/grunt-wp-i18n/test/fixtures/basic-theme/exclude/file.php:3
1017
- #: node_modules/grunt-wp-i18n/test/fixtures/plugin-include/plugin-include.php:6
1018
- msgid "Exclude"
1019
- msgstr ""
1020
-
1021
- #: node_modules/grunt-wp-i18n/test/fixtures/plugin-include/include/file.php:2
1022
- msgid "Include"
1023
- msgstr ""
1024
-
1025
- #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/add-domain.php:2
1026
- #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-domains.php:2
1027
- #: node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-domains.php:3
1028
- msgid "String"
1029
- msgstr ""
1030
-
1031
- #: restaurant-reservations.php:166
1032
  msgid "Booking Manager"
1033
  msgstr ""
1034
 
1035
- #: restaurant-reservations.php:237
1036
  msgid ""
1037
  "An unspecified error occurred. Please try again. If the problem persists, "
1038
  "try logging out and logging back in."
1039
  msgstr ""
1040
 
1041
- #: restaurant-reservations.php:299
1042
  msgid "View the help documentation for Restaurant Reservations"
1043
  msgstr ""
1044
 
1045
- #: restaurant-reservations.php:299
1046
  msgid "Help"
1047
  msgstr ""
1048
 
@@ -1050,9 +1113,6 @@ msgstr ""
1050
  msgid "Restaurant Reservations"
1051
  msgstr ""
1052
 
1053
- #. #-#-#-#-# restaurant-reservations.pot (Restaurant Reservations 1.6) #-#-#-#-#
1054
- #. Plugin URI of the plugin/theme
1055
- #. #-#-#-#-# restaurant-reservations.pot (Restaurant Reservations 1.6) #-#-#-#-#
1056
  #. Author URI of the plugin/theme
1057
  msgid "http://themeofthecrop.com"
1058
  msgstr ""
@@ -1065,46 +1125,22 @@ msgstr ""
1065
  msgid "Theme of the Crop"
1066
  msgstr ""
1067
 
1068
- #: includes/Addons.class.php:102
1069
- msgctxt "Error message when retrieving list of addons"
1070
- msgid "An unknown error occured."
1071
- msgstr ""
1072
-
1073
- #: includes/Addons.class.php:103
1074
- msgctxt "Label for an addon that is already installed and activated."
1075
- msgid "Already Installed"
1076
- msgstr ""
1077
-
1078
- #: includes/Addons.class.php:104
1079
- msgctxt "Label for an addon that is not yet released."
1080
- msgid "Coming Soon"
1081
- msgstr ""
1082
-
1083
- #: includes/Addons.class.php:105
1084
- msgctxt "Label for an addon that is free."
1085
- msgid "Free"
1086
- msgstr ""
1087
-
1088
- #: includes/Addons.class.php:106
1089
- msgctxt "Label for an addon that is released."
1090
- msgid "Get It"
1091
- msgstr ""
1092
-
1093
- #: includes/Addons.class.php:120
1094
  msgctxt "Title of addons page"
1095
  msgid "Addons"
1096
  msgstr ""
1097
 
1098
- #: includes/Addons.class.php:121
1099
  msgctxt "Title of addons page in the admin menu"
1100
  msgid "Addons"
1101
  msgstr ""
1102
 
1103
- #: includes/Addons.class.php:221
1104
  msgctxt "restaurant-reservations"
1105
  msgid ""
1106
  "Find out when new addons are available by subscribing to the %smonthly "
1107
- "newsletter%s or following %sTheme of the Crop%s on Twitter."
 
1108
  msgstr ""
1109
 
1110
  #: includes/Settings.class.php:92
@@ -1114,17 +1150,17 @@ msgid ""
1114
  "sent to the email address you provided."
1115
  msgstr ""
1116
 
1117
- #: includes/AdminBookings.class.php:60
1118
  msgctxt "Title of admin page that lists bookings"
1119
  msgid "Bookings"
1120
  msgstr ""
1121
 
1122
- #: includes/AdminBookings.class.php:61
1123
  msgctxt "Title of bookings admin menu item"
1124
  msgid "Bookings"
1125
  msgstr ""
1126
 
1127
- #: includes/AdminBookings.class.php:190
1128
  msgctxt "Label next to the email address to which an email will be sent"
1129
  msgid "To"
1130
  msgstr ""
@@ -1144,7 +1180,7 @@ msgctxt "Booking status for a closed booking"
1144
  msgid "Closed"
1145
  msgstr ""
1146
 
1147
- #: includes/MultipleLocations.class.php:101
1148
  msgctxt "Name for grouping bookings"
1149
  msgid "Location"
1150
  msgstr ""
@@ -1152,14 +1188,14 @@ msgstr ""
1152
  #: includes/Settings.class.php:93
1153
  msgctxt ""
1154
  "Default date format for display. Must match formatting rules at "
1155
- "http://amsul.ca/pickadate.js/date.htm#formatting-rules"
1156
  msgid "mmmm d, yyyy"
1157
  msgstr ""
1158
 
1159
  #: includes/Settings.class.php:94
1160
  msgctxt ""
1161
  "Default time format for display. Must match formatting rules at "
1162
- "http://amsul.ca/pickadate.js/time.htm#formats"
1163
  msgid "h:i A"
1164
  msgstr ""
1165
 
@@ -1292,86 +1328,86 @@ msgctxt ""
1292
  msgid "Update regarding your booking at %s"
1293
  msgstr ""
1294
 
1295
- #: includes/Settings.class.php:341
1296
  msgctxt "Format of a scheduling rule"
1297
  msgid "Weekly"
1298
  msgstr ""
1299
 
1300
- #: includes/Settings.class.php:342
1301
  msgctxt "Format of a scheduling rule"
1302
  msgid "Monthly"
1303
  msgstr ""
1304
 
1305
- #: includes/Settings.class.php:343
1306
  msgctxt "Format of a scheduling rule"
1307
  msgid "Date"
1308
  msgstr ""
1309
 
1310
- #: includes/Settings.class.php:344
1311
  msgctxt "Label for selecting days of the week in a scheduling rule"
1312
  msgid "Days of the week"
1313
  msgstr ""
1314
 
1315
- #: includes/Settings.class.php:345
1316
  msgctxt "Label for selecting weeks of the month in a scheduling rule"
1317
  msgid "Weeks of the month"
1318
  msgstr ""
1319
 
1320
- #: includes/Settings.class.php:346
1321
  msgctxt "Label to select a date for a scheduling rule"
1322
  msgid "Date"
1323
  msgstr ""
1324
 
1325
- #: includes/Settings.class.php:347
1326
  msgctxt "Label to select a time slot for a scheduling rule"
1327
  msgid "Time"
1328
  msgstr ""
1329
 
1330
- #: includes/Settings.class.php:348
1331
  msgctxt "Label to set a scheduling rule to last all day"
1332
  msgid "All day"
1333
  msgstr ""
1334
 
1335
- #: includes/Settings.class.php:349
1336
  msgctxt "Label for the starting time of a scheduling rule"
1337
  msgid "Start"
1338
  msgstr ""
1339
 
1340
- #: includes/Settings.class.php:350
1341
  msgctxt "Label for the ending time of a scheduling rule"
1342
  msgid "End"
1343
  msgstr ""
1344
 
1345
- #: includes/Settings.class.php:351
1346
  msgctxt "Prompt displayed when a scheduling rule is set without any time restrictions"
1347
  msgid "All day long. Want to %sset a time slot%s?"
1348
  msgstr ""
1349
 
1350
- #: includes/Settings.class.php:352
1351
  msgctxt "Toggle a scheduling rule open and closed"
1352
  msgid "Open and close this rule"
1353
  msgstr ""
1354
 
1355
- #: includes/Settings.class.php:353
1356
  msgctxt "Delete a scheduling rule"
1357
  msgid "Delete rule"
1358
  msgstr ""
1359
 
1360
- #: includes/Settings.class.php:355
1361
  msgctxt ""
1362
  "Brief default description of a scheduling rule when no weekdays or weeks "
1363
  "are included in the rule"
1364
  msgid "Never"
1365
  msgstr ""
1366
 
1367
- #: includes/Settings.class.php:356
1368
  msgctxt ""
1369
  "Brief default description of a scheduling rule when all the weekdays/weeks "
1370
  "are included in the rule"
1371
  msgid "Every day"
1372
  msgstr ""
1373
 
1374
- #: includes/Settings.class.php:357
1375
  msgctxt ""
1376
  "Brief default description of a scheduling rule when some weekdays are "
1377
  "included on only some weeks of the month. %s should be left alone and will "
@@ -1380,7 +1416,7 @@ msgctxt ""
1380
  msgid "%s on the %s week of the month"
1381
  msgstr ""
1382
 
1383
- #: includes/Settings.class.php:358
1384
  msgctxt ""
1385
  "Brief default description of a scheduling rule when some weeks of the month "
1386
  "are included but all or no weekdays are selected. %s should be left alone "
@@ -1389,66 +1425,66 @@ msgctxt ""
1389
  msgid "%s week of the month"
1390
  msgstr ""
1391
 
1392
- #: includes/Settings.class.php:359
1393
  msgctxt "Brief default description of a scheduling rule when no times are set"
1394
  msgid "All day"
1395
  msgstr ""
1396
 
1397
- #: includes/Settings.class.php:360
1398
  msgctxt ""
1399
  "Brief default description of a scheduling rule when an end time is set but "
1400
  "no start time. If the end time is 6pm, it will read: Ends at 6pm"
1401
  msgid "Ends at"
1402
  msgstr ""
1403
 
1404
- #: includes/Settings.class.php:361
1405
  msgctxt ""
1406
  "Brief default description of a scheduling rule when a start time is set but "
1407
  "no end time. If the start time is 6pm, it will read: Starts at 6pm"
1408
  msgid "Starts at"
1409
  msgstr ""
1410
 
1411
- #: includes/Settings.class.php:362
1412
  msgctxt "Separator between times of a scheduling rule"
1413
  msgid "&mdash;"
1414
  msgstr ""
1415
 
1416
- #: includes/Settings.class.php:374
1417
  msgctxt "Monday abbreviation"
1418
  msgid "Mo"
1419
  msgstr ""
1420
 
1421
- #: includes/Settings.class.php:375
1422
  msgctxt "Tuesday abbreviation"
1423
  msgid "Tu"
1424
  msgstr ""
1425
 
1426
- #: includes/Settings.class.php:376
1427
  msgctxt "Wednesday abbreviation"
1428
  msgid "We"
1429
  msgstr ""
1430
 
1431
- #: includes/Settings.class.php:377
1432
  msgctxt "Thursday abbreviation"
1433
  msgid "Th"
1434
  msgstr ""
1435
 
1436
- #: includes/Settings.class.php:378
1437
  msgctxt "Friday abbreviation"
1438
  msgid "Fr"
1439
  msgstr ""
1440
 
1441
- #: includes/Settings.class.php:379
1442
  msgctxt "Saturday abbreviation"
1443
  msgid "Sa"
1444
  msgstr ""
1445
 
1446
- #: includes/Settings.class.php:380
1447
  msgctxt "Sunday abbreviation"
1448
  msgid "Su"
1449
  msgstr ""
1450
 
1451
- #: includes/Settings.class.php:390
1452
  msgctxt "Brief default description of a scheduling exception when no times are set"
1453
  msgid "Closed all day"
1454
  msgstr ""
@@ -1466,19 +1502,19 @@ msgctxt "Separator between two dates in a date range"
1466
  msgid "&mdash;"
1467
  msgstr ""
1468
 
1469
- #: includes/WP_List_Table.BookingsTable.class.php:430
1470
  msgctxt "Status label for bookings put in the trash"
1471
  msgid "Trash"
1472
  msgstr ""
1473
 
1474
- #: includes/WP_List_Table.BookingsTable.class.php:783
1475
  msgctxt ""
1476
  "Indicates which booking status is currently being filtered in the list of "
1477
  "bookings."
1478
  msgid "You're viewing bookings that have been marked as %s."
1479
  msgstr ""
1480
 
1481
- #: includes/WP_List_Table.BookingsTable.class.php:788
1482
  msgctxt "Notification of booking date range, eg - bookings from 2014-12-02-2014-12-05"
1483
  msgid "Only bookings from %s are being shown."
1484
  msgstr ""
1
+ # Copyright (C) 2016 Theme of the Crop
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"
11
  "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
+ "X-Generator: grunt-wp-i18n 0.5.4\n"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
+ #: includes/Addons.class.php:47
17
  msgid "Addons for Restaurant Reservations"
18
  msgstr ""
19
 
20
+ #: includes/AdminBookings.class.php:86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  msgid "Restaurant Bookings"
22
  msgstr ""
23
 
24
+ #: includes/AdminBookings.class.php:87 includes/CustomPostTypes.class.php:42
25
  msgid "Add New"
26
  msgstr ""
27
 
28
+ #: includes/AdminBookings.class.php:125 includes/AdminBookings.class.php:227
29
  msgid "Columns"
30
  msgstr ""
31
 
32
+ #: includes/AdminBookings.class.php:165 restaurant-reservations.php:231
33
  msgid "Add Booking"
34
  msgstr ""
35
 
36
+ #: includes/AdminBookings.class.php:168 includes/AdminBookings.class.php:209
37
+ #: includes/AdminBookings.class.php:254
38
  msgid "Cancel"
39
  msgstr ""
40
 
41
+ #: includes/AdminBookings.class.php:189 includes/AdminBookings.class.php:206
42
+ #: includes/WP_List_Table.BookingsTable.class.php:425
43
  msgid "Send Email"
44
  msgstr ""
45
 
46
+ #: includes/AdminBookings.class.php:196
47
  msgid "Subject"
48
  msgstr ""
49
 
50
+ #: includes/AdminBookings.class.php:200 includes/Settings.class.php:886
51
+ #: includes/WP_List_Table.BookingsTable.class.php:450
52
  msgid "Message"
53
  msgstr ""
54
 
55
+ #: includes/AdminBookings.class.php:251
56
  msgid "Update"
57
  msgstr ""
58
 
59
+ #: includes/AdminBookings.class.php:270 includes/AdminBookings.class.php:296
60
+ #: includes/AdminBookings.class.php:312
61
  msgid "Close"
62
  msgstr ""
63
 
64
+ #: includes/AdminBookings.class.php:282
65
+ msgid "Ban future bookings from the email address %s or the IP address %s?"
66
+ msgstr ""
67
+
68
+ #: includes/AdminBookings.class.php:290
69
+ msgid ""
70
+ "It is recommended to ban by email address instead of IP. Only ban by IP "
71
+ "address to block a malicious user who is using different email addresses to "
72
+ "avoid a previous ban."
73
+ msgstr ""
74
+
75
+ #: includes/AdminBookings.class.php:298
76
+ msgid "View all bans"
77
+ msgstr ""
78
+
79
+ #: includes/AdminBookings.class.php:378
80
  msgid "Booking Status"
81
  msgstr ""
82
 
83
+ #: includes/AdminBookings.class.php:386
84
  msgid "Send notifications"
85
  msgstr ""
86
 
87
+ #: includes/AdminBookings.class.php:391
88
  msgid "Learn more"
89
  msgstr ""
90
 
91
+ #: includes/AdminBookings.class.php:392
92
  msgid ""
93
  "When adding a booking or changing a booking's status with this form, no "
94
  "email notifications will be sent. Check this option if you want to send "
95
  "email notifications."
96
  msgstr ""
97
 
98
+ #: includes/AdminBookings.class.php:446
99
  msgid "You have been logged out. Please %slogin again%s."
100
  msgstr ""
101
 
102
+ #: includes/AdminBookings.class.php:482
103
  msgid ""
104
  "This booking has been sent to the %sTrash%s where it can not be edited. Set "
105
  "the booking to Pending or Confirmed to edit it."
106
  msgstr ""
107
 
108
+ #: includes/AdminBookings.class.php:499
109
  msgid "The booking could not be retrieved. Please reload the page and try again."
110
  msgstr ""
111
 
112
+ #: includes/AdminBookings.class.php:581
113
  msgid ""
114
  "Unable to trash this post. Please try again. If you continue to have "
115
  "trouble, please refresh the page."
116
  msgstr ""
117
 
118
+ #: includes/AdminBookings.class.php:623
119
  msgid "Please enter a message before sending the email."
120
  msgstr ""
121
 
122
+ #: includes/AdminBookings.class.php:632
123
  msgid "The email could not be sent because some critical information was missing."
124
  msgstr ""
125
 
126
+ #: includes/AdminBookings.class.php:644
127
  msgid "There was an error loading the booking and the email was not sent."
128
  msgstr ""
129
 
130
+ #: includes/AdminBookings.class.php:684
131
  msgid "You must select at least one column to display."
132
  msgstr ""
133
 
134
+ #: includes/AdminBookings.class.php:740
135
+ msgid "No IP or email address could be found for this ban request."
136
+ msgstr ""
137
+
138
  #: includes/AdminPageSettingLicenseKey.class.php:193
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."
226
+ msgstr ""
227
+
228
  #: includes/CustomPostTypes.class.php:38 includes/CustomPostTypes.class.php:40
229
  #: includes/CustomPostTypes.class.php:41
230
  #: includes/WP_List_Table.BookingsTable.class.php:113
240
  msgid "Add New Booking"
241
  msgstr ""
242
 
243
+ #: includes/CustomPostTypes.class.php:44 restaurant-reservations.php:232
244
  msgid "Edit Booking"
245
  msgstr ""
246
 
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
+
367
  #: includes/Notification.class.php:88
368
  msgid "View pending bookings"
369
  msgstr ""
395
  msgstr ""
396
 
397
  #: includes/Settings.class.php:271
398
+ msgid "Min Party Size"
399
  msgstr ""
400
 
401
  #: includes/Settings.class.php:272
402
+ msgid "Set a minimum allowed party size for bookings."
403
  msgstr ""
404
 
405
  #: includes/Settings.class.php:284
406
+ msgid "Max Party Size"
407
  msgstr ""
408
 
409
  #: includes/Settings.class.php:285
410
+ msgid "Set a maximum allowed party size for bookings."
411
+ msgstr ""
412
+
413
+ #: includes/Settings.class.php:297
414
+ msgid "Success Message"
415
+ msgstr ""
416
+
417
+ #: includes/Settings.class.php:298
418
  msgid "Enter the message to display when a booking request is made."
419
  msgstr ""
420
 
421
+ #: includes/Settings.class.php:309
422
  msgid "Date Format"
423
  msgstr ""
424
 
425
+ #: includes/Settings.class.php:310
426
  msgid ""
427
  "Define how the date is formatted on the booking form. %sFormatting rules%s. "
428
  "This only changes the format on the booking form. To change the date format "
429
  "in notification messages, modify your general %sWordPress Settings%s."
430
  msgstr ""
431
 
432
+ #: includes/Settings.class.php:321
433
  msgid "Time Format"
434
  msgstr ""
435
 
436
+ #: includes/Settings.class.php:322
437
  msgid ""
438
  "Define how the time is formatted on the booking form. %sFormatting rules%s. "
439
  "This only changes the format on the booking form. To change the time format "
440
  "in notification messages, modify your general %sWordPress Settings%s."
441
  msgstr ""
442
 
443
+ #: includes/Settings.class.php:335
444
  msgid "Language"
445
  msgstr ""
446
 
447
+ #: includes/Settings.class.php:336
448
  msgid ""
449
  "Select a language to use for the booking form datepicker if it is different "
450
  "than your WordPress language setting."
451
  msgstr ""
452
 
453
+ #: includes/Settings.class.php:348
454
+ msgid "Banned Email Addresses"
455
+ msgstr ""
456
+
457
+ #: includes/Settings.class.php:349
458
+ msgid ""
459
+ "You can block bookings from specific email addresses. Enter each email "
460
+ "address on a separate line."
461
+ msgstr ""
462
+
463
+ #: includes/Settings.class.php:359
464
+ msgid "Banned IP Addresses"
465
+ msgstr ""
466
+
467
+ #: includes/Settings.class.php:360
468
+ msgid ""
469
+ "You can block bookings from specific IP addresses. Enter each IP address on "
470
+ "a separate line. Be aware that many internet providers rotate their IP "
471
+ "address assignments, so an IP address may accidentally refer to a different "
472
+ "user. Also, if you block an IP address used by a public connection, such as "
473
+ "cafe WIFI, a public library, or a university network, you may inadvertantly "
474
+ "block several people."
475
+ msgstr ""
476
+
477
+ #: includes/Settings.class.php:368
478
  msgid "Booking Schedule"
479
  msgstr ""
480
 
481
+ #: includes/Settings.class.php:375
482
  msgid "Add new scheduling rule"
483
  msgstr ""
484
 
485
+ #: includes/Settings.class.php:389
486
  msgid "Delete scheduling rule"
487
  msgstr ""
488
 
489
+ #: includes/Settings.class.php:406
490
  msgid "Schedule"
491
  msgstr ""
492
 
493
+ #: includes/Settings.class.php:407
494
  msgid "Define the weekly schedule during which you accept bookings."
495
  msgstr ""
496
 
497
+ #: includes/Settings.class.php:432
498
  msgid "Exceptions"
499
  msgstr ""
500
 
501
+ #: includes/Settings.class.php:433
502
  msgid ""
503
  "Define special opening hours for holidays, events or other needs. Leave the "
504
  "time empty if you're closed all day."
505
  msgstr ""
506
 
507
+ #: includes/Settings.class.php:448
508
  msgid "Early Bookings"
509
  msgstr ""
510
 
511
+ #: includes/Settings.class.php:449
512
  msgid ""
513
  "Select how early customers can make their booking. (Administrators and "
514
  "Booking Managers are not restricted by this setting.)"
515
  msgstr ""
516
 
517
+ #: includes/Settings.class.php:452
518
  msgid "Any time"
519
  msgstr ""
520
 
521
+ #: includes/Settings.class.php:453
522
  msgid "Up to 1 day in advance"
523
  msgstr ""
524
 
525
+ #: includes/Settings.class.php:454
526
  msgid "Up to 1 week in advance"
527
  msgstr ""
528
 
529
+ #: includes/Settings.class.php:455
530
  msgid "Up to 2 weeks in advance"
531
  msgstr ""
532
 
533
+ #: includes/Settings.class.php:456
534
  msgid "Up to 30 days in advance"
535
  msgstr ""
536
 
537
+ #: includes/Settings.class.php:457
538
  msgid "Up to 90 days in advance"
539
  msgstr ""
540
 
541
+ #: includes/Settings.class.php:468
542
  msgid "Late Bookings"
543
  msgstr ""
544
 
545
+ #: includes/Settings.class.php:469
546
  msgid ""
547
  "Select how late customers can make their booking. (Administrators and "
548
  "Booking Managers are not restricted by this setting.)"
549
  msgstr ""
550
 
551
+ #: includes/Settings.class.php:472
552
  msgid "Up to the last minute"
553
  msgstr ""
554
 
555
+ #: includes/Settings.class.php:473
556
  msgid "At least 15 minutes in advance"
557
  msgstr ""
558
 
559
+ #: includes/Settings.class.php:474
560
  msgid "At least 30 minutes in advance"
561
  msgstr ""
562
 
563
+ #: includes/Settings.class.php:475
564
  msgid "At least 45 minutes in advance"
565
  msgstr ""
566
 
567
+ #: includes/Settings.class.php:476
568
  msgid "At least 1 hour in advance"
569
  msgstr ""
570
 
571
+ #: includes/Settings.class.php:477
572
  msgid "At least 4 hours in advance"
573
  msgstr ""
574
 
575
+ #: includes/Settings.class.php:478
576
+ msgid "At least 24 hours in advance"
577
  msgstr ""
578
 
579
+ #: includes/Settings.class.php:479
580
+ msgid "Block same-day bookings"
581
+ msgstr ""
582
+
583
+ #: includes/Settings.class.php:490
584
  msgid "Date Pre-selection"
585
  msgstr ""
586
 
587
+ #: includes/Settings.class.php:491
588
  msgid ""
589
  "When the booking form is loaded, should it automatically attempt to select "
590
  "a valid date?"
591
  msgstr ""
592
 
593
+ #: includes/Settings.class.php:494
594
  msgid "Select today if valid"
595
  msgstr ""
596
 
597
+ #: includes/Settings.class.php:495
598
  msgid "Select today or next valid date"
599
  msgstr ""
600
 
601
+ #: includes/Settings.class.php:496
602
  msgid "Leave empty"
603
  msgstr ""
604
 
605
+ #: includes/Settings.class.php:507
606
  msgid "Time Interval"
607
  msgstr ""
608
 
609
+ #: includes/Settings.class.php:508
610
  msgid "Select the number of minutes between each available time."
611
  msgstr ""
612
 
613
+ #: includes/Settings.class.php:511
614
  msgid "Every 30 minutes"
615
  msgstr ""
616
 
617
+ #: includes/Settings.class.php:512
618
  msgid "Every 15 minutes"
619
  msgstr ""
620
 
621
+ #: includes/Settings.class.php:513
622
  msgid "Every 10 minutes"
623
  msgstr ""
624
 
625
+ #: includes/Settings.class.php:514
626
  msgid "Every 5 minutes"
627
  msgstr ""
628
 
629
+ #: includes/Settings.class.php:525
630
+ msgid "Week Starts On"
631
+ msgstr ""
632
+
633
+ #: includes/Settings.class.php:526
634
+ msgid "Select the first day of the week"
635
+ msgstr ""
636
+
637
+ #: includes/Settings.class.php:529
638
+ msgid "Sunday"
639
+ msgstr ""
640
+
641
+ #: includes/Settings.class.php:530
642
+ msgid "Monday"
643
+ msgstr ""
644
+
645
+ #: includes/Settings.class.php:539
646
  msgid "Notifications"
647
  msgstr ""
648
 
649
+ #: includes/Settings.class.php:551
650
  msgid ""
651
  "The name which should appear in the Reply-To field of a user notification "
652
  "email"
653
  msgstr ""
654
 
655
+ #: includes/Settings.class.php:574
656
  msgid "Admin Notification"
657
  msgstr ""
658
 
659
+ #: includes/Settings.class.php:575
660
  msgid ""
661
  "Send an email notification to an administrator when a new booking is "
662
  "requested."
663
  msgstr ""
664
 
665
+ #: includes/Settings.class.php:585
666
  msgid "Admin Email Address"
667
  msgstr ""
668
 
669
+ #: includes/Settings.class.php:586
670
  msgid "The email address where admin notifications should be sent."
671
  msgstr ""
672
 
673
+ #: includes/Settings.class.php:595
674
  msgid "Email Templates"
675
  msgstr ""
676
 
677
+ #: includes/Settings.class.php:597
678
  msgid ""
679
  "Adjust the messages that are emailed to users and admins during the booking "
680
  "process."
681
  msgstr ""
682
 
683
+ #: includes/Settings.class.php:607
684
  msgid "Template Tags"
685
  msgstr ""
686
 
687
+ #: includes/Settings.class.php:609
688
  msgid ""
689
  "Use the following tags to automatically add booking information to the "
690
  "emails. Tags labeled with an asterisk (*) can be used in the email subject "
691
  "as well."
692
  msgstr ""
693
 
694
+ #: includes/Settings.class.php:620
695
  msgid "Admin Notification Subject"
696
  msgstr ""
697
 
698
+ #: includes/Settings.class.php:621
699
  msgid "The email subject for admin notifications."
700
  msgstr ""
701
 
702
+ #: includes/Settings.class.php:632
703
  msgid "Admin Notification Email"
704
  msgstr ""
705
 
706
+ #: includes/Settings.class.php:633
707
  msgid ""
708
  "Enter the email an admin should receive when an initial booking request is "
709
  "made."
710
  msgstr ""
711
 
712
+ #: includes/Settings.class.php:644
713
  msgid "New Request Email Subject"
714
  msgstr ""
715
 
716
+ #: includes/Settings.class.php:645
717
  msgid ""
718
  "The email subject a user should receive when they make an initial booking "
719
  "request."
720
  msgstr ""
721
 
722
+ #: includes/Settings.class.php:656
723
  msgid "New Request Email"
724
  msgstr ""
725
 
726
+ #: includes/Settings.class.php:657
727
  msgid ""
728
  "Enter the email a user should receive when they make an initial booking "
729
  "request."
730
  msgstr ""
731
 
732
+ #: includes/Settings.class.php:668
733
  msgid "Confirmed Email Subject"
734
  msgstr ""
735
 
736
+ #: includes/Settings.class.php:669
737
  msgid ""
738
  "The email subject a user should receive when their booking has been "
739
  "confirmed."
740
  msgstr ""
741
 
742
+ #: includes/Settings.class.php:680
743
  msgid "Confirmed Email"
744
  msgstr ""
745
 
746
+ #: includes/Settings.class.php:681
747
  msgid "Enter the email a user should receive when their booking has been confirmed."
748
  msgstr ""
749
 
750
+ #: includes/Settings.class.php:692
751
  msgid "Rejected Email Subject"
752
  msgstr ""
753
 
754
+ #: includes/Settings.class.php:693
755
  msgid ""
756
  "The email subject a user should receive when their booking has been "
757
  "rejected."
758
  msgstr ""
759
 
760
+ #: includes/Settings.class.php:704
761
  msgid "Rejected Email"
762
  msgstr ""
763
 
764
+ #: includes/Settings.class.php:705
765
  msgid "Enter the email a user should receive when their booking has been rejected."
766
  msgstr ""
767
 
768
+ #: includes/Settings.class.php:716
769
  msgid "Admin Update Subject"
770
  msgstr ""
771
 
772
+ #: includes/Settings.class.php:717
773
  msgid ""
774
  "The email subject a user should receive when an admin sends them a custom "
775
  "email message from the %sbookings panel%s."
776
  msgstr ""
777
 
778
+ #: includes/Settings.class.php:737
779
  msgid "Any size"
780
  msgstr ""
781
 
782
+ #: includes/Settings.class.php:827
783
  #: includes/integrations/business-profile.php:100
784
  msgid "Book a table"
785
  msgstr ""
786
 
787
+ #: includes/Settings.class.php:830
788
+ #: includes/WP_List_Table.BookingsTable.class.php:358
789
  msgid "Date"
790
  msgstr ""
791
 
792
+ #: includes/Settings.class.php:836
793
  msgid "Time"
794
  msgstr ""
795
 
796
+ #: includes/Settings.class.php:842
797
+ #: includes/WP_List_Table.BookingsTable.class.php:359
798
  msgid "Party"
799
  msgstr ""
800
 
801
+ #: includes/Settings.class.php:855
802
  msgid "Contact Details"
803
  msgstr ""
804
 
805
+ #: includes/Settings.class.php:858
806
+ #: includes/WP_List_Table.BookingsTable.class.php:360
807
  msgid "Name"
808
  msgstr ""
809
 
810
+ #: includes/Settings.class.php:864
811
+ #: includes/WP_List_Table.BookingsTable.class.php:361
812
  msgid "Email"
813
  msgstr ""
814
 
815
+ #: includes/Settings.class.php:873
816
+ #: includes/WP_List_Table.BookingsTable.class.php:362
817
  msgid "Phone"
818
  msgstr ""
819
 
820
+ #: includes/Settings.class.php:881
821
  msgid "Add a Message"
822
  msgstr ""
823
 
824
+ #: includes/Settings.class.php:931
825
  msgid "Email of the user who made the booking"
826
  msgstr ""
827
 
828
+ #: includes/Settings.class.php:932
829
  msgid "* Name of the user who made the booking"
830
  msgstr ""
831
 
832
+ #: includes/Settings.class.php:933
833
  msgid "* Number of people booked"
834
  msgstr ""
835
 
836
+ #: includes/Settings.class.php:934
837
  msgid "* Date and time of the booking"
838
  msgstr ""
839
 
840
+ #: includes/Settings.class.php:935
841
  msgid "Phone number if supplied with the request"
842
  msgstr ""
843
 
844
+ #: includes/Settings.class.php:936
845
  msgid "Message added to the request"
846
  msgstr ""
847
 
848
+ #: includes/Settings.class.php:937
849
  msgid "A link to the admin panel showing pending bookings"
850
  msgstr ""
851
 
852
+ #: includes/Settings.class.php:938
853
  msgid "A link to confirm this booking. Only include this in admin notifications"
854
  msgstr ""
855
 
856
+ #: includes/Settings.class.php:939
857
  msgid "A link to reject this booking. Only include this in admin notifications"
858
  msgstr ""
859
 
860
+ #: includes/Settings.class.php:940
861
  msgid "The name of this website"
862
  msgstr ""
863
 
864
+ #: includes/Settings.class.php:941
865
  msgid "A link to this website"
866
  msgstr ""
867
 
868
+ #: includes/Settings.class.php:942
869
  msgid "Current date and time"
870
  msgstr ""
871
 
923
  msgstr ""
924
 
925
  #: includes/WP_List_Table.BookingsTable.class.php:285
926
+ #: includes/WP_List_Table.BookingsTable.class.php:408
927
  msgid "Trash"
928
  msgstr ""
929
 
930
+ #: includes/WP_List_Table.BookingsTable.class.php:363
931
  msgid "Status"
932
  msgstr ""
933
 
934
+ #: includes/WP_List_Table.BookingsTable.class.php:364
935
  msgid "Details"
936
  msgstr ""
937
 
938
+ #: includes/WP_List_Table.BookingsTable.class.php:378
939
+ msgid "Submitted By"
940
+ msgstr ""
941
+
942
+ #: includes/WP_List_Table.BookingsTable.class.php:403
943
+ msgid "Loading"
944
+ msgstr ""
945
+
946
+ #: includes/WP_List_Table.BookingsTable.class.php:407
947
  msgid "Edit"
948
  msgstr ""
949
 
950
+ #: includes/WP_List_Table.BookingsTable.class.php:468
951
+ msgid "Unknown IP"
952
+ msgstr ""
953
+
954
+ #: includes/WP_List_Table.BookingsTable.class.php:469
955
+ msgid "Unknown Date"
956
+ msgstr ""
957
+
958
+ #: includes/WP_List_Table.BookingsTable.class.php:470
959
+ msgid "Request from %s on %s."
960
+ msgstr ""
961
+
962
+ #: includes/WP_List_Table.BookingsTable.class.php:473
963
+ msgid "Ban Customer"
964
+ msgstr ""
965
+
966
+ #: includes/WP_List_Table.BookingsTable.class.php:536
967
  msgid "Delete"
968
  msgstr ""
969
 
970
+ #: includes/WP_List_Table.BookingsTable.class.php:537
971
  msgid "Set To Confirmed"
972
  msgstr ""
973
 
974
+ #: includes/WP_List_Table.BookingsTable.class.php:538
975
  msgid "Set To Pending Review"
976
  msgstr ""
977
 
978
+ #: includes/WP_List_Table.BookingsTable.class.php:539
979
  msgid "Set To Closed"
980
  msgstr ""
981
 
982
+ #: includes/WP_List_Table.BookingsTable.class.php:653
983
  msgid "%d booking deleted successfully."
984
  msgid_plural "%d bookings deleted successfully."
985
  msgstr[0] ""
986
  msgstr[1] ""
987
 
988
+ #: includes/WP_List_Table.BookingsTable.class.php:656
989
  msgid "%d booking confirmed."
990
  msgid_plural "%d bookings confirmed."
991
  msgstr[0] ""
992
  msgstr[1] ""
993
 
994
+ #: includes/WP_List_Table.BookingsTable.class.php:659
995
  msgid "%d booking set to pending."
996
  msgid_plural "%d bookings set to pending."
997
  msgstr[0] ""
998
  msgstr[1] ""
999
 
1000
+ #: includes/WP_List_Table.BookingsTable.class.php:662
1001
  msgid "%d booking closed."
1002
  msgid_plural "%d bookings closed."
1003
  msgstr[0] ""
1004
  msgstr[1] ""
1005
 
1006
+ #: includes/WP_List_Table.BookingsTable.class.php:674
1007
  msgid "%d booking had errors and could not be processed."
1008
  msgid_plural "%d bookings had errors and could not be processed."
1009
  msgstr[0] ""
1010
  msgstr[1] ""
1011
 
1012
+ #: includes/WP_List_Table.BookingsTable.class.php:726
1013
+ #: includes/WP_List_Table.BookingsTable.class.php:747
1014
  msgid "All Locations"
1015
  msgstr ""
1016
 
1017
+ #: includes/WP_List_Table.BookingsTable.class.php:754
1018
  msgid "Inactive Locations"
1019
  msgstr ""
1020
 
1021
+ #: includes/WP_List_Table.BookingsTable.class.php:763
1022
  msgid "Switch"
1023
  msgstr ""
1024
 
1025
+ #: includes/WP_List_Table.BookingsTable.class.php:795
1026
  msgid "You're viewing bookings that have been moved to the trash."
1027
  msgstr ""
1028
 
1029
+ #: includes/WP_List_Table.BookingsTable.class.php:804
1030
  msgid "Only today's bookings are being shown."
1031
  msgstr ""
1032
 
1033
+ #: includes/WP_List_Table.BookingsTable.class.php:806
1034
  msgid "Only upcoming bookings are being shown."
1035
  msgstr ""
1036
 
1083
  msgid "--- Winery"
1084
  msgstr ""
1085
 
1086
+ #: includes/template-functions.php:130
1087
  msgid "Request Booking"
1088
  msgstr ""
1089
 
1091
  msgid "You do not have sufficient permissions to access this page."
1092
  msgstr ""
1093
 
1094
+ #: restaurant-reservations.php:160
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1095
  msgid "Booking Manager"
1096
  msgstr ""
1097
 
1098
+ #: restaurant-reservations.php:233
1099
  msgid ""
1100
  "An unspecified error occurred. Please try again. If the problem persists, "
1101
  "try logging out and logging back in."
1102
  msgstr ""
1103
 
1104
+ #: restaurant-reservations.php:297
1105
  msgid "View the help documentation for Restaurant Reservations"
1106
  msgstr ""
1107
 
1108
+ #: restaurant-reservations.php:297
1109
  msgid "Help"
1110
  msgstr ""
1111
 
1113
  msgid "Restaurant Reservations"
1114
  msgstr ""
1115
 
 
 
 
1116
  #. Author URI of the plugin/theme
1117
  msgid "http://themeofthecrop.com"
1118
  msgstr ""
1125
  msgid "Theme of the Crop"
1126
  msgstr ""
1127
 
1128
+ #: includes/Addons.class.php:28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1129
  msgctxt "Title of addons page"
1130
  msgid "Addons"
1131
  msgstr ""
1132
 
1133
+ #: includes/Addons.class.php:29
1134
  msgctxt "Title of addons page in the admin menu"
1135
  msgid "Addons"
1136
  msgstr ""
1137
 
1138
+ #: includes/Addons.class.php:134
1139
  msgctxt "restaurant-reservations"
1140
  msgid ""
1141
  "Find out when new addons are available by subscribing to the %smonthly "
1142
+ "newsletter%s, liking %sTheme of the Crop%s on Facebook, or following "
1143
+ "%sTheme of the Crop%s on Twitter."
1144
  msgstr ""
1145
 
1146
  #: includes/Settings.class.php:92
1150
  "sent to the email address you provided."
1151
  msgstr ""
1152
 
1153
+ #: includes/AdminBookings.class.php:62
1154
  msgctxt "Title of admin page that lists bookings"
1155
  msgid "Bookings"
1156
  msgstr ""
1157
 
1158
+ #: includes/AdminBookings.class.php:63
1159
  msgctxt "Title of bookings admin menu item"
1160
  msgid "Bookings"
1161
  msgstr ""
1162
 
1163
+ #: includes/AdminBookings.class.php:192
1164
  msgctxt "Label next to the email address to which an email will be sent"
1165
  msgid "To"
1166
  msgstr ""
1180
  msgid "Closed"
1181
  msgstr ""
1182
 
1183
+ #: includes/MultipleLocations.class.php:102
1184
  msgctxt "Name for grouping bookings"
1185
  msgid "Location"
1186
  msgstr ""
1188
  #: includes/Settings.class.php:93
1189
  msgctxt ""
1190
  "Default date format for display. Must match formatting rules at "
1191
+ "http://amsul.ca/pickadate.js/date/#formats"
1192
  msgid "mmmm d, yyyy"
1193
  msgstr ""
1194
 
1195
  #: includes/Settings.class.php:94
1196
  msgctxt ""
1197
  "Default time format for display. Must match formatting rules at "
1198
+ "http://amsul.ca/pickadate.js/time/#formats"
1199
  msgid "h:i A"
1200
  msgstr ""
1201
 
1328
  msgid "Update regarding your booking at %s"
1329
  msgstr ""
1330
 
1331
+ #: includes/Settings.class.php:376
1332
  msgctxt "Format of a scheduling rule"
1333
  msgid "Weekly"
1334
  msgstr ""
1335
 
1336
+ #: includes/Settings.class.php:377
1337
  msgctxt "Format of a scheduling rule"
1338
  msgid "Monthly"
1339
  msgstr ""
1340
 
1341
+ #: includes/Settings.class.php:378
1342
  msgctxt "Format of a scheduling rule"
1343
  msgid "Date"
1344
  msgstr ""
1345
 
1346
+ #: includes/Settings.class.php:379
1347
  msgctxt "Label for selecting days of the week in a scheduling rule"
1348
  msgid "Days of the week"
1349
  msgstr ""
1350
 
1351
+ #: includes/Settings.class.php:380
1352
  msgctxt "Label for selecting weeks of the month in a scheduling rule"
1353
  msgid "Weeks of the month"
1354
  msgstr ""
1355
 
1356
+ #: includes/Settings.class.php:381
1357
  msgctxt "Label to select a date for a scheduling rule"
1358
  msgid "Date"
1359
  msgstr ""
1360
 
1361
+ #: includes/Settings.class.php:382
1362
  msgctxt "Label to select a time slot for a scheduling rule"
1363
  msgid "Time"
1364
  msgstr ""
1365
 
1366
+ #: includes/Settings.class.php:383
1367
  msgctxt "Label to set a scheduling rule to last all day"
1368
  msgid "All day"
1369
  msgstr ""
1370
 
1371
+ #: includes/Settings.class.php:384
1372
  msgctxt "Label for the starting time of a scheduling rule"
1373
  msgid "Start"
1374
  msgstr ""
1375
 
1376
+ #: includes/Settings.class.php:385
1377
  msgctxt "Label for the ending time of a scheduling rule"
1378
  msgid "End"
1379
  msgstr ""
1380
 
1381
+ #: includes/Settings.class.php:386
1382
  msgctxt "Prompt displayed when a scheduling rule is set without any time restrictions"
1383
  msgid "All day long. Want to %sset a time slot%s?"
1384
  msgstr ""
1385
 
1386
+ #: includes/Settings.class.php:387
1387
  msgctxt "Toggle a scheduling rule open and closed"
1388
  msgid "Open and close this rule"
1389
  msgstr ""
1390
 
1391
+ #: includes/Settings.class.php:388
1392
  msgctxt "Delete a scheduling rule"
1393
  msgid "Delete rule"
1394
  msgstr ""
1395
 
1396
+ #: includes/Settings.class.php:390
1397
  msgctxt ""
1398
  "Brief default description of a scheduling rule when no weekdays or weeks "
1399
  "are included in the rule"
1400
  msgid "Never"
1401
  msgstr ""
1402
 
1403
+ #: includes/Settings.class.php:391
1404
  msgctxt ""
1405
  "Brief default description of a scheduling rule when all the weekdays/weeks "
1406
  "are included in the rule"
1407
  msgid "Every day"
1408
  msgstr ""
1409
 
1410
+ #: includes/Settings.class.php:392
1411
  msgctxt ""
1412
  "Brief default description of a scheduling rule when some weekdays are "
1413
  "included on only some weeks of the month. %s should be left alone and will "
1416
  msgid "%s on the %s week of the month"
1417
  msgstr ""
1418
 
1419
+ #: includes/Settings.class.php:393
1420
  msgctxt ""
1421
  "Brief default description of a scheduling rule when some weeks of the month "
1422
  "are included but all or no weekdays are selected. %s should be left alone "
1425
  msgid "%s week of the month"
1426
  msgstr ""
1427
 
1428
+ #: includes/Settings.class.php:394
1429
  msgctxt "Brief default description of a scheduling rule when no times are set"
1430
  msgid "All day"
1431
  msgstr ""
1432
 
1433
+ #: includes/Settings.class.php:395
1434
  msgctxt ""
1435
  "Brief default description of a scheduling rule when an end time is set but "
1436
  "no start time. If the end time is 6pm, it will read: Ends at 6pm"
1437
  msgid "Ends at"
1438
  msgstr ""
1439
 
1440
+ #: includes/Settings.class.php:396
1441
  msgctxt ""
1442
  "Brief default description of a scheduling rule when a start time is set but "
1443
  "no end time. If the start time is 6pm, it will read: Starts at 6pm"
1444
  msgid "Starts at"
1445
  msgstr ""
1446
 
1447
+ #: includes/Settings.class.php:397
1448
  msgctxt "Separator between times of a scheduling rule"
1449
  msgid "&mdash;"
1450
  msgstr ""
1451
 
1452
+ #: includes/Settings.class.php:409
1453
  msgctxt "Monday abbreviation"
1454
  msgid "Mo"
1455
  msgstr ""
1456
 
1457
+ #: includes/Settings.class.php:410
1458
  msgctxt "Tuesday abbreviation"
1459
  msgid "Tu"
1460
  msgstr ""
1461
 
1462
+ #: includes/Settings.class.php:411
1463
  msgctxt "Wednesday abbreviation"
1464
  msgid "We"
1465
  msgstr ""
1466
 
1467
+ #: includes/Settings.class.php:412
1468
  msgctxt "Thursday abbreviation"
1469
  msgid "Th"
1470
  msgstr ""
1471
 
1472
+ #: includes/Settings.class.php:413
1473
  msgctxt "Friday abbreviation"
1474
  msgid "Fr"
1475
  msgstr ""
1476
 
1477
+ #: includes/Settings.class.php:414
1478
  msgctxt "Saturday abbreviation"
1479
  msgid "Sa"
1480
  msgstr ""
1481
 
1482
+ #: includes/Settings.class.php:415
1483
  msgctxt "Sunday abbreviation"
1484
  msgid "Su"
1485
  msgstr ""
1486
 
1487
+ #: includes/Settings.class.php:425
1488
  msgctxt "Brief default description of a scheduling exception when no times are set"
1489
  msgid "Closed all day"
1490
  msgstr ""
1502
  msgid "&mdash;"
1503
  msgstr ""
1504
 
1505
+ #: includes/WP_List_Table.BookingsTable.class.php:438
1506
  msgctxt "Status label for bookings put in the trash"
1507
  msgid "Trash"
1508
  msgstr ""
1509
 
1510
+ #: includes/WP_List_Table.BookingsTable.class.php:797
1511
  msgctxt ""
1512
  "Indicates which booking status is currently being filtered in the list of "
1513
  "bookings."
1514
  msgid "You're viewing bookings that have been marked as %s."
1515
  msgstr ""
1516
 
1517
+ #: includes/WP_List_Table.BookingsTable.class.php:802
1518
  msgctxt "Notification of booking date range, eg - bookings from 2014-12-02-2014-12-05"
1519
  msgid "Only bookings from %s are being shown."
1520
  msgstr ""
package.json CHANGED
@@ -1,13 +1,14 @@
1
  {
2
  "name": "restaurant-reservations",
3
  "description": "Accept restaurant reservations and bookings online.",
4
- "version": "1.5.3",
5
  "author": {
6
  "name": "Theme of the Crop",
7
- "url": "http://themeofthecrop.com"
8
  },
9
  "devDependencies": {
10
  "grunt": "~1.0.0",
 
11
  "grunt-contrib-jshint": "~1.0.0",
12
  "grunt-contrib-watch": "~1.0.0",
13
  "grunt-wp-i18n": "~0.5.4"
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"
8
  },
9
  "devDependencies": {
10
  "grunt": "~1.0.0",
11
+ "grunt-contrib-compress": "~1.3.0",
12
  "grunt-contrib-jshint": "~1.0.0",
13
  "grunt-contrib-watch": "~1.0.0",
14
  "grunt-wp-i18n": "~0.5.4"
readme.txt → readme.md RENAMED
@@ -1,17 +1,25 @@
1
- === Restaurant Reservations ===
2
  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.6
 
7
  Tags: restaurant, reservations, bookings, table bookings, restaurant reservation, table reservation
8
- Stable tag: 1.6.3
 
 
9
  License: GPLv2 or later
 
10
  Donate link: https://themeofthecrop.com
11
 
12
  Accept restaurant reservations and table bookings online. Quickly confirm or reject bookings, send email notifications, set booking times and more.
13
 
14
- == Description ==
15
 
16
  Accept restaurant reservations and table bookings online. Quickly confirm or reject bookings, send out custom email notifications, restrict booking times and more.
17
 
@@ -24,51 +32,52 @@ Accept restaurant reservations and table bookings online. Quickly confirm or rej
24
  * Customize all [notification messages](http://doc.themeofthecrop.com/plugins/restaurant-reservations/user/config/email-notifications#understanding-the-template-tags), and date and time formats
25
  * Add and edit bookings from the admin panel
26
  * Take bookings for [multiple locations](http://doc.themeofthecrop.com/plugins/restaurant-reservations/user/manage/locations)
27
- * Send customers an email about their booking from the admin panel
 
28
 
29
- [Theme of the Crop](https://themeofthecrop.com/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations) builds the [best WordPress restaurant themes](https://themeofthecrop.com/themes/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations) and plugins that help restaurants manage [responsive online menus](https://themeofthecrop.com/plugins/food-and-drink-menu/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations) and [boost their SEO](https://themeofthecrop.com/restaurant-seo/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations).
30
 
31
- = How to use =
32
 
33
  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.
34
 
35
- = Addons =
36
- [Custom Fields for Restaurant Reservations](https://themeofthecrop.com/plugin/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.
37
 
38
- [Export Bookings for Restaurant Reservations](https://themeofthecrop.com/plugin/export-bookings-for-restaurant-reservations/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations) - Export your restaurant reservations to PDF and Excel/CSV files.
39
 
40
- [MailChimp for Restaurant Reservations](https://themeofthecrop.com/plugin/mailchimp-restaurant-reservations/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations) - Subscribe emails from new restaurant reservations to your MailChimp mailing list.
41
 
42
- = Developers =
43
 
44
  This plugin is packed with hooks so you can extend it, customize it and rebrand it as needed. Take a look at the [Developer Documentation](http://doc.themeofthecrop.com/plugins/restaurant-reservations/developer/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations).
45
 
46
  Development takes place on [GitHub](https://github.com/NateWr/restaurant-reservations), so fork it up.
47
 
48
- == Installation ==
49
 
50
  1. Unzip `restaurant-reservations.zip`
51
  2. Upload the contents of `restaurant-reservations.zip` to the `/wp-content/plugins/` directory
52
  3. Activate the plugin through the 'Plugins' menu in WordPress
53
  4. Go to Bookings > Settings to set up the page to display your booking form.
54
 
55
- == Frequently Asked Questions ==
56
 
57
- = Is there a shortcode to print the booking form? =
58
 
59
  Yes, use the `[booking-form]` shortcode.
60
 
61
- = Can I change the format of the date or time? =
62
 
63
  Yes, set the format for the datepicker in *Bookings > Settings*. The format used in the backend will depend on the date and time formats in your WordPress settings.
64
 
65
- = The datepicker or timepicker is not working. =
66
 
67
  If you load up the form and no date or time picker is popping up when you select those fields, this is likely caused by a Javascript error from another plugin or theme. You can find the problematic plugin by deactivating other plugins you're using one-by-one. Test after each deactivation to see if the date and time pickers work.
68
 
69
  If you have deactivated all other plugins and still have a problem, try switching to a default theme (one of the TwentySomething themes).
70
 
71
- = I'm not receiving notification emails for new bookings. =
72
 
73
  This is almost always the result of issues with your server and can be caused by a number of things. Before posting a support request, please run through the following checklist:
74
 
@@ -78,28 +87,28 @@ This is almost always the result of issues with your server and can be caused by
78
  4. If you're able to receive regular WordPress emails but not booking notifications, check your spam filters or junk mail folders.
79
  5. If you still haven't found the emails, contact your web host and let them know the date, time and email address where you expected to receive a booking. They should be able to check their logs to see what is happening to the email.
80
 
81
- = Can I make the phone number required? =
82
 
83
  This is a common request so I have written a small addon to do this for you. [Learn more](https://themeofthecrop.com/2015/01/08/simple-phone-validation-restaurant-reservations/).
84
 
85
- = Can I translate the booking form? =
86
 
87
  Yes, everything in this plugin can be translated using the standard translation process and software like PoEdit. If you're not familiar with that process, I'd recommend you take a look at the [Loco Translate](https://wordpress.org/plugins/loco-translate/) plugin, which provides a simple interface in your WordPress admin area for translating themes and plugins.
88
 
89
  If you make a translation, please help others out by adding it to the [GitHub repository](https://github.com/NateWr/restaurant-reservations) so that I can distribute it for others.
90
 
91
- = I set Early or Late Bookings restrictions, but I scan still book during that time =
92
  Users with the Administrator and Booking Manager roles are exempt from these restrictions. This is so that they can make last-minute changes to bookings as needed. If you want to test the Early or Late Bookings restrictions, try logging out and testing.
93
 
94
- = I want to add a field to the form. Can I do that? =
95
 
96
- The addon, [Custom Fields for Restaurant Reservations](https://themeofthecrop.com/plugin/custom-fields-restaurant-reservations/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations), will allow you to add a field or modify some of the existing fields of the booking form. Developers who are comfortable coding up plugins for WordPress can add their own fields using the hooks provided. Developers can find a rough guide to coding a custom field in the answer to [this support request](https://wordpress.org/support/topic/edit-form-label-and-add-input-fields).
97
 
98
- = More questions and answers =
99
 
100
  Find answers to even more questions in the [FAQ](http://doc.themeofthecrop.com/plugins/restaurant-reservations/user/faq?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations).
101
 
102
- == Screenshots ==
103
 
104
  1. Easily manage bookings. View today's bookings or upcoming bookings at-a-glance. Confirm or reject bookings quickly.
105
  2. Easy-to-use booking form with a simple, clear style that is compatible with many themes. Minimal CSS is used to make it easier to style.
@@ -114,16 +123,27 @@ Find answers to even more questions in the [FAQ](http://doc.themeofthecrop.com/p
114
  11. It also integrates with the Business Profile plugin to support booking for multiple locations.
115
  12. Access a short guide from your Plugins list to help you get started quickly.
116
 
117
- == Changelog ==
118
 
119
- = 1.6.3 (2016-10-31) =
 
 
 
 
 
 
 
 
 
 
 
120
  * Fix: Exporting bookings by location (addon). Location query args are now support for rtbQuery objects.
121
  * Add: Option to select start of the week for the datepicker
122
 
123
- = 1.6.2 (2016-08-20) =
124
  * Fix: Broken time picker introduced in 1.6.1
125
 
126
- = 1.6.1 (2016-08-19) =
127
  * Fix: Support location post ids in booking form shortcode
128
  * Fix: JavaScript error if the time field is hidden
129
  * Fix: Fix booking detail popup issue when used with custom fields addon
@@ -131,14 +151,14 @@ Find answers to even more questions in the [FAQ](http://doc.themeofthecrop.com/p
131
  * Add: Russian language translation. h/t Alexandra Kuksa
132
  * Update: Spanish language translation. h/t Matias Rodriguez
133
 
134
- = 1.6 (2016-06-20) =
135
  * Fix: Currently visible notice in bookings list on mobile devices
136
  * Fix: Conflict with WooCommerce that prevented booking managers from viewing bookings
137
  * Add: Support multi-location bookings
138
  * Add: Add reservation schema.org markup when Business Profile used
139
  * Add: Allow custom first day of the week for date picker
140
 
141
- = 1.5.3 (2016-03-25) =
142
  * Fix: no bookings found when searching by start and end dates that are the same
143
  * Add: clarify that early/late bookings restrictions don't apply to admins
144
  * Add: Brazilian and Norwegian translations
@@ -146,30 +166,30 @@ Find answers to even more questions in the [FAQ](http://doc.themeofthecrop.com/p
146
  * Update: link to new online documentation
147
  * Other: Tested for compatibility with WP 4.5
148
 
149
- = 1.5.2 (2016-02-29) =
150
  * Fix: booking managers can not confirm/reject bookings
151
 
152
- = 1.5.1 (2016-02-19) =
153
  * Fix: increase security of the quicklink feature for confirming/rejecting bookings
154
  * Fix: Improve wp-cli compatibility
155
 
156
- = 1.5 (2015-12-17) =
157
  * Fix: pickadate iOS bug
158
  * Fix: Bookings table's Today view didn't respect WordPress timezone setting
159
  * Add: Allow bookings table columns to be toggled on/off
160
  * Update: Convert message column/row drop-down to a details modal for all hidden columns
161
  * Update: Put focus into message field when expanded in booking form
162
 
163
- = 1.4.10 (2015-10-29) =
164
  * Fix: Allow settings page required capability to be filtered later
165
  * Fix: Compatibility issue with old versions of jQuery
166
  * Add: Spanish translation from Rafa dMC
167
 
168
- = 1.4.9 (2015-10-06) =
169
  * Fix: iOS 8 bug with date and time pickers
170
  * Add: newsletter signup prompt to addons page
171
 
172
- = 1.4.8 (2015-08-20) =
173
  * Add: WPML config file for improved multi-lingual compatibility
174
  * Add: Danish translation by Yusef Mubeen
175
  * Fix: Allow bookings managers to bypass early/late bookings restrictions
@@ -178,7 +198,7 @@ Find answers to even more questions in the [FAQ](http://doc.themeofthecrop.com/p
178
  * Updated: Simple Admin Pages lib to v2.0.a.10
179
  * Updated: Dutch translation h/t Roy van den Houten and Clements Tolboom
180
 
181
- = 1.4.7 (2015-07-02) =
182
  * Add: Spanish translation from Joaqin Sanz Boixader
183
  * Fix: Sorting of bookings by date and name in list table broken
184
  * Fix: Custom late bookings values more than one day aren't reflected in date picker
@@ -186,7 +206,7 @@ Find answers to even more questions in the [FAQ](http://doc.themeofthecrop.com/p
186
  * Updated: German translation from Roland Stumpp
187
  * Updated: pickadate.js language translations
188
 
189
- = 1.4.6 (2015-06-20) =
190
  * Add: Remove old schedule exceptions and sort exceptions by date
191
  * Add: CSS class indicating type of booking form field
192
  * Fix: Extended Latin can cause Reply-To email headers to fail in some clients
@@ -194,14 +214,14 @@ Find answers to even more questions in the [FAQ](http://doc.themeofthecrop.com/p
194
  * Fix: Message row lingers after booking trashed in admin panel
195
  * Updated .pot file
196
 
197
- = 1.4.5 (2015-04-23) =
198
  * Fix: Loading spinner not visible due to 4.2 changes
199
  * Add: new addon Export Bookings released
200
 
201
- = 1.4.4 (2015-04-20) =
202
  * Fix: low-risk XSS security vulnerability with escaped URLs on admin bookings page
203
 
204
- = 1.4.3 (2015-04-20) =
205
  * Add: Datepickers for start/end date filters in admin bookings list
206
  * Fix: Disabled weekdays get offset when editing bookings
207
  * Fix: Start/end date filters in admin bookings list
@@ -210,10 +230,10 @@ Find answers to even more questions in the [FAQ](http://doc.themeofthecrop.com/p
210
  * Updated: Dutch and German translations
211
  * Updated: pickadate.js lib now at v3.5.6
212
 
213
- = 1.4.2 (2015-03-31) =
214
  * Fix: Speed issue if licensed addon active
215
 
216
- = 1.4.1 (2015-03-31) =
217
  * Add: rtbQuery class for fetching bookings
218
  * Add: Centralized system for handling extension licenses
219
  * Add: Several filters for the bookings admin list table
@@ -222,13 +242,13 @@ Find answers to even more questions in the [FAQ](http://doc.themeofthecrop.com/p
222
  * Updated: German translation h/t Roland Stumpp
223
  * Fix: Button label in send email modal
224
 
225
- = 1.4 (2015-02-24) =
226
  * Add: Send a custom email from the bookings list
227
  * Add: Hebrew translation. h/t Ahrale
228
  * Add: Default template functions for checkbox, radio and confirmation fields
229
  * Fix: Replace dialect with more common German in translation file. h/t Roland Stumpp
230
 
231
- = 1.3 (2015-02-03) =
232
  * Add and edit bookings from the admin area
233
  * Fix: date and time pickers broken on iOS 8 devices
234
  * Add complete German translation from scolast34
@@ -244,7 +264,7 @@ Find answers to even more questions in the [FAQ](http://doc.themeofthecrop.com/p
244
  * Fix: addons list won't load if allow_url_fopen is disabled
245
 
246
 
247
- = 1.2.3 (2014-11-04) =
248
  * Add a {user_email} notification template tag
249
  * Add filter to notification template tag descriptions for extensions
250
  * Add Reply-To mail headers and use a more reliable From header
@@ -253,139 +273,142 @@ Find answers to even more questions in the [FAQ](http://doc.themeofthecrop.com/p
253
  * Fix: open time picker in body container to mitigate rare positioning bugs
254
  * Fix: don't auto-select today's date if it's not a valid date or errors are attached to the date field
255
 
256
- = 1.2.2 (2014-08-24) =
257
  * Fix: custom date formats can break date validation for new bookings
258
  * Add new booking form generation hooks for easier customization
259
  * Add support for upcoming MailChimp addon
260
  * Add new addons page
261
  * Update Simple Admin Pages library to v2.0.a.7
262
 
263
- = 1.2.1 (2014-08-01) =
264
  * Fix: bulk actions below the bookings table don't work
265
  * Fix: PHP Notice generated during validation
266
 
267
- = 1.2 (2014-07-17) =
268
  * Add notification template tags for phone number and message
269
  * Add automatic selection of date when page is loaded (option to disable this feature)
270
  * Add option to set time interval of time picker
271
  * Fix auto-detection of pickadate language from WordPress site language
272
  * Fix duplicate entry in .pot file that caused PoEdit error
273
 
274
- = 1.1.4 (2014-07-03) =
275
  * Add a .pot file for easier translations
276
  * Fix notifications that showed MySQL date format instead of user-selected format
277
  * Fix Arabic translation of pickadate component
278
  * Add support for the correct start of the week depending on language
279
 
280
- = 1.1.3 (2014-05-22) =
281
  * Fix an error where the wrong date would be selected when a form was reloaded with validation errors
282
 
283
- = 1.1.2 (2014-05-14) =
284
  * Update Simple Admin Pages library to fix an uncommon error when saving Textarea components
285
 
286
- = 1.1.1 (2014-05-14) =
287
  * Update Simple Admin Pages library to fix broken Scheduler in Firefox
288
 
289
- = 1.1 (2014-05-12) =
290
  * Attempt to load the correct language for the datepicker from the WordPress settings
291
  * Add support for choosing a language for the datepicker if different from WordPress settings
292
  * Allow late bookings to be blocked 4 hours and 1 day in advance
293
  * Fix: don't show settings under WordPress's core General settings page
294
 
295
- = 1.0.2 (2014-05-08) =
296
  * Remove development tool from codebase
297
 
298
- = 1.0.1 (2014-05-08) =
299
  * Replace dashicons caret with CSS-only caret in booking form
300
 
301
- = 1.0 (2014-05-07) =
302
  * Initial release
303
 
304
- == Upgrade Notice ==
 
 
 
305
 
306
- = 1.6.2 =
307
  This update fixes a critical error introduced in v1.6.1 which broke the time picker.
308
 
309
- = 1.6.1 =
310
  This maintenance update adds a {location} tag for notifications, improves the location argument in the booking form shortcode and fixes a few minor bugs.
311
 
312
- = 1.6 =
313
  This is a major update that adds support for accepting bookings at multiple locations. View the online documentation for further details.
314
 
315
- = 1.5.3 =
316
  This update fixes a minor bug when searching for bookings by date, updates compatibilty for WP v4.5, and adds links to the new online documentation.
317
 
318
- = 1.5.2 =
319
  This update fixes a bug introduced in the last version which prevented Booking Managers from approving/rejecting reservations.
320
 
321
- = 1.5.1 =
322
  This update increases security for the quick link feature to confirm/reject bookings from the admin notification email.
323
 
324
- = 1.5 =
325
  This update adds the ability to configure which columns are visible in the bookings table. It works with the Custom Fields addon. If you have added fields using custom code, please read the release notification at themeofthecrop.com before updating.
326
 
327
- = 1.4.10 =
328
  This update includes a new Spanish translation and a few minor fixes. Updating isn't necessary for most people.
329
 
330
- = 1.4.9 =
331
  This update fixes a bug that made it difficult for iOS 8 users to select a date and time in their bookings. I strongly recommend you update.
332
 
333
- = 1.4.8 =
334
  This update fixes a bug that prevented bookings managers from editing bookings within the early/late schedule restrictions. It also fixed a bug with late opening times, added a WPML config file for better multi-lingual compatibility, updated translations, and improved the mobile view of the bookings list.
335
 
336
- = 1.4.7 =
337
  This update fixes a bug that prevented bookings from being sorted by date or name in the admin panel. It also updates some translations and improves support for custom late bookings values.
338
 
339
- = 1.4.6 =
340
  This update improves compatibility with an upcoming Custom Fields addon. It also fixes some minor bugs with extended Latin characters in emails and the admin list table, and removes expired schedule exceptions.
341
 
342
- = 1.4.5 =
343
  This update fixes a non-critical issue with the display of the loading spinner in the upcoming 4.2 version of WordPress.
344
 
345
- = 1.4.4 =
346
  This update fixes a low-risk XSS security vulnerability. It is low-risk because in order to exploit this vulnerability a user would need to have access to the bookings management panel in the admin area, which only trusted users should have.
347
 
348
- = 1.4.3 =
349
  This update adds datepickers to the start/end date filters in the admin bookings list and fixes a small error with the filters. It also fixes an issue with disabled weekdays when editing bookings. Dutch and German translation updates.
350
 
351
- = 1.4.2 =
352
  This update is a maintenance release that fixes a couple minor issues, adds French and Italian translations, and includes some under-the-hood changes to support upcoming extensions. 1.4.1-1.4.2 fixes a rare but vital performance issue in the admin.
353
 
354
- = 1.4.1 =
355
  This update is a maintenance release that fixes a couple minor issues, adds French and Italian translations, and includes some under-the-hood changes to support upcoming extensions.
356
 
357
- = 1.4 =
358
  Thanks to sponsorship from Gemini Design, the plugin now supports sending an email directly to customers from the list of bookings, so you can request more details or suggest an alternative booking time. This update also improves the German translation and adds a Hebrew translation. Read the full changelog for details.
359
 
360
- = 1.3 =
361
  This update adds support for adding and editing bookings from the admin panel. The bookings panel now shows upcoming bookings by default. The Party field in the booking form is now a dropdown selection. Plus a bunch of new features and fixes. Read the full changelog for details.
362
 
363
- = 1.2.3 =
364
  This update adds a {user_email} notification template tag and improves the mail headers on notifications to mitigate spam risk. It also adds the missing translation for the Clear button in the time picker for many languages. More minor bug fixes listed in the changelog.
365
 
366
- = 1.2.2 =
367
  This update adds support for a new MailChimp addon that will be released soon. An addons page is now available under the Bookings menu. A bug in which custom date/time formats could cause validation errors has been fixed. New hooks are now in place so that it's easier to customize the form output.
368
 
369
- = 1.2.1 =
370
  This is a minor maintenance update which fixes a couple of small bugs.
371
 
372
- = 1.2 =
373
  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.
374
 
375
- = 1.1.4 =
376
  This updated fixes an error with the format of the date in notification emails. Now it will show you the date formatted however you have chosen for it to be formatted in your WordPress installation. It also now displays the correct start of the week depending on the language selected for the datepicker. A .pot file is now included for easier translations.
377
 
378
- = 1.1.3 =
379
  This update fixes an error when the form had validation errors (missing fields or wrong date/time selected). Instead of loading the selected date it would load today's date. This update ensures the selected date is reloaded properly.
380
 
381
- = 1.1.2 =
382
  This update fixes an error some people may experience when trying to save settings. This is the second update today, so if you missed the other one please read the changelog for the 1.1.1 update as well.
383
 
384
- = 1.1.1 =
385
  This update fixes problems some users reported when using the Firefox browser to modify the booking schedule. This required an update to a library that is shared with another plugin, Food and Drink Menu. If you are using that plugin, please update that one as well or you may get some odd behavior. (Thanks to sangwh and bforsoft for reporting the issue.)
386
 
387
- = 1.1 =
388
  This update improves internationalization (i8n) by attempting to determine the appropriate language for the booking form datepicker from your WordPress settings. It also adds a setting to pick a language manually from a list of supported languages. This update also adds options to block late bookings at least 4 hours or 1 day in advance. Thanks to Remco and Roland for their early feedback.
389
 
390
- = 1.0.2 =
391
  This update removes a bit of code that was used for development purposes. Please update as this code could be run by any user on the frontend.
1
+ # Restaurant Reservations
2
  Contributors: NateWr
3
+ <br/>
4
  Author URI: https://github.com/NateWr
5
+ <br/>
6
  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/>
18
  Donate link: https://themeofthecrop.com
19
 
20
  Accept restaurant reservations and table bookings online. Quickly confirm or reject bookings, send email notifications, set booking times and more.
21
 
22
+ ## Description
23
 
24
  Accept restaurant reservations and table bookings online. Quickly confirm or reject bookings, send out custom email notifications, restrict booking times and more.
25
 
32
  * Customize all [notification messages](http://doc.themeofthecrop.com/plugins/restaurant-reservations/user/config/email-notifications#understanding-the-template-tags), and date and time formats
33
  * Add and edit bookings from the admin panel
34
  * Take bookings for [multiple locations](http://doc.themeofthecrop.com/plugins/restaurant-reservations/user/manage/locations)
35
+ * Send customers [an email](http://doc.themeofthecrop.com/plugins/restaurant-reservations/user/manage/send-emails) about their booking from the admin panel
36
+ * [Ban abusive customers](http://doc.themeofthecrop.com/plugins/restaurant-reservations/user/manage/ban-customers) to save money on no-shows
37
 
38
+ [Theme of the Crop](https://themeofthecrop.com/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations) builds <a href="https://themeofthecrop.com/themes/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations" rel="friend">great WordPress restaurant themes</a> and plugins that help restaurants manage [responsive online menus](https://themeofthecrop.com/plugins/food-and-drink-menu/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations) and [boost their SEO](https://themeofthecrop.com/restaurant-seo/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations).
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.
46
 
47
+ [Export Bookings for Restaurant Reservations](https://themeofthecrop.com/plugins/export-bookings-for-restaurant-reservations/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations) - Export your restaurant reservations to PDF and Excel/CSV files.
48
 
49
+ [MailChimp for Restaurant Reservations](https://themeofthecrop.com/plugins/mailchimp-restaurant-reservations/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations) - Subscribe emails from new restaurant reservations to your MailChimp mailing list.
50
 
51
+ ### Developers
52
 
53
  This plugin is packed with hooks so you can extend it, customize it and rebrand it as needed. Take a look at the [Developer Documentation](http://doc.themeofthecrop.com/plugins/restaurant-reservations/developer/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations).
54
 
55
  Development takes place on [GitHub](https://github.com/NateWr/restaurant-reservations), so fork it up.
56
 
57
+ ## Installation
58
 
59
  1. Unzip `restaurant-reservations.zip`
60
  2. Upload the contents of `restaurant-reservations.zip` to the `/wp-content/plugins/` directory
61
  3. Activate the plugin through the 'Plugins' menu in WordPress
62
  4. Go to Bookings > Settings to set up the page to display your booking form.
63
 
64
+ ## Frequently Asked Questions
65
 
66
+ #### Is there a shortcode to print the booking form?
67
 
68
  Yes, use the `[booking-form]` shortcode.
69
 
70
+ #### Can I change the format of the date or time?
71
 
72
  Yes, set the format for the datepicker in *Bookings > Settings*. The format used in the backend will depend on the date and time formats in your WordPress settings.
73
 
74
+ #### The datepicker or timepicker is not working.
75
 
76
  If you load up the form and no date or time picker is popping up when you select those fields, this is likely caused by a Javascript error from another plugin or theme. You can find the problematic plugin by deactivating other plugins you're using one-by-one. Test after each deactivation to see if the date and time pickers work.
77
 
78
  If you have deactivated all other plugins and still have a problem, try switching to a default theme (one of the TwentySomething themes).
79
 
80
+ #### I'm not receiving notification emails for new bookings.
81
 
82
  This is almost always the result of issues with your server and can be caused by a number of things. Before posting a support request, please run through the following checklist:
83
 
87
  4. If you're able to receive regular WordPress emails but not booking notifications, check your spam filters or junk mail folders.
88
  5. If you still haven't found the emails, contact your web host and let them know the date, time and email address where you expected to receive a booking. They should be able to check their logs to see what is happening to the email.
89
 
90
+ #### Can I make the phone number required?
91
 
92
  This is a common request so I have written a small addon to do this for you. [Learn more](https://themeofthecrop.com/2015/01/08/simple-phone-validation-restaurant-reservations/).
93
 
94
+ #### Can I translate the booking form?
95
 
96
  Yes, everything in this plugin can be translated using the standard translation process and software like PoEdit. If you're not familiar with that process, I'd recommend you take a look at the [Loco Translate](https://wordpress.org/plugins/loco-translate/) plugin, which provides a simple interface in your WordPress admin area for translating themes and plugins.
97
 
98
  If you make a translation, please help others out by adding it to the [GitHub repository](https://github.com/NateWr/restaurant-reservations) so that I can distribute it for others.
99
 
100
+ #### I set Early or Late Bookings restrictions, but I scan still book during that time
101
  Users with the Administrator and Booking Manager roles are exempt from these restrictions. This is so that they can make last-minute changes to bookings as needed. If you want to test the Early or Late Bookings restrictions, try logging out and testing.
102
 
103
+ #### I want to add a field to the form. Can I do that?
104
 
105
+ The addon, [Custom Fields for Restaurant Reservations](https://themeofthecrop.com/plugins/custom-fields-restaurant-reservations/?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations), will allow you to add a field or modify some of the existing fields of the booking form. Developers who are comfortable coding up plugins for WordPress can add their own fields using the hooks provided. Developers can find a rough guide to coding a custom field in the answer to [this support request](https://wordpress.org/support/topic/edit-form-label-and-add-input-fields).
106
 
107
+ #### More questions and answers
108
 
109
  Find answers to even more questions in the [FAQ](http://doc.themeofthecrop.com/plugins/restaurant-reservations/user/faq?utm_source=Plugin&utm_medium=Plugin%20Description&utm_campaign=Restaurant%20Reservations).
110
 
111
+ ## Screenshots
112
 
113
  1. Easily manage bookings. View today's bookings or upcoming bookings at-a-glance. Confirm or reject bookings quickly.
114
  2. Easy-to-use booking form with a simple, clear style that is compatible with many themes. Minimal CSS is used to make it easier to style.
123
  11. It also integrates with the Business Profile plugin to support booking for multiple locations.
124
  12. Access a short guide from your Plugins list to help you get started quickly.
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
131
+ * Add: Disable times in the time picker blocked by late bookings restrictions
132
+ * Add: Option to block same-day bookings
133
+ * Add: Option for minimum party size
134
+ * Fix: Location printed twice in booking details
135
+ * Fix: Allow Bookings Managers to edit bookings in the past
136
+ * Update: Deprecated RTB_LOAD_FRONTEND_ASSETS moved `rtb-load-frontend-assets` filter
137
+ * Update: Sort bookings by latest date first when viewing All bookings
138
+
139
+ #### 1.6.3 (2016-10-31)
140
  * Fix: Exporting bookings by location (addon). Location query args are now support for rtbQuery objects.
141
  * Add: Option to select start of the week for the datepicker
142
 
143
+ #### 1.6.2 (2016-08-20)
144
  * Fix: Broken time picker introduced in 1.6.1
145
 
146
+ #### 1.6.1 (2016-08-19)
147
  * Fix: Support location post ids in booking form shortcode
148
  * Fix: JavaScript error if the time field is hidden
149
  * Fix: Fix booking detail popup issue when used with custom fields addon
151
  * Add: Russian language translation. h/t Alexandra Kuksa
152
  * Update: Spanish language translation. h/t Matias Rodriguez
153
 
154
+ #### 1.6 (2016-06-20)
155
  * Fix: Currently visible notice in bookings list on mobile devices
156
  * Fix: Conflict with WooCommerce that prevented booking managers from viewing bookings
157
  * Add: Support multi-location bookings
158
  * Add: Add reservation schema.org markup when Business Profile used
159
  * Add: Allow custom first day of the week for date picker
160
 
161
+ #### 1.5.3 (2016-03-25)
162
  * Fix: no bookings found when searching by start and end dates that are the same
163
  * Add: clarify that early/late bookings restrictions don't apply to admins
164
  * Add: Brazilian and Norwegian translations
166
  * Update: link to new online documentation
167
  * Other: Tested for compatibility with WP 4.5
168
 
169
+ #### 1.5.2 (2016-02-29)
170
  * Fix: booking managers can not confirm/reject bookings
171
 
172
+ #### 1.5.1 (2016-02-19)
173
  * Fix: increase security of the quicklink feature for confirming/rejecting bookings
174
  * Fix: Improve wp-cli compatibility
175
 
176
+ #### 1.5 (2015-12-17)
177
  * Fix: pickadate iOS bug
178
  * Fix: Bookings table's Today view didn't respect WordPress timezone setting
179
  * Add: Allow bookings table columns to be toggled on/off
180
  * Update: Convert message column/row drop-down to a details modal for all hidden columns
181
  * Update: Put focus into message field when expanded in booking form
182
 
183
+ #### 1.4.10 (2015-10-29)
184
  * Fix: Allow settings page required capability to be filtered later
185
  * Fix: Compatibility issue with old versions of jQuery
186
  * Add: Spanish translation from Rafa dMC
187
 
188
+ #### 1.4.9 (2015-10-06)
189
  * Fix: iOS 8 bug with date and time pickers
190
  * Add: newsletter signup prompt to addons page
191
 
192
+ #### 1.4.8 (2015-08-20)
193
  * Add: WPML config file for improved multi-lingual compatibility
194
  * Add: Danish translation by Yusef Mubeen
195
  * Fix: Allow bookings managers to bypass early/late bookings restrictions
198
  * Updated: Simple Admin Pages lib to v2.0.a.10
199
  * Updated: Dutch translation h/t Roy van den Houten and Clements Tolboom
200
 
201
+ #### 1.4.7 (2015-07-02)
202
  * Add: Spanish translation from Joaqin Sanz Boixader
203
  * Fix: Sorting of bookings by date and name in list table broken
204
  * Fix: Custom late bookings values more than one day aren't reflected in date picker
206
  * Updated: German translation from Roland Stumpp
207
  * Updated: pickadate.js language translations
208
 
209
+ #### 1.4.6 (2015-06-20)
210
  * Add: Remove old schedule exceptions and sort exceptions by date
211
  * Add: CSS class indicating type of booking form field
212
  * Fix: Extended Latin can cause Reply-To email headers to fail in some clients
214
  * Fix: Message row lingers after booking trashed in admin panel
215
  * Updated .pot file
216
 
217
+ #### 1.4.5 (2015-04-23)
218
  * Fix: Loading spinner not visible due to 4.2 changes
219
  * Add: new addon Export Bookings released
220
 
221
+ #### 1.4.4 (2015-04-20)
222
  * Fix: low-risk XSS security vulnerability with escaped URLs on admin bookings page
223
 
224
+ #### 1.4.3 (2015-04-20)
225
  * Add: Datepickers for start/end date filters in admin bookings list
226
  * Fix: Disabled weekdays get offset when editing bookings
227
  * Fix: Start/end date filters in admin bookings list
230
  * Updated: Dutch and German translations
231
  * Updated: pickadate.js lib now at v3.5.6
232
 
233
+ #### 1.4.2 (2015-03-31)
234
  * Fix: Speed issue if licensed addon active
235
 
236
+ #### 1.4.1 (2015-03-31)
237
  * Add: rtbQuery class for fetching bookings
238
  * Add: Centralized system for handling extension licenses
239
  * Add: Several filters for the bookings admin list table
242
  * Updated: German translation h/t Roland Stumpp
243
  * Fix: Button label in send email modal
244
 
245
+ #### 1.4 (2015-02-24)
246
  * Add: Send a custom email from the bookings list
247
  * Add: Hebrew translation. h/t Ahrale
248
  * Add: Default template functions for checkbox, radio and confirmation fields
249
  * Fix: Replace dialect with more common German in translation file. h/t Roland Stumpp
250
 
251
+ #### 1.3 (2015-02-03)
252
  * Add and edit bookings from the admin area
253
  * Fix: date and time pickers broken on iOS 8 devices
254
  * Add complete German translation from scolast34
264
  * Fix: addons list won't load if allow_url_fopen is disabled
265
 
266
 
267
+ #### 1.2.3 (2014-11-04)
268
  * Add a {user_email} notification template tag
269
  * Add filter to notification template tag descriptions for extensions
270
  * Add Reply-To mail headers and use a more reliable From header
273
  * Fix: open time picker in body container to mitigate rare positioning bugs
274
  * Fix: don't auto-select today's date if it's not a valid date or errors are attached to the date field
275
 
276
+ #### 1.2.2 (2014-08-24)
277
  * Fix: custom date formats can break date validation for new bookings
278
  * Add new booking form generation hooks for easier customization
279
  * Add support for upcoming MailChimp addon
280
  * Add new addons page
281
  * Update Simple Admin Pages library to v2.0.a.7
282
 
283
+ #### 1.2.1 (2014-08-01)
284
  * Fix: bulk actions below the bookings table don't work
285
  * Fix: PHP Notice generated during validation
286
 
287
+ #### 1.2 (2014-07-17)
288
  * Add notification template tags for phone number and message
289
  * Add automatic selection of date when page is loaded (option to disable this feature)
290
  * Add option to set time interval of time picker
291
  * Fix auto-detection of pickadate language from WordPress site language
292
  * Fix duplicate entry in .pot file that caused PoEdit error
293
 
294
+ #### 1.1.4 (2014-07-03)
295
  * Add a .pot file for easier translations
296
  * Fix notifications that showed MySQL date format instead of user-selected format
297
  * Fix Arabic translation of pickadate component
298
  * Add support for the correct start of the week depending on language
299
 
300
+ #### 1.1.3 (2014-05-22)
301
  * Fix an error where the wrong date would be selected when a form was reloaded with validation errors
302
 
303
+ #### 1.1.2 (2014-05-14)
304
  * Update Simple Admin Pages library to fix an uncommon error when saving Textarea components
305
 
306
+ #### 1.1.1 (2014-05-14)
307
  * Update Simple Admin Pages library to fix broken Scheduler in Firefox
308
 
309
+ #### 1.1 (2014-05-12)
310
  * Attempt to load the correct language for the datepicker from the WordPress settings
311
  * Add support for choosing a language for the datepicker if different from WordPress settings
312
  * Allow late bookings to be blocked 4 hours and 1 day in advance
313
  * Fix: don't show settings under WordPress's core General settings page
314
 
315
+ #### 1.0.2 (2014-05-08)
316
  * Remove development tool from codebase
317
 
318
+ #### 1.0.1 (2014-05-08)
319
  * Replace dashicons caret with CSS-only caret in booking form
320
 
321
+ #### 1.0 (2014-05-07)
322
  * Initial release
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
 
329
+ #### 1.6.2
330
  This update fixes a critical error introduced in v1.6.1 which broke the time picker.
331
 
332
+ #### 1.6.1
333
  This maintenance update adds a {location} tag for notifications, improves the location argument in the booking form shortcode and fixes a few minor bugs.
334
 
335
+ #### 1.6
336
  This is a major update that adds support for accepting bookings at multiple locations. View the online documentation for further details.
337
 
338
+ #### 1.5.3
339
  This update fixes a minor bug when searching for bookings by date, updates compatibilty for WP v4.5, and adds links to the new online documentation.
340
 
341
+ #### 1.5.2
342
  This update fixes a bug introduced in the last version which prevented Booking Managers from approving/rejecting reservations.
343
 
344
+ #### 1.5.1
345
  This update increases security for the quick link feature to confirm/reject bookings from the admin notification email.
346
 
347
+ #### 1.5
348
  This update adds the ability to configure which columns are visible in the bookings table. It works with the Custom Fields addon. If you have added fields using custom code, please read the release notification at themeofthecrop.com before updating.
349
 
350
+ #### 1.4.10
351
  This update includes a new Spanish translation and a few minor fixes. Updating isn't necessary for most people.
352
 
353
+ #### 1.4.9
354
  This update fixes a bug that made it difficult for iOS 8 users to select a date and time in their bookings. I strongly recommend you update.
355
 
356
+ #### 1.4.8
357
  This update fixes a bug that prevented bookings managers from editing bookings within the early/late schedule restrictions. It also fixed a bug with late opening times, added a WPML config file for better multi-lingual compatibility, updated translations, and improved the mobile view of the bookings list.
358
 
359
+ #### 1.4.7
360
  This update fixes a bug that prevented bookings from being sorted by date or name in the admin panel. It also updates some translations and improves support for custom late bookings values.
361
 
362
+ #### 1.4.6
363
  This update improves compatibility with an upcoming Custom Fields addon. It also fixes some minor bugs with extended Latin characters in emails and the admin list table, and removes expired schedule exceptions.
364
 
365
+ #### 1.4.5
366
  This update fixes a non-critical issue with the display of the loading spinner in the upcoming 4.2 version of WordPress.
367
 
368
+ #### 1.4.4
369
  This update fixes a low-risk XSS security vulnerability. It is low-risk because in order to exploit this vulnerability a user would need to have access to the bookings management panel in the admin area, which only trusted users should have.
370
 
371
+ #### 1.4.3
372
  This update adds datepickers to the start/end date filters in the admin bookings list and fixes a small error with the filters. It also fixes an issue with disabled weekdays when editing bookings. Dutch and German translation updates.
373
 
374
+ #### 1.4.2
375
  This update is a maintenance release that fixes a couple minor issues, adds French and Italian translations, and includes some under-the-hood changes to support upcoming extensions. 1.4.1-1.4.2 fixes a rare but vital performance issue in the admin.
376
 
377
+ #### 1.4.1
378
  This update is a maintenance release that fixes a couple minor issues, adds French and Italian translations, and includes some under-the-hood changes to support upcoming extensions.
379
 
380
+ #### 1.4
381
  Thanks to sponsorship from Gemini Design, the plugin now supports sending an email directly to customers from the list of bookings, so you can request more details or suggest an alternative booking time. This update also improves the German translation and adds a Hebrew translation. Read the full changelog for details.
382
 
383
+ #### 1.3
384
  This update adds support for adding and editing bookings from the admin panel. The bookings panel now shows upcoming bookings by default. The Party field in the booking form is now a dropdown selection. Plus a bunch of new features and fixes. Read the full changelog for details.
385
 
386
+ #### 1.2.3
387
  This update adds a {user_email} notification template tag and improves the mail headers on notifications to mitigate spam risk. It also adds the missing translation for the Clear button in the time picker for many languages. More minor bug fixes listed in the changelog.
388
 
389
+ #### 1.2.2
390
  This update adds support for a new MailChimp addon that will be released soon. An addons page is now available under the Bookings menu. A bug in which custom date/time formats could cause validation errors has been fixed. New hooks are now in place so that it's easier to customize the form output.
391
 
392
+ #### 1.2.1
393
  This is a minor maintenance update which fixes a couple of small bugs.
394
 
395
+ #### 1.2
396
  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.
397
 
398
+ #### 1.1.4
399
  This updated fixes an error with the format of the date in notification emails. Now it will show you the date formatted however you have chosen for it to be formatted in your WordPress installation. It also now displays the correct start of the week depending on the language selected for the datepicker. A .pot file is now included for easier translations.
400
 
401
+ #### 1.1.3
402
  This update fixes an error when the form had validation errors (missing fields or wrong date/time selected). Instead of loading the selected date it would load today's date. This update ensures the selected date is reloaded properly.
403
 
404
+ #### 1.1.2
405
  This update fixes an error some people may experience when trying to save settings. This is the second update today, so if you missed the other one please read the changelog for the 1.1.1 update as well.
406
 
407
+ #### 1.1.1
408
  This update fixes problems some users reported when using the Firefox browser to modify the booking schedule. This required an update to a library that is shared with another plugin, Food and Drink Menu. If you are using that plugin, please update that one as well or you may get some odd behavior. (Thanks to sangwh and bforsoft for reporting the issue.)
409
 
410
+ #### 1.1
411
  This update improves internationalization (i8n) by attempting to determine the appropriate language for the booking form datepicker from your WordPress settings. It also adds a setting to pick a language manually from a list of supported languages. This update also adds options to block late bookings at least 4 hours or 1 day in advance. Thanks to Remco and Roland for their early feedback.
412
 
413
+ #### 1.0.2
414
  This update removes a bit of code that was used for development purposes. Please update as this code could be run by any user on the frontend.
restaurant-reservations.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Restaurant Reservations
4
  * Plugin URI: http://themeofthecrop.com
5
  * Description: Accept restaurant reservations and bookings online.
6
- * Version: 1.6.3
7
  * Author: Theme of the Crop
8
  * Author URI: http://themeofthecrop.com
9
  * License: GNU General Public License v2.0 or later
@@ -47,13 +47,12 @@ class rtbInit {
47
  public function __construct() {
48
 
49
  // Common strings
50
- define( 'RTB_VERSION', '1.6.3' );
51
  define( 'RTB_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
52
  define( 'RTB_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
53
  define( 'RTB_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
54
  define( 'RTB_BOOKING_POST_TYPE', 'rtb-booking' );
55
  define( 'RTB_BOOKING_POST_TYPE_SLUG', 'booking' );
56
- define( 'RTB_LOAD_FRONTEND_ASSETS', apply_filters( 'rtb-load-frontend-assets', true ) );
57
 
58
  // Initialize the plugin
59
  add_action( 'init', array( $this, 'load_textdomain' ) );
@@ -116,12 +115,7 @@ class rtbInit {
116
 
117
  // Add the addons page
118
  require_once( RTB_PLUGIN_DIR . '/includes/Addons.class.php' );
119
- new rtbAddons(
120
- array(
121
- 'api_url' => 'http://api.themeofthecrop.com/addons/',
122
- 'plugin' => basename( plugin_dir_path( __FILE__ ) ),
123
- )
124
- );
125
 
126
  // Load integrations with other plugins
127
  require_once( RTB_PLUGIN_DIR . '/includes/integrations/business-profile.php' );
@@ -213,6 +207,8 @@ class rtbInit {
213
  */
214
  public function enqueue_admin_assets() {
215
 
 
 
216
  // Use the page reference in $admin_page_hooks because
217
  // it changes in SOME hooks when it is translated.
218
  // https://core.trac.wordpress.org/ticket/18857
@@ -236,6 +232,8 @@ class rtbInit {
236
  'edit_booking' => __( 'Edit Booking', 'restaurant-reservations' ),
237
  'error_unspecified' => __( 'An unspecified error occurred. Please try again. If the problem persists, try logging out and logging back in.', 'restaurant-reservations' ),
238
  ),
 
 
239
  )
240
  );
241
  }
@@ -253,7 +251,7 @@ class rtbInit {
253
  */
254
  function register_assets() {
255
 
256
- if ( !RTB_LOAD_FRONTEND_ASSETS ) {
257
  return;
258
  }
259
 
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
  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__ ) );
54
  define( 'RTB_BOOKING_POST_TYPE', 'rtb-booking' );
55
  define( 'RTB_BOOKING_POST_TYPE_SLUG', 'booking' );
 
56
 
57
  // Initialize the plugin
58
  add_action( 'init', array( $this, 'load_textdomain' ) );
115
 
116
  // Add the addons page
117
  require_once( RTB_PLUGIN_DIR . '/includes/Addons.class.php' );
118
+ new rtbAddons();
 
 
 
 
 
119
 
120
  // Load integrations with other plugins
121
  require_once( RTB_PLUGIN_DIR . '/includes/integrations/business-profile.php' );
207
  */
208
  public function enqueue_admin_assets() {
209
 
210
+ global $rtb_controller;
211
+
212
  // Use the page reference in $admin_page_hooks because
213
  // it changes in SOME hooks when it is translated.
214
  // https://core.trac.wordpress.org/ticket/18857
232
  'edit_booking' => __( 'Edit Booking', 'restaurant-reservations' ),
233
  'error_unspecified' => __( 'An unspecified error occurred. Please try again. If the problem persists, try logging out and logging back in.', 'restaurant-reservations' ),
234
  ),
235
+ 'banned_emails' => preg_split( '/\r\n|\r|\n/', (string) $rtb_controller->settings->get_setting( 'ban-emails' ) ),
236
+ 'banned_ips' => preg_split( '/\r\n|\r|\n/', (string) $rtb_controller->settings->get_setting( 'ban-ips' ) ),
237
  )
238
  );
239
  }
251
  */
252
  function register_assets() {
253
 
254
+ if ( !apply_filters( 'rtb-load-frontend-assets', true ) ) {
255
  return;
256
  }
257