Restaurant Reservations - Version 2.0.2

Version Description

(2019-10-28) = - Additional fix related to the email templates conflict

Download this release

Release Info

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

Code changes from version 2.0.1 to 2.0.2

includes/InstallationWalkthrough.class.php CHANGED
@@ -30,8 +30,8 @@ class rtbInstallationWalkthrough {
30
  if ( is_network_admin() || isset( $_GET['activate-multi'] ) )
31
  return;
32
 
33
- $menu_items = get_posts(array('post_type' => 'menu-item'));
34
- if (!empty($menu_items)) {
35
  set_transient('rtb-admin-install-notice', true, 5);
36
  return;
37
  }
30
  if ( is_network_admin() || isset( $_GET['activate-multi'] ) )
31
  return;
32
 
33
+ $bookings = get_posts(array('post_type' => 'rtb-booking'));
34
+ if (!empty($bookings)) {
35
  set_transient('rtb-admin-install-notice', true, 5);
36
  return;
37
  }
includes/load-customizer.php CHANGED
@@ -23,6 +23,7 @@ if ( isset( $_GET['etfrtb_designer'] ) ) {
23
  * @param $components Components that have been loaded
24
  * @since 0.1
25
  */
 
26
  function etfrtb_customize_init_blank_state( $components ) {
27
  global $rtb_controller;
28
 
@@ -35,6 +36,7 @@ function etfrtb_customize_init_blank_state( $components ) {
35
  $components = array();
36
  return $components;
37
  }
 
38
 
39
  /**
40
  * Prevent other constructs from being registered and register only those we
@@ -42,6 +44,7 @@ function etfrtb_customize_init_blank_state( $components ) {
42
  *
43
  * @since 0.1
44
  */
 
45
  function etfrtb_customize_reset_register() {
46
 
47
  global $wp_customize;
@@ -58,12 +61,14 @@ function etfrtb_customize_reset_register() {
58
  // Register our Customizer controls
59
  do_action( 'customize_register_email_designer', $wp_customize );
60
  }
 
61
 
62
  /**
63
  * Register customizer controls to manage the email designer
64
  *
65
  * @since 0.1
66
  */
 
67
  function etfrtb_customize_register( $wp_customize ) {
68
  global $rtb_controller;
69
 
@@ -371,6 +376,7 @@ function etfrtb_customize_register( $wp_customize ) {
371
  )
372
  );
373
  }
 
374
 
375
  /**
376
  * Register the customizer settings
@@ -382,6 +388,7 @@ function etfrtb_customize_register( $wp_customize ) {
382
  *
383
  * @since 0.1
384
  */
 
385
  function etfrtb_customize_register_settings( $wp_customize ) {
386
 
387
  global $rtb_controller;
@@ -633,6 +640,7 @@ function etfrtb_customize_register_settings( $wp_customize ) {
633
  )
634
  );
635
  }
 
636
  add_action( 'customize_register', 'etfrtb_customize_register_settings' );
637
 
638
  /**
@@ -640,6 +648,7 @@ add_action( 'customize_register', 'etfrtb_customize_register_settings' );
640
  *
641
  * @since 0.1
642
  */
 
643
  function etfrtb_customize_inject_url_param() {
644
  global $wp_customize;
645
  global $rtb_controller;
@@ -653,12 +662,14 @@ function etfrtb_customize_inject_url_param() {
653
  )
654
  );
655
  }
 
656
 
657
  /**
658
  * Load wp-util dependency missing in WP versions prior to 4.7
659
  *
660
  * @since 0.1
661
  */
 
662
  function etfrtb_customize_control_assets() {
663
  global $rtb_controller;
664
 
@@ -670,12 +681,14 @@ function etfrtb_customize_control_assets() {
670
  wp_enqueue_script( 'wp-util' );
671
  wp_enqueue_script( 'etfrtb-customizer-control', RTB_PLUGIN_URL . '/assets/js/customizer-control' . $min . '.js', array( 'customize-controls' ) );
672
  }
 
673
 
674
  /**
675
  * Initialize the customizer preview window
676
  *
677
  * @since 0.1
678
  */
 
679
  function etfrtb_customize_preview_init() {
680
  global $rtb_controller;
681
 
@@ -686,6 +699,7 @@ function etfrtb_customize_preview_init() {
686
  add_rewrite_endpoint( 'etfrtb_designer_email', EP_NONE);
687
  add_filter( 'template_include', 'etfrtb_customize_preview_load_email_designer' );
688
  }
 
689
 
690
  /**
691
  * Load the email designer in the customizer preview
@@ -693,6 +707,7 @@ function etfrtb_customize_preview_init() {
693
  * @param string $template
694
  * @since 0.1
695
  */
 
696
  function etfrtb_customize_preview_load_email_designer( $template ) {
697
 
698
  global $wp_query;
@@ -709,3 +724,4 @@ function etfrtb_customize_preview_load_email_designer( $template ) {
709
  echo $designer->render();
710
  exit();
711
  }
 
23
  * @param $components Components that have been loaded
24
  * @since 0.1
25
  */
26
+ if ( ! function_exists('etfrtb_customize_init_blank_state') ) {
27
  function etfrtb_customize_init_blank_state( $components ) {
28
  global $rtb_controller;
29
 
36
  $components = array();
37
  return $components;
38
  }
39
+ }
40
 
41
  /**
42
  * Prevent other constructs from being registered and register only those we
44
  *
45
  * @since 0.1
46
  */
47
+ if ( ! function_exists('etfrtb_customize_reset_register') ) {
48
  function etfrtb_customize_reset_register() {
49
 
50
  global $wp_customize;
61
  // Register our Customizer controls
62
  do_action( 'customize_register_email_designer', $wp_customize );
63
  }
64
+ }
65
 
66
  /**
67
  * Register customizer controls to manage the email designer
68
  *
69
  * @since 0.1
70
  */
71
+ if ( ! function_exists('etfrtb_customize_register') ) {
72
  function etfrtb_customize_register( $wp_customize ) {
73
  global $rtb_controller;
74
 
376
  )
377
  );
378
  }
379
+ }
380
 
381
  /**
382
  * Register the customizer settings
388
  *
389
  * @since 0.1
390
  */
391
+ if ( ! function_exists('etfrtb_customize_register_settings') ) {
392
  function etfrtb_customize_register_settings( $wp_customize ) {
393
 
394
  global $rtb_controller;
640
  )
641
  );
642
  }
643
+ }
644
  add_action( 'customize_register', 'etfrtb_customize_register_settings' );
