WP Live Chat Support - Version 4.1.3

Version Description

2014-07-30 = * Code improvements (PHP warnings)

Download this release

Release Info

Developer WP-LiveChat
Plugin Icon 128x128 WP Live Chat Support
Version 4.1.3
Comparing to
See all releases

Code changes from version 4.1.2 to 4.1.3

includes/settings_page.php CHANGED
@@ -29,8 +29,8 @@
29
  <td width='200' valign='top'><?php _e("Chat enabled","wplivechat")?>:</td>
30
  <td>
31
  <select id='wplc_settings_enabled' name='wplc_settings_enabled'>
32
- <option value="1" <?php echo $wplc_settings_enabled[1]?>><?php _e("Yes","wplivechat")?></option>
33
- <option value="2" <?php echo $wplc_settings_enabled[2]?>><?php _e("No","wplivechat")?></option>
34
  </select>
35
  </td>
36
  </tr>
@@ -60,10 +60,10 @@
60
  <td width='200' valign='top'><?php _e("Chat box alignment","wplivechat")?>:</td>
61
  <td>
62
  <select id='wplc_settings_align' name='wplc_settings_align'>
63
- <option value="1" <?php echo $wplc_settings_align[1]?>><?php _e("Bottom left","wplivechat")?></option>
64
- <option value="2" <?php echo $wplc_settings_align[2]?>><?php _e("Bottom right","wplivechat")?></option>
65
- <option value="3" <?php echo $wplc_settings_align[3]?>><?php _e("Left","wplivechat")?></option>
66
- <option value="4" <?php echo $wplc_settings_align[4]?>><?php _e("Right","wplivechat")?></option>
67
  </select>
68
  </td>
69
  </tr>
@@ -72,7 +72,7 @@
72
  <?php _e("Auto Pop-up","wplivechat") ?>
73
  </td>
74
  <td>
75
- <input type="checkbox" name="wplc_auto_pop_up" value="1" <?php if($wplc_settings['wplc_auto_pop_up'] == 1 ){ echo "checked";} ?>/>
76
  <p class="description"><small><?php _e("Expand the chat box automatically (prompts the user to enter their name and email address).","wplivechat") ?></small></p>
77
  </td>
78
  </tr>
29
  <td width='200' valign='top'><?php _e("Chat enabled","wplivechat")?>:</td>
30
  <td>
31
  <select id='wplc_settings_enabled' name='wplc_settings_enabled'>
32
+ <option value="1" <?php if (isset($wplc_settings_enabled[1])) { echo $wplc_settings_enabled[1]; } ?>><?php _e("Yes","wplivechat"); ?></option>
33
+ <option value="2" <?php if (isset($wplc_settings_enabled[2])) { echo $wplc_settings_enabled[2]; }?>><?php _e("No","wplivechat"); ?></option>
34
  </select>
35
  </td>
36
  </tr>
60
  <td width='200' valign='top'><?php _e("Chat box alignment","wplivechat")?>:</td>
61
  <td>
62
  <select id='wplc_settings_align' name='wplc_settings_align'>
63
+ <option value="1" <?php if (isset($wplc_settings_align[1])) { echo $wplc_settings_align[1]; } ?>><?php _e("Bottom left","wplivechat"); ?></option>
64
+ <option value="2" <?php if (isset($wplc_settings_align[2])) { echo $wplc_settings_align[2]; } ?>><?php _e("Bottom right","wplivechat"); ?></option>
65
+ <option value="3" <?php if (isset($wplc_settings_align[3])) { echo $wplc_settings_align[3]; } ?>><?php _e("Left","wplivechat"); ?></option>
66
+ <option value="4" <?php if (isset($wplc_settings_align[4])) { echo $wplc_settings_align[4]; } ?>><?php _e("Right","wplivechat"); ?></option>
67
  </select>
68
  </td>
69
  </tr>
72
  <?php _e("Auto Pop-up","wplivechat") ?>
73
  </td>
74
  <td>
75
+ <input type="checkbox" name="wplc_auto_pop_up" value="1" <?php if(isset($wplc_settings['wplc_auto_pop_up']) && $wplc_settings['wplc_auto_pop_up'] == 1 ) { echo "checked"; } ?>/>
76
  <p class="description"><small><?php _e("Expand the chat box automatically (prompts the user to enter their name and email address).","wplivechat") ?></small></p>
77
  </td>
78
  </tr>
readme.txt CHANGED
@@ -94,10 +94,13 @@ If the live chat box still does not appear on your website, please go through th
94
  == Upgrade Notice ==
95
 
96
  = 4.1.1 =
97
- It is highly recommended that you upgrade to version 4.1.1
98
 
99
  == Changelog ==
100
 
 
 
 
101
  = 4.1.2 2014-07-29 =
102
  * DB bug fix
103
 
94
  == Upgrade Notice ==
95
 
96
  = 4.1.1 =
97
+ It is highly recommended that you upgrade to WP Live Chat Support version 4.1.1
98
 
