|
@@ -1,18 +1,18 @@ |
|
1
|
1
|
<?php |
|
2
|
2
|
/** |
|
3
|
3
|
* Plugin Name: AI ChatBot - WPBot |
|
4
|
|
- * Plugin URI: https://www.wpbot.pro/ |
|
4
|
+ * Plugin URI: https://wordpress.org/plugins/chatbot/ |
|
5
|
5
|
* Description: ChatBot is a native WordPress ChatBot plugin to provide live chat support and lead generation |
|
6
|
6
|
* Donate link: https://www.wpbot.pro/ |
|
7
|
|
- * Version: 8.6.6 |
|
7
|
+ * Version: 7.3.3 |
|
8
|
8
|
* @author QuantumCloud |
|
9
|
9
|
* Author: ChatBot for WordPress - WPBot |
|
10
|
10
|
* Author URI: https://www.wpbot.pro/ |
|
11
|
11
|
* Requires at least: 4.6 |
|
12
|
|
- * Tested up to: 7.0 |
|
13
|
|
- * Text Domain: chatbot |
|
14
|
|
- * Domain Path: /languages |
|
12
|
+ * Tested up to: 6.8 |
|
13
|
+ * Text Domain: wpbot |
|
14
|
+ * Domain Path: /lang |
|
15
|
15
|
* License: GPL2 |
|
16
|
16
|
*/ |
|
17
|
17
|
|
|
18
|
18
|
|
|
@@ -18,40 +18,31 @@ |
|
18
|
18
|
|
|
19
|
19
|
|
|
20
|
20
|
if (!defined('ABSPATH')) exit; // Exit if accessed directly. |
|
21
|
21
|
|
|
22
|
+add_action( 'plugins_loaded', 'qcld_chatbot_existing_plugin_activate_check_callback' ); |
|
23
|
+if( !function_exists('qcld_chatbot_existing_plugin_activate_check_callback') ){ |
|
24
|
+ function qcld_chatbot_existing_plugin_activate_check_callback(){ |
|
22
|
25
|
|
|
26
|
+ $check_existing_plugin = get_option('qcld_chatbot_existing_plugin_activate_check'); |
|
23
|
27
|
|
|
24
|
|
-// Abort execution if Pro version is active to prevent conflicts |
|
25
|
|
-if ( ! function_exists( 'is_plugin_active' ) ) { |
|
26
|
|
- require_once ABSPATH . 'wp-admin/includes/plugin.php'; |
|
27
|
|
-} |
|
28
|
28
|
|
|
29
|
|
-$active_plugins = (array) get_option( 'active_plugins', array() ); |
|
30
|
|
-if ( is_multisite() ) { |
|
31
|
|
- $active_plugins = array_merge( $active_plugins, array_keys( (array) get_site_option( 'active_sitewide_plugins', array() ) ) ); |
|
32
|
|
-} |
|
33
|
|
- |
|
34
|
|
-$current_plugin = plugin_basename( __FILE__ ); |
|
35
|
|
- |
|
36
|
|
-foreach ( $active_plugins as $plugin ) { |
|
37
|
|
- if ( $plugin !== $current_plugin && basename( $plugin ) === 'qcld-wpwbot.php' ) { |
|
38
|
|
- return; |
|
29
|
+ if ( class_exists( 'qcld_wb_Chatbot' ) && isset($check_existing_plugin) && ($check_existing_plugin !== 'yes') ) { |
|
30
|
+ update_option('qcld_chatbot_existing_plugin_activate_check', 'yes'); |
|
31
|
+ }else if ( ! class_exists( 'qcld_wb_Chatbot' ) ) { |
|
32
|
+ delete_option('qcld_chatbot_existing_plugin_activate_check'); |
|
33
|
+ } |
|
34
|
+ |
|
39
|
35
|
} |
|
40
|
36
|
} |
|
41
|
37
|
|
|
42
|
|
-// Also abort if we are currently activating the Pro plugin |
|
43
|
|
-if ( isset($_REQUEST['action']) ) { |
|
44
|
|
- if ( $_REQUEST['action'] == 'activate' && isset($_REQUEST['plugin']) && ( ( strpos($_REQUEST['plugin'], 'wpbot-pro-master') !== false ) || ( strpos($_REQUEST['plugin'], 'wpbot-pro-professional') !== false ) || ( strpos($_REQUEST['plugin'], 'wpbot-pro-professional') !== false ) || ( strpos($_REQUEST['plugin'], 'wpbot-pro-starter') !== false ) ) ) { |
|
45
|
|
- return; |
|
46
|
|
- } |
|
47
|
|
- if ( $_REQUEST['action'] == 'activate-selected' && isset($_POST['checked']) && ( in_array('wpbot-pro-master/qcld-wpwbot.php', $_POST['checked']) || in_array('wpbot-pro-professional/qcld-wpwbot.php', $_POST['checked']) || in_array('wpbot-pro-starter/qcld-wpwbot.php', $_POST['checked']) ) ) { |
|
48
|
|
- return; |
|
49
|
|
- } |
|
38
|
+$check_existing_plugin = get_option('qcld_chatbot_existing_plugin_activate_check'); |
|
39
|
+if ( isset($check_existing_plugin) && ($check_existing_plugin == 'yes') || class_exists( 'qcld_wb_Chatbot' ) ) { |
|
40
|
+ return; |
|
50
|
41
|
} |
|
51
|
42
|
|
|
52
|
43
|
if ( ! defined( 'QCLD_wpCHATBOT_VERSION' ) ) { |
|
53
|
|
- define('QCLD_wpCHATBOT_VERSION', '8.6.6'); |
|
44
|
+ define('QCLD_wpCHATBOT_VERSION', '7.3.3'); |
|
54
|
45
|
} |
|
55
|
46
|
if ( ! defined( 'QCLD_wpCHATBOT_REQUIRED_wpCOMMERCE_VERSION' ) ) { |
|
56
|
47
|
define('QCLD_wpCHATBOT_REQUIRED_wpCOMMERCE_VERSION', 2.2); |
|
57
|
48
|
} |
|
@@ -84,13 +75,11 @@ |
|
84
|
75
|
define('QCLD_wpCHATBOT_GC_ROOT', $wpcontentpath); |
|
85
|
76
|
} |
|
86
|
77
|
|
|
87
|
78
|
require_once("qcld-wpwbot-search.php"); |
|
88
|
|
-require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/class-qcld-bot-rag.php"); |
|
89
|
79
|
require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/integration/openai/qcld-bot-openai.php"); |
|
90
|
80
|
require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/integration/openrouter/qcld-bot-openrouter.php"); |
|
91
|
81
|
require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/integration/gemini/qcld-bot-gemini.php"); |
|
92
|
|
-require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/integration/grok/qcld-bot-grok.php"); |
|
93
|
82
|
require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."class-qc-free-plugin-upgrade-notice.php"); |
|
94
|
83
|
require_once("class-plugin-deactivate-feedback.php"); |
|
95
|
84
|
require_once("qc-support-promo-page/class-qc-support-promo-page.php"); |
|
96
|
85
|
require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."/functions.php"); |
|
@@ -95,9 +84,8 @@ |
|
95
|
84
|
require_once("qc-support-promo-page/class-qc-support-promo-page.php"); |
|
96
|
85
|
require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."/functions.php"); |
|
97
|
86
|
require_once('qcld_df_api.php'); |
|
98
|
87
|
require_once('includes/class-wpbot-gc-download.php'); |
|
99
|
|
-require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/class-common-function.php"); |
|
100
|
88
|
require_once('includes/class-response-list.php'); |
|
101
|
89
|
require_once('qc-rating-feature/qc-rating-class.php'); |
|
102
|
90
|
// if ( is_admin() ) { |
|
103
|
91
|
// require_once( QCLD_wpCHATBOT_PLUGIN_DIR_PATH . '/inc/parsedown.php' ); |
|
@@ -104,12 +92,8 @@ |
|
104
|
92
|
// require_once( QCLD_wpCHATBOT_PLUGIN_DIR_PATH . '/inc/qcld-floating-openai-style-filter.php' ); |
|
105
|
93
|
// require_once( QCLD_wpCHATBOT_PLUGIN_DIR_PATH . '/inc/qcld_openai_floating_content.php' ); |
|
106
|
94
|
// } |
|
107
|
95
|
|
|
108
|
|
-// Built-in Chat Sessions & Analytics module. |
|
109
|
|
-// Defers to the Pro addon automatically when it's active. |
|
110
|
|
-require_once( QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/chat-sessions/wpbot-chat-sessions.php' ); |
|
111
|
|
- |
|
112
|
96
|
/** |
|
113
|
97
|
* Main Class. |
|
114
|
98
|
*/ |
|
115
|
99
|
|
|
@@ -136,9 +120,9 @@ |
|
136
|
120
|
* Construct empty on purpose |
|
137
|
121
|
*/ |
|
138
|
122
|
private function __construct() |
|
139
|
123
|
{ |
|
140
|
|
- $this->promotion = QCLD_wpCHATBOT_IMG_URL . "/NY-26-wpbot.jpg"; |
|
124
|
+ $this->promotion = QCLD_wpCHATBOT_IMG_URL . "/halloween25-wpbot.jpg"; |
|
141
|
125
|
} |
|
142
|
126
|
/** |
|
143
|
127
|
* Init behaves like, and replaces, construct |
|
144
|
128
|
*/ |
|
@@ -154,12 +138,15 @@ |
|
154
|
138
|
if ((!empty($_GET["page"])) && ($_GET["page"] == "wpbot")) { |
|
155
|
139
|
add_action('admin_init', array($this, 'qcld_wb_chatbot_save_options')); |
|
156
|
140
|
|
|
157
|
141
|
} |
|
158
|
|
- |
|
142
|
+ add_action('admin_enqueue_scripts', function() { |
|
143
|
+ wp_register_style('qlcd-str-wp-chatbot-font-awesome', plugins_url(basename(plugin_dir_path(__FILE__)) . '/css/font-awesome.min.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen'); |
|
144
|
+ wp_enqueue_style('qlcd-str-wp-chatbot-font-awesome'); |
|
145
|
+ }); |
|
159
|
146
|
if( ( !empty($_GET['page']) && $_GET["page"] == "wpbot") || ( !empty($_GET['page']) && $_GET["page"] == "wpbot-panel")|| ( !empty($_GET['page']) && $_GET['page'] == 'wpbot_openAi') || ( !empty($_GET['page']) && $_GET['page'] == 'simple-text-response') ){ |
|
160
|
|
- // add_action( 'admin_notices', array( $this, 'promotion_notice' ) ); |
|
161
|
|
- |
|
147
|
+ |
|
148
|
+ add_action( 'admin_notices', array( $this, 'promotion_notice' ) ); |
|
162
|
149
|
} |
|
163
|
150
|
|
|
164
|
151
|
if (is_admin() && !empty($_GET["page"]) && ($_GET["page"] == "wpbot") || (!empty($_GET['page']) && $_GET['page']=='wpbot_help_page') |
|
165
|
152
|
|
|
@@ -244,28 +231,22 @@ |
|
244
|
231
|
__('wpwBot Pro', 'chatbot'), |
|
245
|
232
|
'manage_wpcommerce', |
|
246
|
233
|
$this->id, |
|
247
|
234
|
array($this, 'qcld_wb_chatbot_admin_page'));*/ |
|
248
|
|
- if( get_option( 'qc_bot_str_allow_author_editor' ) == 1 ){ |
|
249
|
|
- $capability = 'publish_posts'; |
|
250
|
|
- }else{ |
|
251
|
|
- $capability = 'manage_options'; |
|
252
|
|
- } |
|
253
|
|
- add_menu_page( esc_html('WPBot - ChatBot'), esc_html('WPBot - ChatBot'), 'manage_options','wpbot-panel', array($this, 'qcld_wb_chatbot_admin_page'),'dashicons-format-status', 6 ); |
|
235
|
+ |
|
236
|
+ add_menu_page( esc_html('ChatBot WPBot Lite'), esc_html('ChatBot WPBot Lite'), 'manage_options','wpbot-panel', array($this, 'qcld_wb_chatbot_admin_page'),'dashicons-format-status', 6 ); |
|
254
|
237
|
|
|
255
|
238
|
add_submenu_page( 'wpbot-panel', esc_html('Settings'), esc_html('Settings'), 'manage_options','wpbot', array($this, 'qcld_wb_chatbot_admin_page_settings') ); |
|
256
|
239
|
|
|
257
|
|
- add_submenu_page( 'wpbot-panel', esc_html('User Data'), esc_html('User Data'), 'manage_options','email-subscription', array($this, 'qcld_wb_chatbot_admin_page1') ); |
|
240
|
+ add_submenu_page( 'wpbot-panel', esc_html('OpenAI Settings'), esc_html('AI Settings'), 'manage_options','wpbot_openAi', 'wpbot_openAi_setting_func' ); |
|
258
|
241
|
|
|
259
|
|
- add_submenu_page( 'wpbot-panel', esc_html('AI Settings'), esc_html('AI Settings'), 'manage_options','wpbot_openAi', 'wpbot_openAi_setting_func' ); |
|
242
|
+ $hook = add_submenu_page( 'wpbot-panel', esc_html('Simple Text Responses'), esc_html('Simple Text Responses'), 'manage_options','simple-text-response', array($this, 'qcld_wb_chatbot_admin_str') ); |
|
260
|
243
|
|
|
261
|
|
- $hook = add_submenu_page( 'wpbot-panel', esc_html('Simple Text Responses'), esc_html('Simple Text Responses'), $capability,'simple-text-response', array($this, 'qcld_wb_chatbot_admin_str') ); |
|
262
|
|
- |
|
263
|
244
|
add_action( "load-$hook", [ $this, 'screen_option' ] ); |
|
264
|
245
|
|
|
265
|
246
|
// add_submenu_page( 'wpbot-panel', esc_html('Conversational Form '), esc_html('Conversational Form'), 'manage_options','wpbots', [$this, 'qcld_wb_chatbot_admin_conversational_settings'] ); |
|
266
|
247
|
|
|
267
|
|
- add_submenu_page( 'wpbot-panel', esc_html('Get Support'), esc_html('Get Support'), 'manage_options','wpbot_support_page', 'qcpromo_wpbot_free_support_page_callback_func' ); |
|
248
|
+ add_submenu_page( 'wpbot-panel', esc_html('Support'), esc_html('Support'), 'manage_options','wpbot_support_page', 'qcpromo_wpbot_free_support_page_callback_func' ); |
|
268
|
249
|
|
|
269
|
250
|
add_submenu_page( 'wpbot-panel', esc_html('Help and Debugging'), esc_html('Help and Debugging'), 'manage_options','wpbot_help_page', 'wpbot_help_page_callback_func' ); |
|
270
|
251
|
|
|
271
|
252
|
|
|
@@ -311,8 +292,11 @@ |
|
311
|
292
|
//wp_enqueue_style('wpcommerce_admin_styles', $wpcommerce->plugin_url() . '/assets/css/admin.css'); |
|
312
|
293
|
|
|
313
|
294
|
wp_register_style('qlcd-wp-chatbot-admin-style', plugins_url(basename(plugin_dir_path(__FILE__)) . '/css/admin-style.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen'); |
|
314
|
295
|
wp_enqueue_style('qlcd-wp-chatbot-admin-style'); |
|
296
|
+ |
|
297
|
+ wp_register_style('qlcd-wp-chatbot-font-awesome', plugins_url(basename(plugin_dir_path(__FILE__)) . '/css/font-awesome.min.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen'); |
|
298
|
+ wp_enqueue_style('qlcd-wp-chatbot-font-awesome'); |
|
315
|
299
|
wp_register_style('qlcd-wp-chatbot-tabs-style', plugins_url(basename(plugin_dir_path(__FILE__)) . '/css/wp-chatbot-tabs.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen'); |
|
316
|
300
|
wp_enqueue_style('qlcd-wp-chatbot-tabs-style'); |
|
317
|
301
|
wp_register_style('jquery.fontpicker.min.css', QCLD_wpCHATBOT_PLUGIN_URL . 'css/fontpicker.min.css', '', QCLD_wpCHATBOT_VERSION, 'screen'); |
|
318
|
302
|
wp_enqueue_style('jquery.fontpicker.min.css'); |
|
@@ -354,9 +338,9 @@ |
|
354
|
338
|
wp_register_style('qcld-wp-chatbot-timepicker-css', plugins_url(basename(plugin_dir_path(__FILE__)) . '/css/jquery.timepicker.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen'); |
|
355
|
339
|
wp_enqueue_style('qcld-wp-chatbot-timepicker-css'); |
|
356
|
340
|
wp_register_script('qcld-wp-chatbot-sweetalrt', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/sweetalrt.js', basename(__FILE__)), array(), true); |
|
357
|
341
|
wp_enqueue_script('qcld-wp-chatbot-sweetalrt'); |
|
358
|
|
- wp_register_script('qcld-wp-chatbot-admin-js', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/qcld-wp-chatbot-admin.js', basename(__FILE__)), array('jquery', 'jquery-ui-core','jquery-ui-sortable','jquery-ui-droppable','wp-color-picker','qcld-wp-chatbot-timepicker-js'), true); |
|
342
|
+ wp_register_script('qcld-wp-chatbot-admin-js', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/qcld-wp-chatbot-admin.js', basename(__FILE__)), array('jquery', 'jquery-ui-core','jquery-ui-sortable','wp-color-picker','qcld-wp-chatbot-timepicker-js'), '10.9.9', true); |
|
359
|
343
|
wp_enqueue_script('qcld-wp-chatbot-admin-js'); |
|
360
|
344
|
wp_localize_script('qcld-wp-chatbot-admin-js', 'qcld_gemini_admin_data', |
|
361
|
345
|
array('ajax_url' => admin_url('admin-ajax.php'),'ajax_nonce' => wp_create_nonce('wp_chatbot'),'image_path' => QCLD_wpCHATBOT_IMG_URL)); |
|
362
|
346
|
// WordPress Media library |
|
@@ -372,9 +356,9 @@ |
|
372
|
356
|
public function qcld_get_formbuilder_forms(){ |
|
373
|
357
|
global $wpdb; |
|
374
|
358
|
$forms = array(); |
|
375
|
359
|
if(class_exists('Qcformbuilder_Forms_Admin')){ |
|
376
|
|
- $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ". $wpdb->prefix."wfb_forms WHERE type=%s", 'primary')); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter |
|
360
|
+ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ". $wpdb->prefix."wfb_forms WHERE type=%s", 'primary')); //DB Call OK, No Caching OK |
|
377
|
361
|
if(!empty($results)){ |
|
378
|
362
|
foreach($results as $result){ |
|
379
|
363
|
$form = maybe_unserialize($result->config); |
|
380
|
364
|
$forms[] = trim($form['name']); |
|
@@ -386,15 +370,12 @@ |
|
386
|
370
|
}else{ |
|
387
|
371
|
return array(); |
|
388
|
372
|
} |
|
389
|
373
|
} |
|
390
|
|
- public function qcld_wb_chatbot_admin_page1() { |
|
391
|
|
- require_once QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/admin/templates/email_subscription.php'; |
|
392
|
|
- } |
|
393
|
374
|
public function qcld_wpbot_simple_response_intent(){ |
|
394
|
375
|
global $wpdb; |
|
395
|
376
|
$table = $wpdb->prefix.'wpbot_response'; |
|
396
|
|
- $results = $wpdb->get_results("SELECT `intent` FROM `{$table}` WHERE 1 and `intent` !=''"); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter |
|
377
|
+ $results = $wpdb->get_results("SELECT `intent` FROM `$table` WHERE 1 and `intent` !=''"); //DB Call OK, No Caching OK |
|
397
|
378
|
$response = array(); |
|
398
|
379
|
if(!empty($results)){ |
|
399
|
380
|
foreach($results as $result){ |
|
400
|
381
|
$response[] = $result->intent; |
|
@@ -406,9 +387,9 @@ |
|
406
|
387
|
global $wpdb; |
|
407
|
388
|
$command = array(); |
|
408
|
389
|
if(class_exists('Qcformbuilder_Forms_Admin')){ |
|
409
|
390
|
$primary = 'primary'; |
|
410
|
|
- $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ". $wpdb->prefix."wfb_forms WHERE type = %s", $primary)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter |
|
391
|
+ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ". $wpdb->prefix."wfb_forms WHERE type = %s", $primary)); //DB Call OK, No Caching OK |
|
411
|
392
|
|
|
412
|
393
|
if(!empty($results)){ |
|
413
|
394
|
foreach($results as $result){ |
|
414
|
395
|
$form = maybe_unserialize($result->config); |
|
@@ -427,11 +408,12 @@ |
|
427
|
408
|
} |
|
428
|
409
|
} |
|
429
|
410
|
public function promotion_notice(){ |
|
430
|
411
|
$screen = get_current_screen(); |
|
412
|
+ // var_dump($screen->base ); |
|
431
|
413
|
// if( isset($screen->base) && (( $screen->base == 'wpbot-lite_page_wpbot') || ( $screen->base == 'toplevel_page_wpbot-panel"'))){ |
|
432
|
414
|
?> |
|
433
|
|
- <div id="promotion-wpchatbot" data-dismiss-type="qcbot-feedback-notice" class="notice is-dismissible qcbot-feedback" style="background: #120976 !important"> |
|
415
|
+ <div id="promotion-wpchatbot" data-dismiss-type="qcbot-feedback-notice" class="notice is-dismissible qcbot-feedback" style="background: #5c62b6 !important"> |
|
434
|
416
|
<div class=""> |
|
435
|
417
|
|
|
436
|
418
|
<div class="qc-review-text" > |
|
437
|
419
|
<a href="<?php echo esc_url('https://www.wpbot.pro/pricing/'); ?>" target="_blank"> |
|
@@ -445,9 +427,9 @@ |
|
445
|
427
|
public function qcld_get_formbuilder_form_ids(){ |
|
446
|
428
|
global $wpdb; |
|
447
|
429
|
$forms = array(); |
|
448
|
430
|
if(class_exists('Qcformbuilder_Forms_Admin')){ |
|
449
|
|
- $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ". $wpdb->prefix."wfb_forms WHERE type=%s", 'primary')); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter |
|
431
|
+ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ". $wpdb->prefix."wfb_forms WHERE type=%s", 'primary')); //DB Call OK, No Caching OK |
|
450
|
432
|
|
|
451
|
433
|
if(!empty($results)){ |
|
452
|
434
|
foreach($results as $result){ |
|
453
|
435
|
$form = maybe_unserialize($result->config); |
|
@@ -481,13 +463,13 @@ |
|
481
|
463
|
$conversation_form_ids = array(); |
|
482
|
464
|
$conversation_form_names = array(); |
|
483
|
465
|
|
|
484
|
466
|
if(class_exists('Qcformbuilder_Forms_Admin')){ |
|
485
|
|
- $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ". $wpdb->prefix."wfb_forms WHERE type=%s", 'primary')); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter |
|
467
|
+ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ". $wpdb->prefix."wfb_forms WHERE type=%s", 'primary')); //DB Call OK, No Caching OK |
|
486
|
468
|
if(!empty($results)){ |
|
487
|
469
|
|
|
488
|
470
|
foreach($results as $result){ |
|
489
|
|
- $form = maybe_unserialize($result->config); |
|
471
|
+ $form = unserialize($result->config); |
|
490
|
472
|
$conversation_form_ids[] = $form['ID']; |
|
491
|
473
|
$conversation_form_names[] = $form['name']; |
|
492
|
474
|
} |
|
493
|
475
|
|
|
@@ -492,8 +474,10 @@ |
|
492
|
474
|
} |
|
493
|
475
|
|
|
494
|
476
|
} |
|
495
|
477
|
} |
|
478
|
+ |
|
479
|
+ // var_dump( str_replace('<', '',esc_html(get_option('qlcd_wp_chatbot_agent'))));wp_die(); |
|
496
|
480
|
$wp_chatbot_obj = array( |
|
497
|
481
|
'wp_chatbot_position_x' => get_option('wp_chatbot_position_x'), |
|
498
|
482
|
'wp_chatbot_position_y' => get_option('wp_chatbot_position_y'), |
|
499
|
483
|
'disable_icon_animation' => get_option('disable_wp_chatbot_icon_animation'), |
|
@@ -509,31 +493,31 @@ |
|
509
|
493
|
'yes' => str_replace('\\', '',get_option('qlcd_wp_chatbot_yes')), |
|
510
|
494
|
'no' => str_replace('\\', '',get_option('qlcd_wp_chatbot_no')), |
|
511
|
495
|
'or' => str_replace('\\', '',get_option('qlcd_wp_chatbot_or')), |
|
512
|
496
|
'host' => str_replace('\\', '',get_option('qlcd_wp_chatbot_host')), |
|
513
|
|
- 'agent' => str_replace(['\\','<','>'], '',esc_html(is_array(maybe_unserialize(get_option('qlcd_wp_chatbot_agent'))) ? current(maybe_unserialize(get_option('qlcd_wp_chatbot_agent'))) : get_option('qlcd_wp_chatbot_agent'))), |
|
497
|
+ 'agent' => str_replace(['\\','<','>'], '',esc_html(get_option('qlcd_wp_chatbot_agent'))), |
|
514
|
498
|
'agent_image' => get_option('wp_chatbot_agent_image'), |
|
515
|
|
- 'agent_image_path' => esc_url((!empty(get_option('wp_chatbot_custom_icon_path')) && !is_404(get_option('wp_chatbot_custom_icon_path'))) ? $this->qcld_wb_chatbot_agent_icon() : QCLD_wpCHATBOT_IMG_URL . 'icon-1.png'), |
|
516
|
|
- 'shopper_demo_name' => str_replace('\\', '', is_array(maybe_unserialize(get_option('qlcd_wp_chatbot_shopper_demo_name'))) ? current(maybe_unserialize(get_option('qlcd_wp_chatbot_shopper_demo_name'))) : get_option('qlcd_wp_chatbot_shopper_demo_name')), |
|
517
|
|
- 'agent_join' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_agent_join'))), |
|
518
|
|
- 'welcome' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_welcome'))), |
|
519
|
|
- 'welcome_back' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_welcome_back'))), |
|
520
|
|
- 'hi_there' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_hi_there'))), |
|
499
|
+ 'agent_image_path' => (!empty(get_option('wp_chatbot_custom_icon_path')) && !is_404(get_option('wp_chatbot_custom_icon_path'))) ? $this->qcld_wb_chatbot_agent_icon() : QCLD_wpCHATBOT_IMG_URL . 'icon-1.png', |
|
500
|
+ 'shopper_demo_name' => str_replace('\\', '',get_option('qlcd_wp_chatbot_shopper_demo_name')), |
|
501
|
+ 'agent_join' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_agent_join'))), |
|
502
|
+ 'welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_welcome'))), |
|
503
|
+ 'welcome_back' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_welcome_back'))), |
|
504
|
+ 'hi_there' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_hi_there'))), |
|
521
|
505
|
'hello' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_hello'))), |
|
522
|
|
- 'asking_name' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_asking_name'))), |
|
523
|
|
- 'i_am' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_i_am'))), |
|
524
|
|
- 'name_greeting' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_name_greeting'))), |
|
525
|
|
- 'wildcard_msg' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_wildcard_msg'))), |
|
526
|
|
- 'empty_filter_msg' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_empty_filter_msg'))), |
|
527
|
|
- 'did_you_mean' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_did_you_mean'))), |
|
528
|
|
- 'is_typing' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_is_typing'))), |
|
529
|
|
- 'send_a_msg' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_send_a_msg'))), |
|
506
|
+ 'asking_name' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_name'))), |
|
507
|
+ 'i_am' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_i_am'))), |
|
508
|
+ 'name_greeting' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_name_greeting'))), |
|
509
|
+ 'wildcard_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_msg'))), |
|
510
|
+ 'empty_filter_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_empty_filter_msg'))), |
|
511
|
+ 'did_you_mean' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_did_you_mean'))), |
|
512
|
+ 'is_typing' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_is_typing'))), |
|
513
|
+ 'send_a_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_send_a_msg'))), |
|
530
|
514
|
|
|
531
|
|
- 'viewed_products' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_viewed_products'))), |
|
515
|
+ 'viewed_products' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_viewed_products'))), |
|
532
|
516
|
|
|
533
|
|
- 'shopping_cart' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_shopping_cart'))), |
|
534
|
|
- 'cart_updating' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_cart_updating'))), |
|
535
|
|
- 'cart_removing' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_cart_removing'))), |
|
517
|
+ 'shopping_cart' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_shopping_cart'))), |
|
518
|
+ 'cart_updating' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_cart_updating'))), |
|
519
|
+ 'cart_removing' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_cart_removing'))), |
|
536
|
520
|
'imgurl' => QCLD_wpCHATBOT_IMG_URL, |
|
537
|
521
|
'sys_key_help' => get_option('qlcd_wp_chatbot_sys_key_help'), |
|
538
|
522
|
'sys_key_product' => get_option('qlcd_wp_chatbot_sys_key_product'), |
|
539
|
523
|
'sys_key_catalog' => get_option('qlcd_wp_chatbot_sys_key_catalog'), |
|
@@ -540,54 +524,54 @@ |
|
540
|
524
|
'sys_key_order' => get_option('qlcd_wp_chatbot_sys_key_order'), |
|
541
|
525
|
'sys_key_support' => get_option('qlcd_wp_chatbot_sys_key_support'), |
|
542
|
526
|
'sys_key_reset' => get_option('qlcd_wp_chatbot_sys_key_reset'), |
|
543
|
527
|
'sys_key_email' => get_option('qlcd_wp_chatbot_sys_key_email'), |
|
544
|
|
- 'help_welcome' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_help_welcome'))), |
|
545
|
|
- 'back_to_start' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_back_to_start'))), |
|
546
|
|
- 'help_msg' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_help_msg'))), |
|
547
|
|
- 'reset' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_reset'))), |
|
548
|
|
- 'wildcard_product' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_wildcard_product'))), |
|
549
|
|
- 'wildcard_catalog' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_wildcard_catalog'))), |
|
550
|
|
- 'featured_products' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_featured_products'))), |
|
551
|
|
- 'sale_products' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_sale_products'))), |
|
552
|
|
- 'wildcard_order' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_wildcard_order'))), |
|
528
|
+ 'help_welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_help_welcome'))), |
|
529
|
+ 'back_to_start' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_back_to_start'))), |
|
530
|
+ 'help_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_help_msg'))), |
|
531
|
+ 'reset' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_reset'))), |
|
532
|
+ 'wildcard_product' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_product'))), |
|
533
|
+ 'wildcard_catalog' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_catalog'))), |
|
534
|
+ 'featured_products' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_featured_products'))), |
|
535
|
+ 'sale_products' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_sale_products'))), |
|
536
|
+ 'wildcard_order' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_order'))), |
|
553
|
537
|
'wildcard_support' => get_option('qlcd_wp_chatbot_wildcard_support'), |
|
554
|
|
- 'product_asking' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_product_asking'))), |
|
555
|
|
- 'product_suggest' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_product_suggest'))), |
|
556
|
|
- 'product_infinite' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_product_infinite'))), |
|
557
|
|
- 'product_success' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_product_success'))), |
|
558
|
|
- 'product_fail' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_product_fail'))), |
|
559
|
|
- 'support_welcome' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_support_welcome'))), |
|
538
|
+ 'product_asking' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_asking'))), |
|
539
|
+ 'product_suggest' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_suggest'))), |
|
540
|
+ 'product_infinite' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_infinite'))), |
|
541
|
+ 'product_success' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_success'))), |
|
542
|
+ 'product_fail' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_fail'))), |
|
543
|
+ 'support_welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_support_welcome'))), |
|
560
|
544
|
'support_email' => get_option('qlcd_wp_chatbot_support_email'), |
|
561
|
|
- 'support_option_again' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_support_option_again'))), |
|
562
|
|
- 'asking_email' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_asking_email'))), |
|
563
|
|
- 'asking_msg' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_asking_msg'))), |
|
564
|
|
- 'no_result' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_no_result'))), |
|
545
|
+ 'support_option_again' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_support_option_again'))), |
|
546
|
+ 'asking_email' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_email'))), |
|
547
|
+ 'asking_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_msg'))), |
|
548
|
+ 'no_result' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_no_result'))), |
|
565
|
549
|
'support_phone' => get_option('qlcd_wp_chatbot_support_phone'), |
|
566
|
|
- 'asking_phone' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_asking_phone'))), |
|
567
|
|
- 'thank_for_phone' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_thank_for_phone'))), |
|
568
|
|
- 'support_query' => ((gettype(get_option('support_query')) == 'string') ? $this->qcld_wb_chatbot_str_replace(maybe_unserialize( get_option('support_query'))) : $this->qcld_wb_chatbot_str_replace(( get_option('support_query')))), |
|
569
|
|
- 'support_ans' => (gettype(get_option('support_ans')) == 'string') ? $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('support_ans'))) : $this->qcld_wb_chatbot_str_replace((get_option('support_ans'))), |
|
550
|
+ 'asking_phone' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_phone'))), |
|
551
|
+ 'thank_for_phone' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_thank_for_phone'))), |
|
552
|
+ 'support_query' => ((gettype(get_option('support_query')) == 'string') ? $this->qcld_wb_chatbot_str_replace(unserialize( get_option('support_query'))) : $this->qcld_wb_chatbot_str_replace(( get_option('support_query')))), |
|
553
|
+ 'support_ans' => (gettype(get_option('support_ans')) == 'string') ? $this->qcld_wb_chatbot_str_replace(unserialize(get_option('support_ans'))) : $this->qcld_wb_chatbot_str_replace((get_option('support_ans'))), |
|
570
|
554
|
'notification_interval' => get_option('qlcd_wp_chatbot_notification_interval'), |
|
571
|
|
- 'notifications' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_notifications'))), |
|
572
|
|
- 'order_welcome' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_order_welcome'))), |
|
573
|
|
- 'order_username_asking' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_order_username_asking'))), |
|
574
|
|
- 'order_username_password' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_order_username_password'))), |
|
555
|
+ 'notifications' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_notifications'))), |
|
556
|
+ 'order_welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_welcome'))), |
|
557
|
+ 'order_username_asking' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_username_asking'))), |
|
558
|
+ 'order_username_password' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_username_password'))), |
|
575
|
559
|
'order_user' => get_option('qlcd_wp_chatbot_order_user'), |
|
576
|
560
|
'order_login' => is_user_logged_in(), |
|
577
|
561
|
'is_chat_session_active' => qcld_wpbot_is_active_chat_history(), |
|
578
|
562
|
'order_nonce' => wp_create_nonce("wpwbot-order-nonce"), |
|
579
|
|
- 'order_email_support' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_order_email_support'))), |
|
563
|
+ 'order_email_support' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_email_support'))), |
|
580
|
564
|
'email_fail' => str_replace('\\', '', get_option('qlcd_wp_chatbot_email_fail')), |
|
581
|
|
- 'invalid_email' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_invalid_email'))), |
|
565
|
+ 'invalid_email' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_invalid_email'))), |
|
582
|
566
|
'stop_words' => str_replace('\\', '', get_option('qlcd_wp_chatbot_stop_words')), |
|
583
|
567
|
'currency_symbol' => '', |
|
584
|
568
|
'enable_messenger' => get_option('enable_wp_chatbot_messenger'), |
|
585
|
|
- 'messenger_label' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_messenger_label'))), |
|
569
|
+ 'messenger_label' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_messenger_label'))), |
|
586
|
570
|
'fb_page_id' => get_option('qlcd_wp_chatbot_fb_page_id'), |
|
587
|
571
|
'enable_skype' => get_option('enable_wp_chatbot_skype'), |
|
588
|
572
|
'enable_whats' => get_option('enable_wp_chatbot_whats'), |
|
589
|
|
- 'whats_label' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_whats_label'))), |
|
573
|
+ 'whats_label' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_whats_label'))), |
|
590
|
574
|
'whats_num' => get_option('qlcd_wp_chatbot_whats_num'), |
|
591
|
575
|
'ret_greet' => get_option('qlcd_wp_chatbot_ret_greet'), |
|
592
|
576
|
'enable_exit_intent' => get_option('enable_wp_chatbot_exit_intent'), |
|
593
|
577
|
'exit_intent_msg' => str_replace('\\', '', get_option('wp_chatbot_exit_intent_msg')), |
|
@@ -602,9 +586,9 @@ |
|
602
|
586
|
'auto_open_once' => get_option('wp_chatbot_auto_open_once'), |
|
603
|
587
|
'proactive_bg_color' => get_option('wp_chatbot_proactive_bg_color'), |
|
604
|
588
|
'disable_feedback' => get_option('disable_wp_chatbot_feedback'), |
|
605
|
589
|
'disable_faq' => get_option('disable_wp_chatbot_faq'), |
|
606
|
|
- 'feedback_label' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_feedback_label'))), |
|
590
|
+ 'feedback_label' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_feedback_label'))), |
|
607
|
591
|
'enable_meta_title' =>get_option('enable_wp_chatbot_meta_title'), |
|
608
|
592
|
'meta_label' =>str_replace('\\', '', get_option('qlcd_wp_chatbot_meta_label')), |
|
609
|
593
|
'phone_number' => get_option('qlcd_wp_chatbot_phone'), |
|
610
|
594
|
'disable_site_search' => get_option('disable_wp_chatbot_site_search'), |
|
@@ -609,9 +593,8 @@ |
|
609
|
593
|
'phone_number' => get_option('qlcd_wp_chatbot_phone'), |
|
610
|
594
|
'disable_site_search' => get_option('disable_wp_chatbot_site_search'), |
|
611
|
595
|
'search_keyword' => get_option('qlcd_wp_chatbot_asking_search_keyword'), |
|
612
|
596
|
'ajax_nonce'=> wp_create_nonce('qcsecretbotnonceval123qc'), |
|
613
|
|
- 'session_nonce'=> wp_create_nonce('wp_chatbot'), |
|
614
|
597
|
'site_search' => get_option('qlcd_wp_site_search'), |
|
615
|
598
|
'open_links_newtab' => get_option('open_links_new_window'), |
|
616
|
599
|
'call_gen' => get_option('disable_wp_chatbot_call_gen'), |
|
617
|
600
|
'call_sup' => get_option('disable_wp_chatbot_call_sup'), |
|
@@ -620,11 +603,9 @@ |
|
620
|
603
|
'enable_ret_user_show' => get_option('enable_wp_chatbot_ret_user_show'), |
|
621
|
604
|
'enable_inactive_time_show' => get_option('enable_wp_chatbot_inactive_time_show'), |
|
622
|
605
|
'ret_inactive_user_once' => get_option('wp_chatbot_inactive_once'), |
|
623
|
606
|
'mobile_full_screen' => '1', |
|
624
|
|
- 'chatbot_content' => get_option( 'chatbot_content_max_height' ), |
|
625
|
|
- 'chatbot_content_responsive' => get_option( 'chatbot_content_max_height_responsive' ), |
|
626
|
|
- 'botpreloadingtime' => (get_option('wpbot_preloading_time')?get_option('wpbot_preloading_time'):800), |
|
607
|
+ 'botpreloadingtime' => (get_option('wpbot_preloading_time')?get_option('wpbot_preloading_time'):100), |
|
627
|
608
|
'inactive_time' => get_option('wp_chatbot_inactive_time'), |
|
628
|
609
|
'checkout_msg' => str_replace('\\', '', get_option('wp_chatbot_checkout_msg')), |
|
629
|
610
|
'ai_df_enable' => get_option('enable_wp_chatbot_dailogflow'), |
|
630
|
611
|
'ai_df_token' => get_option('qlcd_wp_chatbot_dialogflow_client_token'), |
|
@@ -630,13 +611,11 @@ |
|
630
|
611
|
'ai_df_token' => get_option('qlcd_wp_chatbot_dialogflow_client_token'), |
|
631
|
612
|
'df_defualt_reply' => str_replace('\\', '', get_option('qlcd_wp_chatbot_dialogflow_defualt_reply')), |
|
632
|
613
|
'df_agent_lan' => get_option('qlcd_wp_chatbot_dialogflow_agent_language'), |
|
633
|
614
|
'openai_enabled' => get_option('ai_enabled'), |
|
634
|
|
- 'is_stream_enabled' => ( get_option('is_stream_enabled', '1') == '1' ? '1' : '0' ), |
|
635
|
615
|
'qcld_openai_append_content' => get_option('qcld_openai_append_content'), |
|
636
|
616
|
'openrouter_enabled' => (get_option('qcld_openrouter_enabled')=='1'? get_option('qcld_openrouter_enabled') : '0'), |
|
637
|
617
|
'gemini_enabled' => (get_option('qcld_gemini_enabled')=='1'? get_option('qcld_gemini_enabled') : '0'), |
|
638
|
|
- 'grok_enabled' => (get_option('qcld_grok_enabled')=='1'? get_option('qcld_grok_enabled') : '0'), |
|
639
|
618
|
'qcld_gemini_prepend_content' => get_option('qcld_gemini_prepend_content'), |
|
640
|
619
|
'qcld_gemini_append_content' => get_option('qcld_gemini_append_content'), |
|
641
|
620
|
'qcld_openrouter_append_content' => get_option('qcld_openrouter_append_content'), |
|
642
|
621
|
'qcld_openrouter_prepend_content' => get_option('qcld_openrouter_prepend_content'), |
|
@@ -649,60 +628,41 @@ |
|
649
|
628
|
'form_commands' => $this->qcld_get_formbuilder_form_commands(), |
|
650
|
629
|
'df_api_version' => (get_option('wp_chatbot_df_api')==''?'v1':get_option('wp_chatbot_df_api')), |
|
651
|
630
|
'v2_client_url'=> esc_url(get_site_url().'/?action=qcld_dfv2_api'), |
|
652
|
631
|
'show_menu_after_greetings'=> (get_option('show_menu_after_greetings')!=''?get_option('show_menu_after_greetings'):0), |
|
653
|
|
- 'disable_back_to_start'=> (get_option('disable_back_to_start_menu')!=''?get_option('disable_back_to_start_menu'):0), |
|
654
|
632
|
'current_user_id' => $user_id, |
|
655
|
|
- 'display_name' => esc_html( $display_name ), |
|
656
|
633
|
'skip_wp_greetings' => get_option('skip_wp_greetings'), |
|
657
|
634
|
'skip_greetings_and_menu' => get_option('skip_wp_greetings_donot_show_menu'), |
|
658
|
|
- 'ask_email_wp_greetings' => get_option('enable_asking_for_email'), |
|
659
|
|
- 'skip_chat_reactions_menu' => get_option('skip_chat_reactions_menu'), |
|
660
|
|
- 'qlcd_wp_chatbot_like_text' => get_option('qlcd_wp_chatbot_like_text'), |
|
661
|
|
- 'qlcd_wp_chatbot_dislike_text' => get_option('qlcd_wp_chatbot_dislike_text'), |
|
662
|
|
- 'enable_chat_report_menu' => get_option('enable_chat_report_menu'), |
|
663
|
|
- 'qlcd_wp_chatbot_report_text' => get_option('qlcd_wp_chatbot_report_text'), |
|
664
|
|
- 'enable_chat_share_menu' => get_option('enable_chat_share_menu'), |
|
665
|
|
- 'qlcd_wp_chatbot_share_text' => get_option('qlcd_wp_chatbot_share_text'), |
|
666
|
635
|
|
|
667
|
636
|
); |
|
668
|
|
- $user_font = get_option('wp_chatbot_user_font') != '' ? get_option('wp_chatbot_user_font') : ''; |
|
637
|
+ $user_font = get_option('wp_chat_user_font_family') != '' ? get_option('wp_chat_user_font_family') : ''; |
|
669
|
638
|
if($user_font != '' ){ |
|
670
|
|
- $parts = explode(':', $user_font); |
|
671
|
|
- // Create an object |
|
672
|
|
- $user_font_family = new stdClass(); |
|
673
|
|
- // Assign values |
|
674
|
|
- $user_font_family->fontfamily = $parts[0]; |
|
675
|
|
- $user_font_family->fontWeight = isset($parts[1]) ? $parts[1] : '400'; // default weight |
|
676
|
|
- $user_font_family->fontStyle = 'normal'; |
|
639
|
+ $user_font_family = str_replace('\\', '',$user_font); |
|
640
|
+ $user_font_family = json_decode($user_font_family); |
|
641
|
+ $user_font_name = $user_font_family->fontFamily; |
|
642
|
+ $user_font_name = str_replace(' ', '+', $user_font_name); |
|
643
|
+ $user_font_name = str_replace("'","",$user_font_name ); |
|
677
|
644
|
if(get_option('enable_wp_chatbot_custom_color')==1){ |
|
678
|
|
- $user_enqueue_font = 'https://fonts.googleapis.com/css2?family='. $user_font_family->fontfamily; |
|
645
|
+ $user_enqueue_font = 'https://fonts.googleapis.com/css2?family='.$user_font_name; |
|
679
|
646
|
wp_enqueue_style( 'qcld-chatbot-user-google-fonts', $user_enqueue_font, false ); |
|
680
|
647
|
wp_enqueue_style( 'qcld-chatbot-user-google-fonts'); |
|
681
|
648
|
} |
|
682
|
649
|
} |
|
683
|
650
|
|
|
684
|
|
- $bot_font = get_option('wp_chatbot_bot_font') != '' ? get_option('wp_chatbot_bot_font') : ''; |
|
651
|
+ $bot_font = get_option('wp_chat_bot_font_family') != '' ? get_option('wp_chat_bot_font_family') : ''; |
|
685
|
652
|
if($bot_font != '' ){ |
|
686
|
|
- $parts = explode(':', $bot_font); |
|
687
|
|
- // Create an object |
|
688
|
|
- $bot_font_family = new stdClass(); |
|
689
|
|
- // Assign values |
|
690
|
|
- $bot_font_family->fontFamily = $parts[0]; |
|
691
|
|
- $bot_font_family->fontWeight = isset($parts[1]) ? $parts[1] : '400'; // default weight |
|
692
|
|
- $bot_font_family->fontStyle = 'normal'; |
|
693
|
|
- |
|
694
|
|
- |
|
695
|
|
- |
|
653
|
+ $bot_font_family = str_replace('\\', '',$bot_font); |
|
654
|
+ $bot_font_family = json_decode($bot_font_family); |
|
655
|
+ $bot_font_name =$bot_font_family->fontFamily; |
|
656
|
+ $bot_font_name = str_replace(' ', '+', $bot_font_name ); |
|
657
|
+ $bot_font_name = str_replace("'","",$bot_font_name ); |
|
696
|
658
|
if(get_option('enable_wp_chatbot_custom_color')==1){ |
|
697
|
|
- $bot_enqueue_font = 'https://fonts.googleapis.com/css2?family='.$bot_font_family->fontFamily; |
|
659
|
+ $bot_enqueue_font = 'https://fonts.googleapis.com/css2?family='.$bot_font_name; |
|
698
|
660
|
wp_enqueue_style( 'qcld-chatbot-bot-google-fonts', $bot_enqueue_font, false ); |
|
699
|
661
|
wp_enqueue_style( 'qcld-chatbot-bot-google-fonts'); |
|
700
|
662
|
} |
|
701
|
663
|
} |
|
702
|
664
|
|
|
703
|
|
- |
|
704
|
|
- |
|
705
|
665
|
wp_enqueue_style( 'dashicons' ); |
|
706
|
666
|
wp_register_script('qcld-wp-chatbot-slimscroll-js', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/jquery.slimscroll.min.js', basename(__FILE__)), array('jquery'), QCLD_wpCHATBOT_VERSION, true); |
|
707
|
667
|
wp_enqueue_script('qcld-wp-chatbot-slimscroll-js'); |
|
708
|
668
|
wp_register_script('qcld-wp-chatbot-jquery-cookie', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/jquery.cookie.js', basename(__FILE__)), array('jquery'), QCLD_wpCHATBOT_VERSION, true); |
|
@@ -711,16 +671,8 @@ |
|
711
|
671
|
wp_enqueue_script('qcld-wp-chatbot-magnify-popup'); |
|
712
|
672
|
wp_register_script('qcld-wp-chatbot-plugin', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/qcld-wp-chatbot-plugin.js', basename(__FILE__)), array('jquery', 'qcld-wp-chatbot-jquery-cookie','qcld-wp-chatbot-magnify-popup'), QCLD_wpCHATBOT_VERSION, true); |
|
713
|
673
|
wp_enqueue_script('qcld-wp-chatbot-plugin'); |
|
714
|
674
|
|
|
715
|
|
- $nonce = wp_create_nonce('wp_chatbot'); |
|
716
|
|
- // Pass data to JS |
|
717
|
|
- wp_localize_script('qcld-wp-chatbot-plugin', 'qcld_chatbot_obj', [ |
|
718
|
|
- 'ajax_url' => admin_url('admin-ajax.php'), |
|
719
|
|
- 'nonce' => $nonce, |
|
720
|
|
- 'stream_endpoint' => admin_url('admin-ajax.php?action=qcld_stream_openai'), |
|
721
|
|
- ]); |
|
722
|
|
- |
|
723
|
675
|
wp_register_script('qcld-wp-chatbot-front-js', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/qcld-wp-chatbot-front.js', basename(__FILE__)), array('jquery', 'qcld-wp-chatbot-jquery-cookie'), QCLD_wpCHATBOT_VERSION, true); |
|
724
|
676
|
wp_enqueue_script('qcld-wp-chatbot-front-js'); |
|
725
|
677
|
wp_localize_script('qcld-wp-chatbot-front-js', 'wp_chatbot_obj', $wp_chatbot_obj); |
|
726
|
678
|
//wp_register_script('qcld-wp-chatbot-frontend', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/qcld-wp-chatbot-frontend.js', basename(__FILE__)), array('jquery','qcld-wp-chatbot-jquery-cookie'), QCLD_wpCHATBOT_VERSION, true); |
|
@@ -779,14 +731,10 @@ |
|
779
|
731
|
$buttons_bg_color = sanitize_hex_color( get_option('wp_chatbot_buttons_bg_color') ); |
|
780
|
732
|
$buttons_text_color_hover = sanitize_hex_color( get_option('wp_chatbot_buttons_text_color_hover') ); |
|
781
|
733
|
$buttons_bg_color_hover = sanitize_hex_color( get_option('wp_chatbot_buttons_bg_color_hover') ); |
|
782
|
734
|
$user_msg_text_color = sanitize_hex_color( get_option('wp_chatbot_user_msg_text_color') ); |
|
783
|
|
- $wp_chatbot_text_color = sanitize_hex_color( get_option('wp_chatbot_text_color') ); |
|
784
|
735
|
$user_msg_bg_color = sanitize_hex_color( get_option('wp_chatbot_user_msg_bg_color') ); |
|
785
|
736
|
$header_background_color = sanitize_hex_color( get_option('wp_chatbot_header_background_color') ); |
|
786
|
|
- $chatbot_content_max_height = sanitize_text_field( get_option('chatbot_content_max_height') ); |
|
787
|
|
- $chatbot_content_max_height_responsive = sanitize_text_field( get_option('chatbot_content_max_height_responsive') ); |
|
788
|
|
- |
|
789
|
737
|
|
|
790
|
738
|
$inline_chat_custom_styles .= " |
|
791
|
739
|
#wp-chatbot-chat-container, .wp-chatbot-product-description, .wp-chatbot-product-description p,.wp-chatbot-product-quantity label, .wp-chatbot-product-variable label { |
|
792
|
740
|
color: ". $text_color ." !important; |
|
@@ -793,15 +741,8 @@ |
|
793
|
741
|
} |
|
794
|
742
|
#wp-chatbot-chat-container a { |
|
795
|
743
|
color: ". $link_color ." !important; |
|
796
|
744
|
} |
|
797
|
|
- |
|
798
|
|
- #wp-chatbot-chat-container a p{ |
|
799
|
|
- color: ". $link_color ." !important; |
|
800
|
|
- } |
|
801
|
|
- #wp-chatbot-chat-container a p span{ |
|
802
|
|
- color: ". $link_color ." !important; |
|
803
|
|
- } |
|
804
|
745
|
#wp-chatbot-chat-container a:hover { |
|
805
|
746
|
color: ". $link_hover_color ." !important; |
|
806
|
747
|
} |
|
807
|
748
|
|
|
@@ -825,14 +766,9 @@ |
|
825
|
766
|
|
|
826
|
767
|
li.wp-chat-user-msg .wp-chatbot-paragraph { |
|
827
|
768
|
color: ". $user_msg_text_color ." !important; |
|
828
|
769
|
background: ". $user_msg_bg_color ." !important; |
|
829
|
|
- } |
|
830
|
|
- |
|
831
|
|
- ul.wp-chatbot-messages-container li:first-child.wp-chatbot-msg .wp-chatbot-paragraph { |
|
832
|
|
- color: ". $wp_chatbot_text_color ." !important; |
|
833
|
770
|
} |
|
834
|
|
- |
|
835
|
771
|
ul.wp-chatbot-messages-container > li.wp-chatbot-msg > .wp-chatbot-paragraph:before, |
|
836
|
772
|
.wp-chatbot-bubble:before { |
|
837
|
773
|
border-right: 10px solid ". $bot_msg_bg_color ." !important; |
|
838
|
774
|
|
|
@@ -842,9 +778,9 @@ |
|
842
|
778
|
} |
|
843
|
779
|
#wp-chatbot-chat-container .wp-chatbot-header{ |
|
844
|
780
|
background: ". $header_background_color ." !important; |
|
845
|
781
|
} |
|
846
|
|
- .wp-chatbot-container ul.wp-chatbot-messages-container > li.wp-chatbot-msg .chat-container, .wp-chatbot-container .wp-chatbot-agent-profile .wp-chatbot-bubble { |
|
782
|
+ .wp-chatbot-container ul.wp-chatbot-messages-container > li.wp-chatbot-msg .wp-chatbot-paragraph, .wp-chatbot-container .wp-chatbot-agent-profile .wp-chatbot-bubble { |
|
847
|
783
|
color: ". $bot_msg_text_color ." !important; |
|
848
|
784
|
background: ". $bot_msg_bg_color ." !important; |
|
849
|
785
|
} |
|
850
|
786
|
"; |
|
@@ -851,44 +787,23 @@ |
|
851
|
787
|
// Apply the accumulated general chat custom styles. |
|
852
|
788
|
// This ensures these styles are added if the custom color option is enabled. |
|
853
|
789
|
wp_add_inline_style( 'qcld-wp-chatbot-common-style', $inline_chat_custom_styles ); |
|
854
|
790
|
} |
|
855
|
|
- $custom_colors =""; |
|
856
|
|
- if((get_option('enable_wp_chatbot_custom_color')==1) && $user_font != ''){ |
|
791
|
+ if((get_option('enable_wp_chatbot_custom_color')==1) && $user_font != ''){ |
|
857
|
792
|
$custom_colors .=" |
|
858
|
|
- |
|
859
|
|
- |
|
860
|
793
|
#wp-chatbot-messages-container > li.wp-chatbot-msg > .wp-chatbot-paragraph, |
|
861
|
794
|
#wp-chatbot-messages-container > li.wp-chatbot-msg > span{ |
|
862
|
795
|
font-family: ".$bot_font_family->fontFamily."; |
|
863
|
796
|
font-weight: ".$bot_font_family->fontWeight."; |
|
864
|
797
|
font-style: ".$bot_font_family->fontStyle."; |
|
865
|
|
- font-size: ". get_option('wp_chatbot_font_size'). "px; |
|
798
|
+ font-size: ". get_option('wp_chatbot_font_size'). "; |
|
866
|
799
|
} |
|
867
|
|
- |
|
868
|
|
- ul.wp-chatbot-messages-container > li.wp-chatbot-msg .wp-chatbot-paragraph, .wp-chatbot-agent-profile .wp-chatbot-bubble { |
|
869
|
|
- font-family: ".$bot_font_family->fontFamily."; |
|
870
|
|
- font-weight: ".$bot_font_family->fontWeight."; |
|
871
|
|
- font-style: ".$bot_font_family->fontStyle."; |
|
872
|
|
- font-size: ". get_option('wp_chatbot_font_size'). "px; |
|
873
|
|
- } |
|
874
|
|
- |
|
875
|
|
- ul#wp-chatbot-messages-container .wp-chatbot-textanimation span { |
|
876
|
|
- font-family: ".$bot_font_family->fontFamily."; |
|
877
|
|
- font-weight: ".$bot_font_family->fontWeight."; |
|
878
|
|
- font-style: ".$bot_font_family->fontStyle."; |
|
879
|
|
- font-size: ". get_option('wp_chatbot_font_size'). "px; |
|
880
|
|
- } |
|
881
|
|
- |
|
882
|
|
- |
|
883
|
|
- |
|
884
|
|
- |
|
885
|
800
|
"; |
|
886
|
801
|
} |
|
887
|
802
|
if ( get_option('enable_wp_chatbot_custom_color') == 1 && ! empty($bot_font) ) { |
|
888
|
803
|
|
|
889
|
804
|
// Sanitize each CSS-related value |
|
890
|
|
- $font_family = isset( $user_font_family->fontfamily ) ? esc_attr( $user_font_family->fontfamily ) : 'inherit'; |
|
805
|
+ $font_family = isset( $user_font_family->fontFamily ) ? esc_attr( $user_font_family->fontFamily ) : 'inherit'; |
|
891
|
806
|
$font_weight = isset( $user_font_family->fontWeight ) ? esc_attr( $user_font_family->fontWeight ) : 'normal'; |
|
892
|
807
|
$font_style = isset( $user_font_family->fontStyle ) ? esc_attr( $user_font_family->fontStyle ) : 'normal'; |
|
893
|
808
|
$font_size = get_option( 'wp_chatbot_font_size' ); |
|
894
|
809
|
$font_size = esc_attr( trim( $font_size ) ); |
|
@@ -897,9 +812,9 @@ |
|
897
|
812
|
if ( ! preg_match( '/(px|em|rem|%)$/', $font_size ) ) { |
|
898
|
813
|
$font_size .= 'px'; // fallback to px if unit missing. |
|
899
|
814
|
} |
|
900
|
815
|
|
|
901
|
|
- $custom_colors .= " |
|
816
|
+ $custom_colors = " |
|
902
|
817
|
#wp-chatbot-messages-container > li.wp-chat-user-msg > .wp-chatbot-paragraph { |
|
903
|
818
|
font-family: {$font_family}; |
|
904
|
819
|
font-weight: {$font_weight}; |
|
905
|
820
|
font-style: {$font_style}; |
|
@@ -905,9 +820,10 @@ |
|
905
|
820
|
font-style: {$font_style}; |
|
906
|
821
|
font-size: {$font_size}; |
|
907
|
822
|
} |
|
908
|
823
|
"; |
|
909
|
|
- |
|
824
|
+ |
|
825
|
+ wp_add_inline_style( 'qcld-wp-chatbot-common-style', $custom_colors ); |
|
910
|
826
|
} |
|
911
|
827
|
|
|
912
|
828
|
if(get_option('wp_chatbot_custom_css')!=""){ |
|
913
|
829
|
|
|
@@ -912,53 +828,8 @@ |
|
912
|
828
|
if(get_option('wp_chatbot_custom_css')!=""){ |
|
913
|
829
|
|
|
914
|
830
|
wp_add_inline_style( 'qcld-wp-chatbot-common-style', get_option('wp_chatbot_custom_css') ); |
|
915
|
831
|
} |
|
916
|
|
- |
|
917
|
|
- |
|
918
|
|
- |
|
919
|
|
- |
|
920
|
|
- if ( ( get_option( 'chatbot_content_max_height' ) != '' ) ) { |
|
921
|
|
- |
|
922
|
|
- $custom_colors .= ' .slimScrollDiv{ |
|
923
|
|
- height: calc(' . get_option( 'chatbot_content_max_height' ) . 'vh - 270px) !important; |
|
924
|
|
- max-height: calc(' . get_option( 'chatbot_content_max_height' ) . 'vh - 270px) !important; |
|
925
|
|
- }'; |
|
926
|
|
- |
|
927
|
|
- $custom_colors .= 'div#wp-chatbot-board-container{ |
|
928
|
|
- height: calc(' . get_option( 'chatbot_content_max_height' ) . 'vh - 100px) !important; |
|
929
|
|
- max-height: calc(' . get_option( 'chatbot_content_max_height' ) . 'vh - 100px) !important; |
|
930
|
|
- }'; |
|
931
|
|
- |
|
932
|
|
- $custom_colors .= '.wp-chatbot-content{ |
|
933
|
|
- height: calc(' . get_option( 'chatbot_content_max_height' ) . 'vh - 270px) !important; |
|
934
|
|
- max-height: calc(' . get_option( 'chatbot_content_max_height' ) . 'vh - 270px) !important; |
|
935
|
|
- }'; |
|
936
|
|
- |
|
937
|
|
- |
|
938
|
|
- |
|
939
|
|
- $custom_colors .= ' |
|
940
|
|
- @media screen and (max-width: 480px) { |
|
941
|
|
- div#wp-chatbot-board-container{ |
|
942
|
|
- height: calc(' . get_option( 'chatbot_content_max_height_responsive' ) . 'vh - 0px) !important; |
|
943
|
|
- max-height: calc(' . get_option( 'chatbot_content_max_height_responsive' ) . 'vh - 0px) !important; |
|
944
|
|
- } |
|
945
|
|
- |
|
946
|
|
- .slimScrollDiv{ |
|
947
|
|
- height: calc(' . get_option( 'chatbot_content_max_height_responsive' ) . 'vh - 170px) !important; |
|
948
|
|
- max-height: calc(' . get_option( 'chatbot_content_max_height_responsive' ) . 'vh - 170px) !important; |
|
949
|
|
- } |
|
950
|
|
- |
|
951
|
|
- .wp-chatbot-content{ |
|
952
|
|
- height: calc(' . get_option( 'chatbot_content_max_height_responsive' ) . 'vh - 170px) !important; |
|
953
|
|
- max-height: calc(' . get_option( 'chatbot_content_max_height_responsive' ) . 'vh - 170px) !important; |
|
954
|
|
- } |
|
955
|
|
- } |
|
956
|
|
- '; |
|
957
|
|
- |
|
958
|
|
- |
|
959
|
|
- } |
|
960
|
|
- wp_add_inline_style( 'qcld-wp-chatbot-common-style', $custom_colors ); |
|
961
|
832
|
} |
|
962
|
833
|
public function qcld_wb_chatbot_str_replace($messages=array()){ |
|
963
|
834
|
$allowed_html = array( |
|
964
|
835
|
'a' => array( |
|
@@ -1066,15 +937,15 @@ |
|
1066
|
937
|
if (is_array($options) && count($options) > 0) { |
|
1067
|
938
|
foreach ($options as $key => $value) { |
|
1068
|
939
|
?> |
|
1069
|
940
|
<div class="row" class="wp-chatbot-lng-item"> |
|
1070
|
|
- <div class="col-xs-11"> |
|
941
|
+ <div class="col-xs-10"> |
|
1071
|
942
|
<input type="text" |
|
1072
|
943
|
class="form-control qc-opt-dcs-font" |
|
1073
|
944
|
name="<?php echo esc_attr( $option_name ); ?>[]" |
|
1074
|
945
|
value="<?php echo esc_attr(str_replace('\\', '', $value)); ?>"> |
|
1075
|
946
|
</div> |
|
1076
|
|
- <div class="col-xs-1"> |
|
947
|
+ <div class="col-xs-2"> |
|
1077
|
948
|
<button type="button" class="btn btn-danger btn-sm wp-chatbot-lng-item-remove"> <span class="glyphicon glyphicon-remove"></span> </button> |
|
1078
|
949
|
</div> |
|
1079
|
950
|
</div> |
|
1080
|
951
|
<?php |
|
@@ -1080,15 +951,15 @@ |
|
1080
|
951
|
<?php |
|
1081
|
952
|
} |
|
1082
|
953
|
} else { ?> |
|
1083
|
954
|
<div class="row" class="wp-chatbot-lng-item"> |
|
1084
|
|
-<div class="col-xs-11"> |
|
955
|
+<div class="col-xs-10"> |
|
1085
|
956
|
<input type="text" |
|
1086
|
957
|
class="form-control qc-opt-dcs-font" |
|
1087
|
958
|
name="<?php echo esc_attr( $option_name ); ?>[]" |
|
1088
|
959
|
value="<?php echo esc_attr($option_text); ?>"> |
|
1089
|
960
|
</div> |
|
1090
|
|
-<div class="col-xs-1"> <span class="wp-chatbot-lng-item-remove"> |
|
961
|
+<div class="col-xs-2"> <span class="wp-chatbot-lng-item-remove"> |
|
1091
|
962
|
<?php esc_html_e('X', 'chatbot'); ?> |
|
1092
|
963
|
</span> </div> |
|
1093
|
964
|
</div> |
|
1094
|
965
|
<?php } ?> |
|
@@ -1093,9 +964,9 @@ |
|
1093
|
964
|
</div> |
|
1094
|
965
|
<?php } ?> |
|
1095
|
966
|
</div> |
|
1096
|
967
|
<div class="row"> |
|
1097
|
|
- <div class="col-sm-1 col-sm-offset-11"> |
|
968
|
+ <div class="col-sm-2 col-sm-offset-10"> |
|
1098
|
969
|
<button type="button" class="btn btn-success btn-sm wp-chatbot-lng-item-add"> <span class="glyphicon glyphicon-plus"></span> </button> |
|
1099
|
970
|
</div> |
|
1100
|
971
|
</div> |
|
1101
|
972
|
<?php |
|
@@ -1103,181 +974,137 @@ |
|
1103
|
974
|
|
|
1104
|
975
|
function qcld_wb_chatbot_save_options() |
|
1105
|
976
|
{ |
|
1106
|
977
|
//global $wpcommerce; |
|
1107
|
|
- if (isset($_POST['_wpnonce']) && wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['_wpnonce'])), 'wp_chatbot') && current_user_can('manage_options')) { |
|
978
|
+ if (isset($_POST['_wpnonce']) && wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['_wpnonce'])), 'wp_chatbot')) { |
|
1108
|
979
|
// Check if the form is submitted or not. |
|
1109
|
|
- $submit = sanitize_text_field(wp_unslash($_POST['submit'])); |
|
980
|
+ $submit = sanitize_text_field($_POST['submit']); |
|
1110
|
981
|
if (isset($submit)) { |
|
1111
|
982
|
//wpwboticon position settings. |
|
1112
|
983
|
if (isset($_POST["wp_chatbot_position_x"])) { |
|
1113
|
|
- $wp_chatbot_position_x = intval(sanitize_text_field(wp_unslash($_POST["wp_chatbot_position_x"]))); |
|
984
|
+ $wp_chatbot_position_x = intval(sanitize_text_field($_POST["wp_chatbot_position_x"])); |
|
1114
|
985
|
update_option('wp_chatbot_position_x', $wp_chatbot_position_x); |
|
1115
|
986
|
} |
|
1116
|
987
|
if (isset($_POST["wp_chatbot_position_y"])) { |
|
1117
|
|
- $wp_chatbot_position_y = intval(sanitize_text_field(wp_unslash($_POST["wp_chatbot_position_y"]))); |
|
988
|
+ $wp_chatbot_position_y = intval(sanitize_text_field($_POST["wp_chatbot_position_y"])); |
|
1118
|
989
|
update_option('wp_chatbot_position_y', $wp_chatbot_position_y); |
|
1119
|
990
|
} |
|
1120
|
991
|
//product search options |
|
1121
|
992
|
if(isset($_POST['qlcd_wp_chatbot_search_option'])){ |
|
1122
|
|
- $qlcd_wp_chatbot_search_option = sanitize_text_field(wp_unslash($_POST['qlcd_wp_chatbot_search_option'])); |
|
993
|
+ $qlcd_wp_chatbot_search_option = sanitize_text_field($_POST['qlcd_wp_chatbot_search_option']); |
|
1123
|
994
|
update_option('qlcd_wp_chatbot_search_option', $qlcd_wp_chatbot_search_option); |
|
1124
|
995
|
} |
|
1125
|
|
- if(isset( $_POST["disable_floating_button"])){ |
|
1126
|
|
- $disable_floating_button = sanitize_text_field(wp_unslash($_POST["disable_floating_button"])); |
|
1127
|
|
- }else{ $disable_floating_button='';} |
|
1128
|
|
- update_option('disable_floating_button', wp_unslash($disable_floating_button)); |
|
996
|
+ |
|
1129
|
997
|
|
|
1130
|
|
- if(isset( $_POST["wpbot_enable_on_search"])){ |
|
1131
|
|
- $wpbot_enable_on_search = sanitize_text_field(wp_unslash($_POST["wpbot_enable_on_search"])); |
|
1132
|
|
- }else{ $wpbot_enable_on_search='';} |
|
1133
|
|
- update_option('wpbot_enable_on_search', wp_unslash($wpbot_enable_on_search)); |
|
1134
|
|
- |
|
1135
|
998
|
if(isset( $_POST["skip_wp_greetings_donot_show_menu"])){ |
|
1136
|
|
- $skip_wp_greetings_donot_show_menu = sanitize_text_field(wp_unslash($_POST["skip_wp_greetings_donot_show_menu"])); |
|
999
|
+ $skip_wp_greetings_donot_show_menu = sanitize_text_field($_POST["skip_wp_greetings_donot_show_menu"]); |
|
1137
|
1000
|
}else{ $skip_wp_greetings_donot_show_menu='';} |
|
1138
|
1001
|
update_option('skip_wp_greetings_donot_show_menu', wp_unslash($skip_wp_greetings_donot_show_menu)); |
|
1139
|
1002
|
|
|
1140
|
1003
|
if(isset( $_POST["skip_wp_greetings"])){ |
|
1141
|
|
- $skip_wp_greetings = sanitize_text_field(wp_unslash($_POST["skip_wp_greetings"])); |
|
1004
|
+ $skip_wp_greetings = sanitize_text_field($_POST["skip_wp_greetings"]); |
|
1142
|
1005
|
}else{ $skip_wp_greetings='';} |
|
1143
|
1006
|
update_option('skip_wp_greetings', wp_unslash($skip_wp_greetings)); |
|
1144
|
|
- |
|
1145
|
|
- if( $skip_wp_greetings == '1' || $skip_wp_greetings_donot_show_menu == '1' ){ |
|
1146
|
|
- $ask_email_wp_greetings = ''; |
|
1147
|
|
- $enable_asking_for_email = ''; |
|
1148
|
|
- } else { |
|
1149
|
|
- if (isset( $_POST["ask_email_wp_greetings"])) { |
|
1150
|
|
- $ask_email_wp_greetings = sanitize_text_field(wp_unslash($_POST["ask_email_wp_greetings"])); |
|
1151
|
|
- } else { |
|
1152
|
|
- $ask_email_wp_greetings = ''; |
|
1153
|
|
- } |
|
1154
|
|
- if (isset( $_POST["enable_asking_for_email"])) { |
|
1155
|
|
- $enable_asking_for_email = sanitize_text_field(wp_unslash($_POST["enable_asking_for_email"])); |
|
1156
|
|
- } else { |
|
1157
|
|
- $enable_asking_for_email = ''; |
|
1158
|
|
- } |
|
1159
|
|
- } |
|
1160
|
|
- update_option('ask_email_wp_greetings', wp_unslash($ask_email_wp_greetings)); |
|
1161
|
|
- update_option('enable_asking_for_email', wp_unslash($enable_asking_for_email)); |
|
1162
|
1007
|
//Enable /disable wpwbot |
|
1163
|
1008
|
if(isset( $_POST["disable_wp_chatbot"])){ |
|
1164
|
|
- $disable_wp_chatbot = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot"])); |
|
1009
|
+ $disable_wp_chatbot = sanitize_text_field($_POST["disable_wp_chatbot"]); |
|
1165
|
1010
|
}else{ $disable_wp_chatbot='';} |
|
1166
|
1011
|
update_option('disable_wp_chatbot', wp_unslash($disable_wp_chatbot)); |
|
1167
|
1012
|
|
|
1168
|
1013
|
if(isset( $_POST["qlcd_wp_chatbot_admin_email"])){ |
|
1169
|
|
- $qlcd_wp_chatbot_admin_email = sanitize_email(wp_unslash($_POST["qlcd_wp_chatbot_admin_email"])); |
|
1014
|
+ $qlcd_wp_chatbot_admin_email = sanitize_email($_POST["qlcd_wp_chatbot_admin_email"]); |
|
1170
|
1015
|
}else{ $qlcd_wp_chatbot_admin_email='';} |
|
1171
|
1016
|
update_option('qlcd_wp_chatbot_admin_email', wp_unslash($qlcd_wp_chatbot_admin_email)); |
|
1172
|
1017
|
|
|
1173
|
1018
|
|
|
1174
|
1019
|
if(isset( $_POST["open_links_new_window"])){ |
|
1175
|
|
- $open_links_new_window = sanitize_text_field(wp_unslash($_POST["open_links_new_window"])); |
|
1020
|
+ $open_links_new_window = sanitize_text_field($_POST["open_links_new_window"]); |
|
1176
|
1021
|
}else{ $open_links_new_window='';} |
|
1177
|
1022
|
update_option('open_links_new_window', wp_unslash($open_links_new_window)); |
|
1178
|
1023
|
|
|
1179
|
1024
|
|
|
1180
|
1025
|
if(isset( $_POST["qlcd_wp_chatbot_from_email"])){ |
|
1181
|
|
- $qlcd_wp_chatbot_from_email = sanitize_email(wp_unslash($_POST["qlcd_wp_chatbot_from_email"])); |
|
1026
|
+ $qlcd_wp_chatbot_from_email = sanitize_email($_POST["qlcd_wp_chatbot_from_email"]); |
|
1182
|
1027
|
}else{ $qlcd_wp_chatbot_from_email='';} |
|
1183
|
1028
|
update_option('qlcd_wp_chatbot_from_email', wp_unslash($qlcd_wp_chatbot_from_email)); |
|
1184
|
1029
|
|
|
1185
|
1030
|
if(isset( $_POST["disable_wp_chatbot_on_mobile"])) { |
|
1186
|
|
- $disable_wp_chatbot_on_mobile = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_on_mobile"])); |
|
1031
|
+ $disable_wp_chatbot_on_mobile = sanitize_text_field($_POST["disable_wp_chatbot_on_mobile"]); |
|
1187
|
1032
|
}else{ $disable_wp_chatbot_on_mobile='';} |
|
1188
|
1033
|
update_option('disable_wp_chatbot_on_mobile', wp_unslash($disable_wp_chatbot_on_mobile)); |
|
1189
|
1034
|
if(isset( $_POST["disable_wp_chatbot_product_search"])) { |
|
1190
|
|
- $disable_wp_chatbot_product_search = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_product_search"])); |
|
1035
|
+ $disable_wp_chatbot_product_search = sanitize_text_field($_POST["disable_wp_chatbot_product_search"]); |
|
1191
|
1036
|
}else{ $disable_wp_chatbot_product_search='';} |
|
1192
|
1037
|
update_option('disable_wp_chatbot_product_search', wp_unslash($disable_wp_chatbot_product_search)); |
|
1193
|
1038
|
if(isset( $_POST["disable_wp_chatbot_catalog"])) { |
|
1194
|
|
- $disable_wp_chatbot_catalog= sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_catalog"])); |
|
1039
|
+ $disable_wp_chatbot_catalog= sanitize_text_field($_POST["disable_wp_chatbot_catalog"]); |
|
1195
|
1040
|
}else{ $disable_wp_chatbot_catalog='';} |
|
1196
|
1041
|
update_option('disable_wp_chatbot_catalog', wp_unslash($disable_wp_chatbot_catalog)); |
|
1197
|
1042
|
if(isset( $_POST["disable_wp_chatbot_order_status"])) { |
|
1198
|
|
- $disable_wp_chatbot_order_status = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_order_status"])); |
|
1043
|
+ $disable_wp_chatbot_order_status = sanitize_text_field($_POST["disable_wp_chatbot_order_status"]); |
|
1199
|
1044
|
}else{ $disable_wp_chatbot_order_status='';} |
|
1200
|
1045
|
update_option('disable_wp_chatbot_order_status', wp_unslash($disable_wp_chatbot_order_status)); |
|
1201
|
1046
|
if(isset( $_POST["disable_wp_chatbot_notification"])) { |
|
1202
|
|
- $disable_wp_chatbot_notification = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_notification"])); |
|
1047
|
+ $disable_wp_chatbot_notification = sanitize_text_field($_POST["disable_wp_chatbot_notification"]); |
|
1203
|
1048
|
}else{ $disable_wp_chatbot_notification='1';} |
|
1204
|
1049
|
update_option('disable_wp_chatbot_notification', wp_unslash($disable_wp_chatbot_notification)); |
|
1205
|
1050
|
|
|
1206
|
1051
|
if(isset( $_POST["enable_wp_chatbot_rtl"])) { |
|
1207
|
|
- $enable_wp_chatbot_rtl = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_rtl"])); |
|
1052
|
+ $enable_wp_chatbot_rtl = sanitize_text_field($_POST["enable_wp_chatbot_rtl"]); |
|
1208
|
1053
|
}else{ $enable_wp_chatbot_rtl='';} |
|
1209
|
1054
|
update_option('enable_wp_chatbot_rtl', wp_unslash($enable_wp_chatbot_rtl)); |
|
1210
|
|
- |
|
1211
|
|
- if(isset( $_POST["chatbot_content_max_height"])) { |
|
1212
|
|
- $chatbot_content_max_height = sanitize_text_field(wp_unslash($_POST["chatbot_content_max_height"])); |
|
1213
|
|
- }else{ $chatbot_content_max_height='';} |
|
1214
|
|
- update_option('chatbot_content_max_height', wp_unslash($chatbot_content_max_height)); |
|
1215
|
|
- |
|
1216
|
|
- |
|
1217
|
|
- if(isset( $_POST["chatbot_content_max_height_responsive"])) { |
|
1218
|
|
- $chatbot_content_max_height_responsive = sanitize_text_field(wp_unslash($_POST["chatbot_content_max_height_responsive"])); |
|
1219
|
|
- }else{ $chatbot_content_max_height_responsive='';} |
|
1220
|
|
- update_option('chatbot_content_max_height_responsive', wp_unslash($chatbot_content_max_height_responsive)); |
|
1221
|
|
- |
|
1222
|
|
- |
|
1055
|
+ |
|
1223
|
1056
|
if(isset( $_POST["show_menu_after_greetings"])) { |
|
1224
|
|
- $show_menu_after_greetings = sanitize_text_field(wp_unslash($_POST["show_menu_after_greetings"])); |
|
1057
|
+ $show_menu_after_greetings = sanitize_text_field($_POST["show_menu_after_greetings"]); |
|
1225
|
1058
|
}else{ $show_menu_after_greetings='';} |
|
1226
|
1059
|
update_option('show_menu_after_greetings', wp_unslash($show_menu_after_greetings)); |
|
1227
|
|
- |
|
1228
|
|
- if(isset( $_POST["disable_back_to_start_menu"])) { |
|
1229
|
|
- $disable_back_to_start_menu = sanitize_text_field(wp_unslash($_POST["disable_back_to_start_menu"])); |
|
1230
|
|
- }else{ $disable_back_to_start_menu='';} |
|
1231
|
|
- update_option('disable_back_to_start_menu', wp_unslash($disable_back_to_start_menu)); |
|
1232
|
|
- |
|
1233
|
1060
|
if(isset( $_POST["enable_chat_session"])) { |
|
1234
|
|
- $enable_chat_session = sanitize_text_field(wp_unslash($_POST["enable_chat_session"])); |
|
1061
|
+ $enable_chat_session = sanitize_text_field($_POST["enable_chat_session"]); |
|
1235
|
1062
|
}else{ $enable_chat_session='';} |
|
1236
|
1063
|
update_option('enable_chat_session', wp_unslash($enable_chat_session)); |
|
1237
|
1064
|
|
|
1238
|
1065
|
|
|
1239
|
1066
|
if(isset( $_POST["enable_wp_chatbot_mobile_full_screen"])) { |
|
1240
|
|
- $enable_wp_chatbot_mobile_full_screen = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_mobile_full_screen"])); |
|
1067
|
+ $enable_wp_chatbot_mobile_full_screen = sanitize_text_field($_POST["enable_wp_chatbot_mobile_full_screen"]); |
|
1241
|
1068
|
}else{ $enable_wp_chatbot_mobile_full_screen='';} |
|
1242
|
1069
|
update_option('enable_wp_chatbot_mobile_full_screen', wp_unslash($enable_wp_chatbot_mobile_full_screen)); |
|
1243
|
1070
|
|
|
1244
|
1071
|
if(isset( $_POST["wpbot_preloading_time"])) { |
|
1245
|
|
- $wpbot_preloading_time = sanitize_text_field(wp_unslash($_POST["wpbot_preloading_time"])); |
|
1246
|
|
- }else{ $wpbot_preloading_time='800';} |
|
1072
|
+ $wpbot_preloading_time = sanitize_text_field($_POST["wpbot_preloading_time"]); |
|
1073
|
+ }else{ $wpbot_preloading_time='100';} |
|
1247
|
1074
|
update_option('wpbot_preloading_time', wp_unslash($wpbot_preloading_time)); |
|
1248
|
1075
|
|
|
1249
|
1076
|
if(isset( $_POST["disable_wp_chatbot_icon_animation"])) { |
|
1250
|
|
- $disable_wp_chatbot_icon_animation = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_icon_animation"])); |
|
1077
|
+ $disable_wp_chatbot_icon_animation = sanitize_text_field($_POST["disable_wp_chatbot_icon_animation"]); |
|
1251
|
1078
|
}else{ $disable_wp_chatbot_icon_animation='';} |
|
1252
|
1079
|
update_option('disable_wp_chatbot_icon_animation', wp_unslash($disable_wp_chatbot_icon_animation)); |
|
1253
|
1080
|
//Enable /disable Cart Item Number |
|
1254
|
1081
|
if(isset( $_POST["disable_wp_chatbot_cart_item_number"])) { |
|
1255
|
|
- $disable_wp_chatbot_cart_item_number = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_cart_item_number"])); |
|
1082
|
+ $disable_wp_chatbot_cart_item_number = sanitize_text_field($_POST["disable_wp_chatbot_cart_item_number"]); |
|
1256
|
1083
|
}else{ $disable_wp_chatbot_cart_item_number='';} |
|
1257
|
1084
|
update_option('disable_wp_chatbot_cart_item_number', wp_unslash($disable_wp_chatbot_cart_item_number)); |
|
1258
|
1085
|
//Enable /disable featured products button. |
|
1259
|
1086
|
if(isset( $_POST["disable_wp_chatbot_featured_product"])) { |
|
1260
|
|
- $disable_wp_chatbot_featured_product = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_featured_product"])); |
|
1087
|
+ $disable_wp_chatbot_featured_product = sanitize_text_field($_POST["disable_wp_chatbot_featured_product"]); |
|
1261
|
1088
|
}else{ $disable_wp_chatbot_featured_product='';} |
|
1262
|
1089
|
update_option('disable_wp_chatbot_featured_product', wp_unslash($disable_wp_chatbot_featured_product)); |
|
1263
|
1090
|
//Enable /disable sale products button |
|
1264
|
1091
|
if(isset( $_POST["disable_wp_chatbot_sale_product"])) { |
|
1265
|
|
- $disable_wp_chatbot_sale_product = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_sale_product"])); |
|
1092
|
+ $disable_wp_chatbot_sale_product = sanitize_text_field($_POST["disable_wp_chatbot_sale_product"]); |
|
1266
|
1093
|
}else{ $disable_wp_chatbot_sale_product='';} |
|
1267
|
1094
|
update_option('disable_wp_chatbot_sale_product', wp_unslash($disable_wp_chatbot_sale_product)); |
|
1268
|
1095
|
//Enable Product details page. |
|
1269
|
1096
|
if(isset( $_POST["wp_chatbot_open_product_detail"])) { |
|
1270
|
|
- $wp_chatbot_open_product_detail = sanitize_text_field(wp_unslash($_POST["wp_chatbot_open_product_detail"])); |
|
1097
|
+ $wp_chatbot_open_product_detail = sanitize_text_field($_POST["wp_chatbot_open_product_detail"]); |
|
1271
|
1098
|
}else{ $wp_chatbot_open_product_detail='';} |
|
1272
|
1099
|
update_option('wp_chatbot_open_product_detail', wp_unslash($wp_chatbot_open_product_detail)); |
|
1273
|
1100
|
//product order and order by |
|
1274
|
1101
|
if(isset($_POST['qlcd_wp_chatbot_product_orderby'])){ |
|
1275
|
|
- $qlcd_wp_chatbot_product_orderby = sanitize_text_field(wp_unslash($_POST['qlcd_wp_chatbot_product_orderby'])); |
|
1102
|
+ $qlcd_wp_chatbot_product_orderby = sanitize_text_field($_POST['qlcd_wp_chatbot_product_orderby']); |
|
1276
|
1103
|
update_option('qlcd_wp_chatbot_product_orderby', sanitize_text_field($qlcd_wp_chatbot_product_orderby)); |
|
1277
|
1104
|
} |
|
1278
|
1105
|
if(isset($_POST['qlcd_wp_chatbot_product_order'])){ |
|
1279
|
|
- $qlcd_wp_chatbot_product_order = sanitize_text_field(wp_unslash($_POST['qlcd_wp_chatbot_product_order'])); |
|
1106
|
+ $qlcd_wp_chatbot_product_order = sanitize_text_field($_POST['qlcd_wp_chatbot_product_order']); |
|
1280
|
1107
|
update_option('qlcd_wp_chatbot_product_order', sanitize_text_field($qlcd_wp_chatbot_product_order)); |
|
1281
|
1108
|
} |
|
1282
|
1109
|
|
|
1283
|
1110
|
|
|
@@ -1282,53 +1109,53 @@ |
|
1282
|
1109
|
|
|
1283
|
1110
|
|
|
1284
|
1111
|
//Product per page settings. |
|
1285
|
1112
|
if (isset($_POST["qlcd_wp_chatbot_ppp"])) { |
|
1286
|
|
- $qlcd_wp_chatbot_ppp = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_ppp"])); |
|
1113
|
+ $qlcd_wp_chatbot_ppp = sanitize_text_field($_POST["qlcd_wp_chatbot_ppp"]); |
|
1287
|
1114
|
update_option('qlcd_wp_chatbot_ppp', intval($qlcd_wp_chatbot_ppp)); |
|
1288
|
1115
|
} |
|
1289
|
1116
|
if(isset( $_POST["wp_chatbot_exclude_stock_out_product"])) { |
|
1290
|
|
- $wp_chatbot_exclude_stock_out_product = sanitize_text_field(wp_unslash($_POST['wp_chatbot_exclude_stock_out_product'])); |
|
1117
|
+ $wp_chatbot_exclude_stock_out_product = sanitize_text_field($_POST['wp_chatbot_exclude_stock_out_product']); |
|
1291
|
1118
|
}else{ $wp_chatbot_exclude_stock_out_product='';} |
|
1292
|
1119
|
update_option('wp_chatbot_exclude_stock_out_product', wp_unslash($wp_chatbot_exclude_stock_out_product)); |
|
1293
|
1120
|
if(isset( $_POST["wp_chatbot_show_parent_category"])) { |
|
1294
|
|
- $wp_chatbot_show_parent_category = sanitize_text_field(wp_unslash($_POST['wp_chatbot_show_parent_category'])); |
|
1121
|
+ $wp_chatbot_show_parent_category = sanitize_text_field($_POST['wp_chatbot_show_parent_category']); |
|
1295
|
1122
|
}else{ $wp_chatbot_show_parent_category='';} |
|
1296
|
1123
|
update_option('wp_chatbot_show_parent_category', wp_unslash($wp_chatbot_show_parent_category)); |
|
1297
|
1124
|
if(isset( $_POST["wp_chatbot_show_sub_category"])) { |
|
1298
|
|
- $wp_chatbot_show_sub_category = sanitize_text_field(wp_unslash($_POST['wp_chatbot_show_sub_category'])); |
|
1125
|
+ $wp_chatbot_show_sub_category = sanitize_text_field($_POST['wp_chatbot_show_sub_category']); |
|
1299
|
1126
|
}else{ $wp_chatbot_show_sub_category='';} |
|
1300
|
1127
|
update_option('wp_chatbot_show_sub_category', wp_unslash($wp_chatbot_show_sub_category)); |
|
1301
|
1128
|
if (isset($_POST["qlcd_wp_chatbot_order_user"])) { |
|
1302
|
|
- $qlcd_wp_chatbot_order_user = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_order_user"])); |
|
1129
|
+ $qlcd_wp_chatbot_order_user = sanitize_text_field($_POST["qlcd_wp_chatbot_order_user"]); |
|
1303
|
1130
|
update_option('qlcd_wp_chatbot_order_user', sanitize_text_field($qlcd_wp_chatbot_order_user)); |
|
1304
|
1131
|
} |
|
1305
|
1132
|
|
|
1306
|
1133
|
if(isset( $_POST["qc_wpbot_menu_order"]) && !empty($_POST["qc_wpbot_menu_order"])) { |
|
1307
|
|
- $qc_wpbot_menu_order = wp_kses_post(wp_unslash($_POST["qc_wpbot_menu_order"])); |
|
1134
|
+ $qc_wpbot_menu_order = wp_kses_post($_POST["qc_wpbot_menu_order"]); |
|
1308
|
1135
|
}else{ $qc_wpbot_menu_order='';} |
|
1309
|
1136
|
update_option('qc_wpbot_menu_order', ($qc_wpbot_menu_order)); |
|
1310
|
1137
|
|
|
1311
|
1138
|
//wpwBot Load control |
|
1312
|
1139
|
if(isset($_POST["wp_chatbot_show_home_page"])){ |
|
1313
|
|
- $wp_chatbot_show_home_page = sanitize_key((wp_unslash($_POST["wp_chatbot_show_home_page"]))); |
|
1140
|
+ $wp_chatbot_show_home_page = sanitize_key(($_POST["wp_chatbot_show_home_page"])); |
|
1314
|
1141
|
update_option('wp_chatbot_show_home_page', $wp_chatbot_show_home_page); |
|
1315
|
1142
|
} |
|
1316
|
1143
|
|
|
1317
|
1144
|
|
|
1318
|
1145
|
if(isset($_POST["wp_chatbot_show_posts"])){ |
|
1319
|
|
- $wp_chatbot_show_posts = sanitize_key((wp_unslash($_POST["wp_chatbot_show_posts"]))); |
|
1146
|
+ $wp_chatbot_show_posts = sanitize_key(($_POST["wp_chatbot_show_posts"])); |
|
1320
|
1147
|
update_option('wp_chatbot_show_posts', $wp_chatbot_show_posts); |
|
1321
|
1148
|
} |
|
1322
|
1149
|
|
|
1323
|
1150
|
|
|
1324
|
1151
|
if(isset($_POST["wp_chatbot_show_pages"])){ |
|
1325
|
|
- $wp_chatbot_show_pages = sanitize_key((wp_unslash($_POST["wp_chatbot_show_pages"]))); |
|
1152
|
+ $wp_chatbot_show_pages = sanitize_key(($_POST["wp_chatbot_show_pages"])); |
|
1326
|
1153
|
update_option('wp_chatbot_show_pages', $wp_chatbot_show_pages); |
|
1327
|
1154
|
} |
|
1328
|
1155
|
|
|
1329
|
1156
|
if(isset( $_POST["wp_chatbot_show_pages_list"])) { |
|
1330
|
|
- $wp_chatbot_show_pages_list = wp_parse_id_list(wp_unslash($_POST["wp_chatbot_show_pages_list"])); |
|
1157
|
+ $wp_chatbot_show_pages_list = wp_parse_id_list($_POST["wp_chatbot_show_pages_list"]); |
|
1331
|
1158
|
update_option('wp_chatbot_show_pages_list', maybe_serialize(sanitize_array($wp_chatbot_show_pages_list))); |
|
1332
|
1159
|
}else{ |
|
1333
|
1160
|
$wp_chatbot_show_pages_list=''; |
|
1334
|
1161
|
update_option('wp_chatbot_show_pages_list', maybe_serialize(sanitize_array($wp_chatbot_show_pages_list))); |
|
@@ -1333,9 +1160,9 @@ |
|
1333
|
1160
|
$wp_chatbot_show_pages_list=''; |
|
1334
|
1161
|
update_option('wp_chatbot_show_pages_list', maybe_serialize(sanitize_array($wp_chatbot_show_pages_list))); |
|
1335
|
1162
|
} |
|
1336
|
1163
|
if(isset( $_POST["wp_chatbot_exclude_post_list"])) { |
|
1337
|
|
- $wp_chatbot_exclude_post_list = wp_unslash($_POST["wp_chatbot_exclude_post_list"]); |
|
1164
|
+ $wp_chatbot_exclude_post_list = $_POST["wp_chatbot_exclude_post_list"]; |
|
1338
|
1165
|
update_option('wp_chatbot_exclude_post_list', maybe_serialize(sanitize_array($wp_chatbot_exclude_post_list))); |
|
1339
|
1166
|
}else{ |
|
1340
|
1167
|
$wp_chatbot_exclude_post_list=''; |
|
1341
|
1168
|
update_option('wp_chatbot_exclude_post_list', maybe_serialize(sanitize_array($wp_chatbot_exclude_post_list))); |
|
@@ -1341,9 +1168,9 @@ |
|
1341
|
1168
|
update_option('wp_chatbot_exclude_post_list', maybe_serialize(sanitize_array($wp_chatbot_exclude_post_list))); |
|
1342
|
1169
|
} |
|
1343
|
1170
|
|
|
1344
|
1171
|
if(isset($_POST["wp_chatbot_show_wpcommerce"])){ |
|
1345
|
|
- $wp_chatbot_show_wpcommerce = sanitize_key((wp_unslash($_POST["wp_chatbot_show_wpcommerce"]))); |
|
1172
|
+ $wp_chatbot_show_wpcommerce = sanitize_key(($_POST["wp_chatbot_show_wpcommerce"])); |
|
1346
|
1173
|
update_option('wp_chatbot_show_wpcommerce', $wp_chatbot_show_wpcommerce); |
|
1347
|
1174
|
} |
|
1348
|
1175
|
|
|
1349
|
1176
|
|
|
@@ -1348,51 +1175,45 @@ |
|
1348
|
1175
|
|
|
1349
|
1176
|
|
|
1350
|
1177
|
//Stop Words Settings |
|
1351
|
1178
|
if (isset($_POST["qlcd_wp_chatbot_stop_words_name"])) { |
|
1352
|
|
- $qlcd_wp_chatbot_stop_words_name = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_stop_words_name"])); |
|
1179
|
+ $qlcd_wp_chatbot_stop_words_name = sanitize_text_field($_POST["qlcd_wp_chatbot_stop_words_name"]); |
|
1353
|
1180
|
update_option('qlcd_wp_chatbot_stop_words_name', $qlcd_wp_chatbot_stop_words_name); |
|
1354
|
1181
|
} |
|
1355
|
1182
|
if (isset($_POST["qlcd_wp_chatbot_stop_words"])) { |
|
1356
|
|
- $qlcd_wp_chatbot_stop_words = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_stop_words"])); |
|
1183
|
+ $qlcd_wp_chatbot_stop_words = sanitize_text_field($_POST["qlcd_wp_chatbot_stop_words"]); |
|
1357
|
1184
|
update_option('qlcd_wp_chatbot_stop_words', $qlcd_wp_chatbot_stop_words); |
|
1358
|
1185
|
} |
|
1359
|
1186
|
//wpwbot icon settings. |
|
1360
|
|
- $wp_chatbot_icon = isset( $_POST['wp_chatbot_icon'] ) ? sanitize_text_field(wp_unslash($_POST['wp_chatbot_icon'])) : 'icon-3.png'; |
|
1187
|
+ $wp_chatbot_icon = isset( $_POST['wp_chatbot_icon'] ) ? sanitize_text_field($_POST['wp_chatbot_icon']) : 'icon-3.png'; |
|
1361
|
1188
|
update_option('wp_chatbot_icon', $wp_chatbot_icon); |
|
1362
|
1189
|
|
|
1363
|
|
- $wp_chatbot_floatingiconbg_color = isset( $_POST['wp_chatbot_floatingiconbg_color'] ) ? sanitize_text_field(wp_unslash($_POST['wp_chatbot_floatingiconbg_color'])) : '#fff'; |
|
1190
|
+ $wp_chatbot_floatingiconbg_color = isset( $_POST['wp_chatbot_floatingiconbg_color'] ) ? sanitize_text_field($_POST['wp_chatbot_floatingiconbg_color']) : '#fff'; |
|
1364
|
1191
|
update_option('wp_chatbot_floatingiconbg_color', $wp_chatbot_floatingiconbg_color); |
|
1365
|
1192
|
|
|
1366
|
1193
|
// upload custom wpwbot icon path |
|
1367
|
|
- $wp_chatbot_custom_icon_path = sanitize_text_field(wp_unslash($_POST['wp_chatbot_custom_icon_path'])); |
|
1194
|
+ $wp_chatbot_custom_icon_path = sanitize_text_field($_POST['wp_chatbot_custom_icon_path']); |
|
1368
|
1195
|
update_option('wp_chatbot_custom_icon_path', $wp_chatbot_custom_icon_path); |
|
1369
|
1196
|
//Agent image |
|
1370
|
1197
|
//wpwbot icon settings. |
|
1371
|
|
- $wp_chatbot_icon = (isset($_POST['wp_chatbot_agent_image']) ? sanitize_text_field(wp_unslash($_POST['wp_chatbot_agent_image'])) : 'agent-13.png'); |
|
1198
|
+ $wp_chatbot_icon = (isset($_POST['wp_chatbot_agent_image']) ? sanitize_text_field($_POST['wp_chatbot_agent_image']) : 'agent-13.png'); |
|
1372
|
1199
|
update_option('wp_chatbot_agent_image', $wp_chatbot_icon); |
|
1373
|
1200
|
// upload custom wpwbot icon |
|
1374
|
1201
|
if(isset($_POST['wp_chatbot_custom_agent_path'])){ |
|
1375
|
|
- $wp_chatbot_custom_agent_path = sanitize_text_field(wp_unslash($_POST['wp_chatbot_custom_agent_path'])); |
|
1202
|
+ $wp_chatbot_custom_agent_path = sanitize_text_field($_POST['wp_chatbot_custom_agent_path']); |
|
1376
|
1203
|
update_option('wp_chatbot_custom_agent_path', $wp_chatbot_custom_agent_path); |
|
1377
|
1204
|
} |
|
1378
|
1205
|
|
|
1379
|
1206
|
//Theming |
|
1380
|
|
- $qcld_wb_chatbot_theme = (isset($_POST['qcld_wb_chatbot_theme']) ? sanitize_text_field(wp_unslash($_POST['qcld_wb_chatbot_theme'])) : 'template-00'); |
|
1207
|
+ $qcld_wb_chatbot_theme = (isset($_POST['qcld_wb_chatbot_theme']) ? sanitize_text_field($_POST['qcld_wb_chatbot_theme']) : 'template-00'); |
|
1381
|
1208
|
update_option('qcld_wb_chatbot_theme', $qcld_wb_chatbot_theme); |
|
1382
|
|
- |
|
1383
|
|
- //Avatar Location |
|
1384
|
|
- if(isset($_POST['qcld_chatbot_avatar_location'])) { |
|
1385
|
|
- $qcld_chatbot_avatar_location = sanitize_text_field(wp_unslash($_POST['qcld_chatbot_avatar_location'])); |
|
1386
|
|
- update_option('qcld_chatbot_avatar_location', $qcld_chatbot_avatar_location); |
|
1387
|
|
- } |
|
1388
|
1209
|
//Theme custom background option |
|
1389
|
1210
|
if(isset( $_POST["qcld_wb_chatbot_change_bg"])) { |
|
1390
|
|
- $qcld_wb_chatbot_change_bg = sanitize_text_field(wp_unslash($_POST["qcld_wb_chatbot_change_bg"])); |
|
1211
|
+ $qcld_wb_chatbot_change_bg = sanitize_text_field($_POST["qcld_wb_chatbot_change_bg"]); |
|
1391
|
1212
|
}else{$qcld_wb_chatbot_change_bg='';} |
|
1392
|
1213
|
update_option('qcld_wb_chatbot_change_bg', $qcld_wb_chatbot_change_bg); |
|
1393
|
1214
|
if(isset($_POST["qcld_wb_chatbot_board_bg_path"])){ |
|
1394
|
|
- $qcld_wb_chatbot_board_bg_path = sanitize_text_field(wp_unslash($_POST["qcld_wb_chatbot_board_bg_path"])); |
|
1215
|
+ $qcld_wb_chatbot_board_bg_path = sanitize_text_field($_POST["qcld_wb_chatbot_board_bg_path"]); |
|
1395
|
1216
|
update_option('qcld_wb_chatbot_board_bg_path', wp_unslash($qcld_wb_chatbot_board_bg_path)); |
|
1396
|
1217
|
} |
|
1397
|
1218
|
|
|
1398
|
1219
|
|
|
@@ -1474,68 +1295,11 @@ |
|
1474
|
1295
|
$qlcd_wp_chatbot_sorry = ''; |
|
1475
|
1296
|
} |
|
1476
|
1297
|
update_option('qlcd_wp_chatbot_sorry', $qlcd_wp_chatbot_sorry); |
|
1477
|
1298
|
|
|
1478
|
|
- if (isset($_POST["skip_chat_reactions_menu"])) { |
|
1479
|
|
- $skip_chat_reactions_menu = sanitize_text_field(wp_unslash($_POST["skip_chat_reactions_menu"])); |
|
1480
|
|
- } else { |
|
1481
|
|
- $skip_chat_reactions_menu = ''; |
|
1482
|
|
- } |
|
1483
|
|
- update_option('skip_chat_reactions_menu', $skip_chat_reactions_menu); |
|
1484
|
|
- |
|
1485
|
|
- if (isset($_POST["qlcd_wp_chatbot_report_text"])) { |
|
1486
|
|
- $qlcd_wp_chatbot_report_text = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_report_text"])); |
|
1487
|
|
- } else { |
|
1488
|
|
- $qlcd_wp_chatbot_report_text = ''; |
|
1489
|
|
- } |
|
1490
|
|
- update_option('qlcd_wp_chatbot_report_text', $qlcd_wp_chatbot_report_text); |
|
1491
|
|
- |
|
1492
|
|
- if (isset($_POST["qlcd_wp_chatbot_report_text"])) { |
|
1493
|
|
- $qlcd_wp_chatbot_report_text = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_report_text"])); |
|
1494
|
|
- } else { |
|
1495
|
|
- $qlcd_wp_chatbot_report_text = ''; |
|
1496
|
|
- } |
|
1497
|
|
- update_option('qlcd_wp_chatbot_report_text', $qlcd_wp_chatbot_report_text); |
|
1498
|
|
- |
|
1499
|
|
- if (isset($_POST["enable_chat_report_menu"])) { |
|
1500
|
|
- $enable_chat_report_menu = sanitize_text_field(wp_unslash($_POST["enable_chat_report_menu"])); |
|
1501
|
|
- } else { |
|
1502
|
|
- $enable_chat_report_menu = ''; |
|
1503
|
|
- } |
|
1504
|
|
- update_option('enable_chat_report_menu', $enable_chat_report_menu); |
|
1505
|
|
- |
|
1506
|
|
- if (isset($_POST["qlcd_wp_chatbot_like_text"])) { |
|
1507
|
|
- $qlcd_wp_chatbot_like_text = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_like_text"])); |
|
1508
|
|
- } else { |
|
1509
|
|
- $qlcd_wp_chatbot_like_text = ''; |
|
1510
|
|
- } |
|
1511
|
|
- update_option('qlcd_wp_chatbot_like_text', $qlcd_wp_chatbot_like_text); |
|
1512
|
|
- |
|
1513
|
|
- if (isset($_POST["qlcd_wp_chatbot_dislike_text"])) { |
|
1514
|
|
- $qlcd_wp_chatbot_dislike_text = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_dislike_text"])); |
|
1515
|
|
- } else { |
|
1516
|
|
- $qlcd_wp_chatbot_dislike_text = ''; |
|
1517
|
|
- } |
|
1518
|
|
- update_option('qlcd_wp_chatbot_dislike_text', $qlcd_wp_chatbot_dislike_text); |
|
1519
|
|
- |
|
1520
|
|
- if (isset($_POST["enable_chat_share_menu"])) { |
|
1521
|
|
- $enable_chat_share_menu = sanitize_text_field(wp_unslash($_POST["enable_chat_share_menu"])); |
|
1522
|
|
- } else { |
|
1523
|
|
- $enable_chat_share_menu = ''; |
|
1524
|
|
- } |
|
1525
|
|
- update_option('enable_chat_share_menu', $enable_chat_share_menu); |
|
1526
|
|
- |
|
1527
|
|
- if (isset($_POST["qlcd_wp_chatbot_share_text"])) { |
|
1528
|
|
- $qlcd_wp_chatbot_share_text = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_share_text"])); |
|
1529
|
|
- } else { |
|
1530
|
|
- $qlcd_wp_chatbot_share_text = ''; |
|
1531
|
|
- } |
|
1532
|
|
- update_option('qlcd_wp_chatbot_share_text', $qlcd_wp_chatbot_share_text); |
|
1533
|
|
- |
|
1534
|
1299
|
if (isset($_POST["qlcd_wp_chatbot_agent_join"])) { |
|
1535
|
1300
|
// Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array. |
|
1536
|
|
- $qlcd_wp_chatbot_agent_join = wp_unslash($_POST["qlcd_wp_chatbot_agent_join"]); |
|
1537
|
|
- $qlcd_wp_chatbot_agent_join = sanitize_array($qlcd_wp_chatbot_agent_join); |
|
1301
|
+ $qlcd_wp_chatbot_agent_join = sanitize_array(wp_unslash($_POST["qlcd_wp_chatbot_agent_join"])); |
|
1538
|
1302
|
} else { |
|
1539
|
1303
|
$qlcd_wp_chatbot_agent_join = array(); |
|
1540
|
1304
|
} |
|
1541
|
1305
|
update_option('qlcd_wp_chatbot_agent_join', maybe_serialize($qlcd_wp_chatbot_agent_join)); |
|
@@ -1542,10 +1306,9 @@ |
|
1542
|
1306
|
|
|
1543
|
1307
|
//Greeting. |
|
1544
|
1308
|
if (isset($_POST["qlcd_wp_chatbot_welcome"])) { |
|
1545
|
1309
|
// Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array. |
|
1546
|
|
- $qlcd_wp_chatbot_welcome = wp_unslash($_POST["qlcd_wp_chatbot_welcome"]); |
|
1547
|
|
- $qlcd_wp_chatbot_welcome = sanitize_array($qlcd_wp_chatbot_welcome); |
|
1310
|
+ $qlcd_wp_chatbot_welcome = sanitize_array(wp_unslash($_POST["qlcd_wp_chatbot_welcome"])); |
|
1548
|
1311
|
} else { |
|
1549
|
1312
|
$qlcd_wp_chatbot_welcome = array(); |
|
1550
|
1313
|
} |
|
1551
|
1314
|
update_option('qlcd_wp_chatbot_welcome', maybe_serialize($qlcd_wp_chatbot_welcome)); |
|
@@ -1551,10 +1314,9 @@ |
|
1551
|
1314
|
update_option('qlcd_wp_chatbot_welcome', maybe_serialize($qlcd_wp_chatbot_welcome)); |
|
1552
|
1315
|
|
|
1553
|
1316
|
if (isset($_POST["qlcd_wp_chatbot_back_to_start"])) { |
|
1554
|
1317
|
// Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array. |
|
1555
|
|
- $qlcd_wp_chatbot_back_to_start = wp_unslash($_POST["qlcd_wp_chatbot_back_to_start"]); |
|
1556
|
|
- $qlcd_wp_chatbot_back_to_start = sanitize_array($qlcd_wp_chatbot_back_to_start); |
|
1318
|
+ $qlcd_wp_chatbot_back_to_start = sanitize_array(wp_unslash($_POST["qlcd_wp_chatbot_back_to_start"])); |
|
1557
|
1319
|
} else { |
|
1558
|
1320
|
$qlcd_wp_chatbot_back_to_start = array(); |
|
1559
|
1321
|
} |
|
1560
|
1322
|
update_option('qlcd_wp_chatbot_back_to_start', maybe_serialize($qlcd_wp_chatbot_back_to_start)); |
|
@@ -1560,10 +1322,9 @@ |
|
1560
|
1322
|
update_option('qlcd_wp_chatbot_back_to_start', maybe_serialize($qlcd_wp_chatbot_back_to_start)); |
|
1561
|
1323
|
|
|
1562
|
1324
|
if (isset($_POST["qlcd_wp_chatbot_hi_there"])) { |
|
1563
|
1325
|
// Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array. |
|
1564
|
|
- $qlcd_wp_chatbot_hi_there = wp_unslash($_POST["qlcd_wp_chatbot_hi_there"]); |
|
1565
|
|
- $qlcd_wp_chatbot_hi_there = sanitize_array($qlcd_wp_chatbot_hi_there); |
|
1326
|
+ $qlcd_wp_chatbot_hi_there = sanitize_array(wp_unslash($_POST["qlcd_wp_chatbot_hi_there"])); |
|
1566
|
1327
|
} else { |
|
1567
|
1328
|
$qlcd_wp_chatbot_hi_there = array(); |
|
1568
|
1329
|
} |
|
1569
|
1330
|
update_option('qlcd_wp_chatbot_hi_there', maybe_serialize($qlcd_wp_chatbot_hi_there)); |
|
@@ -1569,10 +1330,9 @@ |
|
1569
|
1330
|
update_option('qlcd_wp_chatbot_hi_there', maybe_serialize($qlcd_wp_chatbot_hi_there)); |
|
1570
|
1331
|
|
|
1571
|
1332
|
if (isset($_POST["qlcd_wp_chatbot_hello"])) { |
|
1572
|
1333
|
// Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array. |
|
1573
|
|
- $qlcd_wp_chatbot_hello = wp_unslash($_POST["qlcd_wp_chatbot_hello"]); |
|
1574
|
|
- $qlcd_wp_chatbot_hello = sanitize_array($qlcd_wp_chatbot_hello); |
|
1334
|
+ $qlcd_wp_chatbot_hello = sanitize_array(wp_unslash($_POST["qlcd_wp_chatbot_hello"])); |
|
1575
|
1335
|
} else { |
|
1576
|
1336
|
$qlcd_wp_chatbot_hello = array(); |
|
1577
|
1337
|
} |
|
1578
|
1338
|
update_option('qlcd_wp_chatbot_hello', maybe_serialize($qlcd_wp_chatbot_hello)); |
|
@@ -1578,10 +1338,9 @@ |
|
1578
|
1338
|
update_option('qlcd_wp_chatbot_hello', maybe_serialize($qlcd_wp_chatbot_hello)); |
|
1579
|
1339
|
|
|
1580
|
1340
|
if (isset($_POST["qlcd_wp_chatbot_welcome_back"])) { |
|
1581
|
1341
|
// Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array. |
|
1582
|
|
- $qlcd_wp_chatbot_welcome_back = wp_unslash( $_POST["qlcd_wp_chatbot_welcome_back"] ); |
|
1583
|
|
- $qlcd_wp_chatbot_welcome_back = sanitize_array( $qlcd_wp_chatbot_welcome_back ); |
|
1342
|
+ $qlcd_wp_chatbot_welcome_back = sanitize_array(wp_unslash($_POST["qlcd_wp_chatbot_welcome_back"])); |
|
1584
|
1343
|
} else { |
|
1585
|
1344
|
$qlcd_wp_chatbot_welcome_back = array(); |
|
1586
|
1345
|
} |
|
1587
|
1346
|
update_option('qlcd_wp_chatbot_welcome_back', maybe_serialize($qlcd_wp_chatbot_welcome_back)); |
|
@@ -1587,10 +1346,9 @@ |
|
1587
|
1346
|
update_option('qlcd_wp_chatbot_welcome_back', maybe_serialize($qlcd_wp_chatbot_welcome_back)); |
|
1588
|
1347
|
|
|
1589
|
1348
|
if (isset($_POST["qlcd_wp_chatbot_asking_name"])) { |
|
1590
|
1349
|
// Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array. |
|
1591
|
|
- $qlcd_wp_chatbot_asking_name = wp_unslash( $_POST["qlcd_wp_chatbot_asking_name"] ); |
|
1592
|
|
- $qlcd_wp_chatbot_asking_name = sanitize_array( $qlcd_wp_chatbot_asking_name ); |
|
1350
|
+ $qlcd_wp_chatbot_asking_name = sanitize_array(wp_unslash($_POST["qlcd_wp_chatbot_asking_name"])); |
|
1593
|
1351
|
} else { |
|
1594
|
1352
|
$qlcd_wp_chatbot_asking_name = array(); |
|
1595
|
1353
|
} |
|
1596
|
1354
|
update_option('qlcd_wp_chatbot_asking_name', maybe_serialize($qlcd_wp_chatbot_asking_name)); |
|
@@ -1596,10 +1354,9 @@ |
|
1596
|
1354
|
update_option('qlcd_wp_chatbot_asking_name', maybe_serialize($qlcd_wp_chatbot_asking_name)); |
|
1597
|
1355
|
|
|
1598
|
1356
|
if (isset($_POST["qlcd_wp_chatbot_name_greeting"])) { |
|
1599
|
1357
|
// Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array. |
|
1600
|
|
- $qlcd_wp_chatbot_name_greeting = wp_unslash( $_POST["qlcd_wp_chatbot_name_greeting"] ); |
|
1601
|
|
- $qlcd_wp_chatbot_name_greeting = sanitize_array( $qlcd_wp_chatbot_name_greeting ); |
|
1358
|
+ $qlcd_wp_chatbot_name_greeting = sanitize_array(wp_unslash($_POST["qlcd_wp_chatbot_name_greeting"])); |
|
1602
|
1359
|
} else { |
|
1603
|
1360
|
$qlcd_wp_chatbot_name_greeting = array(); |
|
1604
|
1361
|
} |
|
1605
|
1362
|
update_option('qlcd_wp_chatbot_name_greeting', maybe_serialize($qlcd_wp_chatbot_name_greeting)); |
|
@@ -1605,10 +1362,9 @@ |
|
1605
|
1362
|
update_option('qlcd_wp_chatbot_name_greeting', maybe_serialize($qlcd_wp_chatbot_name_greeting)); |
|
1606
|
1363
|
|
|
1607
|
1364
|
if (isset($_POST["qlcd_wp_chatbot_i_am"])) { |
|
1608
|
1365
|
// Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array. |
|
1609
|
|
- $qlcd_wp_chatbot_i_am = wp_unslash( $_POST["qlcd_wp_chatbot_i_am"] ); |
|
1610
|
|
- $qlcd_wp_chatbot_i_am = sanitize_array( $qlcd_wp_chatbot_i_am ); |
|
1366
|
+ $qlcd_wp_chatbot_i_am = sanitize_array(wp_unslash($_POST["qlcd_wp_chatbot_i_am"])); |
|
1611
|
1367
|
} else { |
|
1612
|
1368
|
$qlcd_wp_chatbot_i_am = array(); |
|
1613
|
1369
|
} |
|
1614
|
1370
|
update_option('qlcd_wp_chatbot_i_am', maybe_serialize($qlcd_wp_chatbot_i_am)); |
|
@@ -1614,10 +1370,9 @@ |
|
1614
|
1370
|
update_option('qlcd_wp_chatbot_i_am', maybe_serialize($qlcd_wp_chatbot_i_am)); |
|
1615
|
1371
|
|
|
1616
|
1372
|
if (isset($_POST["qlcd_wp_chatbot_is_typing"])) { |
|
1617
|
1373
|
// Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array. |
|
1618
|
|
- $qlcd_wp_chatbot_is_typing = wp_unslash( $_POST["qlcd_wp_chatbot_is_typing"] ); |
|
1619
|
|
- $qlcd_wp_chatbot_is_typing = sanitize_array( $qlcd_wp_chatbot_is_typing ); |
|
1374
|
+ $qlcd_wp_chatbot_is_typing = sanitize_array(wp_unslash($_POST["qlcd_wp_chatbot_is_typing"])); |
|
1620
|
1375
|
} else { |
|
1621
|
1376
|
$qlcd_wp_chatbot_is_typing = array(); |
|
1622
|
1377
|
} |
|
1623
|
1378
|
update_option('qlcd_wp_chatbot_is_typing', maybe_serialize($qlcd_wp_chatbot_is_typing)); |
|
@@ -1623,10 +1378,9 @@ |
|
1623
|
1378
|
update_option('qlcd_wp_chatbot_is_typing', maybe_serialize($qlcd_wp_chatbot_is_typing)); |
|
1624
|
1379
|
|
|
1625
|
1380
|
if (isset($_POST["qlcd_wp_chatbot_send_a_msg"])) { |
|
1626
|
1381
|
// Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array. |
|
1627
|
|
- $qlcd_wp_chatbot_send_a_msg = wp_unslash( $_POST["qlcd_wp_chatbot_send_a_msg"] ); |
|
1628
|
|
- $qlcd_wp_chatbot_send_a_msg = sanitize_array( $qlcd_wp_chatbot_send_a_msg ); |
|
1382
|
+ $qlcd_wp_chatbot_send_a_msg = sanitize_array(wp_unslash($_POST["qlcd_wp_chatbot_send_a_msg"])); |
|
1629
|
1383
|
} else { |
|
1630
|
1384
|
$qlcd_wp_chatbot_send_a_msg = array(); |
|
1631
|
1385
|
} |
|
1632
|
1386
|
update_option('qlcd_wp_chatbot_send_a_msg', maybe_serialize($qlcd_wp_chatbot_send_a_msg)); |
|
@@ -1632,10 +1386,9 @@ |
|
1632
|
1386
|
update_option('qlcd_wp_chatbot_send_a_msg', maybe_serialize($qlcd_wp_chatbot_send_a_msg)); |
|
1633
|
1387
|
|
|
1634
|
1388
|
if (isset($_POST["qlcd_wp_chatbot_choose_option"])) { |
|
1635
|
1389
|
// Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array. |
|
1636
|
|
- $qlcd_wp_chatbot_choose_option = wp_unslash( $_POST["qlcd_wp_chatbot_choose_option"] ); |
|
1637
|
|
- $qlcd_wp_chatbot_choose_option = sanitize_array( $qlcd_wp_chatbot_choose_option ); |
|
1390
|
+ $qlcd_wp_chatbot_choose_option = sanitize_array(wp_unslash($_POST["qlcd_wp_chatbot_choose_option"])); |
|
1638
|
1391
|
} else { |
|
1639
|
1392
|
$qlcd_wp_chatbot_choose_option = array(); |
|
1640
|
1393
|
} |
|
1641
|
1394
|
update_option('qlcd_wp_chatbot_choose_option', maybe_serialize($qlcd_wp_chatbot_choose_option)); |
|
@@ -1641,10 +1394,9 @@ |
|
1641
|
1394
|
update_option('qlcd_wp_chatbot_choose_option', maybe_serialize($qlcd_wp_chatbot_choose_option)); |
|
1642
|
1395
|
|
|
1643
|
1396
|
if (isset($_POST["qlcd_wp_chatbot_viewed_products"])) { |
|
1644
|
1397
|
|
|
1645
|
|
- $qlcd_wp_chatbot_viewed_products = wp_unslash( $_POST["qlcd_wp_chatbot_viewed_products"] ); |
|
1646
|
|
- $qlcd_wp_chatbot_viewed_products = sanitize_array( $qlcd_wp_chatbot_viewed_products ); |
|
1398
|
+ $qlcd_wp_chatbot_viewed_products = sanitize_array(wp_unslash($_POST["qlcd_wp_chatbot_viewed_products"])); |
|
1647
|
1399
|
} else { |
|
1648
|
1400
|
$qlcd_wp_chatbot_viewed_products = array(); |
|
1649
|
1401
|
} |
|
1650
|
1402
|
update_option('qlcd_wp_chatbot_viewed_products', maybe_serialize($qlcd_wp_chatbot_viewed_products)); |
|
@@ -1649,52 +1401,52 @@ |
|
1649
|
1401
|
} |
|
1650
|
1402
|
update_option('qlcd_wp_chatbot_viewed_products', maybe_serialize($qlcd_wp_chatbot_viewed_products)); |
|
1651
|
1403
|
|
|
1652
|
1404
|
if(isset($_POST["qlcd_wp_chatbot_shopping_cart"])){ |
|
1653
|
|
- $qlcd_wp_chatbot_shopping_cart= esc_html((@wp_unslash($_POST["qlcd_wp_chatbot_shopping_cart"]))); |
|
1405
|
+ $qlcd_wp_chatbot_shopping_cart= esc_html((@$_POST["qlcd_wp_chatbot_shopping_cart"])); |
|
1654
|
1406
|
update_option('qlcd_wp_chatbot_shopping_cart', maybe_serialize(sanitize_array($qlcd_wp_chatbot_shopping_cart))); |
|
1655
|
1407
|
} |
|
1656
|
1408
|
|
|
1657
|
1409
|
if(isset($_POST["qlcd_wp_chatbot_add_to_cart"])){ |
|
1658
|
|
- $qlcd_wp_chatbot_add_to_cart= (@wp_unslash($_POST["qlcd_wp_chatbot_add_to_cart"])); |
|
1410
|
+ $qlcd_wp_chatbot_add_to_cart= (@$_POST["qlcd_wp_chatbot_add_to_cart"]); |
|
1659
|
1411
|
update_option('qlcd_wp_chatbot_add_to_cart', maybe_serialize(sanitize_array($qlcd_wp_chatbot_add_to_cart))); |
|
1660
|
1412
|
} |
|
1661
|
1413
|
if(isset($_POST["qlcd_wp_chatbot_cart_link"])){ |
|
1662
|
|
- $qlcd_wp_chatbot_cart_link= @wp_unslash($_POST["qlcd_wp_chatbot_cart_link"]); |
|
1414
|
+ $qlcd_wp_chatbot_cart_link= @$_POST["qlcd_wp_chatbot_cart_link"]; |
|
1663
|
1415
|
update_option('qlcd_wp_chatbot_cart_link', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_link))); |
|
1664
|
1416
|
} |
|
1665
|
1417
|
if(isset($_POST["qlcd_wp_chatbot_checkout_link"])){ |
|
1666
|
|
- $qlcd_wp_chatbot_checkout_link= @wp_unslash($_POST["qlcd_wp_chatbot_checkout_link"]); |
|
1418
|
+ $qlcd_wp_chatbot_checkout_link= @$_POST["qlcd_wp_chatbot_checkout_link"]; |
|
1667
|
1419
|
update_option('qlcd_wp_chatbot_checkout_link', maybe_serialize(sanitize_array($qlcd_wp_chatbot_checkout_link))); |
|
1668
|
1420
|
} |
|
1669
|
1421
|
if(isset($_POST["qlcd_wp_chatbot_cart_welcome"])){ |
|
1670
|
|
- $qlcd_wp_chatbot_cart_welcome= (@wp_unslash($_POST["qlcd_wp_chatbot_cart_welcome"])); |
|
1422
|
+ $qlcd_wp_chatbot_cart_welcome= (@$_POST["qlcd_wp_chatbot_cart_welcome"]); |
|
1671
|
1423
|
update_option('qlcd_wp_chatbot_cart_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_welcome))); |
|
1672
|
1424
|
} |
|
1673
|
1425
|
if(isset($_POST["qlcd_wp_chatbot_featured_product_welcome"])){ |
|
1674
|
|
- $qlcd_wp_chatbot_featured_product_welcome= @wp_unslash($_POST["qlcd_wp_chatbot_featured_product_welcome"]); |
|
1426
|
+ $qlcd_wp_chatbot_featured_product_welcome= @$_POST["qlcd_wp_chatbot_featured_product_welcome"]; |
|
1675
|
1427
|
update_option('qlcd_wp_chatbot_featured_product_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_featured_product_welcome))); |
|
1676
|
1428
|
} |
|
1677
|
1429
|
|
|
1678
|
1430
|
if(isset($_POST["qlcd_wp_chatbot_viewed_product_welcome"])){ |
|
1679
|
|
- $qlcd_wp_chatbot_viewed_product_welcome= @wp_unslash($_POST["qlcd_wp_chatbot_viewed_product_welcome"]); |
|
1431
|
+ $qlcd_wp_chatbot_viewed_product_welcome= @$_POST["qlcd_wp_chatbot_viewed_product_welcome"]; |
|
1680
|
1432
|
update_option('qlcd_wp_chatbot_viewed_product_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_viewed_product_welcome))); |
|
1681
|
1433
|
} |
|
1682
|
1434
|
if(isset($_POST["qlcd_wp_chatbot_latest_product_welcome"])){ |
|
1683
|
|
- $qlcd_wp_chatbot_latest_product_welcome= @wp_unslash($_POST["qlcd_wp_chatbot_latest_product_welcome"]); |
|
1435
|
+ $qlcd_wp_chatbot_latest_product_welcome= @$_POST["qlcd_wp_chatbot_latest_product_welcome"]; |
|
1684
|
1436
|
update_option('qlcd_wp_chatbot_latest_product_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_latest_product_welcome))); |
|
1685
|
1437
|
} |
|
1686
|
1438
|
|
|
1687
|
1439
|
if(isset($_POST["qlcd_wp_chatbot_cart_title"])){ |
|
1688
|
|
- $qlcd_wp_chatbot_cart_title= @wp_unslash($_POST["qlcd_wp_chatbot_cart_title"]); |
|
1440
|
+ $qlcd_wp_chatbot_cart_title= @$_POST["qlcd_wp_chatbot_cart_title"]; |
|
1689
|
1441
|
update_option('qlcd_wp_chatbot_cart_title', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_title))); |
|
1690
|
1442
|
} |
|
1691
|
1443
|
if(isset($_POST["qlcd_wp_chatbot_cart_quantity"])){ |
|
1692
|
|
- $qlcd_wp_chatbot_cart_quantity= @wp_unslash($_POST["qlcd_wp_chatbot_cart_quantity"]); |
|
1444
|
+ $qlcd_wp_chatbot_cart_quantity= @$_POST["qlcd_wp_chatbot_cart_quantity"]; |
|
1693
|
1445
|
update_option('qlcd_wp_chatbot_cart_quantity', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_quantity))); |
|
1694
|
1446
|
} |
|
1695
|
1447
|
if(isset($_POST["qlcd_wp_chatbot_cart_price"])){ |
|
1696
|
|
- $qlcd_wp_chatbot_cart_price= @wp_unslash($_POST["qlcd_wp_chatbot_cart_price"]); |
|
1448
|
+ $qlcd_wp_chatbot_cart_price= @$_POST["qlcd_wp_chatbot_cart_price"]; |
|
1697
|
1449
|
update_option('qlcd_wp_chatbot_cart_price', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_price))); |
|
1698
|
1450
|
} |
|
1699
|
1451
|
if(isset($_POST["qlcd_wp_chatbot_no_cart_items"])){ |
|
1700
|
1452
|
$qlcd_wp_chatbot_no_cart_items= wp_unslash(@$_POST["qlcd_wp_chatbot_no_cart_items"]); |
|
@@ -1700,20 +1452,18 @@ |
|
1700
|
1452
|
$qlcd_wp_chatbot_no_cart_items= wp_unslash(@$_POST["qlcd_wp_chatbot_no_cart_items"]); |
|
1701
|
1453
|
update_option('qlcd_wp_chatbot_no_cart_items', maybe_serialize(sanitize_array($qlcd_wp_chatbot_no_cart_items))); |
|
1702
|
1454
|
} |
|
1703
|
1455
|
if(isset($_POST["qlcd_wp_chatbot_cart_updating"])){ |
|
1704
|
|
- $qlcd_wp_chatbot_cart_updating= @wp_unslash($_POST["qlcd_wp_chatbot_cart_updating"]); |
|
1456
|
+ $qlcd_wp_chatbot_cart_updating= @$_POST["qlcd_wp_chatbot_cart_updating"]; |
|
1705
|
1457
|
update_option('qlcd_wp_chatbot_cart_updating', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_updating))); |
|
1706
|
1458
|
} |
|
1707
|
1459
|
if(isset($_POST["qlcd_wp_chatbot_cart_removing"])){ |
|
1708
|
|
- $qlcd_wp_chatbot_cart_removing= @wp_unslash($_POST["qlcd_wp_chatbot_cart_removing"]); |
|
1460
|
+ $qlcd_wp_chatbot_cart_removing= @$_POST["qlcd_wp_chatbot_cart_removing"]; |
|
1709
|
1461
|
update_option('qlcd_wp_chatbot_cart_removing', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_removing))); |
|
1710
|
1462
|
} |
|
1711
|
1463
|
//wpwBot wildcard settings |
|
1712
|
1464
|
if (isset($_POST["qlcd_wp_chatbot_wildcard_msg"])) { |
|
1713
|
|
- $qlcd_wp_chatbot_wildcard_msg = wp_unslash( $_POST["qlcd_wp_chatbot_wildcard_msg"] ); |
|
1714
|
|
- $qlcd_wp_chatbot_wildcard_msg = sanitize_array( $qlcd_wp_chatbot_wildcard_msg ); |
|
1715
|
|
- |
|
1465
|
+ $qlcd_wp_chatbot_wildcard_msg = sanitize_array(wp_unslash($_POST["qlcd_wp_chatbot_wildcard_msg"])); |
|
1716
|
1466
|
update_option('qlcd_wp_chatbot_wildcard_msg', maybe_serialize($qlcd_wp_chatbot_wildcard_msg)); |
|
1717
|
1467
|
} else { |
|
1718
|
1468
|
update_option('qlcd_wp_chatbot_wildcard_msg', maybe_serialize(array())); |
|
1719
|
1469
|
} |
|
@@ -1718,11 +1468,9 @@ |
|
1718
|
1468
|
update_option('qlcd_wp_chatbot_wildcard_msg', maybe_serialize(array())); |
|
1719
|
1469
|
} |
|
1720
|
1470
|
//empty filter message repeat. |
|
1721
|
1471
|
if (isset($_POST["qlcd_wp_chatbot_empty_filter_msg"])) { |
|
1722
|
|
- $qlcd_wp_chatbot_empty_filter_msg = wp_unslash( $_POST["qlcd_wp_chatbot_empty_filter_msg"] ); |
|
1723
|
|
- $qlcd_wp_chatbot_empty_filter_msg = sanitize_array( $qlcd_wp_chatbot_empty_filter_msg ); |
|
1724
|
|
- |
|
1472
|
+ $qlcd_wp_chatbot_empty_filter_msg = sanitize_array(wp_unslash($_POST["qlcd_wp_chatbot_empty_filter_msg"])); |
|
1725
|
1473
|
update_option('qlcd_wp_chatbot_empty_filter_msg', maybe_serialize($qlcd_wp_chatbot_empty_filter_msg)); |
|
1726
|
1474
|
} else { |
|
1727
|
1475
|
update_option('qlcd_wp_chatbot_empty_filter_msg', maybe_serialize(array())); |
|
1728
|
1476
|
} |
|
@@ -1727,10 +1475,9 @@ |
|
1727
|
1475
|
update_option('qlcd_wp_chatbot_empty_filter_msg', maybe_serialize(array())); |
|
1728
|
1476
|
} |
|
1729
|
1477
|
|
|
1730
|
1478
|
if (isset($_POST["qlcd_wp_chatbot_did_you_mean"])) { |
|
1731
|
|
- $qlcd_wp_chatbot_did_you_mean = wp_unslash( $_POST["qlcd_wp_chatbot_did_you_mean"] ); |
|
1732
|
|
- $qlcd_wp_chatbot_did_you_mean = sanitize_array( $qlcd_wp_chatbot_did_you_mean ); |
|
1479
|
+ $qlcd_wp_chatbot_did_you_mean = sanitize_array(wp_unslash($_POST["qlcd_wp_chatbot_did_you_mean"])); |
|
1733
|
1480
|
update_option('qlcd_wp_chatbot_did_you_mean', maybe_serialize($qlcd_wp_chatbot_did_you_mean)); |
|
1734
|
1481
|
} else { |
|
1735
|
1482
|
update_option('qlcd_wp_chatbot_did_you_mean', maybe_serialize(array())); |
|
1736
|
1483
|
} |
|
@@ -1735,17 +1482,15 @@ |
|
1735
|
1482
|
update_option('qlcd_wp_chatbot_did_you_mean', maybe_serialize(array())); |
|
1736
|
1483
|
} |
|
1737
|
1484
|
//help welcome and message |
|
1738
|
1485
|
if (isset($_POST["qlcd_wp_chatbot_help_welcome"])) { |
|
1739
|
|
- $qlcd_wp_chatbot_help_welcome = wp_unslash( $_POST["qlcd_wp_chatbot_help_welcome"] ); |
|
1740
|
|
- $qlcd_wp_chatbot_help_welcome = sanitize_array( $qlcd_wp_chatbot_help_welcome ); |
|
1486
|
+ $qlcd_wp_chatbot_help_welcome = sanitize_array(wp_unslash($_POST["qlcd_wp_chatbot_help_welcome"])); |
|
1741
|
1487
|
update_option('qlcd_wp_chatbot_help_welcome', maybe_serialize($qlcd_wp_chatbot_help_welcome)); |
|
1742
|
1488
|
} else { |
|
1743
|
1489
|
update_option('qlcd_wp_chatbot_help_welcome', maybe_serialize(array())); |
|
1744
|
1490
|
} |
|
1745
|
1491
|
if (isset($_POST["qlcd_wp_chatbot_help_msg"])) { |
|
1746
|
|
- $qlcd_wp_chatbot_help_msg = wp_unslash( $_POST["qlcd_wp_chatbot_help_msg"] ); |
|
1747
|
|
- $qlcd_wp_chatbot_help_msg = sanitize_array( $qlcd_wp_chatbot_help_msg ); |
|
1492
|
+ $qlcd_wp_chatbot_help_msg = sanitize_array(wp_unslash($_POST["qlcd_wp_chatbot_help_msg"])); |
|
1748
|
1493
|
update_option('qlcd_wp_chatbot_help_msg', maybe_serialize($qlcd_wp_chatbot_help_msg)); |
|
1749
|
1494
|
} else { |
|
1750
|
1495
|
update_option('qlcd_wp_chatbot_help_msg', maybe_serialize(array())); |
|
1751
|
1496
|
} |
|
@@ -1750,10 +1495,9 @@ |
|
1750
|
1495
|
update_option('qlcd_wp_chatbot_help_msg', maybe_serialize(array())); |
|
1751
|
1496
|
} |
|
1752
|
1497
|
//To clear Conversation history. |
|
1753
|
1498
|
if (isset($_POST["qlcd_wp_chatbot_reset"])) { |
|
1754
|
|
- $qlcd_wp_chatbot_reset = wp_unslash( $_POST["qlcd_wp_chatbot_reset"] ); |
|
1755
|
|
- $qlcd_wp_chatbot_reset = sanitize_array( $qlcd_wp_chatbot_reset ); |
|
1499
|
+ $qlcd_wp_chatbot_reset = sanitize_array(wp_unslash($_POST["qlcd_wp_chatbot_reset"])); |
|
1756
|
1500
|
update_option('qlcd_wp_chatbot_reset', maybe_serialize($qlcd_wp_chatbot_reset)); |
|
1757
|
1501
|
} else { |
|
1758
|
1502
|
update_option('qlcd_wp_chatbot_reset', maybe_serialize(array())); |
|
1759
|
1503
|
} |
|
@@ -1764,17 +1508,17 @@ |
|
1764
|
1508
|
} else { |
|
1765
|
1509
|
update_option('qlcd_wp_chatbot_sys_key_help', ''); |
|
1766
|
1510
|
} |
|
1767
|
1511
|
if(isset($_POST["qlcd_wp_chatbot_sys_key_product"])){ |
|
1768
|
|
- $qlcd_wp_chatbot_sys_key_product = esc_html((@wp_unslash($_POST["qlcd_wp_chatbot_sys_key_product"]))); |
|
1512
|
+ $qlcd_wp_chatbot_sys_key_product = esc_html((@$_POST["qlcd_wp_chatbot_sys_key_product"])); |
|
1769
|
1513
|
update_option('qlcd_wp_chatbot_sys_key_product', sanitize_text_field($qlcd_wp_chatbot_sys_key_product)); |
|
1770
|
1514
|
} |
|
1771
|
1515
|
if(isset($_POST["qlcd_wp_chatbot_sys_key_catalog"])){ |
|
1772
|
|
- $qlcd_wp_chatbot_sys_key_catalog = (@wp_unslash($_POST["qlcd_wp_chatbot_sys_key_catalog"])); |
|
1516
|
+ $qlcd_wp_chatbot_sys_key_catalog = (@$_POST["qlcd_wp_chatbot_sys_key_catalog"]); |
|
1773
|
1517
|
update_option('qlcd_wp_chatbot_sys_key_catalog', sanitize_text_field($qlcd_wp_chatbot_sys_key_catalog)); |
|
1774
|
1518
|
} |
|
1775
|
1519
|
if(isset($_POST["qlcd_wp_chatbot_sys_key_order"])){ |
|
1776
|
|
- $qlcd_wp_chatbot_sys_key_order = (@wp_unslash($_POST["qlcd_wp_chatbot_sys_key_order"])); |
|
1520
|
+ $qlcd_wp_chatbot_sys_key_order = (@$_POST["qlcd_wp_chatbot_sys_key_order"]); |
|
1777
|
1521
|
update_option('qlcd_wp_chatbot_sys_key_order', sanitize_text_field($qlcd_wp_chatbot_sys_key_order)); |
|
1778
|
1522
|
} |
|
1779
|
1523
|
if (isset($_POST["qlcd_wp_chatbot_sys_key_support"])) { |
|
1780
|
1524
|
$qlcd_wp_chatbot_sys_key_support = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_sys_key_support"])); |
|
@@ -1794,21 +1538,21 @@ |
|
1794
|
1538
|
} else { |
|
1795
|
1539
|
update_option('qlcd_wp_chatbot_sys_key_email', ''); |
|
1796
|
1540
|
} |
|
1797
|
1541
|
if(isset($_POST["qlcd_wp_chatbot_wildcard_product"])){ |
|
1798
|
|
- $qlcd_wp_chatbot_wildcard_product = (@wp_unslash($_POST["qlcd_wp_chatbot_wildcard_product"])); |
|
1542
|
+ $qlcd_wp_chatbot_wildcard_product = (@$_POST["qlcd_wp_chatbot_wildcard_product"]); |
|
1799
|
1543
|
update_option('qlcd_wp_chatbot_wildcard_product', maybe_serialize(sanitize_array($qlcd_wp_chatbot_wildcard_product))); |
|
1800
|
1544
|
} |
|
1801
|
1545
|
if(isset($_POST["qlcd_wp_chatbot_wildcard_catalog"])){ |
|
1802
|
|
- $qlcd_wp_chatbot_wildcard_catalog = (@wp_unslash($_POST["qlcd_wp_chatbot_wildcard_catalog"])); |
|
1546
|
+ $qlcd_wp_chatbot_wildcard_catalog = (@$_POST["qlcd_wp_chatbot_wildcard_catalog"]); |
|
1803
|
1547
|
update_option('qlcd_wp_chatbot_wildcard_catalog', maybe_serialize(sanitize_array($qlcd_wp_chatbot_wildcard_catalog))); |
|
1804
|
1548
|
} |
|
1805
|
1549
|
if(isset($_POST["qlcd_wp_chatbot_featured_products"])){ |
|
1806
|
|
- $qlcd_wp_chatbot_featured_products = (@wp_unslash($_POST["qlcd_wp_chatbot_featured_products"])); |
|
1550
|
+ $qlcd_wp_chatbot_featured_products = (@$_POST["qlcd_wp_chatbot_featured_products"]); |
|
1807
|
1551
|
update_option('qlcd_wp_chatbot_featured_products', maybe_serialize(sanitize_array($qlcd_wp_chatbot_featured_products))); |
|
1808
|
1552
|
} |
|
1809
|
1553
|
if(isset($_POST["qlcd_wp_chatbot_sale_products"])){ |
|
1810
|
|
- $qlcd_wp_chatbot_sale_products = (@wp_unslash($_POST["qlcd_wp_chatbot_sale_products"])); |
|
1554
|
+ $qlcd_wp_chatbot_sale_products = (@$_POST["qlcd_wp_chatbot_sale_products"]); |
|
1811
|
1555
|
update_option('qlcd_wp_chatbot_sale_products', maybe_serialize(sanitize_array($qlcd_wp_chatbot_sale_products))); |
|
1812
|
1556
|
} |
|
1813
|
1557
|
|
|
1814
|
1558
|
if (isset($_POST["qlcd_wp_chatbot_wildcard_support"])) { |
|
@@ -1825,9 +1569,9 @@ |
|
1825
|
1569
|
update_option('qlcd_wp_chatbot_wildcard_site_search', ''); |
|
1826
|
1570
|
} |
|
1827
|
1571
|
|
|
1828
|
1572
|
if(isset($_POST["qlcd_wp_chatbot_messenger_label"])){ |
|
1829
|
|
- $qlcd_wp_chatbot_messenger_label = (@wp_unslash($_POST["qlcd_wp_chatbot_messenger_label"])); |
|
1573
|
+ $qlcd_wp_chatbot_messenger_label = (@$_POST["qlcd_wp_chatbot_messenger_label"]); |
|
1830
|
1574
|
update_option('qlcd_wp_chatbot_messenger_label', maybe_serialize(sanitize_array($qlcd_wp_chatbot_messenger_label))); |
|
1831
|
1575
|
} |
|
1832
|
1576
|
//Products search . |
|
1833
|
1577
|
if (isset($_POST["qlcd_wp_chatbot_product_success"])) { |
|
@@ -1836,42 +1580,42 @@ |
|
1836
|
1580
|
$qlcd_wp_chatbot_product_success = map_deep($unslashed_data, 'sanitize_text_field'); |
|
1837
|
1581
|
update_option('qlcd_wp_chatbot_product_success', maybe_serialize($qlcd_wp_chatbot_product_success)); |
|
1838
|
1582
|
} |
|
1839
|
1583
|
if (isset($_POST["qlcd_wp_chatbot_product_fail"])) { |
|
1840
|
|
- $qlcd_wp_chatbot_product_fail = @wp_unslash($_POST["qlcd_wp_chatbot_product_fail"]); |
|
1584
|
+ $qlcd_wp_chatbot_product_fail = @$_POST["qlcd_wp_chatbot_product_fail"]; |
|
1841
|
1585
|
update_option('qlcd_wp_chatbot_product_fail', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_fail))); |
|
1842
|
1586
|
} |
|
1843
|
1587
|
if(isset($_POST["qlcd_wp_chatbot_product_asking"])){ |
|
1844
|
|
- $qlcd_wp_chatbot_product_asking = @wp_unslash($_POST["qlcd_wp_chatbot_product_asking"]); |
|
1588
|
+ $qlcd_wp_chatbot_product_asking = @$_POST["qlcd_wp_chatbot_product_asking"]; |
|
1845
|
1589
|
update_option('qlcd_wp_chatbot_product_asking', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_asking))); |
|
1846
|
1590
|
} |
|
1847
|
1591
|
if(isset($_POST["qlcd_wp_chatbot_product_suggest"])){ |
|
1848
|
|
- $qlcd_wp_chatbot_product_suggest = @wp_unslash($_POST["qlcd_wp_chatbot_product_suggest"]); |
|
1592
|
+ $qlcd_wp_chatbot_product_suggest = @$_POST["qlcd_wp_chatbot_product_suggest"]; |
|
1849
|
1593
|
update_option('qlcd_wp_chatbot_product_suggest', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_suggest))); |
|
1850
|
1594
|
} |
|
1851
|
1595
|
if(isset($_POST["qlcd_wp_chatbot_product_infinite"])){ |
|
1852
|
|
- $qlcd_wp_chatbot_product_infinite = @wp_unslash($_POST["qlcd_wp_chatbot_product_infinite"]); |
|
1596
|
+ $qlcd_wp_chatbot_product_infinite = @$_POST["qlcd_wp_chatbot_product_infinite"]; |
|
1853
|
1597
|
update_option('qlcd_wp_chatbot_product_infinite', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_infinite))); |
|
1854
|
1598
|
} |
|
1855
|
1599
|
if(isset($_POST["qlcd_wp_chatbot_load_more"])){ |
|
1856
|
|
- $qlcd_wp_chatbot_load_more = @wp_unslash($_POST["qlcd_wp_chatbot_load_more"]); |
|
1600
|
+ $qlcd_wp_chatbot_load_more = @$_POST["qlcd_wp_chatbot_load_more"]; |
|
1857
|
1601
|
update_option('qlcd_wp_chatbot_load_more', maybe_serialize(sanitize_array($qlcd_wp_chatbot_load_more))); |
|
1858
|
1602
|
} |
|
1859
|
1603
|
//Order |
|
1860
|
1604
|
if(isset($_POST["qlcd_wp_chatbot_wildcard_order"])){ |
|
1861
|
|
- $qlcd_wp_chatbot_wildcard_order = @wp_unslash($_POST["qlcd_wp_chatbot_wildcard_order"]); |
|
1605
|
+ $qlcd_wp_chatbot_wildcard_order = @$_POST["qlcd_wp_chatbot_wildcard_order"]; |
|
1862
|
1606
|
update_option('qlcd_wp_chatbot_wildcard_order', maybe_serialize(sanitize_array($qlcd_wp_chatbot_wildcard_order))); |
|
1863
|
1607
|
} |
|
1864
|
1608
|
if(isset($_POST["qlcd_wp_chatbot_order_welcome"])){ |
|
1865
|
|
- $qlcd_wp_chatbot_order_welcome = @wp_unslash($_POST["qlcd_wp_chatbot_order_welcome"]); |
|
1609
|
+ $qlcd_wp_chatbot_order_welcome = @$_POST["qlcd_wp_chatbot_order_welcome"]; |
|
1866
|
1610
|
update_option('qlcd_wp_chatbot_order_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_welcome))); |
|
1867
|
1611
|
} |
|
1868
|
1612
|
if(isset($_POST["qlcd_wp_chatbot_order_username_asking"])){ |
|
1869
|
|
- $qlcd_wp_chatbot_order_username_asking = @wp_unslash($_POST["qlcd_wp_chatbot_order_username_asking"]); |
|
1613
|
+ $qlcd_wp_chatbot_order_username_asking = @$_POST["qlcd_wp_chatbot_order_username_asking"]; |
|
1870
|
1614
|
update_option('qlcd_wp_chatbot_order_username_asking', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_username_asking))); |
|
1871
|
1615
|
} |
|
1872
|
1616
|
if(isset($_POST["qlcd_wp_chatbot_order_username_not_exist"])){ |
|
1873
|
|
- $qlcd_wp_chatbot_order_username_not_exist = @wp_unslash($_POST["qlcd_wp_chatbot_order_username_not_exist"]); |
|
1617
|
+ $qlcd_wp_chatbot_order_username_not_exist = @$_POST["qlcd_wp_chatbot_order_username_not_exist"]; |
|
1874
|
1618
|
update_option('qlcd_wp_chatbot_order_username_not_exist', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_username_not_exist))); |
|
1875
|
1619
|
} |
|
1876
|
1620
|
if (isset($_POST["qlcd_wp_chatbot_order_username_thanks"])) { |
|
1877
|
1621
|
// Unslash the input first, then sanitize deeply as text, assuming it's an array of texts or a single text. |
|
@@ -1879,55 +1623,52 @@ |
|
1879
|
1623
|
$qlcd_wp_chatbot_order_username_thanks = map_deep($unslashed_data, 'sanitize_text_field'); |
|
1880
|
1624
|
update_option('qlcd_wp_chatbot_order_username_thanks', maybe_serialize($qlcd_wp_chatbot_order_username_thanks)); |
|
1881
|
1625
|
} |
|
1882
|
1626
|
if(isset($_POST["qlcd_wp_chatbot_order_username_password"])){ |
|
1883
|
|
- $qlcd_wp_chatbot_order_username_password = @wp_unslash($_POST["qlcd_wp_chatbot_order_username_password"]); |
|
1627
|
+ $qlcd_wp_chatbot_order_username_password = @$_POST["qlcd_wp_chatbot_order_username_password"]; |
|
1884
|
1628
|
update_option('qlcd_wp_chatbot_order_username_password', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_username_password))); |
|
1885
|
1629
|
} |
|
1886
|
1630
|
if(isset($_POST["qlcd_wp_chatbot_order_password_incorrect"])){ |
|
1887
|
|
- $qlcd_wp_chatbot_order_password_incorrect= @wp_unslash($_POST["qlcd_wp_chatbot_order_password_incorrect"]); |
|
1631
|
+ $qlcd_wp_chatbot_order_password_incorrect= @$_POST["qlcd_wp_chatbot_order_password_incorrect"]; |
|
1888
|
1632
|
update_option('qlcd_wp_chatbot_order_password_incorrect', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_password_incorrect))); |
|
1889
|
1633
|
} |
|
1890
|
1634
|
if(isset($_POST["qlcd_wp_chatbot_order_not_found"])){ |
|
1891
|
|
- $qlcd_wp_chatbot_order_not_found= @wp_unslash($_POST["qlcd_wp_chatbot_order_not_found"]); |
|
1635
|
+ $qlcd_wp_chatbot_order_not_found= @$_POST["qlcd_wp_chatbot_order_not_found"]; |
|
1892
|
1636
|
update_option('qlcd_wp_chatbot_order_not_found', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_not_found))); |
|
1893
|
1637
|
} |
|
1894
|
1638
|
if(isset($_POST["qlcd_wp_chatbot_order_found"])){ |
|
1895
|
|
- $qlcd_wp_chatbot_order_found= @wp_unslash($_POST["qlcd_wp_chatbot_order_found"]); |
|
1639
|
+ $qlcd_wp_chatbot_order_found= @$_POST["qlcd_wp_chatbot_order_found"]; |
|
1896
|
1640
|
update_option('qlcd_wp_chatbot_order_found', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_found))); |
|
1897
|
1641
|
} |
|
1898
|
1642
|
if(isset( $_POST["qlcd_wp_chatbot_order_email_support"])){ |
|
1899
|
|
- $qlcd_wp_chatbot_order_email_support= @wp_unslash($_POST["qlcd_wp_chatbot_order_email_support"]); |
|
1643
|
+ $qlcd_wp_chatbot_order_email_support= @$_POST["qlcd_wp_chatbot_order_email_support"]; |
|
1900
|
1644
|
update_option('qlcd_wp_chatbot_order_email_support', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_email_support))); |
|
1901
|
1645
|
} |
|
1902
|
1646
|
//Support |
|
1903
|
1647
|
if (isset($_POST["qlcd_wp_chatbot_support_welcome"])) { |
|
1904
|
|
- $qlcd_wp_chatbot_support_welcome = wp_unslash($_POST["qlcd_wp_chatbot_support_welcome"]); |
|
1905
|
|
- $qlcd_wp_chatbot_support_welcome = sanitize_array($qlcd_wp_chatbot_support_welcome); |
|
1648
|
+ $qlcd_wp_chatbot_support_welcome = sanitize_array($_POST["qlcd_wp_chatbot_support_welcome"]); |
|
1906
|
1649
|
update_option('qlcd_wp_chatbot_support_welcome', maybe_serialize($qlcd_wp_chatbot_support_welcome)); |
|
1907
|
1650
|
} |
|
1908
|
1651
|
if (isset($_POST["qlcd_wp_chatbot_support_email"])) { |
|
1909
|
|
- $qlcd_wp_chatbot_support_email = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_support_email"])); |
|
1652
|
+ $qlcd_wp_chatbot_support_email = sanitize_text_field($_POST["qlcd_wp_chatbot_support_email"]); |
|
1910
|
1653
|
update_option('qlcd_wp_chatbot_support_email', $qlcd_wp_chatbot_support_email); |
|
1911
|
1654
|
} |
|
1912
|
1655
|
if (isset($_POST["qlcd_wp_chatbot_asking_email"])) { |
|
1913
|
|
- $qlcd_wp_chatbot_asking_email = wp_unslash($_POST["qlcd_wp_chatbot_asking_email"]); |
|
1914
|
|
- $qlcd_wp_chatbot_asking_email = sanitize_array($qlcd_wp_chatbot_asking_email); |
|
1656
|
+ $qlcd_wp_chatbot_asking_email = sanitize_array($_POST["qlcd_wp_chatbot_asking_email"]); |
|
1915
|
1657
|
update_option('qlcd_wp_chatbot_asking_email', maybe_serialize($qlcd_wp_chatbot_asking_email)); |
|
1916
|
1658
|
} |
|
1917
|
1659
|
if (isset($_POST["qlcd_wp_chatbot_asking_msg"])) { |
|
1918
|
|
- $qlcd_wp_chatbot_asking_msg = wp_unslash($_POST["qlcd_wp_chatbot_asking_msg"]); |
|
1919
|
|
- $qlcd_wp_chatbot_asking_msg = sanitize_array($qlcd_wp_chatbot_asking_msg); |
|
1660
|
+ $qlcd_wp_chatbot_asking_msg = sanitize_array($_POST["qlcd_wp_chatbot_asking_msg"]); |
|
1920
|
1661
|
update_option('qlcd_wp_chatbot_asking_msg', maybe_serialize($qlcd_wp_chatbot_asking_msg)); |
|
1921
|
1662
|
} |
|
1922
|
1663
|
|
|
1923
|
1664
|
if(isset($_POST["qlcd_wp_chatbot_no_result"])){ |
|
1924
|
|
- $qlcd_wp_chatbot_no_result = @wp_unslash($_POST["qlcd_wp_chatbot_no_result"]); |
|
1665
|
+ $qlcd_wp_chatbot_no_result = @$_POST["qlcd_wp_chatbot_no_result"]; |
|
1925
|
1666
|
update_option('qlcd_wp_chatbot_no_result', maybe_serialize(sanitize_array($qlcd_wp_chatbot_no_result))); |
|
1926
|
1667
|
} |
|
1927
|
1668
|
|
|
1928
|
1669
|
if (isset($_POST["qlcd_wp_chatbot_support_option_again"])) { |
|
1929
|
|
- $qlcd_wp_chatbot_support_option_again = wp_unslash($_POST["qlcd_wp_chatbot_support_option_again"]); |
|
1670
|
+ $qlcd_wp_chatbot_support_option_again = $_POST["qlcd_wp_chatbot_support_option_again"]; |
|
1930
|
1671
|
update_option('qlcd_wp_chatbot_support_option_again', maybe_serialize(sanitize_array($qlcd_wp_chatbot_support_option_again))); |
|
1931
|
1672
|
} else { |
|
1932
|
1673
|
update_option('qlcd_wp_chatbot_support_option_again', maybe_serialize(array())); |
|
1933
|
1674
|
} |
|
@@ -1932,9 +1673,9 @@ |
|
1932
|
1673
|
update_option('qlcd_wp_chatbot_support_option_again', maybe_serialize(array())); |
|
1933
|
1674
|
} |
|
1934
|
1675
|
|
|
1935
|
1676
|
if (isset($_POST["qlcd_wp_chatbot_invalid_email"])) { |
|
1936
|
|
- $qlcd_wp_chatbot_invalid_email = wp_unslash($_POST["qlcd_wp_chatbot_invalid_email"]); |
|
1677
|
+ $qlcd_wp_chatbot_invalid_email = $_POST["qlcd_wp_chatbot_invalid_email"]; |
|
1937
|
1678
|
update_option('qlcd_wp_chatbot_invalid_email', maybe_serialize(sanitize_array($qlcd_wp_chatbot_invalid_email))); |
|
1938
|
1679
|
} else { |
|
1939
|
1680
|
update_option('qlcd_wp_chatbot_invalid_email', maybe_serialize(array())); |
|
1940
|
1681
|
} |
|
@@ -1939,9 +1680,9 @@ |
|
1939
|
1680
|
update_option('qlcd_wp_chatbot_invalid_email', maybe_serialize(array())); |
|
1940
|
1681
|
} |
|
1941
|
1682
|
|
|
1942
|
1683
|
if (isset($_POST["qlcd_wp_chatbot_support_phone"])) { |
|
1943
|
|
- $qlcd_wp_chatbot_support_phone = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_support_phone"])); |
|
1684
|
+ $qlcd_wp_chatbot_support_phone = sanitize_text_field($_POST["qlcd_wp_chatbot_support_phone"]); |
|
1944
|
1685
|
update_option('qlcd_wp_chatbot_support_phone', $qlcd_wp_chatbot_support_phone); |
|
1945
|
1686
|
} else { |
|
1946
|
1687
|
update_option('qlcd_wp_chatbot_support_phone', ''); |
|
1947
|
1688
|
} |
|
@@ -1946,9 +1687,9 @@ |
|
1946
|
1687
|
update_option('qlcd_wp_chatbot_support_phone', ''); |
|
1947
|
1688
|
} |
|
1948
|
1689
|
|
|
1949
|
1690
|
if (isset($_POST["qlcd_wp_chatbot_asking_phone"])) { |
|
1950
|
|
- $qlcd_wp_chatbot_asking_phone = wp_unslash($_POST["qlcd_wp_chatbot_asking_phone"]); |
|
1691
|
+ $qlcd_wp_chatbot_asking_phone = $_POST["qlcd_wp_chatbot_asking_phone"]; |
|
1951
|
1692
|
update_option('qlcd_wp_chatbot_asking_phone', maybe_serialize(sanitize_array($qlcd_wp_chatbot_asking_phone))); |
|
1952
|
1693
|
} else { |
|
1953
|
1694
|
update_option('qlcd_wp_chatbot_asking_phone', maybe_serialize(array())); |
|
1954
|
1695
|
} |
|
@@ -1953,9 +1694,9 @@ |
|
1953
|
1694
|
update_option('qlcd_wp_chatbot_asking_phone', maybe_serialize(array())); |
|
1954
|
1695
|
} |
|
1955
|
1696
|
|
|
1956
|
1697
|
if (isset($_POST["qlcd_wp_chatbot_thank_for_phone"])) { |
|
1957
|
|
- $qlcd_wp_chatbot_thank_for_phone = wp_unslash($_POST["qlcd_wp_chatbot_thank_for_phone"]); |
|
1698
|
+ $qlcd_wp_chatbot_thank_for_phone = $_POST["qlcd_wp_chatbot_thank_for_phone"]; |
|
1958
|
1699
|
update_option('qlcd_wp_chatbot_thank_for_phone', maybe_serialize(sanitize_array($qlcd_wp_chatbot_thank_for_phone))); |
|
1959
|
1700
|
} else { |
|
1960
|
1701
|
update_option('qlcd_wp_chatbot_thank_for_phone', maybe_serialize(array())); |
|
1961
|
1702
|
} |
|
@@ -1960,9 +1701,9 @@ |
|
1960
|
1701
|
update_option('qlcd_wp_chatbot_thank_for_phone', maybe_serialize(array())); |
|
1961
|
1702
|
} |
|
1962
|
1703
|
|
|
1963
|
1704
|
if (isset($_POST["qlcd_wp_chatbot_admin_email"])) { |
|
1964
|
|
- $qlcd_wp_chatbot_admin_email = sanitize_email(wp_unslash($_POST["qlcd_wp_chatbot_admin_email"])); |
|
1705
|
+ $qlcd_wp_chatbot_admin_email = sanitize_email($_POST["qlcd_wp_chatbot_admin_email"]); |
|
1965
|
1706
|
} else { |
|
1966
|
1707
|
$qlcd_wp_chatbot_admin_email = ''; |
|
1967
|
1708
|
} |
|
1968
|
1709
|
|
|
@@ -2007,9 +1748,9 @@ |
|
2007
|
1748
|
update_option('qlcd_wp_chatbot_notification_interval', $qlcd_wp_chatbot_notification_interval); |
|
2008
|
1749
|
} |
|
2009
|
1750
|
|
|
2010
|
1751
|
if(isset($_POST["qlcd_wp_chatbot_notifications"])){ |
|
2011
|
|
- $qlcd_wp_chatbot_notifications = @wp_unslash($_POST["qlcd_wp_chatbot_notifications"]); |
|
1752
|
+ $qlcd_wp_chatbot_notifications = @$_POST["qlcd_wp_chatbot_notifications"]; |
|
2012
|
1753
|
update_option('qlcd_wp_chatbot_notifications', maybe_serialize(sanitize_array($qlcd_wp_chatbot_notifications))); |
|
2013
|
1754
|
} |
|
2014
|
1755
|
//Support building part. |
|
2015
|
1756
|
|
|
@@ -2021,9 +1762,9 @@ |
|
2021
|
1762
|
'br' => array(), |
|
2022
|
1763
|
'em' => array(), |
|
2023
|
1764
|
'strong' => array(), |
|
2024
|
1765
|
); |
|
2025
|
|
- $support_query = @wp_unslash($_POST["support_query"]); |
|
1766
|
+ $support_query = @$_POST["support_query"]; |
|
2026
|
1767
|
$clean_support_query = []; |
|
2027
|
1768
|
if(!empty($support_query)){ |
|
2028
|
1769
|
foreach($support_query as $key => $val) { |
|
2029
|
1770
|
|
|
@@ -2030,9 +1771,9 @@ |
|
2030
|
1771
|
$clean_support_query[wp_kses($key,$allowed_html)] = wp_kses($val,$allowed_html); |
|
2031
|
1772
|
} |
|
2032
|
1773
|
} |
|
2033
|
1774
|
update_option('support_query', (maybe_serialize($clean_support_query))); |
|
2034
|
|
- $support_ans = @wp_unslash($_POST["support_ans"]); |
|
1775
|
+ $support_ans = @$_POST["support_ans"]; |
|
2035
|
1776
|
$clean_support_ans = []; |
|
2036
|
1777
|
if(!empty($support_query)){ |
|
2037
|
1778
|
foreach($support_ans as $key => $val) { |
|
2038
|
1779
|
$clean_support_ans[wp_kses($key,$allowed_html)] = wp_kses($val,$allowed_html); |
|
@@ -2040,241 +1781,241 @@ |
|
2040
|
1781
|
} |
|
2041
|
1782
|
update_option('support_ans', (maybe_serialize($clean_support_ans))); |
|
2042
|
1783
|
//Create Mobile app pages. |
|
2043
|
1784
|
if(isset( $_POST["wp_chatbot_app_pages"])) { |
|
2044
|
|
- $wp_chatbot_app_pages = wp_unslash($_POST["wp_chatbot_app_pages"]); |
|
1785
|
+ $wp_chatbot_app_pages = $_POST["wp_chatbot_app_pages"]; |
|
2045
|
1786
|
}else{ $wp_chatbot_app_pages='';} |
|
2046
|
1787
|
update_option('wp_chatbot_app_pages', wp_unslash($wp_chatbot_app_pages)); |
|
2047
|
1788
|
//Messenger Options |
|
2048
|
1789
|
if(isset( $_POST["enable_wp_chatbot_messenger"])) { |
|
2049
|
|
- $enable_wp_chatbot_messenger = wp_unslash($_POST["enable_wp_chatbot_messenger"]); |
|
1790
|
+ $enable_wp_chatbot_messenger = $_POST["enable_wp_chatbot_messenger"]; |
|
2050
|
1791
|
}else{ $enable_wp_chatbot_messenger='';} |
|
2051
|
1792
|
update_option('enable_wp_chatbot_messenger', wp_unslash($enable_wp_chatbot_messenger)); |
|
2052
|
1793
|
if(isset( $_POST["enable_wp_chatbot_messenger_floating_icon"])) { |
|
2053
|
|
- $enable_wp_chatbot_messenger_floating_icon = wp_unslash($_POST["enable_wp_chatbot_messenger_floating_icon"]); |
|
1794
|
+ $enable_wp_chatbot_messenger_floating_icon = $_POST["enable_wp_chatbot_messenger_floating_icon"]; |
|
2054
|
1795
|
}else{ $enable_wp_chatbot_messenger_floating_icon='';} |
|
2055
|
1796
|
update_option('enable_wp_chatbot_messenger_floating_icon', wp_unslash($enable_wp_chatbot_messenger_floating_icon)); |
|
2056
|
1797
|
if(isset($_POST["qlcd_wp_chatbot_fb_app_id"])){ |
|
2057
|
|
- $qlcd_wp_chatbot_fb_app_id = @wp_unslash($_POST["qlcd_wp_chatbot_fb_app_id"]); |
|
1798
|
+ $qlcd_wp_chatbot_fb_app_id = @$_POST["qlcd_wp_chatbot_fb_app_id"]; |
|
2058
|
1799
|
update_option('qlcd_wp_chatbot_fb_app_id', sanitize_text_field($qlcd_wp_chatbot_fb_app_id)); |
|
2059
|
1800
|
} |
|
2060
|
1801
|
if(isset($_POST["qlcd_wp_chatbot_fb_page_id"])){ |
|
2061
|
|
- $qlcd_wp_chatbot_fb_page_id = @wp_unslash($_POST["qlcd_wp_chatbot_fb_page_id"]); |
|
1802
|
+ $qlcd_wp_chatbot_fb_page_id = @$_POST["qlcd_wp_chatbot_fb_page_id"]; |
|
2062
|
1803
|
update_option('qlcd_wp_chatbot_fb_page_id', sanitize_text_field($qlcd_wp_chatbot_fb_page_id)); |
|
2063
|
1804
|
} |
|
2064
|
1805
|
if(isset($_POST["qlcd_wp_chatbot_fb_color"])){ |
|
2065
|
|
- $qlcd_wp_chatbot_fb_color= @wp_unslash($_POST["qlcd_wp_chatbot_fb_color"]); |
|
1806
|
+ $qlcd_wp_chatbot_fb_color= @$_POST["qlcd_wp_chatbot_fb_color"]; |
|
2066
|
1807
|
update_option('qlcd_wp_chatbot_fb_color', wp_unslash($qlcd_wp_chatbot_fb_color)); |
|
2067
|
1808
|
} |
|
2068
|
1809
|
if(isset($_POST["qlcd_wp_chatbot_fb_in_msg"])){ |
|
2069
|
|
- $qlcd_wp_chatbot_fb_in_msg = @wp_unslash($_POST["qlcd_wp_chatbot_fb_in_msg"]); |
|
1810
|
+ $qlcd_wp_chatbot_fb_in_msg = @$_POST["qlcd_wp_chatbot_fb_in_msg"]; |
|
2070
|
1811
|
update_option('qlcd_wp_chatbot_fb_in_msg', stripslashes(sanitize_text_field($qlcd_wp_chatbot_fb_in_msg))); |
|
2071
|
1812
|
} |
|
2072
|
1813
|
if(isset($_POST["qlcd_wp_chatbot_fb_out_msg"])){ |
|
2073
|
|
- $qlcd_wp_chatbot_fb_out_msg = @wp_unslash($_POST["qlcd_wp_chatbot_fb_out_msg"]); |
|
1814
|
+ $qlcd_wp_chatbot_fb_out_msg = @$_POST["qlcd_wp_chatbot_fb_out_msg"]; |
|
2074
|
1815
|
update_option('qlcd_wp_chatbot_fb_out_msg', stripslashes(sanitize_text_field($qlcd_wp_chatbot_fb_out_msg))); |
|
2075
|
1816
|
} |
|
2076
|
1817
|
//Skype option |
|
2077
|
1818
|
if(isset( $_POST["enable_wp_chatbot_skype_floating_icon"])) { |
|
2078
|
|
- $enable_wp_chatbot_skype_floating_icon = wp_unslash($_POST["enable_wp_chatbot_skype_floating_icon"]); |
|
1819
|
+ $enable_wp_chatbot_skype_floating_icon = $_POST["enable_wp_chatbot_skype_floating_icon"]; |
|
2079
|
1820
|
}else{ $enable_wp_chatbot_skype_floating_icon='';} |
|
2080
|
1821
|
update_option('enable_wp_chatbot_skype_floating_icon', sanitize_text_field($enable_wp_chatbot_skype_floating_icon)); |
|
2081
|
1822
|
if(isset( $_POST["enable_wp_chatbot_skype_id"])) { |
|
2082
|
|
- $enable_wp_chatbot_skype_id = wp_unslash($_POST["enable_wp_chatbot_skype_id"]); |
|
1823
|
+ $enable_wp_chatbot_skype_id = $_POST["enable_wp_chatbot_skype_id"]; |
|
2083
|
1824
|
}else{ $enable_wp_chatbot_skype_id='';} |
|
2084
|
1825
|
update_option('enable_wp_chatbot_skype_id', sanitize_text_field($enable_wp_chatbot_skype_id)); |
|
2085
|
1826
|
//WhatsApp |
|
2086
|
1827
|
if(isset( $_POST["enable_wp_chatbot_whats"])) { |
|
2087
|
|
- $enable_wp_chatbot_whats= wp_unslash($_POST["enable_wp_chatbot_whats"]); |
|
1828
|
+ $enable_wp_chatbot_whats= $_POST["enable_wp_chatbot_whats"]; |
|
2088
|
1829
|
}else{ $enable_wp_chatbot_whats='';} |
|
2089
|
1830
|
update_option('enable_wp_chatbot_whats', sanitize_text_field($enable_wp_chatbot_whats)); |
|
2090
|
1831
|
if(isset($_POST["qlcd_wp_chatbot_whats_label"])){ |
|
2091
|
|
- $qlcd_wp_chatbot_whats_label = @wp_unslash($_POST["qlcd_wp_chatbot_whats_label"]); |
|
1832
|
+ $qlcd_wp_chatbot_whats_label = @$_POST["qlcd_wp_chatbot_whats_label"]; |
|
2092
|
1833
|
update_option('qlcd_wp_chatbot_whats_label', maybe_serialize(sanitize_array($qlcd_wp_chatbot_whats_label))); |
|
2093
|
1834
|
} |
|
2094
|
1835
|
if(isset( $_POST["enable_wp_chatbot_floating_whats"])) { |
|
2095
|
|
- $enable_wp_chatbot_floating_whats= wp_unslash($_POST["enable_wp_chatbot_floating_whats"]); |
|
1836
|
+ $enable_wp_chatbot_floating_whats= $_POST["enable_wp_chatbot_floating_whats"]; |
|
2096
|
1837
|
}else{ $enable_wp_chatbot_floating_whats='';} |
|
2097
|
1838
|
update_option('enable_wp_chatbot_floating_whats', sanitize_text_field($enable_wp_chatbot_floating_whats)); |
|
2098
|
1839
|
if(isset($_POST["qlcd_wp_chatbot_whats_num"])){ |
|
2099
|
|
- $qlcd_wp_chatbot_whats_num = @wp_unslash($_POST["qlcd_wp_chatbot_whats_num"]); |
|
1840
|
+ $qlcd_wp_chatbot_whats_num = @$_POST["qlcd_wp_chatbot_whats_num"]; |
|
2100
|
1841
|
update_option('qlcd_wp_chatbot_whats_num', sanitize_text_field($qlcd_wp_chatbot_whats_num)); |
|
2101
|
1842
|
} |
|
2102
|
1843
|
//Viber |
|
2103
|
1844
|
if(isset( $_POST["enable_wp_chatbot_floating_viber"])) { |
|
2104
|
|
- $enable_wp_chatbot_floating_viber = wp_unslash($_POST["enable_wp_chatbot_floating_viber"]); |
|
1845
|
+ $enable_wp_chatbot_floating_viber = $_POST["enable_wp_chatbot_floating_viber"]; |
|
2105
|
1846
|
}else{ $enable_wp_chatbot_floating_viber='';} |
|
2106
|
1847
|
update_option('enable_wp_chatbot_floating_viber', sanitize_text_field($enable_wp_chatbot_floating_viber)); |
|
2107
|
1848
|
if(isset($_POST["qlcd_wp_chatbot_viber_acc"])){ |
|
2108
|
|
- $qlcd_wp_chatbot_viber_acc = @wp_unslash($_POST["qlcd_wp_chatbot_viber_acc"]); |
|
1849
|
+ $qlcd_wp_chatbot_viber_acc = @$_POST["qlcd_wp_chatbot_viber_acc"]; |
|
2109
|
1850
|
update_option('qlcd_wp_chatbot_viber_acc', sanitize_text_field($qlcd_wp_chatbot_viber_acc)); |
|
2110
|
1851
|
} |
|
2111
|
1852
|
//Others integration |
|
2112
|
1853
|
if(isset( $_POST["enable_wp_chatbot_floating_phone"])) { |
|
2113
|
|
- $enable_wp_chatbot_floating_phone = wp_unslash($_POST["enable_wp_chatbot_floating_phone"]); |
|
1854
|
+ $enable_wp_chatbot_floating_phone = $_POST["enable_wp_chatbot_floating_phone"]; |
|
2114
|
1855
|
}else{ $enable_wp_chatbot_floating_phone='';} |
|
2115
|
1856
|
update_option('enable_wp_chatbot_floating_phone', sanitize_text_field($enable_wp_chatbot_floating_phone)); |
|
2116
|
1857
|
if(isset($_POST["qlcd_wp_chatbot_phone"])){ |
|
2117
|
|
- $qlcd_wp_chatbot_phone = @wp_unslash($_POST["qlcd_wp_chatbot_phone"]); |
|
1858
|
+ $qlcd_wp_chatbot_phone = @$_POST["qlcd_wp_chatbot_phone"]; |
|
2118
|
1859
|
update_option('qlcd_wp_chatbot_phone', sanitize_text_field($qlcd_wp_chatbot_phone)); |
|
2119
|
1860
|
} |
|
2120
|
1861
|
|
|
2121
|
1862
|
if(isset( $_POST["enable_wp_chatbot_floating_link"])) { |
|
2122
|
|
- $enable_wp_chatbot_floating_link = wp_unslash($_POST["enable_wp_chatbot_floating_link"]); |
|
1863
|
+ $enable_wp_chatbot_floating_link = $_POST["enable_wp_chatbot_floating_link"]; |
|
2123
|
1864
|
}else{ $enable_wp_chatbot_floating_link='';} |
|
2124
|
1865
|
update_option('enable_wp_chatbot_floating_link', sanitize_text_field($enable_wp_chatbot_floating_link)); |
|
2125
|
1866
|
if(isset($_POST["qlcd_wp_chatbot_weblink"])){ |
|
2126
|
|
- $qlcd_wp_chatbot_weblink = @wp_unslash($_POST["qlcd_wp_chatbot_weblink"]); |
|
1867
|
+ $qlcd_wp_chatbot_weblink = @$_POST["qlcd_wp_chatbot_weblink"]; |
|
2127
|
1868
|
update_option('qlcd_wp_chatbot_weblink', sanitize_text_field($qlcd_wp_chatbot_weblink)); |
|
2128
|
1869
|
} |
|
2129
|
1870
|
|
|
2130
|
1871
|
//Re Targetting. |
|
2131
|
1872
|
if(isset($_POST["qlcd_wp_chatbot_ret_greet"])){ |
|
2132
|
|
- $qlcd_wp_chatbot_ret_greet = @wp_unslash($_POST["qlcd_wp_chatbot_ret_greet"]); |
|
1873
|
+ $qlcd_wp_chatbot_ret_greet = @$_POST["qlcd_wp_chatbot_ret_greet"]; |
|
2133
|
1874
|
update_option('qlcd_wp_chatbot_ret_greet', sanitize_text_field($qlcd_wp_chatbot_ret_greet)); |
|
2134
|
1875
|
} |
|
2135
|
1876
|
|
|
2136
|
1877
|
if(isset( $_POST["enable_wp_chatbot_exit_intent"])) { |
|
2137
|
|
- $enable_wp_chatbot_exit_intent = wp_unslash($_POST["enable_wp_chatbot_exit_intent"]); |
|
1878
|
+ $enable_wp_chatbot_exit_intent = $_POST["enable_wp_chatbot_exit_intent"]; |
|
2138
|
1879
|
}else{ $enable_wp_chatbot_exit_intent='';} |
|
2139
|
1880
|
update_option('enable_wp_chatbot_exit_intent', sanitize_text_field($enable_wp_chatbot_exit_intent)); |
|
2140
|
1881
|
|
|
2141
|
1882
|
if(isset($_POST["wp_chatbot_exit_intent_msg"])){ |
|
2142
|
|
- $wp_chatbot_exit_intent_msg = @wp_unslash($_POST["wp_chatbot_exit_intent_msg"]); |
|
1883
|
+ $wp_chatbot_exit_intent_msg = @$_POST["wp_chatbot_exit_intent_msg"]; |
|
2143
|
1884
|
update_option('wp_chatbot_exit_intent_msg', wp_unslash($wp_chatbot_exit_intent_msg)); |
|
2144
|
1885
|
} |
|
2145
|
1886
|
|
|
2146
|
1887
|
if(isset( $_POST["wp_chatbot_exit_intent_once"])) { |
|
2147
|
|
- $wp_chatbot_exit_intent_once = wp_unslash($_POST["wp_chatbot_exit_intent_once"]); |
|
1888
|
+ $wp_chatbot_exit_intent_once = $_POST["wp_chatbot_exit_intent_once"]; |
|
2148
|
1889
|
}else{ $wp_chatbot_exit_intent_once='';} |
|
2149
|
1890
|
update_option('wp_chatbot_exit_intent_once', sanitize_text_field($wp_chatbot_exit_intent_once)); |
|
2150
|
1891
|
|
|
2151
|
1892
|
if(isset( $_POST["enable_wp_chatbot_scroll_open"])) { |
|
2152
|
|
- $enable_wp_chatbot_scroll_open = wp_unslash($_POST["enable_wp_chatbot_scroll_open"]); |
|
1893
|
+ $enable_wp_chatbot_scroll_open = $_POST["enable_wp_chatbot_scroll_open"]; |
|
2153
|
1894
|
}else{ $enable_wp_chatbot_scroll_open='';} |
|
2154
|
1895
|
update_option('enable_wp_chatbot_scroll_open', sanitize_text_field($enable_wp_chatbot_scroll_open)); |
|
2155
|
1896
|
|
|
2156
|
1897
|
if(isset($_POST["wp_chatbot_scroll_open_msg"])){ |
|
2157
|
|
- $wp_chatbot_scroll_open_msg= @wp_unslash($_POST["wp_chatbot_scroll_open_msg"]); |
|
1898
|
+ $wp_chatbot_scroll_open_msg= @$_POST["wp_chatbot_scroll_open_msg"]; |
|
2158
|
1899
|
update_option('wp_chatbot_scroll_open_msg', wp_unslash($wp_chatbot_scroll_open_msg)); |
|
2159
|
1900
|
} |
|
2160
|
1901
|
|
|
2161
|
1902
|
if(isset($_POST["wp_chatbot_scroll_percent"])){ |
|
2162
|
|
- $wp_chatbot_scroll_percent= @wp_unslash($_POST["wp_chatbot_scroll_percent"]); |
|
1903
|
+ $wp_chatbot_scroll_percent= @$_POST["wp_chatbot_scroll_percent"]; |
|
2163
|
1904
|
update_option('wp_chatbot_scroll_percent', wp_unslash($wp_chatbot_scroll_percent)); |
|
2164
|
1905
|
} |
|
2165
|
1906
|
|
|
2166
|
1907
|
if(isset( $_POST["wp_chatbot_scroll_once"])) { |
|
2167
|
|
- $wp_chatbot_scroll_once = sanitize_text_field(wp_unslash($_POST["wp_chatbot_scroll_once"])); |
|
1908
|
+ $wp_chatbot_scroll_once = sanitize_text_field($_POST["wp_chatbot_scroll_once"]); |
|
2168
|
1909
|
}else{ $wp_chatbot_scroll_once='';} |
|
2169
|
1910
|
update_option('wp_chatbot_scroll_once', $wp_chatbot_scroll_once); |
|
2170
|
1911
|
|
|
2171
|
1912
|
if(isset( $_POST["enable_wp_chatbot_auto_open"])) { |
|
2172
|
|
- $enable_wp_chatbot_auto_open = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_auto_open"])); |
|
1913
|
+ $enable_wp_chatbot_auto_open = sanitize_text_field($_POST["enable_wp_chatbot_auto_open"]); |
|
2173
|
1914
|
}else{ $enable_wp_chatbot_auto_open='';} |
|
2174
|
1915
|
update_option('enable_wp_chatbot_auto_open', $enable_wp_chatbot_auto_open); |
|
2175
|
1916
|
|
|
2176
|
1917
|
if(isset( $_POST["enable_wp_chatbot_ret_sound"])) { |
|
2177
|
|
- $enable_wp_chatbot_ret_sound = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_ret_sound"])); |
|
1918
|
+ $enable_wp_chatbot_ret_sound = sanitize_text_field($_POST["enable_wp_chatbot_ret_sound"]); |
|
2178
|
1919
|
}else{ $enable_wp_chatbot_ret_sound='';} |
|
2179
|
1920
|
update_option('enable_wp_chatbot_ret_sound', $enable_wp_chatbot_ret_sound); |
|
2180
|
1921
|
|
|
2181
|
1922
|
if(isset( $_POST["enable_wp_chatbot_sound_initial"])) { |
|
2182
|
|
- $enable_wp_chatbot_sound_initial = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_sound_initial"])); |
|
1923
|
+ $enable_wp_chatbot_sound_initial = sanitize_text_field($_POST["enable_wp_chatbot_sound_initial"]); |
|
2183
|
1924
|
}else{ $enable_wp_chatbot_sound_initial='';} |
|
2184
|
1925
|
update_option('enable_wp_chatbot_sound_initial', $enable_wp_chatbot_sound_initial); |
|
2185
|
1926
|
|
|
2186
|
1927
|
|
|
2187
|
1928
|
if(isset($_POST["wp_chatbot_auto_open_msg"])){ |
|
2188
|
|
- $wp_chatbot_auto_open_msg = @wp_unslash($_POST["wp_chatbot_auto_open_msg"]); |
|
1929
|
+ $wp_chatbot_auto_open_msg = @$_POST["wp_chatbot_auto_open_msg"]; |
|
2189
|
1930
|
update_option('wp_chatbot_auto_open_msg', wp_unslash($wp_chatbot_auto_open_msg)); |
|
2190
|
1931
|
} |
|
2191
|
1932
|
|
|
2192
|
1933
|
if(isset($_POST["wp_chatbot_auto_open_time"])){ |
|
2193
|
|
- $wp_chatbot_auto_open_time = @wp_unslash($_POST["wp_chatbot_auto_open_time"]); |
|
1934
|
+ $wp_chatbot_auto_open_time = @$_POST["wp_chatbot_auto_open_time"]; |
|
2194
|
1935
|
update_option('wp_chatbot_auto_open_time', wp_unslash($wp_chatbot_auto_open_time)); |
|
2195
|
1936
|
} |
|
2196
|
1937
|
//to complate checkout. |
|
2197
|
1938
|
if(isset( $_POST["enable_wp_chatbot_ret_user_show"])) { |
|
2198
|
|
- $enable_wp_chatbot_ret_user_show = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_ret_user_show"])); |
|
1939
|
+ $enable_wp_chatbot_ret_user_show = sanitize_text_field($_POST["enable_wp_chatbot_ret_user_show"]); |
|
2199
|
1940
|
}else{ $enable_wp_chatbot_ret_user_show='';} |
|
2200
|
1941
|
update_option('enable_wp_chatbot_ret_user_show', $enable_wp_chatbot_ret_user_show); |
|
2201
|
1942
|
|
|
2202
|
1943
|
if(isset( $_POST["enable_wp_chatbot_inactive_time_show"])) { |
|
2203
|
|
- $enable_wp_chatbot_inactive_time_show = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_inactive_time_show"])); |
|
1944
|
+ $enable_wp_chatbot_inactive_time_show = sanitize_text_field($_POST["enable_wp_chatbot_inactive_time_show"]); |
|
2204
|
1945
|
}else{ $enable_wp_chatbot_inactive_time_show='';} |
|
2205
|
1946
|
update_option('enable_wp_chatbot_inactive_time_show', $enable_wp_chatbot_inactive_time_show); |
|
2206
|
1947
|
|
|
2207
|
1948
|
if(isset($_POST["wp_chatbot_inactive_time"])){ |
|
2208
|
|
- $wp_chatbot_inactive_time = @wp_unslash($_POST["wp_chatbot_inactive_time"]); |
|
1949
|
+ $wp_chatbot_inactive_time = @$_POST["wp_chatbot_inactive_time"]; |
|
2209
|
1950
|
update_option('wp_chatbot_inactive_time', sanitize_text_field($wp_chatbot_inactive_time)); |
|
2210
|
1951
|
} |
|
2211
|
1952
|
|
|
2212
|
1953
|
if(isset($_POST["wp_chatbot_checkout_msg"])){ |
|
2213
|
|
- $wp_chatbot_checkout_msg = @wp_unslash($_POST["wp_chatbot_checkout_msg"]); |
|
1954
|
+ $wp_chatbot_checkout_msg = @$_POST["wp_chatbot_checkout_msg"]; |
|
2214
|
1955
|
update_option('wp_chatbot_checkout_msg', wp_unslash($wp_chatbot_checkout_msg)); |
|
2215
|
1956
|
} |
|
2216
|
1957
|
|
|
2217
|
1958
|
if(isset( $_POST["wp_chatbot_auto_open_once"])) { |
|
2218
|
|
- $wp_chatbot_auto_open_once = sanitize_text_field(wp_unslash($_POST["wp_chatbot_auto_open_once"])); |
|
1959
|
+ $wp_chatbot_auto_open_once = sanitize_text_field($_POST["wp_chatbot_auto_open_once"]); |
|
2219
|
1960
|
}else{ $wp_chatbot_auto_open_once='';} |
|
2220
|
1961
|
update_option('wp_chatbot_auto_open_once', $wp_chatbot_auto_open_once); |
|
2221
|
1962
|
|
|
2222
|
1963
|
if(isset( $_POST["wp_chatbot_inactive_once"])) { |
|
2223
|
|
- $wp_chatbot_inactive_once = sanitize_text_field(wp_unslash($_POST["wp_chatbot_inactive_once"])); |
|
1964
|
+ $wp_chatbot_inactive_once = sanitize_text_field($_POST["wp_chatbot_inactive_once"]); |
|
2224
|
1965
|
}else{ $wp_chatbot_inactive_once='';} |
|
2225
|
1966
|
update_option('wp_chatbot_inactive_once', $wp_chatbot_inactive_once); |
|
2226
|
1967
|
|
|
2227
|
1968
|
|
|
2228
|
1969
|
if(isset($_POST["wp_chatbot_proactive_bg_color"])){ |
|
2229
|
|
- $wp_chatbot_proactive_bg_color = @wp_unslash($_POST["wp_chatbot_proactive_bg_color"]); |
|
1970
|
+ $wp_chatbot_proactive_bg_color = @$_POST["wp_chatbot_proactive_bg_color"]; |
|
2230
|
1971
|
update_option('wp_chatbot_proactive_bg_color', sanitize_text_field($wp_chatbot_proactive_bg_color)); |
|
2231
|
1972
|
} |
|
2232
|
1973
|
|
|
2233
|
1974
|
if(isset( $_POST["disable_wp_chatbot_call_gen"])) { |
|
2234
|
|
- $disable_wp_chatbot_call_gen = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_call_gen"])); |
|
1975
|
+ $disable_wp_chatbot_call_gen = sanitize_text_field($_POST["disable_wp_chatbot_call_gen"]); |
|
2235
|
1976
|
}else{ $disable_wp_chatbot_call_gen='';} |
|
2236
|
1977
|
update_option('disable_wp_chatbot_call_gen', $disable_wp_chatbot_call_gen); |
|
2237
|
1978
|
|
|
2238
|
1979
|
if(isset( $_POST["disable_wp_chatbot_site_search"])) { |
|
2239
|
|
- $disable_wp_chatbot_site_search = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_site_search"])); |
|
1980
|
+ $disable_wp_chatbot_site_search = sanitize_text_field($_POST["disable_wp_chatbot_site_search"]); |
|
2240
|
1981
|
update_option('enable_wp_chatbot_post_content', ''); |
|
2241
|
1982
|
}else{ $disable_wp_chatbot_site_search='';} |
|
2242
|
1983
|
update_option('disable_wp_chatbot_site_search', $disable_wp_chatbot_site_search); |
|
2243
|
1984
|
|
|
2244
|
1985
|
if(isset( $_POST["enable_wp_chatbot_post_content"])) { |
|
2245
|
|
- $enable_wp_chatbot_post_content = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_post_content"])); |
|
1986
|
+ $enable_wp_chatbot_post_content = sanitize_text_field($_POST["enable_wp_chatbot_post_content"]); |
|
2246
|
1987
|
|
|
2247
|
1988
|
}else{ $enable_wp_chatbot_post_content='';} |
|
2248
|
1989
|
update_option('enable_wp_chatbot_post_content', $enable_wp_chatbot_post_content); |
|
2249
|
1990
|
|
|
2250
|
1991
|
if(isset( $_POST["disable_wp_chatbot_call_sup"])) { |
|
2251
|
|
- $disable_wp_chatbot_call_sup = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_call_sup"])); |
|
1992
|
+ $disable_wp_chatbot_call_sup = sanitize_text_field($_POST["disable_wp_chatbot_call_sup"]); |
|
2252
|
1993
|
}else{ $disable_wp_chatbot_call_sup='';} |
|
2253
|
1994
|
update_option('disable_wp_chatbot_call_sup', $disable_wp_chatbot_call_sup); |
|
2254
|
1995
|
|
|
2255
|
1996
|
if(isset( $_POST["disable_wp_chatbot_feedback"])) { |
|
2256
|
|
- $disable_wp_chatbot_feedback = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_feedback"])); |
|
1997
|
+ $disable_wp_chatbot_feedback = sanitize_text_field($_POST["disable_wp_chatbot_feedback"]); |
|
2257
|
1998
|
}else{ $disable_wp_chatbot_feedback='';} |
|
2258
|
1999
|
update_option('disable_wp_chatbot_feedback', $disable_wp_chatbot_feedback); |
|
2259
|
2000
|
|
|
2260
|
2001
|
if(isset( $_POST["disable_wp_chatbot_faq"])) { |
|
2261
|
|
- $disable_wp_chatbot_faq = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_faq"])); |
|
2002
|
+ $disable_wp_chatbot_faq = sanitize_text_field($_POST["disable_wp_chatbot_faq"]); |
|
2262
|
2003
|
}else{ $disable_wp_chatbot_faq='';} |
|
2263
|
2004
|
update_option('disable_wp_chatbot_faq', $disable_wp_chatbot_faq); |
|
2264
|
2005
|
|
|
2265
|
2006
|
if(isset($_POST["qlcd_wp_chatbot_feedback_label"])){ |
|
2266
|
|
- $qlcd_wp_chatbot_feedback_label = (@wp_unslash($_POST["qlcd_wp_chatbot_feedback_label"])); |
|
2007
|
+ $qlcd_wp_chatbot_feedback_label = (@$_POST["qlcd_wp_chatbot_feedback_label"]); |
|
2267
|
2008
|
update_option('qlcd_wp_chatbot_feedback_label', maybe_serialize(sanitize_array($qlcd_wp_chatbot_feedback_label))); |
|
2268
|
2009
|
} |
|
2269
|
2010
|
|
|
2270
|
2011
|
if(isset( $_POST["enable_wp_chatbot_meta_title"])) { |
|
2271
|
|
- $enable_wp_chatbot_meta_title = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_meta_title"])); |
|
2012
|
+ $enable_wp_chatbot_meta_title = sanitize_text_field($_POST["enable_wp_chatbot_meta_title"]); |
|
2272
|
2013
|
}else{ $enable_wp_chatbot_meta_title='';} |
|
2273
|
2014
|
update_option('enable_wp_chatbot_meta_title', $enable_wp_chatbot_meta_title); |
|
2274
|
2015
|
|
|
2275
|
2016
|
if(isset($_POST["qlcd_wp_chatbot_meta_label"])){ |
|
2276
|
|
- $qlcd_wp_chatbot_meta_label = esc_html(@wp_unslash($_POST["qlcd_wp_chatbot_meta_label"])); |
|
2017
|
+ $qlcd_wp_chatbot_meta_label = esc_html(@$_POST["qlcd_wp_chatbot_meta_label"]); |
|
2277
|
2018
|
update_option('qlcd_wp_chatbot_meta_label', stripslashes(sanitize_text_field($qlcd_wp_chatbot_meta_label))); |
|
2278
|
2019
|
} |
|
2279
|
2020
|
|
|
2280
|
2021
|
if (isset($_POST["qlcd_wp_chatbot_phone_sent"])) { |
|
@@ -2297,24 +2038,24 @@ |
|
2297
|
2038
|
update_option('qlcd_wp_chatbot_found_result', $qlcd_wp_chatbot_found_result); |
|
2298
|
2039
|
} |
|
2299
|
2040
|
|
|
2300
|
2041
|
if(isset( $_POST["enable_wp_chatbot_opening_hour"])) { |
|
2301
|
|
- $enable_wp_chatbot_opening_hour = stripslashes(sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_opening_hour"]))); |
|
2042
|
+ $enable_wp_chatbot_opening_hour = stripslashes(sanitize_text_field($_POST["enable_wp_chatbot_opening_hour"])); |
|
2302
|
2043
|
}else{ $enable_wp_chatbot_opening_hour='';} |
|
2303
|
2044
|
update_option('enable_wp_chatbot_opening_hour', esc_html($enable_wp_chatbot_opening_hour)); |
|
2304
|
2045
|
|
|
2305
|
2046
|
if(isset($_POST["wpwbot_hours"])){ |
|
2306
|
|
- $wpwbot_hours= @wp_unslash($_POST["wpwbot_hours"]); |
|
2047
|
+ $wpwbot_hours= @$_POST["wpwbot_hours"]; |
|
2307
|
2048
|
update_option('wpwbot_hours', maybe_serialize(sanitize_array($wpwbot_hours))); |
|
2308
|
2049
|
} |
|
2309
|
2050
|
|
|
2310
|
2051
|
if(isset( $_POST["enable_wp_chatbot_dailogflow"])) { |
|
2311
|
|
- $enable_wp_chatbot_dailogflow = stripslashes(sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_dailogflow"]))); |
|
2052
|
+ $enable_wp_chatbot_dailogflow = stripslashes(sanitize_text_field($_POST["enable_wp_chatbot_dailogflow"])); |
|
2312
|
2053
|
}else{ $enable_wp_chatbot_dailogflow='';} |
|
2313
|
2054
|
update_option('enable_wp_chatbot_dailogflow', $enable_wp_chatbot_dailogflow); |
|
2314
|
2055
|
|
|
2315
|
2056
|
if(isset($_POST["qlcd_wp_chatbot_dialogflow_client_token"])){ |
|
2316
|
|
- $qlcd_wp_chatbot_dialogflow_client_token= esc_html(@wp_unslash($_POST["qlcd_wp_chatbot_dialogflow_client_token"])); |
|
2057
|
+ $qlcd_wp_chatbot_dialogflow_client_token= esc_html(@$_POST["qlcd_wp_chatbot_dialogflow_client_token"]); |
|
2317
|
2058
|
update_option('qlcd_wp_chatbot_dialogflow_client_token', stripslashes(sanitize_text_field($qlcd_wp_chatbot_dialogflow_client_token))); |
|
2318
|
2059
|
} |
|
2319
|
2060
|
|
|
2320
|
2061
|
if (isset($_POST["qlcd_wp_chatbot_dialogflow_defualt_reply"])) { |
|
@@ -2327,99 +2068,99 @@ |
|
2327
|
2068
|
update_option('qlcd_wp_chatbot_dialogflow_agent_language', $qlcd_wp_chatbot_dialogflow_agent_language); |
|
2328
|
2069
|
} |
|
2329
|
2070
|
// style option save. |
|
2330
|
2071
|
if(isset( $_POST["enable_wp_chatbot_custom_color"])) { |
|
2331
|
|
- $enable_wp_chatbot_custom_color = esc_html(wp_unslash($_POST["enable_wp_chatbot_custom_color"])); |
|
2072
|
+ $enable_wp_chatbot_custom_color = esc_html($_POST["enable_wp_chatbot_custom_color"]); |
|
2332
|
2073
|
}else{ $enable_wp_chatbot_custom_color='';} |
|
2333
|
2074
|
update_option('enable_wp_chatbot_custom_color', stripslashes(sanitize_text_field($enable_wp_chatbot_custom_color))); |
|
2334
|
2075
|
if (isset($_POST["wp_chatbot_text_color"])) { |
|
2335
|
|
- $wp_chatbot_text_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_text_color"])); |
|
2076
|
+ $wp_chatbot_text_color = sanitize_hex_color($_POST["wp_chatbot_text_color"]); |
|
2336
|
2077
|
update_option('wp_chatbot_text_color', $wp_chatbot_text_color); |
|
2337
|
2078
|
} |
|
2338
|
2079
|
|
|
2339
|
2080
|
if (isset($_POST["wp_chatbot_floatingiconbg_color"])) { |
|
2340
|
|
- $wp_chatbot_floatingiconbg_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_floatingiconbg_color"])); |
|
2081
|
+ $wp_chatbot_floatingiconbg_color = sanitize_hex_color($_POST["wp_chatbot_floatingiconbg_color"]); |
|
2341
|
2082
|
update_option('wp_chatbot_floatingiconbg_color', $wp_chatbot_floatingiconbg_color); |
|
2342
|
2083
|
} |
|
2343
|
2084
|
|
|
2344
|
2085
|
if (isset($_POST["wp_chatbot_link_color"])) { |
|
2345
|
|
- $wp_chatbot_link_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_link_color"])); |
|
2086
|
+ $wp_chatbot_link_color = sanitize_hex_color($_POST["wp_chatbot_link_color"]); |
|
2346
|
2087
|
update_option('wp_chatbot_link_color', $wp_chatbot_link_color); |
|
2347
|
2088
|
} |
|
2348
|
2089
|
|
|
2349
|
2090
|
if (isset($_POST["wp_chatbot_link_hover_color"])) { |
|
2350
|
|
- $wp_chatbot_link_hover_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_link_hover_color"])); |
|
2091
|
+ $wp_chatbot_link_hover_color = sanitize_hex_color($_POST["wp_chatbot_link_hover_color"]); |
|
2351
|
2092
|
update_option('wp_chatbot_link_hover_color', $wp_chatbot_link_hover_color); |
|
2352
|
2093
|
} |
|
2353
|
2094
|
|
|
2354
|
2095
|
if (isset($_POST["wp_chatbot_bot_msg_bg_color"])) { |
|
2355
|
|
- $wp_chatbot_bot_msg_bg_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_bot_msg_bg_color"])); |
|
2096
|
+ $wp_chatbot_bot_msg_bg_color = sanitize_hex_color($_POST["wp_chatbot_bot_msg_bg_color"]); |
|
2356
|
2097
|
update_option('wp_chatbot_bot_msg_bg_color', $wp_chatbot_bot_msg_bg_color); |
|
2357
|
2098
|
} |
|
2358
|
2099
|
|
|
2359
|
2100
|
if (isset($_POST["wp_chatbot_bot_msg_text_color"])) { |
|
2360
|
|
- $wp_chatbot_bot_msg_text_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_bot_msg_text_color"])); |
|
2101
|
+ $wp_chatbot_bot_msg_text_color = sanitize_hex_color($_POST["wp_chatbot_bot_msg_text_color"]); |
|
2361
|
2102
|
update_option('wp_chatbot_bot_msg_text_color', $wp_chatbot_bot_msg_text_color); |
|
2362
|
2103
|
} |
|
2363
|
2104
|
|
|
2364
|
2105
|
if (isset($_POST["wp_chatbot_user_msg_bg_color"])) { |
|
2365
|
|
- $wp_chatbot_user_msg_bg_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_user_msg_bg_color"])); |
|
2106
|
+ $wp_chatbot_user_msg_bg_color = sanitize_hex_color($_POST["wp_chatbot_user_msg_bg_color"]); |
|
2366
|
2107
|
update_option('wp_chatbot_user_msg_bg_color', $wp_chatbot_user_msg_bg_color); |
|
2367
|
2108
|
} |
|
2368
|
2109
|
|
|
2369
|
2110
|
if (isset($_POST["wp_chatbot_user_msg_text_color"])) { |
|
2370
|
|
- $wp_chatbot_user_msg_text_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_user_msg_text_color"])); |
|
2111
|
+ $wp_chatbot_user_msg_text_color = sanitize_hex_color($_POST["wp_chatbot_user_msg_text_color"]); |
|
2371
|
2112
|
update_option('wp_chatbot_user_msg_text_color', $wp_chatbot_user_msg_text_color); |
|
2372
|
2113
|
} |
|
2373
|
2114
|
|
|
2374
|
2115
|
if (isset($_POST["wp_chatbot_buttons_bg_color"])) { |
|
2375
|
|
- $wp_chatbot_buttons_bg_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_buttons_bg_color"])); |
|
2116
|
+ $wp_chatbot_buttons_bg_color = sanitize_hex_color($_POST["wp_chatbot_buttons_bg_color"]); |
|
2376
|
2117
|
update_option('wp_chatbot_buttons_bg_color', $wp_chatbot_buttons_bg_color); |
|
2377
|
2118
|
} |
|
2378
|
2119
|
|
|
2379
|
2120
|
if (isset($_POST["wp_chatbot_buttons_text_color"])) { |
|
2380
|
|
- $wp_chatbot_buttons_text_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_buttons_text_color"])); |
|
2121
|
+ $wp_chatbot_buttons_text_color = sanitize_hex_color($_POST["wp_chatbot_buttons_text_color"]); |
|
2381
|
2122
|
update_option('wp_chatbot_buttons_text_color', $wp_chatbot_buttons_text_color); |
|
2382
|
2123
|
} |
|
2383
|
2124
|
|
|
2384
|
2125
|
if (isset($_POST["wp_chatbot_buttons_bg_color_hover"])) { |
|
2385
|
|
- $wp_chatbot_buttons_bg_color_hover = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_buttons_bg_color_hover"])); |
|
2126
|
+ $wp_chatbot_buttons_bg_color_hover = sanitize_hex_color($_POST["wp_chatbot_buttons_bg_color_hover"]); |
|
2386
|
2127
|
update_option('wp_chatbot_buttons_bg_color_hover', $wp_chatbot_buttons_bg_color_hover); |
|
2387
|
2128
|
} |
|
2388
|
2129
|
|
|
2389
|
2130
|
if (isset($_POST["wp_chatbot_buttons_text_color_hover"])) { |
|
2390
|
|
- $wp_chatbot_buttons_text_color_hover = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_buttons_text_color_hover"])); |
|
2131
|
+ $wp_chatbot_buttons_text_color_hover = sanitize_hex_color($_POST["wp_chatbot_buttons_text_color_hover"]); |
|
2391
|
2132
|
update_option('wp_chatbot_buttons_text_color_hover', $wp_chatbot_buttons_text_color_hover); |
|
2392
|
2133
|
} |
|
2393
|
2134
|
|
|
2394
|
2135
|
if (isset($_POST["wp_chatbot_theme_secondary_color"])) { |
|
2395
|
|
- $wp_chatbot_theme_secondary_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_theme_secondary_color"])); |
|
2136
|
+ $wp_chatbot_theme_secondary_color = sanitize_hex_color($_POST["wp_chatbot_theme_secondary_color"]); |
|
2396
|
2137
|
update_option('wp_chatbot_theme_secondary_color', $wp_chatbot_theme_secondary_color); |
|
2397
|
2138
|
} |
|
2398
|
2139
|
if (isset($_POST["wp_chatbot_header_background_color"])) { |
|
2399
|
|
- $wp_chatbot_header_background_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_header_background_color"])); |
|
2140
|
+ $wp_chatbot_header_background_color = sanitize_hex_color($_POST["wp_chatbot_header_background_color"]); |
|
2400
|
2141
|
update_option('wp_chatbot_header_background_color', $wp_chatbot_header_background_color); |
|
2401
|
2142
|
} |
|
2402
|
2143
|
|
|
2403
|
2144
|
if (isset($_POST["wp_chatbot_font_size"])) { |
|
2404
|
|
- $wp_chatbot_font_size = sanitize_text_field(wp_unslash($_POST["wp_chatbot_font_size"])); |
|
2145
|
+ $wp_chatbot_font_size = sanitize_text_field($_POST["wp_chatbot_font_size"]); |
|
2405
|
2146
|
// Additional validation for font size format (e.g., '14px', '1.2em') could be added here if strict adherence to CSS units is required. |
|
2406
|
2147
|
update_option('wp_chatbot_font_size', $wp_chatbot_font_size); |
|
2407
|
2148
|
} |
|
2408
|
2149
|
if (isset($_POST["wp_chat_bot_font_family"])) { |
|
2409
|
|
- $wp_chat_bot_font_family = sanitize_text_field(wp_unslash($_POST["wp_chat_bot_font_family"])); |
|
2150
|
+ $wp_chat_bot_font_family = sanitize_text_field($_POST["wp_chat_bot_font_family"]); |
|
2410
|
2151
|
update_option('wp_chat_bot_font_family', $wp_chat_bot_font_family); |
|
2411
|
2152
|
} |
|
2412
|
2153
|
if (isset($_POST["wp_chat_user_font_family"])) { |
|
2413
|
|
- $wp_chat_user_font_family = sanitize_text_field(wp_unslash($_POST["wp_chat_user_font_family"])); |
|
2154
|
+ $wp_chat_user_font_family = sanitize_text_field($_POST["wp_chat_user_font_family"]); |
|
2414
|
2155
|
update_option('wp_chat_user_font_family', $wp_chat_user_font_family); |
|
2415
|
2156
|
} |
|
2416
|
2157
|
if (isset($_POST['wp_chatbot_user_font'])) { |
|
2417
|
|
- $wp_chatbot_user_font = sanitize_text_field(wp_unslash($_POST['wp_chatbot_user_font'])); |
|
2158
|
+ $wp_chatbot_user_font = sanitize_text_field($_POST['wp_chatbot_user_font']); |
|
2418
|
2159
|
update_option('wp_chatbot_user_font', $wp_chatbot_user_font); |
|
2419
|
2160
|
} |
|
2420
|
2161
|
if (isset($_POST['wp_chatbot_bot_font'])) { |
|
2421
|
|
- $wp_chatbot_bot_font = sanitize_text_field(wp_unslash($_POST['wp_chatbot_bot_font'])); |
|
2162
|
+ $wp_chatbot_bot_font = sanitize_text_field($_POST['wp_chatbot_bot_font']); |
|
2422
|
2163
|
update_option('wp_chatbot_bot_font', $wp_chatbot_bot_font); |
|
2423
|
2164
|
} |
|
2424
|
2165
|
|
|
2425
|
2166
|
set_transient( 'qcld_bot_clear_cache', 1, DAY_IN_SECONDS ); |
|
@@ -2566,84 +2307,19 @@ |
|
2566
|
2307
|
) $collate AUTO_INCREMENT=1 ENGINE=InnoDB"; |
|
2567
|
2308
|
|
|
2568
|
2309
|
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); |
|
2569
|
2310
|
dbDelta( $sql_sliders_Table1 ); |
|
2570
|
|
- |
|
2571
|
|
- |
|
2572
|
|
- //Bot Response Table |
|
2573
|
|
- $table_rag_documents = $wpdb->prefix . "rag_documents"; |
|
2574
|
|
- |
|
2575
|
|
- $charset = $wpdb->get_charset_collate(); |
|
2576
|
|
- if ($wpdb->get_var($wpdb->prepare("SHOW TABLES LIKE %s", $wpdb->esc_like($table_rag_documents))) != $table_rag_documents) { // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching |
|
2577
|
|
- // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange |
|
2578
|
|
- $sql_rag_documents = "CREATE TABLE $table_rag_documents ( |
|
2579
|
|
- id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, |
|
2580
|
|
- doc_id VARCHAR(100) DEFAULT NULL, |
|
2581
|
|
- title VARCHAR(255) NOT NULL, |
|
2582
|
|
- content LONGTEXT NOT NULL, |
|
2583
|
|
- embedding LONGTEXT NOT NULL, |
|
2584
|
|
- source_type VARCHAR(20) DEFAULT 'post', |
|
2585
|
|
- source_url VARCHAR(255) DEFAULT NULL, |
|
2586
|
|
- file_url TEXT DEFAULT NULL, |
|
2587
|
|
- metadata LONGTEXT DEFAULT NULL, |
|
2588
|
|
- status VARCHAR(50) DEFAULT 'complete', |
|
2589
|
|
- created_at DATETIME DEFAULT CURRENT_TIMESTAMP |
|
2590
|
|
- ) $charset;"; |
|
2591
|
|
- require_once ABSPATH . 'wp-admin/includes/upgrade.php'; |
|
2592
|
|
- dbDelta($sql_rag_documents); |
|
2593
|
|
- // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange |
|
2594
|
|
- } |
|
2595
|
|
- $table_report = $wpdb->prefix . 'wpbot_chat_report'; |
|
2596
|
|
- |
|
2597
|
|
- if ( $wpdb->get_var( $wpdb->prepare("SHOW TABLES LIKE %s", $wpdb->esc_like($table_report)) ) != $table_report ) { // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching |
|
2598
|
|
- // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange |
|
2599
|
|
- $sql_report = " |
|
2600
|
|
- CREATE TABLE `$table_report` ( |
|
2601
|
|
- `id` int(11) NOT NULL AUTO_INCREMENT, |
|
2602
|
|
- `user_id` int(11) NOT NULL, |
|
2603
|
|
- `conversation_id` int(11) DEFAULT NULL, |
|
2604
|
|
- `message` longtext NOT NULL, |
|
2605
|
|
- `feedback` varchar(20) DEFAULT NULL, |
|
2606
|
|
- `meta_info` text DEFAULT NULL, |
|
2607
|
|
- `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, |
|
2608
|
|
- PRIMARY KEY (`id`) |
|
2609
|
|
- ) $charset_collate AUTO_INCREMENT=1; |
|
2610
|
|
- "; |
|
2611
|
|
- |
|
2612
|
|
- require_once ABSPATH . 'wp-admin/includes/upgrade.php'; |
|
2613
|
|
- dbDelta( $sql_report ); |
|
2614
|
|
- // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange |
|
2615
|
|
- } |
|
2616
|
2311
|
|
|
2617
|
|
- $sqlqry = $wpdb->get_results($wpdb->prepare("select * from {$table1} where id = %d", 1)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter |
|
2312
|
+ $sqlqry = $wpdb->get_results($wpdb->prepare("select * from $table1")); //DB Call OK, No Caching OK |
|
2618
|
2313
|
if(empty($sqlqry)){ |
|
2619
|
2314
|
|
|
2620
|
|
- $query = 'Sample Question ?'; |
|
2621
|
|
- $response = 'Sample Answer'; |
|
2315
|
+ $query = 'What Can WPBot do for you?'; |
|
2316
|
+ $response = 'WPBot can converse fluidly with users on website and FB messenger. It can search your website, send/collect eMails, user feedback & phone numbers . You can create Custom Intents from DialogFlow with Rich Messages & Card responses!'; |
|
2622
|
2317
|
|
|
2623
|
2318
|
$data = array('query' => $query, 'keyword' => '', 'response'=> $response, 'intent'=> ''); |
|
2624
|
2319
|
$format = array('%s','%s', '%s', '%s'); |
|
2625
|
|
- $wpdb->insert($table1,$data,$format); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, PluginCheck.Security.DirectDB.UnescapedDBParameter |
|
2320
|
+ $wpdb->insert($table1,$data,$format); //DB Call OK, No Caching OK |
|
2626
|
2321
|
} |
|
2627
|
|
- |
|
2628
|
|
- $table = $wpdb->prefix . 'wpbot_subscription'; |
|
2629
|
|
- if ($wpdb->get_var($wpdb->prepare("SHOW TABLES LIKE %s", $table)) != $table) { // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter |
|
2630
|
|
- // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange |
|
2631
|
|
- $sql_sliders_Table = " |
|
2632
|
|
- CREATE TABLE IF NOT EXISTS `$table` ( |
|
2633
|
|
- `id` int(11) NOT NULL AUTO_INCREMENT, |
|
2634
|
|
- `name` varchar(256) NOT NULL, |
|
2635
|
|
- `email` varchar(256) NOT NULL, |
|
2636
|
|
- `phone` varchar(256) NOT NULL, |
|
2637
|
|
- `url` text NOT NULL, |
|
2638
|
|
- `date` datetime NOT NULL, |
|
2639
|
|
- `user_agent` text NOT NULL, |
|
2640
|
|
- PRIMARY KEY (`id`) |
|
2641
|
|
- ) $collate AUTO_INCREMENT=1 "; |
|
2642
|
|
- require_once ABSPATH . 'wp-admin/includes/upgrade.php'; |
|
2643
|
|
- dbDelta($sql_sliders_Table); |
|
2644
|
|
- // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange |
|
2645
|
|
- } |
|
2646
|
2322
|
|
|
2647
|
2323
|
$url = get_site_url(); |
|
2648
|
2324
|
$url = wp_parse_url($url); |
|
2649
|
2325
|
$domain = $url['host']; |
|
@@ -2648,13 +2324,14 @@ |
|
2648
|
2324
|
$url = wp_parse_url($url); |
|
2649
|
2325
|
$domain = $url['host']; |
|
2650
|
2326
|
//$admin_email = "admin@" . $domain; |
|
2651
|
2327
|
$admin_email = get_option('admin_email'); |
|
2328
|
+ |
|
2652
|
2329
|
if(!get_option('wp_chatbot_position_x')) { |
|
2653
|
|
- update_option('wp_chatbot_position_x', 30); |
|
2330
|
+ update_option('wp_chatbot_position_x', 50); |
|
2654
|
2331
|
} |
|
2655
|
2332
|
if(!get_option('wp_chatbot_position_y')) { |
|
2656
|
|
- update_option('wp_chatbot_position_y', 30); |
|
2333
|
+ update_option('wp_chatbot_position_y', 50); |
|
2657
|
2334
|
} |
|
2658
|
2335
|
if(!get_option('disable_wp_chatbot')) { |
|
2659
|
2336
|
update_option('disable_wp_chatbot', ''); |
|
2660
|
2337
|
} |
|
@@ -2681,14 +2358,8 @@ |
|
2681
|
2358
|
} |
|
2682
|
2359
|
if(!get_option('show_menu_after_greetings')) { |
|
2683
|
2360
|
update_option('show_menu_after_greetings', 1); |
|
2684
|
2361
|
} |
|
2685
|
|
- if(!get_option('disable_back_to_start_menu')) { |
|
2686
|
|
- update_option('disable_back_to_start_menu', ''); |
|
2687
|
|
- } |
|
2688
|
|
- if(!get_option('disable_floating_button')) { |
|
2689
|
|
- update_option('disable_floating_button', ''); |
|
2690
|
|
- } |
|
2691
|
2362
|
if(!get_option('enable_chat_session')) { |
|
2692
|
2363
|
update_option('enable_chat_session', ''); |
|
2693
|
2364
|
} |
|
2694
|
2365
|
|
|
@@ -2695,9 +2366,9 @@ |
|
2695
|
2366
|
if(!get_option('enable_wp_chatbot_mobile_full_screen')) { |
|
2696
|
2367
|
update_option('enable_wp_chatbot_mobile_full_screen', 1); |
|
2697
|
2368
|
} |
|
2698
|
2369
|
if(!get_option('wpbot_preloading_time')) { |
|
2699
|
|
- update_option('wpbot_preloading_time', '800'); |
|
2370
|
+ update_option('wpbot_preloading_time', '0.5'); |
|
2700
|
2371
|
} |
|
2701
|
2372
|
|
|
2702
|
2373
|
if(!get_option('disable_wp_chatbot_notification')) { |
|
2703
|
2374
|
update_option('disable_wp_chatbot_notification', '1'); |
|
@@ -2735,19 +2406,11 @@ |
|
2735
|
2406
|
if(!get_option('wp_chatbot_show_home_page')) { |
|
2736
|
2407
|
update_option('wp_chatbot_show_home_page', 'on'); |
|
2737
|
2408
|
} |
|
2738
|
2409
|
if(!get_option('qc_wpbot_menu_order')) { |
|
2739
|
|
- $site_search_label = get_option('qlcd_wp_chatbot_wildcard_site_search') != '' ? get_option('qlcd_wp_chatbot_wildcard_site_search') : 'Site Search'; |
|
2740
|
|
- $support_email_label = get_option('qlcd_wp_chatbot_support_email') != '' ? get_option('qlcd_wp_chatbot_support_email') : 'Send us Email.'; |
|
2741
|
|
- $support_phone_label = get_option('qlcd_wp_chatbot_support_phone') != '' ? get_option('qlcd_wp_chatbot_support_phone') : 'Leave your number. We will call you back!'; |
|
2742
|
|
- $default_menu = '<span class="qcld-chatbot-wildcard qc_draggable_item qcld-chatbot-site-search" data-wildcart="site_search">' . esc_attr($site_search_label) . '</span>'; |
|
2743
|
|
- $default_menu .= '<span class="qcld-chatbot-suggest-email qc_draggable_item">' . esc_attr($support_email_label) . '</span>'; |
|
2744
|
|
- $default_menu .= '<span class="qcld-chatbot-suggest-phone qc_draggable_item">' . esc_attr($support_phone_label) . '</span>'; |
|
2745
|
|
- update_option('qc_wpbot_menu_order', $default_menu); |
|
2410
|
+ update_option('qc_wpbot_menu_order', ''); |
|
2746
|
2411
|
} |
|
2747
|
|
- if(!get_option('qcld_chatbot_avatar_location')) { |
|
2748
|
|
- update_option('qcld_chatbot_avatar_location', 'side'); |
|
2749
|
|
- } |
|
2412
|
+ |
|
2750
|
2413
|
if(!get_option('wp_chatbot_show_posts')) { |
|
2751
|
2414
|
update_option('wp_chatbot_show_posts', 'on'); |
|
2752
|
2415
|
} |
|
2753
|
2416
|
if(!get_option('wp_chatbot_show_pages')){ |
|
@@ -3074,12 +2737,12 @@ |
|
3074
|
2737
|
if(!get_option('qlcd_wp_chatbot_notifications')) { |
|
3075
|
2738
|
update_option('qlcd_wp_chatbot_notifications', maybe_serialize(array('Welcome to WPBot'))); |
|
3076
|
2739
|
} |
|
3077
|
2740
|
if(!get_option('support_query')) { |
|
3078
|
|
- update_option('support_query', maybe_serialize(array('Sample Question?'))); |
|
2741
|
+ update_option('support_query', maybe_serialize(array('What is WPBot?'))); |
|
3079
|
2742
|
} |
|
3080
|
2743
|
if(!get_option('support_ans')) { |
|
3081
|
|
- update_option('support_ans', maybe_serialize(array('Sample Answer'))); |
|
2744
|
+ update_option('support_ans', maybe_serialize(array('WPBot is a stand alone Chat Bot with zero configuration or bot training required. This plug and play chatbot also does not require any 3rd party service integration like Facebook. This chat bot helps shoppers find the products they are looking for easily and increase store sales! WPBot is a must have plugin for trending conversational commerce or conversational shopping.'))); |
|
3082
|
2745
|
} |
|
3083
|
2746
|
if(!get_option('qlcd_wp_chatbot_search_option')) { |
|
3084
|
2747
|
update_option('qlcd_wp_chatbot_search_option', 'standard'); |
|
3085
|
2748
|
} |
|
@@ -3266,10 +2929,9 @@ |
|
3266
|
2929
|
} |
|
3267
|
2930
|
if(!get_option('enable_wp_chatbot_opening_hour')) { |
|
3268
|
2931
|
update_option('wpwbot_hours', array()); |
|
3269
|
2932
|
} |
|
3270
|
|
- wpbot_free_set_content_height_defaults(); |
|
3271
|
|
- |
|
2933
|
+ |
|
3272
|
2934
|
if(!get_option('enable_wp_chatbot_dailogflow')) { |
|
3273
|
2935
|
update_option('enable_wp_chatbot_dailogflow', ''); |
|
3274
|
2936
|
} |
|
3275
|
2937
|
if(!get_option('qlcd_wp_chatbot_dialogflow_client_token')) { |
|
@@ -3319,11 +2981,8 @@ |
|
3319
|
2981
|
delete_option('disable_wp_chatbot_icon_animation'); |
|
3320
|
2982
|
delete_option('disable_wp_chatbot_on_mobile'); |
|
3321
|
2983
|
delete_option('qlcd_wp_chatbot_admin_email'); |
|
3322
|
2984
|
delete_option('qlcd_wp_chatbot_from_email'); |
|
3323
|
|
- |
|
3324
|
|
- delete_option('disable_back_to_start_menu'); |
|
3325
|
|
- delete_option('disable_floating_button'); |
|
3326
|
2985
|
|
|
3327
|
2986
|
delete_option('disable_wp_chatbot_product_search'); |
|
3328
|
2987
|
delete_option('disable_wp_chatbot_catalog'); |
|
3329
|
2988
|
delete_option('disable_wp_chatbot_order_status'); |
|
@@ -3544,9 +3203,8 @@ |
|
3544
|
3203
|
delete_option('wp_chat_user_font_family'); |
|
3545
|
3204
|
delete_option('wp_chat_bot_font_family'); |
|
3546
|
3205
|
delete_option('wp_chatbot_bot_font'); |
|
3547
|
3206
|
delete_option('wp_chatbot_user_font'); |
|
3548
|
|
- delete_option('qcld_chatbot_avatar_location'); |
|
3549
|
3207
|
set_transient( 'qcld_bot_clear_cache', 1, DAY_IN_SECONDS ); |
|
3550
|
3208
|
qcld_wb_chatboot_defualt_options(); |
|
3551
|
3209
|
$html='Reset all options to default successfully.'; |
|
3552
|
3210
|
wp_send_json($html); |
|
@@ -3552,22 +3210,8 @@ |
|
3552
|
3210
|
wp_send_json($html); |
|
3553
|
3211
|
} |
|
3554
|
3212
|
} |
|
3555
|
3213
|
|
|
3556
|
|
-if( !function_exists('wpbot_free_set_content_height_defaults') ){ |
|
3557
|
|
- function wpbot_free_set_content_height_defaults() { |
|
3558
|
|
- $chatbot_content_max_height = get_option( 'chatbot_content_max_height', false ); |
|
3559
|
|
- if ( $chatbot_content_max_height === false || $chatbot_content_max_height === '' ) { |
|
3560
|
|
- update_option( 'chatbot_content_max_height', '80' ); |
|
3561
|
|
- } |
|
3562
|
|
- |
|
3563
|
|
- $chatbot_content_max_height_responsive = get_option( 'chatbot_content_max_height_responsive', false ); |
|
3564
|
|
- if ( $chatbot_content_max_height_responsive === false || $chatbot_content_max_height_responsive === '' ) { |
|
3565
|
|
- update_option( 'chatbot_content_max_height_responsive', '90' ); |
|
3566
|
|
- } |
|
3567
|
|
- } |
|
3568
|
|
-} |
|
3569
|
|
- |
|
3570
|
3214
|
if( !function_exists('wpbot_free_qc_upgrade_completed') ){ |
|
3571
|
3215
|
function wpbot_free_qc_upgrade_completed( $upgrader_object, $options ) { |
|
3572
|
3216
|
// The path to our plugin's main file |
|
3573
|
3217
|
$our_plugin = plugin_basename( __FILE__ ); |
|
@@ -3576,9 +3220,8 @@ |
|
3576
|
3220
|
// Iterate through the plugins being updated and check if ours is there |
|
3577
|
3221
|
foreach( $options['plugins'] as $plugin ) { |
|
3578
|
3222
|
if( $plugin == $our_plugin ) { |
|
3579
|
3223
|
set_transient( 'qcld_bot_clear_cache', 1, DAY_IN_SECONDS ); |
|
3580
|
|
- wpbot_free_set_content_height_defaults(); |
|
3581
|
3224
|
} |
|
3582
|
3225
|
} |
|
3583
|
3226
|
} |
|
3584
|
3227
|
update_option( 'qcld_openai_relevant_post', ['post','page'] ); |
|
@@ -3628,20 +3271,17 @@ |
|
3628
|
3271
|
|
|
3629
|
3272
|
|
|
3630
|
3273
|
|
|
3631
|
3274
|
<div class="wrap qcld-main-wrapper"> |
|
3632
|
|
-<div class="qcld-wp-chatbot-wrap-header"> |
|
3633
|
|
- |
|
3634
|
|
- <div class="qcld-wp-chatbot-wrap-header-logo"><a href="#" class="qcld-wp-chatbot-wrap-site__logo"><img src="<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/chatbot.png' ); ?>" alt="Dialogflow CX"> WPBot Control Panel </a> |
|
3635
|
|
- <p><strong>Core Version:</strong> v<?php echo esc_html( QCLD_wpCHATBOT_VERSION ); ?></p> |
|
3636
|
|
- </div> |
|
3637
|
|
- <ul class="qcld-wp-chatbot-wrap-version-wrapper"> |
|
3638
|
|
- <li> |
|
3639
|
|
- <a class="wpchatbot-Upgrade" href="https://www.wpbot.pro/" target="_blank">Upgrade To Pro</a> |
|
3640
|
|
- |
|
3641
|
|
- </li> |
|
3642
|
|
- </ul> |
|
3643
|
|
-</div> |
|
3275
|
+ <div class="qcld-wp-chatbot-wrap-header"> |
|
3276
|
+ <a href="#" class="qcld-wp-chatbot-wrap-site__logo"><img style="width:100%" src="<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/chatbot.png' ); ?>" alt="Dialogflow CX"> WPBot Control Panel </a> |
|
3277
|
+ <p><strong>Core Version:</strong> v<?php echo QCLD_wpCHATBOT_VERSION; ?></p> |
|
3278
|
+ <ul class="qcld-wp-chatbot-wrap-version-wrapper"> |
|
3279
|
+ <li> |
|
3280
|
+ <a class="wpchatbot-Upgrade" href="https://www.wpbot.pro/" target="_blank">Upgrade To Pro</a> |
|
3281
|
+ </li> |
|
3282
|
+ </ul> |
|
3283
|
+ </div> |
|
3644
|
3284
|
<div class="qcld-wrap swpm-admin-menu-wrap"> |
|
3645
|
3285
|
<div class="nav-tab-wrapper sld_nav_container wppt_nav_container qcld_help_wppt_nav_container"> |
|
3646
|
3286
|
<a class="nav-tab sld_click_handle nav-tab-active" href="#general_int"><span class="wpwbot-admin-tab-icon "> <i class="fa fa-rocket"></i> </span><?php echo esc_html('Getting Started'); ?></a> |
|
3647
|
3287
|
<a class="nav-tab sld_click_handle " href="#general_wp_nutshell"><span class="wpwbot-admin-tab-icon "> <i class="fa fa-hourglass-start"></i> </span><?php echo esc_html('WPBot – In a Nutshell'); ?></a> |
|
@@ -3957,218 +3597,162 @@ |
|
3957
|
3597
|
<h3><?php esc_html_e('Note', 'chatbot'); ?></h3> |
|
3958
|
3598
|
<p><?php esc_html_e('You could use <br> tag in Language Center & Dialogflow Responses for line break.', 'chatbot'); ?></p> |
|
3959
|
3599
|
</div> |
|
3960
|
3600
|
</div> |
|
3961
|
|
- |
|
3601
|
+ <div class="content form-container qcbot_help_secion"> |
|
3602
|
+ <h3><?php esc_html_e('Problem: I changed language and/or some settings but do not see the changes.', 'chatbot'); ?></h3> |
|
3603
|
+ <p><?php esc_html_e('WPBot saves a lot of information in the browser`s local storage. After making any language or settings change you must clear browser cache and cookies both and reload the page for testing. An easier alternative is to always launch a new browser window in Incognito mode (Ctrl+Shift+N in chrome) and test there. Also, you need to purge cache plugin and CDN caching if you have any.', 'chatbot'); ?></p> |
|
3604
|
+ </div> |
|
3605
|
+ <div class="content form-container qcbot_help_secion"> |
|
3606
|
+ <h3><?php esc_html_e('Problem: I cannot connect to the DialogFlow', 'chatbot'); ?></h3> |
|
3607
|
+ <p><?php esc_html_e('To Debug: 1. Make sure that you have created the Google Project and the Service account as an Owner', 'chatbot'); ?><br> |
|
3608
|
+ <?php esc_html_e('2. Make sure that you have connected to the correct Dialogflow agent', 'chatbot'); ?><br> |
|
3609
|
+ <?php esc_html_e('3. Follow the steps in this tutorial correctly:', 'chatbot'); ?> <a href="https://www.wpbot.pro/dialogflow-integration" target="_blank">https://www.wpbot.pro/dialogflow-integration</a><br> |
|
3610
|
+ <?php esc_html_e(' 4. Make sure that the Google Client Package is Installed on Your Website.<br> |
|
3611
|
+ 5. For DialogFlow agent region, try choosing any region other than the EU region which has known issues.<br> |
|
3612
|
+ 6. Make sure to download and import the sample DialogFlow agent to your agent<br> |
|
3613
|
+ 7. Test the ChatBot in the browser Incognito mode', 'chatbot'); ?> |
|
3614
|
+ </p> |
|
3615
|
+ </div> |
|
3616
|
+ <div class="content form-container qcbot_help_secion" > |
|
3617
|
+ <h3><?php esc_html_e('Problem: I am not getting emails from the ChatBot', 'chatbot'); ?></h3> |
|
3618
|
+ <p> |
|
3619
|
+ <?php esc_html_e('The WPBot ChatBot uses the WordPress` default email function. If you are not getting emails from the ChatBot`s email feature, it is likely that no emails are getting through from your WordPress site or they are ending up in the Spam box. Try using an SMTP mailer plugin. Also, try changing the to and from email addresses in the ChatBot`s general settings area.', 'chatbot'); ?> |
|
3620
|
+ </p> |
|
3621
|
+ </div> |
|
3622
|
+ <div class="content form-container qcbot_help_secion" > |
|
3623
|
+ <h3><?php esc_html_e('Problem: Simple text responses are not working or getting an error', 'chatbot'); ?></h3> |
|
3624
|
+ <p> |
|
3625
|
+ <?php esc_html_e('WPBot requires mysql version 5.6+ for the simple text responses to work. If your server has a version below that, you might see some PHP error or the Simple Text Responses will not work at all. Please request your hosting support to update the mysql version on your server.', 'chatbot'); ?> |
|
3626
|
+ </p> |
|
3627
|
+ </div> |
|
3628
|
+ <div class="content form-container qcbot_help_secion"> |
|
3629
|
+ <h3><?php esc_html_e('Problem: I changed language or some other settings but do not see them when testing', 'chatbot'); ?></h3> |
|
3630
|
+ <p> |
|
3631
|
+ <?php esc_html_e('Please clear the browser cache and <strong>cookies</strong> to see any change you have made. Alternatively, you can open a fresh browser window in incognito mode (Ctrl+Shift+N in chrome) to test your changes. Also, you may need to purge any cache plugin and CDN caching.', 'chatbot'); ?> |
|
3632
|
+ </p> |
|
3633
|
+ </div> |
|
3634
|
+ <div class="content form-container qcbot_help_secion"> |
|
3635
|
+ <h3><?php esc_html_e('Problem: The ChatBot is NOT working in the front end.', 'chatbot'); ?></h3> |
|
3636
|
+ <p> |
|
3637
|
+ <?php esc_html_e('The most common reason for this is if the theme is coded incorrectly and jQuery is loaded from external source. jQuery is included with WordPress core and according to WordPress standard, jQuery must be included using wp_enqueue_script.', 'chatbot'); ?> <a href="https://developer.wordpress.org/reference/functions/wp_enqueue_script/" target="_blank">https://developer.wordpress.org/reference/functions/wp_enqueue_script/</a> <?php esc_html_e('. Please make sure if that is the case in your theme.', 'chatbot'); ?><br> |
|
3638
|
+ <?php esc_html_e(' Also go to Simple Text Responses and press the Re-Index button.', 'chatbot'); ?></br> |
|
3639
|
+ <?php esc_html_e(' After that try purging any cache and test the chatbot in Incognito mode', 'chatbot'); ?><br> |
|
3640
|
+ <?php esc_html_e(' Please contact us if you need [further help]', 'chatbot'); ?>(<a href="https://www.wpbot.pro/free-support/" target="_blank">https://www.wpbot.pro/free-support/</a>). <?php esc_html_e('We take all user feedback sriously.', 'chatbot'); ?> |
|
3641
|
+ </p> |
|
3642
|
+ </div> |
|
3643
|
+ <div class="content form-container qcbot_help_secion"> |
|
3644
|
+ <h3><?php esc_html_e('Problem: The ChatBot is stuck on typing or loading', 'chatbot'); ?></h3> |
|
3645
|
+ <p> |
|
3646
|
+ <?php esc_html_e('This usually happens if you enabled DialogFlow but did not complete the set up. Please make sure that you have carefully followed all the steps for DialogFlow integration in the Settings->DialogFlow section.', 'chatbot'); ?><br> |
|
3647
|
+ <?php esc_html_e('This can also happen if there is any empty language fields or Simple Text Responses database needs updating because of mysql version changes. Try saving both the Language Center and Simple Text Responses and test again.', 'chatbot'); ?><br> |
|
3648
|
+ <?php esc_html_e('Also go to Simple Text Responses and press the Re-Index button.', 'chatbot'); ?></br> |
|
3649
|
+ <?php esc_html_e('After that remember to test in a browser Incognito mode to avoid cache and cookies.', 'chatbot'); ?> |
|
3650
|
+ </p> |
|
3651
|
+ </div> |
|
3652
|
+ <div class="content form-container qcbot_help_secion"> |
|
3653
|
+ <h3><?php esc_html_e('Problem: How do I add new conversations to the ChatBot?', 'chatbot'); ?></h3> |
|
3654
|
+ <p><?php esc_html_e('Please check the plugin`s Help Section for details on this', 'chatbot'); ?></p> |
|
3655
|
+ </div> |
|
3656
|
+ <div class="content form-container qcbot_help_secion" > |
|
3657
|
+ <h3><?php esc_html_e('Problem: How do I add Line Breaks?', 'chatbot'); ?></h3> |
|
3658
|
+ <p><?php esc_html_e('Please use the <br> tag for line breaks.', 'chatbot'); ?></p> |
|
3659
|
+ </div> |
|
3660
|
+ <div class="content form-container qcbot_help_secion"> |
|
3661
|
+ <h3><?php esc_html_e('Problem: Are HTML tags supported?', 'chatbot'); ?> </h3> |
|
3662
|
+ <p><?php esc_html_e('Yes, common HTML tags link link href, strong, br etc. are supported.', 'chatbot'); ?></p> |
|
3663
|
+ </div> |
|
3664
|
+ <div class="content form-container qcbot_help_secion"> |
|
3665
|
+ <h3><?php esc_html_e('Problem: I want to add images, GIFs, Videos', 'chatbot'); ?></h3> |
|
3666
|
+ <p><?php esc_html_e('Images, GIFs and Youtube Videos are supprted in the pro version. Pro version also includes a handy giphy floating search feature for easy embed in the language center.', 'chatbot'); ?></p> |
|
3667
|
+ </div> |
|
3668
|
+ <div class="content form-container qcbot_help_secion"> |
|
3669
|
+ <h3><?php esc_html_e('How to disable Predefined Intent?', 'chatbot'); ?></h3> |
|
3670
|
+ <p><?php esc_html_e('You can disable predefined intents FAQ, eMail, Call me from WPBot Lite > Settings page`s Start Menu Section.', 'chatbot'); ?></p> |
|
3671
|
+ </div> |
|
3672
|
+ </div> |
|
3673
|
+ </div> |
|
3674
|
+ </div> |
|
3675
|
+</div> |
|
3962
|
3676
|
|
|
3963
|
3677
|
|
|
3678
|
+<div id="qcld-quick-flyout" > |
|
3679
|
+ <div class="qcld-quick-flyout-items"> |
|
3680
|
+ <a href="https://wpbot.pro/docs/knowledgebase/getting-started-with-chatbot/" target="_blank" class="qcld-quick-flyout-button qcld-quick-flyout-item qcld-quick-flyout-premium" rel="noopener noreferrer" target="_blank" style="transition-delay: 0ms;"> |
|
3681
|
+ <div class="qcld-quick-flyout-label"> |
|
3682
|
+ <div>Getting Started</div> |
|
3683
|
+ </div> |
|
3684
|
+ <i class="dashicons dashicons-admin-home"></i> |
|
3685
|
+ </a> |
|
3686
|
+ <a href="https://wpbot.pro/docs/kb-sections/chatbot-faqs/" target="_blank" class="qcld-quick-flyout-button qcld-quick-flyout-item" rel="noopener noreferrer" target="_blank" style="transition-delay: 60ms;"> |
|
3687
|
+ <div class="qcld-quick-flyout-label"> |
|
3688
|
+ <div>FAQ</div> |
|
3689
|
+ </div> |
|
3690
|
+ <i class="dashicons dashicons-flag"></i> |
|
3691
|
+ </a> |
|
3692
|
+ <a href="https://wpbot.pro/docs/" target="_blank" class="qcld-quick-flyout-button qcld-quick-flyout-item" style="transition-delay: 90ms;"> |
|
3693
|
+ <div class="qcld-quick-flyout-label"> |
|
3694
|
+ <div>Read the Documentation</div> |
|
3695
|
+ </div> |
|
3696
|
+ <i class="dashicons dashicons-sos"></i> |
|
3697
|
+ </a> |
|
3698
|
+ <a href="https://www.wpbot.pro/free-support/" target="_blank" class="qcld-quick-flyout-button qcld-quick-flyout-item" rel="noopener noreferrer" target="_blank" style="transition-delay: 120ms;"> |
|
3699
|
+ <div class="qcld-quick-flyout-label"> |
|
3700
|
+ <div>Ask for Help</div> |
|
3701
|
+ </div> |
|
3702
|
+ <i class="dashicons dashicons-email"></i> |
|
3703
|
+ </a> |
|
3704
|
+ <a href="https://www.wpbot.pro/" target="_blank" class="qcld-quick-flyout-button qcld-quick-flyout-item" style="transition-delay: 30ms;"> |
|
3705
|
+ <div class="qcld-quick-flyout-label"> |
|
3706
|
+ <div>Check out the WPBot Demo</div> |
|
3707
|
+ </div> |
|
3708
|
+ <i class="dashicons dashicons-welcome-view-site"></i> |
|
3709
|
+ </a> |
|
3710
|
+ <a href="https://www.wpbot.pro/pricing/" target="_blank" class="qcld-quick-flyout-button qcld-quick-flyout-item qcld-quick-flyout-premium" rel="noopener noreferrer" target="_blank" style="transition-delay: 0ms;"> |
|
3711
|
+ <div class="qcld-quick-flyout-label"> |
|
3712
|
+ <div>Upgrade to Premium</div> |
|
3713
|
+ </div> |
|
3714
|
+ <i class="dashicons dashicons-star-filled"></i> |
|
3715
|
+ </a> |
|
3716
|
+ </div> |
|
3717
|
+ <a href="javascript:void(0);" class="qcld-quick-flyout-button qcld-quick-flyout-mascot"> |
|
3718
|
+ <div class="qcld-quick-flyout-label"> |
|
3719
|
+ <div>Start Here</div> |
|
3720
|
+ </div> |
|
3721
|
+ <img style="width:100%" src="<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/agent-01.png' ); ?>" alt="Dialogflow CX"> |
|
3722
|
+ </a> |
|
3723
|
+</div> |
|
3964
|
3724
|
|
|
3965
|
3725
|
|
|
3966
|
3726
|
|
|
3967
|
3727
|
|
|
3968
|
|
- <div class="panel panel-default"> |
|
3969
|
|
- <div class="panel-heading" role="tab" id="faqone"> |
|
3970
|
|
- <h4 class="panel-title"> |
|
3971
|
|
- <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#faqcollapseOne" aria-expanded="false" aria-controls="faqcollapseOne"> <?php esc_html_e('Problem: I changed language and/or some settings but do not see the changes.', 'chatbot'); ?> </a> |
|
3972
|
|
- </h4> |
|
3973
|
|
- </div> |
|
3974
|
|
- <div id="faqcollapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqone"> |
|
3975
|
|
- <div class="panel-body"> |
|
3976
|
|
- <?php echo esc_html_e('WPBot saves a lot of information in the browser`s local storage. After making any language or settings change you must clear browser cache and cookies both and reload the page for testing. An easier alternative is to always launch a new browser window in Incognito mode (Ctrl+Shift+N in chrome) and test there. Also, you need to purge cache plugin and CDN caching if you have any.', 'chatbot'); ?> |
|
3977
|
|
- </div> |
|
3978
|
|
- </div> |
|
3979
|
|
- </div> |
|
3980
|
|
- |
|
3981
|
|
- |
|
3982
|
3728
|
|
|
3983
|
3729
|
|
|
3984
|
|
- <div class="panel panel-default"> |
|
3985
|
|
- <div class="panel-heading" role="tab" id="faqtwo"> |
|
3986
|
|
- <h4 class="panel-title"> |
|
3987
|
|
- <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#faqcollapsetwo" aria-expanded="false" aria-controls="faqcollapsetwo"> <?php esc_html_e('Problem: I cannot connect to the DialogFlow', 'chatbot'); ?> </a> |
|
3988
|
|
- </h4> |
|
3989
|
|
- </div> |
|
3990
|
|
- <div id="faqcollapsetwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqtwo"> |
|
3991
|
|
- <div class="panel-body"> |
|
3992
|
|
- <?php echo esc_html_e('To Debug: ', 'chatbot'); ?><br> |
|
3993
|
|
- <?php echo esc_html_e(' 1. Make sure that you have created the Google Project and the Service account as an Owner', 'chatbot'); ?><br> |
|
3994
|
|
- <?php echo esc_html_e('2. Make sure that you have connected to the correct Dialogflow agent', 'chatbot'); ?><br> |
|
3995
|
|
- <?php echo esc_html_e('3. Follow the steps in this tutorial correctly: https://www.wpbot.pro/dialogflow-integration', 'chatbot'); ?><br> |
|
3996
|
|
- <?php echo esc_html_e('4. Make sure that the Google Client Package is Installed on Your Website. 5. For DialogFlow agent region, try choosing any region other than the EU region which has known issues. 6. Make sure to download and import the sample DialogFlow agent to your agent 7. Test the ChatBot in the browser Incognito mode', 'chatbot'); ?> |
|
3997
|
|
- </div> |
|
3998
|
|
- </div> |
|
3999
|
|
- </div> |
|
3730
|
+ <script type="text/javascript"> |
|
3731
|
+ jQuery(document).ready(function($){ |
|
3732
|
+ var url=document.URL; |
|
3733
|
+ var arr=url.split('#'); |
|
3734
|
+ var tab_tar = '.'+arr[1]; |
|
3735
|
+ setTimeout(function(){ |
|
3736
|
+ jQuery(tab_tar).trigger('click'); |
|
3737
|
+ }, 500); |
|
3738
|
+ |
|
3739
|
+ jQuery('.wppt_nav_container .nav-tab').on('click', function(e){ |
|
3740
|
+ e.preventDefault(); |
|
3741
|
+ var section_id = jQuery(this).attr('href'); |
|
3742
|
+ jQuery('.wppt_nav_container .nav-tab').removeClass('nav-tab-active'); |
|
3743
|
+ jQuery(this).addClass('nav-tab-active'); |
|
3744
|
+ jQuery('.wppt-settings-section').hide(); |
|
3745
|
+ jQuery('.wppt-settings-section').each(function(){ |
|
3746
|
+ jQuery(section_id).show(); |
|
3747
|
+ }); |
|
3748
|
+ }); |
|
3749
|
+ }) |
|
3750
|
+ </script> |
|
4000
|
3751
|
|
|
4001
|
3752
|
|
|
4002
|
|
- <div class="panel panel-default"> |
|
4003
|
|
- <div class="panel-heading" role="tab" id="faqthree"> |
|
4004
|
|
- <h4 class="panel-title"> |
|
4005
|
|
- <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#faqcollapsethree" aria-expanded="false" aria-controls="faqcollapsethree"> <?php esc_html_e('Problem: I am not getting emails from the ChatBot |
|
4006
|
|
-', 'chatbot'); ?> </a> |
|
4007
|
|
- </h4> |
|
4008
|
|
- </div> |
|
4009
|
|
- <div id="faqcollapsethree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqthree"> |
|
4010
|
|
- <div class="panel-body"> |
|
4011
|
|
- <?php echo esc_html_e('The WPBot ChatBot uses the WordPress` default email function. If you are not getting emails from the ChatBot`s email feature, it is likely that no emails are getting through from your WordPress site or they are ending up in the Spam box. Try using an SMTP mailer plugin. Also, try changing the to and from email addresses in the ChatBot`s general settings area.', 'chatbot'); ?> |
|
4012
|
|
- </div> |
|
4013
|
|
- </div> |
|
4014
|
|
- </div> |
|
4015
|
3753
|
|
|
4016
|
|
- <div class="panel panel-default"> |
|
4017
|
|
- <div class="panel-heading" role="tab" id="faqfour"> |
|
4018
|
|
- <h4 class="panel-title"> |
|
4019
|
|
- <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#faqcollapsefour" aria-expanded="false" aria-controls="faqcollapsefour"> <?php esc_html_e('Problem: Simple text responses are not working or getting an error |
|
4020
|
|
-', 'chatbot'); ?> </a> |
|
4021
|
|
- </h4> |
|
4022
|
|
- </div> |
|
4023
|
|
- <div id="faqcollapsefour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqfour"> |
|
4024
|
|
- <div class="panel-body"> |
|
4025
|
|
- <?php echo esc_html_e('WPBot requires mysql version 5.6+ for the simple text responses to work. If your server has a version below that, you might see some PHP error or the Simple Text Responses will not work at all. Please request your hosting support to update the mysql version on your server.', 'chatbot'); ?> |
|
4026
|
|
- </div> |
|
4027
|
|
- </div> |
|
4028
|
|
- </div> |
|
4029
|
3754
|
|
|
4030
|
|
- |
|
4031
|
|
- <div class="panel panel-default"> |
|
4032
|
|
- <div class="panel-heading" role="tab" id="faqfive"> |
|
4033
|
|
- <h4 class="panel-title"> |
|
4034
|
|
- <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#faqcollapsefive" aria-expanded="false" aria-controls="faqcollapsefive"> <?php esc_html_e('Problem: I changed language or some other settings but do not see them when testing', 'chatbot'); ?> </a> |
|
4035
|
|
- </h4> |
|
4036
|
|
- </div> |
|
4037
|
|
- <div id="faqcollapsefive" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqfive"> |
|
4038
|
|
- <div class="panel-body"> |
|
4039
|
|
- <?php echo esc_html_e('Please clear the browser cache and <strong>cookies</strong> to see any change you have made. Alternatively, you can open a fresh browser window in incognito mode (Ctrl+Shift+N in chrome) to test your changes. Also, you may need to purge any cache plugin and CDN caching.', 'chatbot'); ?> |
|
4040
|
|
- </div> |
|
4041
|
|
- </div> |
|
4042
|
|
- </div> |
|
4043
|
|
- |
|
4044
|
|
- |
|
4045
|
|
- |
|
4046
|
|
- <div class="panel panel-default"> |
|
4047
|
|
- <div class="panel-heading" role="tab" id="faqsix"> |
|
4048
|
|
- <h4 class="panel-title"> |
|
4049
|
|
- <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#faqcollapsesix" aria-expanded="false" aria-controls="faqcollapsesix"> <?php esc_html_e('Problem: The ChatBot is NOT working in the front end.', 'chatbot'); ?> </a> |
|
4050
|
|
- </h4> |
|
4051
|
|
- </div> |
|
4052
|
|
- <div id="faqcollapsesix" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqsix"> |
|
4053
|
|
- <div class="panel-body"> |
|
4054
|
|
- <?php echo esc_html_e('The most common reason for this is if the theme is coded incorrectly and jQuery is loaded from external source. jQuery is included with WordPress core and according to WordPress standard, jQuery must be included using wp_enqueue_script. https://developer.wordpress.org/reference/functions/wp_enqueue_script/ .', 'chatbot'); ?><br> <?php echo esc_html_e('Please make sure if that is the case in your theme.', 'chatbot'); ?><br> |
|
4055
|
|
- <?php echo esc_html_e('Also go to Simple Text Responses and press the Re-Index button.', 'chatbot'); ?><br> |
|
4056
|
|
- <?php echo esc_html_e(' After that try purging any cache and test the chatbot in Incognito mode', 'chatbot'); ?><br> |
|
4057
|
|
- <?php echo esc_html_e('Please contact us if you need [further help] https://www.wpbot.pro/free-support/). We take all user feedback sriously.', 'chatbot'); ?> |
|
4058
|
|
- </div> |
|
4059
|
|
- </div> |
|
4060
|
|
- </div> |
|
4061
|
|
- |
|
4062
|
|
- |
|
4063
|
|
- <div class="panel panel-default"> |
|
4064
|
|
- <div class="panel-heading" role="tab" id="faqseven"> |
|
4065
|
|
- <h4 class="panel-title"> |
|
4066
|
|
- <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#faqcollapseseven" aria-expanded="false" aria-controls="faqcollapseseven"> <?php esc_html_e('Problem: The ChatBot is stuck on typing or loading', 'chatbot'); ?> </a> |
|
4067
|
|
- </h4> |
|
4068
|
|
- </div> |
|
4069
|
|
- <div id="faqcollapseseven" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqseven"> |
|
4070
|
|
- <div class="panel-body"> |
|
4071
|
|
- <?php echo esc_html_e('This usually happens if you enabled DialogFlow but did not complete the set up. Please make sure that you have carefully followed all the steps for DialogFlow integration in the Settings->DialogFlow section.', 'chatbot'); ?><br> |
|
4072
|
|
- <?php echo esc_html_e('This can also happen if there is any empty language fields or Simple Text Responses database needs updating because of mysql version changes. Try saving both the Language Center and Simple Text Responses and test again.', 'chatbot'); ?><br> |
|
4073
|
|
- <?php echo esc_html_e('Also go to Simple Text Responses and press the Re-Index button.', 'chatbot'); ?><br> |
|
4074
|
|
- <?php echo esc_html_e('After that remember to test in a browser Incognito mode to avoid cache and cookies.', 'chatbot'); ?> |
|
4075
|
|
- </div> |
|
4076
|
|
- </div> |
|
4077
|
|
- </div> |
|
4078
|
|
- |
|
4079
|
|
- <div class="panel panel-default"> |
|
4080
|
|
- <div class="panel-heading" role="tab" id="faqeight"> |
|
4081
|
|
- <h4 class="panel-title"> |
|
4082
|
|
- <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#faqcollapseeight" aria-expanded="false" aria-controls="faqcollapseeight"> <?php esc_html_e('Problem: How do I add new conversations to the ChatBot?', 'chatbot'); ?> </a> |
|
4083
|
|
- </h4> |
|
4084
|
|
- </div> |
|
4085
|
|
- <div id="faqcollapseeight" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqeight"> |
|
4086
|
|
- <div class="panel-body"> |
|
4087
|
|
- <?php echo esc_html_e('Please check the plugin`s Help Section for details on this', 'chatbot'); ?> |
|
4088
|
|
- </div> |
|
4089
|
|
- </div> |
|
4090
|
|
- </div> |
|
4091
|
|
- |
|
4092
|
|
- <div class="panel panel-default"> |
|
4093
|
|
- <div class="panel-heading" role="tab" id="faqnine"> |
|
4094
|
|
- <h4 class="panel-title"> |
|
4095
|
|
- <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#faqcollapsenine" aria-expanded="false" aria-controls="faqcollapsenine"> <?php esc_html_e('Problem: How do I add Line Breaks?', 'chatbot'); ?> </a> |
|
4096
|
|
- </h4> |
|
4097
|
|
- </div> |
|
4098
|
|
- <div id="faqcollapsenine" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqnine"> |
|
4099
|
|
- <div class="panel-body"> |
|
4100
|
|
- <?php echo esc_html_e('Please use the <br> tag for line breaks.', 'chatbot'); ?> |
|
4101
|
|
- </div> |
|
4102
|
|
- </div> |
|
4103
|
|
- </div> |
|
4104
|
|
- |
|
4105
|
|
- <div class="panel panel-default"> |
|
4106
|
|
- <div class="panel-heading" role="tab" id="faqten"> |
|
4107
|
|
- <h4 class="panel-title"> |
|
4108
|
|
- <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#faqcollapseten" aria-expanded="false" aria-controls="faqcollapseten"> <?php esc_html_e('Problem: Are HTML tags supported?', 'chatbot'); ?> </a> |
|
4109
|
|
- </h4> |
|
4110
|
|
- </div> |
|
4111
|
|
- <div id="faqcollapseten" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqten"> |
|
4112
|
|
- <div class="panel-body"> |
|
4113
|
|
- <?php echo esc_html_e('Yes, common HTML tags link link href, strong, br etc. are supported.', 'chatbot'); ?> |
|
4114
|
|
- </div> |
|
4115
|
|
- </div> |
|
4116
|
|
- </div> |
|
4117
|
|
- |
|
4118
|
|
- <div class="panel panel-default"> |
|
4119
|
|
- <div class="panel-heading" role="tab" id="faqeleven"> |
|
4120
|
|
- <h4 class="panel-title"> |
|
4121
|
|
- <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#faqcollapseeleven" aria-expanded="false" aria-controls="faqcollapseeleven"> <?php esc_html_e('Problem: I want to add images, GIFs, Videos', 'chatbot'); ?> </a> |
|
4122
|
|
- </h4> |
|
4123
|
|
- </div> |
|
4124
|
|
- <div id="faqcollapseeleven" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqeleven"> |
|
4125
|
|
- <div class="panel-body"> |
|
4126
|
|
- <?php echo esc_html_e('Images, GIFs and Youtube Videos are supprted in the pro version. Pro version also includes a handy giphy floating search feature for easy embed in the language center.', 'chatbot'); ?> |
|
4127
|
|
- </div> |
|
4128
|
|
- </div> |
|
4129
|
|
- </div> |
|
4130
|
|
- |
|
4131
|
|
- |
|
4132
|
|
- <div class="panel panel-default"> |
|
4133
|
|
- <div class="panel-heading" role="tab" id="faqtwelve"> |
|
4134
|
|
- <h4 class="panel-title"> |
|
4135
|
|
- <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#faqcollapsetwelve" aria-expanded="false" aria-controls="faqcollapsetwelve"> <?php esc_html_e('How to disable Predefined Intent?', 'chatbot'); ?> </a> |
|
4136
|
|
- </h4> |
|
4137
|
|
- </div> |
|
4138
|
|
- <div id="faqcollapsetwelve" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqtwelve"> |
|
4139
|
|
- <div class="panel-body"> |
|
4140
|
|
- <?php echo esc_html_e('You can disable predefined intents FAQ, eMail, Call me from WPBot Lite > Settings page`s Start Menu Section.', 'chatbot'); ?> |
|
4141
|
|
- </div> |
|
4142
|
|
- </div> |
|
4143
|
|
- </div> |
|
4144
|
|
- |
|
4145
|
|
- |
|
4146
|
|
- |
|
4147
|
|
- </div> |
|
4148
|
|
- </div> |
|
4149
|
|
- </div> |
|
4150
|
|
-</div> |
|
4151
|
|
-<script type="text/javascript"> |
|
4152
|
|
- jQuery(document).ready(function($){ |
|
4153
|
|
- var url=document.URL; |
|
4154
|
|
- var arr=url.split('#'); |
|
4155
|
|
- var tab_tar = '.'+arr[1]; |
|
4156
|
|
- setTimeout(function(){ |
|
4157
|
|
- jQuery(tab_tar).trigger('click'); |
|
4158
|
|
- }, 500); |
|
4159
|
|
- jQuery('.wppt_nav_container .nav-tab').on('click', function(e){ |
|
4160
|
|
- e.preventDefault(); |
|
4161
|
|
- var section_id = jQuery(this).attr('href'); |
|
4162
|
|
- jQuery('.wppt_nav_container .nav-tab').removeClass('nav-tab-active'); |
|
4163
|
|
- jQuery(this).addClass('nav-tab-active'); |
|
4164
|
|
- jQuery('.wppt-settings-section').hide(); |
|
4165
|
|
- jQuery('.wppt-settings-section').each(function(){ |
|
4166
|
|
- jQuery(section_id).show(); |
|
4167
|
|
- }); |
|
4168
|
|
- }); |
|
4169
|
|
- }) |
|
4170
|
|
-</script> |
|
4171
|
3755
|
<?php |
|
4172
|
3756
|
} |
|
4173
|
3757
|
} |
|
4174
|
3758
|
|
|
@@ -4232,18 +3816,18 @@ |
|
4232
|
3816
|
|
|
4233
|
3817
|
if(!get_option('qlcd_wp_chatbot_did_you_mean')) { |
|
4234
|
3818
|
update_option('qlcd_wp_chatbot_did_you_mean', maybe_serialize(array('Did you mean?'))); |
|
4235
|
3819
|
} |
|
4236
|
|
- |
|
4237
|
|
- $sqlqry = $wpdb->get_results( $wpdb->prepare( "select * from {$table1} where id = %d", 1 ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter |
|
3820
|
+ |
|
3821
|
+ $sqlqry = $wpdb->get_results($wpdb->prepare("select * from $table1")); //DB Call OK, No Caching OK |
|
4238
|
3822
|
if(empty($sqlqry)){ |
|
4239
|
3823
|
|
|
4240
|
|
- $query = 'Sample Question?'; |
|
4241
|
|
- $response = 'Sample Answer'; |
|
3824
|
+ $query = 'What Can WPBot do for you?'; |
|
3825
|
+ $response = 'WPBot can converse fluidly with users on website and FB messenger. It can search your website, send/collect eMails, user feedback & phone numbers . You can create Custom Intents from DialogFlow with Rich Messages & Card responses!'; |
|
4242
|
3826
|
|
|
4243
|
3827
|
$data = array('query' => $query, 'keyword' => '', 'response'=> $response, 'intent'=> ''); |
|
4244
|
3828
|
$format = array('%s','%s', '%s', '%s'); |
|
4245
|
|
- $wpdb->insert($table1,$data,$format); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, PluginCheck.Security.DirectDB.UnescapedDBParameter |
|
3829
|
+ $wpdb->insert($table1,$data,$format); //DB Call OK, No Caching OK |
|
4246
|
3830
|
} |
|
4247
|
3831
|
|
|
4248
|
3832
|
update_option('qc_wpb_simple_response_db_upgrade_free2', 'done'); |
|
4249
|
3833
|
|
|
@@ -4285,15 +3869,15 @@ |
|
4285
|
3869
|
$table = $wpdb->prefix.'wpbot_response'; |
|
4286
|
3870
|
$data = array('query' => $query, 'keyword' => $keyword, 'response'=> $response, 'intent'=> $intent, 'category'=> $category); |
|
4287
|
3871
|
$format = array('%s','%s', '%s', '%s', '%s'); |
|
4288
|
3872
|
|
|
4289
|
|
- if(isset($_POST['qc_bot_str_id']) && wp_unslash($_POST['qc_bot_str_id'])!=''){ |
|
4290
|
|
- $id = sanitize_text_field(wp_unslash($_POST['qc_bot_str_id'])); |
|
3873
|
+ if(isset($_POST['qc_bot_str_id']) && $_POST['qc_bot_str_id']!=''){ |
|
3874
|
+ $id = sanitize_text_field($_POST['qc_bot_str_id']); |
|
4291
|
3875
|
$where = array('id'=>$id); |
|
4292
|
3876
|
$whereformat = array('%d'); |
|
4293
|
|
- $wpdb->update( $table, $data, $where, $format, $whereformat ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching |
|
3877
|
+ $wpdb->update( $table, $data, $where, $format, $whereformat ); //DB Call OK, No Caching OK |
|
4294
|
3878
|
}else{ |
|
4295
|
|
- $wpdb->insert($table,$data,$format); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery |
|
3879
|
+ $wpdb->insert($table,$data,$format); //DB Call OK, No Caching OK |
|
4296
|
3880
|
} |
|
4297
|
3881
|
|
|
4298
|
3882
|
qcld_mysql_remove_existing_indexes(); |
|
4299
|
3883
|
|
|
@@ -4299,9 +3883,9 @@ |
|
4299
|
3883
|
|
|
4300
|
3884
|
// phpcs:ignore |
|
4301
|
3885
|
$wpdb->query("ALTER TABLE $table ADD FULLTEXT(`query`, `keyword`, `response`)"); |
|
4302
|
3886
|
|
|
4303
|
|
- wp_safe_redirect(admin_url('admin.php?page=simple-text-response'));exit; |
|
3887
|
+ wp_redirect(admin_url('admin.php?page=simple-text-response'));exit; |
|
4304
|
3888
|
|
|
4305
|
3889
|
} |
|
4306
|
3890
|
$table = $wpdb->prefix.'wpbot_response'; |
|
4307
|
3891
|
|
|
@@ -4314,51 +3898,33 @@ |
|
4314
|
3898
|
|
|
4315
|
3899
|
add_action('admin_notices', 'general_admin_notice_str' ); |
|
4316
|
3900
|
|
|
4317
|
3901
|
} |
|
4318
|
|
- if(isset($_POST['qc_bot_str_weight']) && wp_unslash($_POST['qc_bot_str_weight'])!=''){ |
|
4319
|
|
- $weight = sanitize_text_field(wp_unslash($_POST['qc_bot_str_weight'])); |
|
3902
|
+ if(isset($_POST['qc_bot_str_weight']) && $_POST['qc_bot_str_weight']!=''){ |
|
3903
|
+ $weight = sanitize_text_field($_POST['qc_bot_str_weight']); |
|
4320
|
3904
|
update_option('qc_bot_str_weight', $weight); |
|
4321
|
3905
|
} |
|
4322
|
|
- if(isset($_POST['qc_bot_str_remove_stopwords']) && wp_unslash($_POST['qc_bot_str_remove_stopwords'])!=''){ |
|
3906
|
+ if(isset($_POST['qc_bot_str_remove_stopwords']) && $_POST['qc_bot_str_remove_stopwords']!=''){ |
|
4323
|
3907
|
|
|
4324
|
|
- $stopwords = sanitize_text_field(wp_unslash($_POST['qc_bot_str_remove_stopwords'])); |
|
3908
|
+ $stopwords = sanitize_text_field($_POST['qc_bot_str_remove_stopwords']); |
|
4325
|
3909
|
update_option('qc_bot_str_remove_stopwords', '1'); |
|
4326
|
3910
|
} |
|
4327
|
|
- if ( isset($_POST['qc_bot_str_allow_author_editor']) && wp_unslash($_POST['qc_bot_str_allow_author_editor']) != '' ) { |
|
4328
|
|
- $qc_bot_str_allow_author_editor = sanitize_text_field(wp_unslash($_POST['qc_bot_str_allow_author_editor'])); |
|
4329
|
|
- update_option( 'qc_bot_str_allow_author_editor', $qc_bot_str_allow_author_editor ); |
|
4330
|
|
- } else { |
|
4331
|
|
- delete_option( 'qc_bot_str_allow_author_editor' ); |
|
4332
|
|
- } |
|
4333
|
3911
|
if(isset($_POST['qc_bot_str_fields']) && !empty($_POST['qc_bot_str_fields'])){ |
|
4334
|
3912
|
$table = $wpdb->prefix.'wpbot_response'; |
|
4335
|
|
- $fields = rest_sanitize_array(wp_unslash($_POST['qc_bot_str_fields'])); |
|
4336
|
|
- |
|
4337
|
|
- $allowed_fields = array('query', 'keyword', 'response'); |
|
4338
|
|
- $valid_fields = array(); |
|
4339
|
|
- if(is_array($fields)){ |
|
4340
|
|
- foreach($fields as $field){ |
|
4341
|
|
- if(in_array($field, $allowed_fields)){ |
|
4342
|
|
- $valid_fields[] = $field; |
|
4343
|
|
- } |
|
4344
|
|
- } |
|
4345
|
|
- } |
|
4346
|
|
- $fields = $valid_fields; |
|
4347
|
|
- |
|
3913
|
+ $fields = rest_sanitize_array($_POST['qc_bot_str_fields']); |
|
4348
|
3914
|
update_option('qc_bot_str_fields', $fields); |
|
4349
|
3915
|
qcld_mysql_remove_existing_indexes(); |
|
4350
|
3916
|
|
|
4351
|
3917
|
if($fields && !empty($fields)){ |
|
4352
|
|
- $safe_fields = array_map(function($f) { return '`' . $f . '`'; }, $fields); |
|
3918
|
+ |
|
4353
|
3919
|
// phpcs:ignore |
|
4354
|
|
- $wpdb->query("ALTER TABLE $table ADD FULLTEXT(".implode(', ', $safe_fields).")"); |
|
3920
|
+ $wpdb->query("ALTER TABLE $table ADD FULLTEXT(".implode(', ', $fields).")"); |
|
4355
|
3921
|
|
|
4356
|
3922
|
} |
|
4357
|
3923
|
} |
|
4358
|
3924
|
|
|
4359
|
3925
|
if(!get_option('wpbot_preloading_time')) { |
|
4360
|
|
- update_option('wpbot_preloading_time', '800'); |
|
3926
|
+ update_option('wpbot_preloading_time', '0.5'); |
|
4361
|
3927
|
} |
|
4362
|
3928
|
} |
|
4363
|
3929
|
} |
|
4364
|
3930
|
} |
|
@@ -4376,9 +3942,9 @@ |
|
4376
|
3942
|
if( !function_exists('qcld_wpbot_simple_response_intent') ){ |
|
4377
|
3943
|
function qcld_wpbot_simple_response_intent(){ |
|
4378
|
3944
|
global $wpdb; |
|
4379
|
3945
|
$table = $wpdb->prefix.'wpbot_response'; |
|
4380
|
|
- $results = $wpdb->get_results("SELECT `intent` FROM `{$table}` WHERE 1 and `intent` !=''"); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter |
|
3946
|
+ $results = $wpdb->get_results("SELECT `intent` FROM `$table` WHERE 1 and `intent` !=''"); //DB Call OK, No Caching OK |
|
4381
|
3947
|
$response = array(); |
|
4382
|
3948
|
if(!empty($results)){ |
|
4383
|
3949
|
foreach($results as $result){ |
|
4384
|
3950
|
$response[] = $result->intent; |
|
@@ -4391,9 +3957,9 @@ |
|
4391
|
3957
|
function qcld_mysql_remove_existing_indexes(){ |
|
4392
|
3958
|
global $wpdb; |
|
4393
|
3959
|
$table = $wpdb->prefix.'wpbot_response'; |
|
4394
|
3960
|
|
|
4395
|
|
- $results = $wpdb->get_results("SHOW INDEX FROM {$table}"); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter |
|
3961
|
+ $results = $wpdb->get_results("SHOW INDEX FROM $table"); //DB Call OK, No Caching OK |
|
4396
|
3962
|
$indexes = array(); |
|
4397
|
3963
|
foreach($results as $result){ |
|
4398
|
3964
|
|
|
4399
|
3965
|
|
|
@@ -4421,4 +3987,6 @@ |
|
4421
|
3987
|
} |
|
4422
|
3988
|
} |
|
4423
|
3989
|
} |
|
4424
|
3990
|
} |
|
3991
|
+ |
|
3992
|
+ |