REVE Chat – WP Live Chat Support plugin - Version 2.0.0

Version Description

Download this release

Release Info

Developer revechat
Plugin Icon 128x128 REVE Chat – WP Live Chat Support plugin
Version 2.0.0
Comparing to
See all releases

Code changes from version 1.2.4 to 2.0.0

css/admin-styles.css ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #revechat #edit-choose-form h3,
2
+ #revechat #revechat_already_have h3,
3
+ #revechat #revechat_new_account h3{
4
+ color: coral;
5
+ }
6
+ #revechat ul#revechat_choose_form{}
7
+ #revechat ul#revechat_choose_form li{
8
+ list-style: none;
9
+ display: block;
10
+ }
11
+ #revechat ul#revechat_choose_form li label{
12
+ display: inline-block;
13
+ }
14
+ #revechat .revechat_email_error{
15
+ color: red;
16
+ }
17
+ #revechat .ajax_message {
18
+ display: none;
19
+ background: url(ajax_loader.gif) no-repeat 24px 51%;
20
+ padding: 0;
21
+ margin-top: 1em;
22
+ }
23
+ #revechat .ajax_message.wait,
24
+ #revechat .ajax_message.message
25
+ {
26
+ display: block;
27
+ font-size: 1.2em;
28
+ padding: 20px;
29
+ box-shadow: 2px 2px 2px rgba(0,0,0,.2);
30
+ }
31
+ #revechat .ajax_message.wait {
32
+ text-indent: 28px;
33
+ background-color: #fff;
34
+ }
35
+ #revechat .ajax_message.message {
36
+ background-image: none;
37
+ text-indent: 0px;
38
+ }
39
+
40
+ #revechat .ajax_message.message.alert{
41
+ background-color: #f2dede;
42
+ border-color: #ebccd1;
43
+ color: #a94442;
44
+ padding: 20px;
45
+ }
46
+ #revechat .revechat_success_message{
47
+ background: #ffffff;
48
+ padding: 50px;
49
+ height: auto;
50
+ font-size: 1.5em;
51
+ border-bottom: 5px solid #F16915;
52
+ -webkit-box-shadow: 0px 0px 6px rgba(0,0,0,.3);
53
+ -moz-box-shadow: 0px 0px 6px rgba(0,0,0,.3);
54
+ box-shadow: 0px 0px 6px rgba(0,0,0,.3);
55
+ }
56
+ #revechat .revechat_success_message h3{
57
+ font-weight: bold;
58
+ border-bottom: 1px solid #B1B4B9;
59
+ padding-bottom: 20px;
60
+ line-height: 2em;
61
+ }
62
+ #revechat .messages.revechat_success{
63
+ background-color: #dff0d8;
64
+ border: 1px solid #bee99a;
65
+ color: #3c763d;
66
+ padding: 20px;
67
+ margin-bottom: 30px;
68
+ font-weight: 600;
69
+ }
70
+ #revechat .form-submit{
71
+ background: #FF5800 none repeat scroll 0 0;
72
+ border-color: #bd4302 #ab3c02 #ab3c02;
73
+ -webkit-box-shadow: 0 1px 0 #ab3c02;
74
+ box-shadow: 0 1px 0 #ab3c02;
75
+ color: #fff;
76
+ text-decoration: none;
77
+ text-shadow: 0 -1px 1px #ab3c02,1px 0 1px #ab3c02,0 1px 1px #ab3c02,-1px 0 1px #ab3c02;
78
+ }
79
+
80
+ #revechat #revechat-admin-settings-form {
81
+ padding: 18px;
82
+ }
83
+ #revechat fieldset {
84
+ border: 1px solid #c0c0c0;
85
+ margin-top: 20px;
86
+ }
87
+ #revechat #revechat_already_have > h3 {
88
+ margin-top: 19px;
89
+ }
90
+ #revechat ul#revechat_choose_form li {
91
+ display: block;
92
+ list-style: outside none none;
93
+ padding-left: 20px;
94
+ }
95
+ #revechat .form-wrapper {
96
+ padding: 16px;
97
+ padding-bottom: 31px;
98
+ }
99
+ #revechat .form-item > label {
100
+ display: table;
101
+ margin-bottom: 11px;
102
+ margin-top: 20px;
103
+ }
104
+ #revechat input.form-submit{
105
+ cursor: pointer;
106
+ }
css/ajax_loader.gif ADDED
Binary file
images/favicon.png ADDED
Binary file
images/logo.png ADDED
Binary file
includes/choose-form.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="edit-choose-form">
2
+ <h3>Already have a REVE Chat account?</h3>
3
+ <ul id="revechat_choose_form">
4
+ <li>
5
+ <input type="radio" checked="checked" id="has_revechat_account" name="revechat_choose_form">
6
+ <label for="has_revechat_account">Yes, I already have a REVE Chat account</label>
7
+ </li>
8
+ <li>
9
+ <input type="radio" id="new_revechat_account" name="revechat_choose_form">
10
+ <label for="new_revechat_account">No, I want to create one</label>
11
+ </li>
12
+ </ul>
13
+ </div><!-- Edit Choose Form -->
includes/login-form.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="revechat_already_have">
2
+ <h3>Account Details</h3>
3
+ <table class="form-table">
4
+ <tbody>
5
+ <tr>
6
+ <th>
7
+ <label for="edit-revechat-account-email">
8
+ <?php
9
+ _e("REVE Chat Login Email");
10
+ ?>
11
+ </label>
12
+ </th>
13
+ <td>
14
+ <input type="email" class="revechat_account_email regular-text" name="revechat_account_email" id="edit-revechat-account-email">
15
+ <input type="hidden" name="<?php echo $accountId; ?>" value="<?php echo $val_accountId; ?>" id="revechat_aid">
16
+ </td>
17
+ </tr>
18
+ </tbody>
19
+ </table>
20
+ </div><!-- revechat_already_have -->
includes/remove-form.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <div>
2
+ <div class="messages revechat_success">REVE Chat
3
+ is already installed.</div>
4
+
5
+ <div id="edit-actions" class="form-actions form-wrapper">
6
+ <input type="hidden" name="<?php echo $accountId; ?>" value="0" id="revechat_aid">
7
+ <input type="submit" class="form-submit button-primary" value="Remove" name="revechat_remove" id="edit-submit">
8
+ </div>
9
+ </div>
includes/signup-form.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="revechat_new_account">
2
+
3
+ <h3>Create a new REVE Chat account</h3>
4
+ <table class="form-table">
5
+ <tr>
6
+ <th>
7
+ <label for="edit-name">
8
+ <?php
9
+ _e("Name")
10
+ ?>
11
+ </label>
12
+ </th>
13
+ <td>
14
+ <input type="text" class="regular-text" name="name" id="edit-name">
15
+ </td>
16
+ </tr>
17
+
18
+ <tr>
19
+ <th>
20
+ <label for="edit-email">
21
+ <?php
22
+ _e('Email')
23
+ ?>
24
+ </label>
25
+
26
+ </th>
27
+ <td>
28
+ <input type="text" class="regular-text" name="email" id="edit-email">
29
+ </td>
30
+ </tr>
31
+
32
+ <tr>
33
+ <th>
34
+ <label for="edit-phone">
35
+ <?php
36
+ _e('Phone')
37
+ ?>
38
+ </label>
39
+ </th>
40
+ <td>
41
+ <input type="text" class="regular-text" name="Phone" id="edit-phone">
42
+ </td>
43
+ </tr>
44
+ </table>
45
+
46
+ </div>
js/revechat-admin.js ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery.noConflict();
2
+ (function($){
3
+ var baseUrl = 'https://dashboard.revechat.com/';
4
+ var ReveChat ={
5
+ init: function () {
6
+ this.toggleForms();
7
+ this.bindFormSubmit();
8
+ },
9
+
10
+ toggleForms: function ()
11
+ {
12
+ var toggleForms = function ()
13
+ {
14
+ if ($('#new_revechat_account').is(':checked'))
15
+ {
16
+ $('#revechat_already_have').hide();
17
+ $('#revechat_new_account').show();
18
+ $('#edit-name').focus();
19
+ }
20
+ else if ($('#has_revechat_account').is(':checked'))
21
+ {
22
+ $('#revechat_new_account').hide();
23
+ $('#revechat_already_have').show();
24
+ $('#edit-revechat-account-email').focus();
25
+ }
26
+ };
27
+ toggleForms();
28
+
29
+ $('#revechat_choose_form input').click(toggleForms);
30
+ },
31
+
32
+ bindFormSubmit: function () {
33
+ $('#revechat-admin-settings-form').submit(function(e)
34
+ {
35
+ //e.preventDefault();
36
+
37
+ if($('#edit-submit').val() == 'Remove'){
38
+ $('#revechat_aid').val(0);
39
+ $('#revechat-admin-settings-form').submit();
40
+ }
41
+ if (((parseInt($('#revechat_aid').val()) !== 0) || $('#has_revechat_account').is(':checked')))
42
+ {
43
+ return ReveChat.alreadyHaveAccountForm();
44
+ }
45
+ else
46
+ {
47
+ return ReveChat.newLicenseForm();
48
+ }
49
+
50
+ });
51
+ },
52
+
53
+ alreadyHaveAccountForm: function()
54
+ {
55
+
56
+ if(this.validEmail())
57
+ {
58
+ if((parseInt($('#revechat_aid').val()) == 0 || $('#revechat_aid').val() == ""))
59
+ {
60
+ var login = $.trim($('#edit-revechat-account-email').val());
61
+ if(!login.length)
62
+ {
63
+ $('#edit-revechat-account-email').focus();
64
+ return false;
65
+ }
66
+ $('.ajax_message').removeClass('message').addClass('wait').html('Please wait&hellip;');
67
+ var signInUrl = baseUrl +'/license/adminId/'+$('#edit-revechat-account-email').val()+'/?callback=?';
68
+ $.getJSON(signInUrl,
69
+ function(response)
70
+ {
71
+ if (response.error)
72
+ {
73
+ $('.ajax_message').removeClass('wait').addClass('message alert').html('Incorrect REVE Chat login.');
74
+ $('#edit-revechat-account-email').focus();
75
+ return false;
76
+ }
77
+ else
78
+ {
79
+ $('#revechat_aid').val(response.data.account_id);
80
+ $('#revechat-admin-settings-form').submit();
81
+ }
82
+ });
83
+ return false;
84
+ }
85
+ }
86
+ else
87
+ {
88
+ $('.ajax_message').removeClass('wait').addClass('message alert').html('Invalid Email.');
89
+ $('#edit-revechat-account-email').focus();
90
+ return false;
91
+ }
92
+ return true;
93
+ },
94
+
95
+ newLicenseForm: function()
96
+ {
97
+ if (parseInt(($('#revechat_aid').val()) > 0))
98
+ {
99
+ return true;
100
+ }
101
+
102
+ if(this.validateNewLicenseForm())
103
+ {
104
+ $('.ajax_message').removeClass('message').addClass('wait').html('Please wait...');
105
+
106
+ ReveChat.createLicense();
107
+ }
108
+ return false;
109
+ },
110
+ createLicense: function()
111
+ {
112
+
113
+ $('.ajax_message').removeClass('message').addClass('wait').html('Creating new account&hellip;');
114
+
115
+ var signUpUrl = baseUrl + '/revechat/rest/api/signup.do';
116
+
117
+ $.ajax({
118
+ data: { 'firstname':$('#edit-name').val(), 'lastname':' ', 'mailAddr':$('#edit-email').val(), 'phoneNo':$('#edit-phone').val() },
119
+ type:'POST',
120
+ url:signUpUrl,
121
+ dataType: 'json',
122
+ cache:false,
123
+ success: function(response) {
124
+ if(response.error)
125
+ {
126
+ $('.ajax_message').html(response.error).addClass('message alert').removeClass('wait');
127
+ return false;
128
+ }
129
+ else if(response.success)
130
+ {
131
+ $('#revechat-admin-settings-form').children('div').remove();
132
+ var message = '<div class="revechat_success_message">';
133
+ message += '<h3>Thank you for sigining up with REVE Chat</h3>';
134
+ message += '<p>A verification link has been sent to your registered email address from <strong><a href="#">support@revechat.com</a></strong>. Kindly verify your email to complete the signup process</p>';
135
+ message += '<p>Then come backe again to integrate REVE Chat in your website.</p>';
136
+ message += '</div>';
137
+ $(message).appendTo('#revechat-admin-settings-form');
138
+ $('p.submit').remove();
139
+ $('.ajax_message').removeClass('wait');
140
+ return false;
141
+ }
142
+ }
143
+ });
144
+ },
145
+ validEmail: function()
146
+ {
147
+ if($('#edit-submit').val() != 'Remove')
148
+ {
149
+ if (/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i.test($('#edit-revechat-account-email').val()) == false)
150
+ {
151
+ //alert ('Please enter a valid email address.');
152
+ $('#edit-email').focus();
153
+ return false;
154
+ }
155
+ }
156
+ return true;
157
+ },
158
+
159
+ validateNewLicenseForm: function()
160
+ {
161
+ if ($('#edit-name').val().length < 1)
162
+ {
163
+ alert ('Please enter your full name.');
164
+ $('#edit-name').addClass('error').focus();
165
+ return false;
166
+ }
167
+
168
+ if (/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i.test($('#edit-email').val()) == false)
169
+ {
170
+ alert ('Please enter a valid email address.');
171
+ $('#edit-email').addClass('error').focus();
172
+ return false;
173
+ }
174
+
175
+ if ($('#edit-phone').val().length < 1)
176
+ {
177
+ alert ('Please enter your phone number.');
178
+ $('#edit-phone').addClass('error').focus();
179
+ return false;
180
+ }
181
+
182
+ return true;
183
+ }
184
+ }
185
+ $(document).ready(function()
186
+ {
187
+ ReveChat.init();
188
+ });
189
+ })(jQuery);
readme.txt CHANGED
@@ -1 +1 @@
1
- === Reve Chat ===
2
 