99
  == Changelog ==
100
 
101
+ = 4.1.3 2014-07-30 =
102
+ * Code improvements (PHP warnings)
103
+
104
  = 4.1.2 2014-07-29 =
105
  * DB bug fix
106
 
wp-live-chat-support.php CHANGED
@@ -3,13 +3,16 @@
3
  Plugin Name: WP Live Chat Support
4
  Plugin URI: http://www.wp-livechat.com
5
  Description: The easiest to use website live chat plugin. Let your visitors chat with you and increase sales conversion rates with WP Live Chat Support. No third party connection required!
6
- Version: 4.1.2
7
  Author: WP-LiveChat
8
  Author URI: http://www.wp-livechat.com
9
  */
10
 
11
 
12
- /* 4.1.2
 
 
 
13
  * DB bug fix
14
  *
15
  * 4.1.1
@@ -39,7 +42,7 @@ global $wplc_tblname_chats;
39
  global $wplc_tblname_msgs;
40
  $wplc_tblname_chats = $wpdb->prefix . "wplc_chat_sessions";
41
  $wplc_tblname_msgs = $wpdb->prefix . "wplc_chat_msgs";
42
- $wplc_version = "4.1.2";
43
 
44
  define('WPLC_BASIC_PLUGIN_DIR',dirname(__FILE__));
45
  define('WPLC_BASIC_PLUGIN_URL',plugins_url()."/wp-live-chat-support/");
@@ -188,7 +191,7 @@ function wplc_output_box() {
188
  }
189
 
190
  ?>
191
- <div id="wp-live-chat" style="display:none; <?php echo $wplc_box_align; ?>; " class="<?php echo $wplc_class ?> wplc_close" original_pos="<?php echo $original_pos ?>" wplc-auto-pop-up="<?php echo $wplc_settings['wplc_auto_pop_up'] ?>">
192
 
193
 
194
  <?php if (function_exists("wplc_register_pro_version")) {
@@ -749,7 +752,7 @@ function wplc_return_admin_chat_javascript($cid) {
749
 
750
  jQuery(document).ready(function() {
751
 
752
- var wplc_image = "<?php echo $image ?>";
753
  var wplc_ajaxurl = '<?php echo plugins_url('/ajax.php', __FILE__); ?>';
754
 
755
 
@@ -887,8 +890,8 @@ function wplc_handle_db() {
887
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
888
  dbDelta($sql);
889
 
890
- $sql = "
891
- CREATE TABLE ".$wplc_tblname_msgs." (
892
  id int(11) NOT NULL AUTO_INCREMENT,
893
  chat_sess_id int(11) NOT NULL,
894
  `from` varchar(150) CHARACTER SET utf8 NOT NULL,
@@ -898,10 +901,10 @@ function wplc_handle_db() {
898
  originates INT(3) NOT NULL,
899
  PRIMARY KEY (id)
900
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
901
- ";
902
 
903
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
904
- dbDelta($sql);
905
 
906
  add_option("wplc_db_version", $wplc_version);
907
  update_option("wplc_db_version",$wplc_version);
@@ -915,7 +918,7 @@ function wplc_add_user_stylesheet() {
915
 
916
  }
917
  function wplc_add_admin_stylesheet() {
918
- if (isset($_GET['page']) && $_GET['page'] == 'wplivechat-menu' || $_GET['page'] == 'wplivechat-menu-settings') {
919
  wp_register_style( 'wplc-admin-style', 'http://code.jquery.com/ui/1.8.24/themes/smoothness/jquery-ui.css' );
920
  wp_enqueue_style( 'wplc-admin-style' );
921
  wp_register_style( 'wplc-font-awesome', plugins_url('/css/font-awesome.min.css', __FILE__) );
@@ -928,7 +931,7 @@ if (isset($_GET['page']) && $_GET['page'] == 'wplivechat-menu-settings') {
928
  }
929
  function wplc_admin_scripts_basic() {
930
 
931
- if ($_GET['page'] == "wplivechat-menu-settings") {
932
  wp_enqueue_script( 'jquery' );
933
  wp_enqueue_script('jquery-ui-core');
934
 
@@ -967,13 +970,13 @@ function wplc_head_basic() {
967
 
968
  if (isset($_POST['wplc_save_settings'])){
969
 
970
- $wplc_data['wplc_settings_align'] = esc_attr($_POST['wplc_settings_align']);
971
- $wplc_data['wplc_settings_fill'] = esc_attr($_POST['wplc_settings_fill']);
972
- $wplc_data['wplc_settings_font'] = esc_attr($_POST['wplc_settings_font']);
973
- $wplc_data['wplc_settings_enabled'] = esc_attr($_POST['wplc_settings_enabled']);
974
- $wplc_data['wplc_auto_pop_up'] = esc_attr($_POST['wplc_auto_pop_up']);
975
  update_option('WPLC_SETTINGS', $wplc_data);
976
- update_option("WPLC_HIDE_CHAT", $_POST['wplc_hide_chat']);
977
  echo "<div class='updated'>";
978
  _e("Your settings have been saved.","wplivechat");
979
  echo "</div>";
3
  Plugin Name: WP Live Chat Support
4
  Plugin URI: http://www.wp-livechat.com
5
  Description: The easiest to use website live chat plugin. Let your visitors chat with you and increase sales conversion rates with WP Live Chat Support. No third party connection required!
6
+ Version: 4.1.3
7
  Author: WP-LiveChat
8
  Author URI: http://www.wp-livechat.com
9
  */