645
 
646
  /**
648
  *
649
  * @since 0.1
650
  */
651
+ if ( ! function_exists('etfrtb_customize_inject_url_param') ) {
652
  function etfrtb_customize_inject_url_param() {
653
  global $wp_customize;
654
  global $rtb_controller;
662
  )
663
  );
664
  }
665
+ }
666
 
667
  /**
668
  * Load wp-util dependency missing in WP versions prior to 4.7
669
  *
670
  * @since 0.1
671
  */
672
+ if ( ! function_exists('etfrtb_customize_control_assets') ) {
673
  function etfrtb_customize_control_assets() {
674
  global $rtb_controller;
675
 
681
  wp_enqueue_script( 'wp-util' );
682
  wp_enqueue_script( 'etfrtb-customizer-control', RTB_PLUGIN_URL . '/assets/js/customizer-control' . $min . '.js', array( 'customize-controls' ) );
683
  }
684
+ }
685
 
686
  /**
687
  * Initialize the customizer preview window
688
  *
689
  * @since 0.1
690
  */
691
+ if ( ! function_exists('etfrtb_customize_preview_init') ) {
692
  function etfrtb_customize_preview_init() {
693
  global $rtb_controller;
694
 
699
  add_rewrite_endpoint( 'etfrtb_designer_email', EP_NONE);
700
  add_filter( 'template_include', 'etfrtb_customize_preview_load_email_designer' );
701
  }
702
+ }
703
 
704
  /**
705
  * Load the email designer in the customizer preview
707
  * @param string $template
708
  * @since 0.1
709
  */
710
+ if ( ! function_exists('etfrtb_customize_preview_load_email_designer') ) {
711
  function etfrtb_customize_preview_load_email_designer( $template ) {
712
 
713
  global $wp_query;
724
  echo $designer->render();
725
  exit();
726
  }
727
+ }
includes/load-notifications.php CHANGED
@@ -11,6 +11,7 @@
11
  * $notification->message.
12
  * @since 0.1
13
  */
 
14
  function etfrtb_notification_email_template( $notification ) {
15
  global $rtb_controller;
16
 
@@ -48,4 +49,5 @@ function etfrtb_notification_email_template( $notification ) {
48
  break;
49
  }
50
  }
 
51
  add_action( 'rtb_send_notification_before', 'etfrtb_notification_email_template', 100 );
11
  * $notification->message.
12
  * @since 0.1
13
  */
14
+ if ( ! function_exists('etfrtb_notification_email_template') ) {
15
  function etfrtb_notification_email_template( $notification ) {
16
  global $rtb_controller;
17
 
49
  break;
50
  }
51
  }
52
+ }
53
  add_action( 'rtb_send_notification_before', 'etfrtb_notification_email_template', 100 );
readme.txt CHANGED
@@ -175,6 +175,9 @@ Find answers to even more questions in the [FAQ](http://doc.fivestarplugins.com/
175
 
176
  == Changelog ==
177
 
 
 
 
178
  = 2.0.1 (2019-10-28) =
179
  - Fixing an error being thrown if you tried to update while also having the email templates add-on activated
180
 
175
 
176
  == Changelog ==
177
 
178
+ = 2.0.2 (2019-10-28) =
179
+ - Additional fix related to the email templates conflict
180
+
181
  = 2.0.1 (2019-10-28) =
182
  - Fixing an error being thrown if you tried to update while also having the email templates add-on activated
183
 
restaurant-reservations.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Five Star Restaurant Reservations
4
  * Plugin URI: http://www.fivestarplugins.com/plugins/five-star-restaurant-reservations/
5
  * Description: Restaurant reservations made easy. Accept bookings online. Quickly confirm or reject reservations, send email notifications, set booking times and more.
6
- * Version: 2.0.1
7
  * Author: FiveStarPlugins
8
  * Author URI: https://profiles.wordpress.org/fivestarplugins/
9
  * Text Domain: restaurant-reservations
3
  * Plugin Name: Five Star Restaurant Reservations
4
  * Plugin URI: http://www.fivestarplugins.com/plugins/five-star-restaurant-reservations/
5
  * Description: Restaurant reservations made easy. Accept bookings online. Quickly confirm or reject reservations, send email notifications, set booking times and more.
6
+ * Version: 2.0.2
7
  * Author: FiveStarPlugins
8
  * Author URI: https://profiles.wordpress.org/fivestarplugins/
9
  * Text Domain: restaurant-reservations