3
 
 
4
 
5
 
 
1
 
2
 
3
+ === Reve Chat ===
4
 
5
 
revechat.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Reve Chat
4
  Description: REVE Chat is a powerful and intuitive real-time customer engagement software. As a customer support software, REVE Chat puts a live person on your website to personally guide and help your visitors, while they go through the various sections of your digital display. This live chat service helps them to get the most out of your web presence, while allowing you to understand their diverse needs on a one-to-one basis. REVE Chat is easy to install and use.
5
- Version: 1.2.4
6
  Author: ReveChat
7
  Author URI: www.revechat.com
8
  License: GPL2
@@ -24,11 +24,16 @@ if(!class_exists('WP_Plugin_Revechat'))
24
 
25
  // Hooks
26
  add_action('admin_init', array(&$this, 'registerSettings'));
27
- add_action('admin_menu', array(&$this, 'adminPanels'));
28
 
29
  add_action('wp_head', array(&$this, 'frontendHeader'));
30
  add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array(&$this,'add_action_links') );
31
 
 
 
 
 
 
32
  } // END public function __construct
33
 
34
  /**
@@ -37,8 +42,6 @@ if(!class_exists('WP_Plugin_Revechat'))
37
  public static function frontendHeader()
38
  {
39
  $accountId = get_option('revechat_accountid' , '');
40
- //$trackingID = get_option('revechat_trackingid' , '');
41
-
42
  if( (isset($accountId) && !empty($accountId)) ) {
43
 
44
  $script = "<script type='text/javascript'>";
@@ -81,35 +84,41 @@ if(!class_exists('WP_Plugin_Revechat'))
81
  }
82
  // variables for the field and option names
83
  $accountId = 'revechat_accountid';
84
- $trackingId = 'revechat_trackingid';
85
 
86
  // Read in existing option value from database
87
  $val_accountId = get_option( $accountId );
88
- $val_trackingId = get_option( $trackingId );
89
 
90
- if( isset($_POST[ $accountId ]) && isset($_POST[ $trackingId ] ) ){
91
 
92
  // Read in existing option value from POST
93
  $val_accountId = $_POST[ $accountId ];
94
- $val_trackingId = $_POST[ $trackingId ];
95
  update_option( $accountId , $val_accountId );
96
- update_option( $trackingId , $val_trackingId );
97
  ?>
98
- <div class="updated"><p><strong><?php _e('Settings saved.', 'revechat-menu' ); ?></strong></p></div>
99
  <?php
100
  }
101
  ?>
102
- <div class="wrap">
103
- <?php echo "<h2>" . __( 'ReveChat Plugin Settings', 'revechat-menu' ) . "</h2>"; ?>
104
- <form name="form1" method="post" action="">
105
-
106
-
107
- <p><?php _e("Account ID", 'revechat-menu' ); ?>
108
- <input type="text" name="<?php echo $accountId; ?>" value="<?php echo $val_accountId; ?>" size="20">
109
- </p><hr />
110
- <p><?php _e("Tracking ID", 'revechat-menu' ); ?>
111
- <input type="text" name="<?php echo $trackingId; ?>" value="<?php echo $val_trackingId; ?>" size="20">
112
- </p><hr />
 
 
 
 
 
 
 
 
 
 
113
 
114
  <p class="submit">
115
  <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />
@@ -121,14 +130,26 @@ if(!class_exists('WP_Plugin_Revechat'))
121
  <?php
122
  }
123
 
 
 
 
 
 
 
 
124
  /**
125
  * Deactivate the plugin
126
  */