10
 
11
 
12
+ /* 4.1.3
13
+ * Code improvements (PHP warnings)
14
+ *
15
+ * 4.1.2
16
  * DB bug fix
17
  *
18
  * 4.1.1
42
  global $wplc_tblname_msgs;
43
  $wplc_tblname_chats = $wpdb->prefix . "wplc_chat_sessions";
44
  $wplc_tblname_msgs = $wpdb->prefix . "wplc_chat_msgs";
45
+ $wplc_version = "4.1.3";
46
 
47
  define('WPLC_BASIC_PLUGIN_DIR',dirname(__FILE__));
48
  define('WPLC_BASIC_PLUGIN_URL',plugins_url()."/wp-live-chat-support/");
191
  }
192
 
193
  ?>
194
+ <div id="wp-live-chat" style="display:none; <?php echo $wplc_box_align; ?>; " class="<?php echo $wplc_class ?> wplc_close" original_pos="<?php echo $original_pos ?>" wplc-auto-pop-up="<?php if (isset($wplc_settings['wplc_auto_pop_up'])) { echo $wplc_settings['wplc_auto_pop_up']; } ?>">
195
 
196
 
197
  <?php if (function_exists("wplc_register_pro_version")) {
752
 
753
  jQuery(document).ready(function() {
754
 
755
+ var wplc_image = "<?php if (isset($image)) { echo $image; } else { echo ""; } ?>";
756
  var wplc_ajaxurl = '<?php echo plugins_url('/ajax.php', __FILE__); ?>';
757
 
758
 
890
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
891
  dbDelta($sql);
892
 
893
+ $sql = '
894
+ CREATE TABLE '.$wplc_tblname_msgs.' (
895
  id int(11) NOT NULL AUTO_INCREMENT,
896
  chat_sess_id int(11) NOT NULL,
897
  `from` varchar(150) CHARACTER SET utf8 NOT NULL,
901
  originates INT(3) NOT NULL,
902
  PRIMARY KEY (id)
903
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
904
+ ';
905
 
906
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
907
+ @dbDelta($sql);
908
 
909
  add_option("wplc_db_version", $wplc_version);
910
  update_option("wplc_db_version",$wplc_version);
918
 
919
  }
920
  function wplc_add_admin_stylesheet() {
921
+ if (isset($_GET['page']) && ($_GET['page'] == 'wplivechat-menu' || $_GET['page'] == 'wplivechat-menu-settings')) {
922
  wp_register_style( 'wplc-admin-style', 'http://code.jquery.com/ui/1.8.24/themes/smoothness/jquery-ui.css' );
923
  wp_enqueue_style( 'wplc-admin-style' );
924
  wp_register_style( 'wplc-font-awesome', plugins_url('/css/font-awesome.min.css', __FILE__) );
931
  }
932
  function wplc_admin_scripts_basic() {
933
 
934
+ if (isset($_GET['page']) && $_GET['page'] == "wplivechat-menu-settings") {
935
  wp_enqueue_script( 'jquery' );
936
  wp_enqueue_script('jquery-ui-core');
937
 
970
 
971
  if (isset($_POST['wplc_save_settings'])){
972
 
973
+ if (isset($_POST['wplc_settings_align'])) { $wplc_data['wplc_settings_align'] = esc_attr($_POST['wplc_settings_align']); }
974
+ if (isset($_POST['wplc_settings_fill'])) { $wplc_data['wplc_settings_fill'] = esc_attr($_POST['wplc_settings_fill']); }
975
+ if (isset($_POST['wplc_settings_font'])) { $wplc_data['wplc_settings_font'] = esc_attr($_POST['wplc_settings_font']); }
976
+ if (isset($_POST['wplc_settings_enabled'])) { $wplc_data['wplc_settings_enabled'] = esc_attr($_POST['wplc_settings_enabled']); }
977
+ if (isset($_POST['wplc_auto_pop_up'])) { $wplc_data['wplc_auto_pop_up'] = esc_attr($_POST['wplc_auto_pop_up']); }
978
  update_option('WPLC_SETTINGS', $wplc_data);
979
+ if (isset($_POST['wplc_hide_chat'])) { update_option("WPLC_HIDE_CHAT", $_POST['wplc_hide_chat']); }
980
  echo "<div class='updated'>";
981
  _e("Your settings have been saved.","wplivechat");
982
  echo "</div>";