127
  public static function deactivate()
128
  {
129
- // Do nothing
130
  } // END public static function deactivate
131
 
 
 
 
 
 
132
  function add_action_links ( $links ) {
133
  $menu_link = array(
134
  '<a href="' . admin_url( 'options-general.php?page=revechatsettings' ) . '">Settings</a>',
@@ -137,4 +158,5 @@ if(!class_exists('WP_Plugin_Revechat'))
137
  }
138
  } // END class WP_Plugin_Revechat
139
  } // END if(!class_exists('WP_Plugin_Revechat'))
140
- $revechat = new WP_Plugin_Revechat ;
 
2
  /*
3
  Plugin Name: Reve Chat
4
  Description: REVE Chat is a powerful and intuitive real-time customer engagement software. As a customer support software, REVE Chat puts a live person on your website to personally guide and help your visitors, while they go through the various sections of your digital display. This live chat service helps them to get the most out of your web presence, while allowing you to understand their diverse needs on a one-to-one basis. REVE Chat is easy to install and use.
5
+ Version: 2.0.0
6
  Author: ReveChat
7
  Author URI: www.revechat.com
8
  License: GPL2
24
 
25
  // Hooks
26
  add_action('admin_init', array(&$this, 'registerSettings'));
27
+ //add_action('admin_menu', array(&$this, 'adminPanels'));
28
 
29
  add_action('wp_head', array(&$this, 'frontendHeader'));
30
  add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array(&$this,'add_action_links') );
31
 
32
+ // Add Menu Page
33
+ add_action('admin_menu',array($this,'admin_menu'));
34
+
35
+ //enqueue scripts
36
+ add_action('admin_enqueue_scripts',array($this,'admin_scripts'));
37
  } // END public function __construct
38
 
39
  /**
42
  public static function frontendHeader()
43
  {
44
  $accountId = get_option('revechat_accountid' , '');
 
 
45
  if( (isset($accountId) && !empty($accountId)) ) {
46
 
47
  $script = "<script type='text/javascript'>";
84
  }
85
  // variables for the field and option names
86
  $accountId = 'revechat_accountid';
 
87
 
88
  // Read in existing option value from database
89
  $val_accountId = get_option( $accountId );
 
90
 
91
+ if( isset($_POST[ $accountId ])){
92
 
93
  // Read in existing option value from POST
94
  $val_accountId = $_POST[ $accountId ];
 
95
  update_option( $accountId , $val_accountId );
 
96
  ?>
97
+ <div class="updated" xmlns="http://www.w3.org/1999/html"><p><strong><?php _e('Settings saved.', 'revechat-menu' ); ?></strong></p></div>
98
  <?php
99
  }
100
  ?>
101
+ <div class="wrap" id="revechat">
102
+
103
+ <div class="reve-chat-logo">
104
+ <img src="<?php echo plugin_dir_url( __FILE__ )."images/logo.png";?>" alt="REVE Chat">
105
+ </div>
106
+ <div class="form-item form-type-item" id="edit-ajax-message">
107
+ <p class="ajax_message"></p>
108
+ </div>
109
+
110
+ <form name="form1" id="revechat-admin-settings-form" method="post" action="">
111
+
112
+ <?php
113
+ if(isset($val_accountId) && $val_accountId != 0){
114
+ require (plugin_dir_path( __FILE__ )."includes/remove-form.php");
115
+ return;
116
+ }
117
+
118
+ require (plugin_dir_path( __FILE__ )."includes/choose-form.php");
119
+ require (plugin_dir_path( __FILE__ )."includes/login-form.php");
120
+ require (plugin_dir_path( __FILE__ )."includes/signup-form.php");
121
+ ?>
122
 
123
  <p class="submit">
124
  <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />
130
  <?php
131
  }
132
 
133
+ public function admin_menu()
134
+ {
135
+ // add_menu_page( string $page_title, string $menu_title, string $capability, string $menu_slug, callable $function = '', string $icon_url = '', int $position = null )
136
+ add_menu_page(__('ReveChat Dashboard','revechat-settings'), __('REVE Chat','menu-revechat'), 'manage_options', 'revechatsettings', array($this , 'reveChatOptions'), plugin_dir_url( __FILE__ )."images/favicon.png");
137
+
138
+ }
139
+
140
  /**
141
  * Deactivate the plugin
142
  */
143
  public static function deactivate()
144
  {
145
+ delete_option('revechat_accountid');
146
  } // END public static function deactivate
147
 
148
+ public function admin_scripts(){
149
+ wp_enqueue_script( 'revechat-admin-script', plugin_dir_url( __FILE__ ) . '/js/revechat-admin.js' );
150
+ wp_enqueue_style( 'custom_wp_admin_css',plugin_dir_url( __FILE__ ).'css/admin-styles.css' );
151
+ }
152
+
153
  function add_action_links ( $links ) {
154
  $menu_link = array(
155
  '<a href="' . admin_url( 'options-general.php?page=revechatsettings' ) . '">Settings</a>',
158
  }
159
  } // END class WP_Plugin_Revechat
160
  } // END if(!class_exists('WP_Plugin_Revechat'))
161
+ $revechat = new WP_Plugin_Revechat ;
162
+ register_deactivation_hook( __FILE__, array( 'WP_Plugin_Revechat', 'deactivate' ) );