|
@@ -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.1
|
|
7
|
+ * Version: 7.8.7
|
|
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.9
|
|
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.1');
|
|
44
|
+ define('QCLD_wpCHATBOT_VERSION', '7.8.7');
|
|
54
|
45
|
}
|
|
55
|
46
|
if ( ! defined( 'QCLD_wpCHATBOT_REQUIRED_wpCOMMERCE_VERSION' ) ) {
|
|
56
|
47
|
define('QCLD_wpCHATBOT_REQUIRED_wpCOMMERCE_VERSION', 2.2);
|
|
57
|
48
|
}
|
|
@@ -88,9 +79,8 @@ |
|
88
|
79
|
require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/class-qcld-bot-rag.php");
|
|
89
|
80
|
require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/integration/openai/qcld-bot-openai.php");
|
|
90
|
81
|
require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/integration/openrouter/qcld-bot-openrouter.php");
|
|
91
|
82
|
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
|
83
|
require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."class-qc-free-plugin-upgrade-notice.php");
|
|
94
|
84
|
require_once("class-plugin-deactivate-feedback.php");
|
|
95
|
85
|
require_once("qc-support-promo-page/class-qc-support-promo-page.php");
|
|
96
|
86
|
require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."/functions.php");
|
|
@@ -104,12 +94,8 @@ |
|
104
|
94
|
// require_once( QCLD_wpCHATBOT_PLUGIN_DIR_PATH . '/inc/qcld-floating-openai-style-filter.php' );
|
|
105
|
95
|
// require_once( QCLD_wpCHATBOT_PLUGIN_DIR_PATH . '/inc/qcld_openai_floating_content.php' );
|
|
106
|
96
|
// }
|
|
107
|
97
|
|
|
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
|
98
|
/**
|
|
113
|
99
|
* Main Class.
|
|
114
|
100
|
*/
|
|
115
|
101
|
|
|
@@ -157,9 +143,8 @@ |
|
157
|
143
|
}
|
|
158
|
144
|
|
|
159
|
145
|
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
|
146
|
// add_action( 'admin_notices', array( $this, 'promotion_notice' ) );
|
|
161
|
|
-
|
|
162
|
147
|
}
|
|
163
|
148
|
|
|
164
|
149
|
if (is_admin() && !empty($_GET["page"]) && ($_GET["page"] == "wpbot") || (!empty($_GET['page']) && $_GET['page']=='wpbot_help_page')
|
|
165
|
150
|
|
|
@@ -249,16 +234,14 @@ |
|
249
|
234
|
$capability = 'publish_posts';
|
|
250
|
235
|
}else{
|
|
251
|
236
|
$capability = 'manage_options';
|
|
252
|
237
|
}
|
|
253
|
|
- add_menu_page( esc_html('WPBot - ChatBot Lite'), esc_html('WPBot - ChatBot Lite'), 'manage_options','wpbot-panel', array($this, 'qcld_wb_chatbot_admin_page'),'dashicons-format-status', 6 );
|
|
238
|
+ 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
|
239
|
|
|
255
|
240
|
add_submenu_page( 'wpbot-panel', esc_html('Settings'), esc_html('Settings'), 'manage_options','wpbot', array($this, 'qcld_wb_chatbot_admin_page_settings') );
|
|
256
|
241
|
|
|
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') );
|
|
242
|
+ add_submenu_page( 'wpbot-panel', esc_html('OpenAI Settings'), esc_html('AI Settings'), 'manage_options','wpbot_openAi', 'wpbot_openAi_setting_func' );
|
|
258
|
243
|
|
|
259
|
|
- add_submenu_page( 'wpbot-panel', esc_html('AI Settings'), esc_html('AI Settings'), 'manage_options','wpbot_openAi', 'wpbot_openAi_setting_func' );
|
|
260
|
|
-
|
|
261
|
244
|
$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
|
245
|
|
|
263
|
246
|
add_action( "load-$hook", [ $this, 'screen_option' ] );
|
|
264
|
247
|
|
|
@@ -263,9 +246,9 @@ |
|
263
|
246
|
add_action( "load-$hook", [ $this, 'screen_option' ] );
|
|
264
|
247
|
|
|
265
|
248
|
// add_submenu_page( 'wpbot-panel', esc_html('Conversational Form '), esc_html('Conversational Form'), 'manage_options','wpbots', [$this, 'qcld_wb_chatbot_admin_conversational_settings'] );
|
|
266
|
249
|
|
|
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' );
|
|
250
|
+ add_submenu_page( 'wpbot-panel', esc_html('Support'), esc_html('Support'), 'manage_options','wpbot_support_page', 'qcpromo_wpbot_free_support_page_callback_func' );
|
|
268
|
251
|
|
|
269
|
252
|
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
|
253
|
|
|
271
|
254
|
|
|
@@ -354,9 +337,9 @@ |
|
354
|
337
|
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
|
338
|
wp_enqueue_style('qcld-wp-chatbot-timepicker-css');
|
|
356
|
339
|
wp_register_script('qcld-wp-chatbot-sweetalrt', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/sweetalrt.js', basename(__FILE__)), array(), true);
|
|
357
|
340
|
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);
|
|
341
|
+ 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
|
342
|
wp_enqueue_script('qcld-wp-chatbot-admin-js');
|
|
360
|
343
|
wp_localize_script('qcld-wp-chatbot-admin-js', 'qcld_gemini_admin_data',
|
|
361
|
344
|
array('ajax_url' => admin_url('admin-ajax.php'),'ajax_nonce' => wp_create_nonce('wp_chatbot'),'image_path' => QCLD_wpCHATBOT_IMG_URL));
|
|
362
|
345
|
// WordPress Media library
|
|
@@ -372,9 +355,9 @@ |
|
372
|
355
|
public function qcld_get_formbuilder_forms(){
|
|
373
|
356
|
global $wpdb;
|
|
374
|
357
|
$forms = array();
|
|
375
|
358
|
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
|
|
359
|
+ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ". $wpdb->prefix."wfb_forms WHERE type=%s", 'primary')); //DB Call OK, No Caching OK
|
|
377
|
360
|
if(!empty($results)){
|
|
378
|
361
|
foreach($results as $result){
|
|
379
|
362
|
$form = maybe_unserialize($result->config);
|
|
380
|
363
|
$forms[] = trim($form['name']);
|
|
@@ -386,15 +369,12 @@ |
|
386
|
369
|
}else{
|
|
387
|
370
|
return array();
|
|
388
|
371
|
}
|
|
389
|
372
|
}
|
|
390
|
|
- public function qcld_wb_chatbot_admin_page1() {
|
|
391
|
|
- require_once QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/admin/templates/email_subscription.php';
|
|
392
|
|
- }
|
|
393
|
373
|
public function qcld_wpbot_simple_response_intent(){
|
|
394
|
374
|
global $wpdb;
|
|
395
|
375
|
$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
|
|
376
|
+ $results = $wpdb->get_results("SELECT `intent` FROM `$table` WHERE 1 and `intent` !=''"); //DB Call OK, No Caching OK
|
|
397
|
377
|
$response = array();
|
|
398
|
378
|
if(!empty($results)){
|
|
399
|
379
|
foreach($results as $result){
|
|
400
|
380
|
$response[] = $result->intent;
|
|
@@ -406,9 +386,9 @@ |
|
406
|
386
|
global $wpdb;
|
|
407
|
387
|
$command = array();
|
|
408
|
388
|
if(class_exists('Qcformbuilder_Forms_Admin')){
|
|
409
|
389
|
$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
|
|
390
|
+ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ". $wpdb->prefix."wfb_forms WHERE type = %s", $primary)); //DB Call OK, No Caching OK
|
|
411
|
391
|
|
|
412
|
392
|
if(!empty($results)){
|
|
413
|
393
|
foreach($results as $result){
|
|
414
|
394
|
$form = maybe_unserialize($result->config);
|
|
@@ -427,8 +407,9 @@ |
|
427
|
407
|
}
|
|
428
|
408
|
}
|
|
429
|
409
|
public function promotion_notice(){
|
|
430
|
410
|
$screen = get_current_screen();
|
|
411
|
+ // var_dump($screen->base );
|
|
431
|
412
|
// if( isset($screen->base) && (( $screen->base == 'wpbot-lite_page_wpbot') || ( $screen->base == 'toplevel_page_wpbot-panel"'))){
|
|
432
|
413
|
?>
|
|
433
|
414
|
<div id="promotion-wpchatbot" data-dismiss-type="qcbot-feedback-notice" class="notice is-dismissible qcbot-feedback" style="background: #120976 !important">
|
|
434
|
415
|
<div class="">
|
|
@@ -445,9 +426,9 @@ |
|
445
|
426
|
public function qcld_get_formbuilder_form_ids(){
|
|
446
|
427
|
global $wpdb;
|
|
447
|
428
|
$forms = array();
|
|
448
|
429
|
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
|
|
430
|
+ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ". $wpdb->prefix."wfb_forms WHERE type=%s", 'primary')); //DB Call OK, No Caching OK
|
|
450
|
431
|
|
|
451
|
432
|
if(!empty($results)){
|
|
452
|
433
|
foreach($results as $result){
|
|
453
|
434
|
$form = maybe_unserialize($result->config);
|
|
@@ -481,13 +462,13 @@ |
|
481
|
462
|
$conversation_form_ids = array();
|
|
482
|
463
|
$conversation_form_names = array();
|
|
483
|
464
|
|
|
484
|
465
|
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
|
|
466
|
+ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ". $wpdb->prefix."wfb_forms WHERE type=%s", 'primary')); //DB Call OK, No Caching OK
|
|
486
|
467
|
if(!empty($results)){
|
|
487
|
468
|
|
|
488
|
469
|
foreach($results as $result){
|
|
489
|
|
- $form = maybe_unserialize($result->config);
|
|
470
|
+ $form = unserialize($result->config);
|
|
490
|
471
|
$conversation_form_ids[] = $form['ID'];
|
|
491
|
472
|
$conversation_form_names[] = $form['name'];
|
|
492
|
473
|
}
|
|
493
|
474
|
|
|
@@ -509,31 +490,31 @@ |
|
509
|
490
|
'yes' => str_replace('\\', '',get_option('qlcd_wp_chatbot_yes')),
|
|
510
|
491
|
'no' => str_replace('\\', '',get_option('qlcd_wp_chatbot_no')),
|
|
511
|
492
|
'or' => str_replace('\\', '',get_option('qlcd_wp_chatbot_or')),
|
|
512
|
493
|
'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'))),
|
|
494
|
+ 'agent' => str_replace(['\\','<','>'], '',esc_html(get_option('qlcd_wp_chatbot_agent'))),
|
|
514
|
495
|
'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'))),
|
|
496
|
+ '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',
|
|
497
|
+ 'shopper_demo_name' => str_replace('\\', '',get_option('qlcd_wp_chatbot_shopper_demo_name')),
|
|
498
|
+ 'agent_join' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_agent_join'))),
|
|
499
|
+ 'welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_welcome'))),
|
|
500
|
+ 'welcome_back' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_welcome_back'))),
|
|
501
|
+ 'hi_there' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_hi_there'))),
|
|
521
|
502
|
'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'))),
|
|
503
|
+ 'asking_name' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_name'))),
|
|
504
|
+ 'i_am' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_i_am'))),
|
|
505
|
+ 'name_greeting' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_name_greeting'))),
|
|
506
|
+ 'wildcard_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_msg'))),
|
|
507
|
+ 'empty_filter_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_empty_filter_msg'))),
|
|
508
|
+ 'did_you_mean' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_did_you_mean'))),
|
|
509
|
+ 'is_typing' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_is_typing'))),
|
|
510
|
+ 'send_a_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_send_a_msg'))),
|
|
530
|
511
|
|
|
531
|
|
- 'viewed_products' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_viewed_products'))),
|
|
512
|
+ 'viewed_products' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_viewed_products'))),
|
|
532
|
513
|
|
|
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'))),
|
|
514
|
+ 'shopping_cart' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_shopping_cart'))),
|
|
515
|
+ 'cart_updating' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_cart_updating'))),
|
|
516
|
+ 'cart_removing' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_cart_removing'))),
|
|
536
|
517
|
'imgurl' => QCLD_wpCHATBOT_IMG_URL,
|
|
537
|
518
|
'sys_key_help' => get_option('qlcd_wp_chatbot_sys_key_help'),
|
|
538
|
519
|
'sys_key_product' => get_option('qlcd_wp_chatbot_sys_key_product'),
|
|
539
|
520
|
'sys_key_catalog' => get_option('qlcd_wp_chatbot_sys_key_catalog'),
|
|
@@ -540,54 +521,54 @@ |
|
540
|
521
|
'sys_key_order' => get_option('qlcd_wp_chatbot_sys_key_order'),
|
|
541
|
522
|
'sys_key_support' => get_option('qlcd_wp_chatbot_sys_key_support'),
|
|
542
|
523
|
'sys_key_reset' => get_option('qlcd_wp_chatbot_sys_key_reset'),
|
|
543
|
524
|
'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'))),
|
|
525
|
+ 'help_welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_help_welcome'))),
|
|
526
|
+ 'back_to_start' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_back_to_start'))),
|
|
527
|
+ 'help_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_help_msg'))),
|
|
528
|
+ 'reset' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_reset'))),
|
|
529
|
+ 'wildcard_product' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_product'))),
|
|
530
|
+ 'wildcard_catalog' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_catalog'))),
|
|
531
|
+ 'featured_products' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_featured_products'))),
|
|
532
|
+ 'sale_products' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_sale_products'))),
|
|
533
|
+ 'wildcard_order' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_order'))),
|
|
553
|
534
|
'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'))),
|
|
535
|
+ 'product_asking' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_asking'))),
|
|
536
|
+ 'product_suggest' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_suggest'))),
|
|
537
|
+ 'product_infinite' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_infinite'))),
|
|
538
|
+ 'product_success' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_success'))),
|
|
539
|
+ 'product_fail' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_fail'))),
|
|
540
|
+ 'support_welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_support_welcome'))),
|
|
560
|
541
|
'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'))),
|
|
542
|
+ 'support_option_again' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_support_option_again'))),
|
|
543
|
+ 'asking_email' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_email'))),
|
|
544
|
+ 'asking_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_msg'))),
|
|
545
|
+ 'no_result' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_no_result'))),
|
|
565
|
546
|
'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'))),
|
|
547
|
+ 'asking_phone' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_phone'))),
|
|
548
|
+ 'thank_for_phone' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_thank_for_phone'))),
|
|
549
|
+ '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')))),
|
|
550
|
+ '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
|
551
|
'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'))),
|
|
552
|
+ 'notifications' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_notifications'))),
|
|
553
|
+ 'order_welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_welcome'))),
|
|
554
|
+ 'order_username_asking' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_username_asking'))),
|
|
555
|
+ 'order_username_password' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_username_password'))),
|
|
575
|
556
|
'order_user' => get_option('qlcd_wp_chatbot_order_user'),
|
|
576
|
557
|
'order_login' => is_user_logged_in(),
|
|
577
|
558
|
'is_chat_session_active' => qcld_wpbot_is_active_chat_history(),
|
|
578
|
559
|
'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'))),
|
|
560
|
+ 'order_email_support' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_email_support'))),
|
|
580
|
561
|
'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'))),
|
|
562
|
+ 'invalid_email' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_invalid_email'))),
|
|
582
|
563
|
'stop_words' => str_replace('\\', '', get_option('qlcd_wp_chatbot_stop_words')),
|
|
583
|
564
|
'currency_symbol' => '',
|
|
584
|
565
|
'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'))),
|
|
566
|
+ 'messenger_label' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_messenger_label'))),
|
|
586
|
567
|
'fb_page_id' => get_option('qlcd_wp_chatbot_fb_page_id'),
|
|
587
|
568
|
'enable_skype' => get_option('enable_wp_chatbot_skype'),
|
|
588
|
569
|
'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'))),
|
|
570
|
+ 'whats_label' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_whats_label'))),
|
|
590
|
571
|
'whats_num' => get_option('qlcd_wp_chatbot_whats_num'),
|
|
591
|
572
|
'ret_greet' => get_option('qlcd_wp_chatbot_ret_greet'),
|
|
592
|
573
|
'enable_exit_intent' => get_option('enable_wp_chatbot_exit_intent'),
|
|
593
|
574
|
'exit_intent_msg' => str_replace('\\', '', get_option('wp_chatbot_exit_intent_msg')),
|
|
@@ -602,9 +583,9 @@ |
|
602
|
583
|
'auto_open_once' => get_option('wp_chatbot_auto_open_once'),
|
|
603
|
584
|
'proactive_bg_color' => get_option('wp_chatbot_proactive_bg_color'),
|
|
604
|
585
|
'disable_feedback' => get_option('disable_wp_chatbot_feedback'),
|
|
605
|
586
|
'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'))),
|
|
587
|
+ 'feedback_label' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_feedback_label'))),
|
|
607
|
588
|
'enable_meta_title' =>get_option('enable_wp_chatbot_meta_title'),
|
|
608
|
589
|
'meta_label' =>str_replace('\\', '', get_option('qlcd_wp_chatbot_meta_label')),
|
|
609
|
590
|
'phone_number' => get_option('qlcd_wp_chatbot_phone'),
|
|
610
|
591
|
'disable_site_search' => get_option('disable_wp_chatbot_site_search'),
|
|
@@ -609,9 +590,8 @@ |
|
609
|
590
|
'phone_number' => get_option('qlcd_wp_chatbot_phone'),
|
|
610
|
591
|
'disable_site_search' => get_option('disable_wp_chatbot_site_search'),
|
|
611
|
592
|
'search_keyword' => get_option('qlcd_wp_chatbot_asking_search_keyword'),
|
|
612
|
593
|
'ajax_nonce'=> wp_create_nonce('qcsecretbotnonceval123qc'),
|
|
613
|
|
- 'session_nonce'=> wp_create_nonce('wp_chatbot'),
|
|
614
|
594
|
'site_search' => get_option('qlcd_wp_site_search'),
|
|
615
|
595
|
'open_links_newtab' => get_option('open_links_new_window'),
|
|
616
|
596
|
'call_gen' => get_option('disable_wp_chatbot_call_gen'),
|
|
617
|
597
|
'call_sup' => get_option('disable_wp_chatbot_call_sup'),
|
|
@@ -628,13 +608,11 @@ |
|
628
|
608
|
'ai_df_token' => get_option('qlcd_wp_chatbot_dialogflow_client_token'),
|
|
629
|
609
|
'df_defualt_reply' => str_replace('\\', '', get_option('qlcd_wp_chatbot_dialogflow_defualt_reply')),
|
|
630
|
610
|
'df_agent_lan' => get_option('qlcd_wp_chatbot_dialogflow_agent_language'),
|
|
631
|
611
|
'openai_enabled' => get_option('ai_enabled'),
|
|
632
|
|
- 'is_stream_enabled' => ( get_option('is_stream_enabled', '1') == '1' ? '1' : '0' ),
|
|
633
|
612
|
'qcld_openai_append_content' => get_option('qcld_openai_append_content'),
|
|
634
|
613
|
'openrouter_enabled' => (get_option('qcld_openrouter_enabled')=='1'? get_option('qcld_openrouter_enabled') : '0'),
|
|
635
|
614
|
'gemini_enabled' => (get_option('qcld_gemini_enabled')=='1'? get_option('qcld_gemini_enabled') : '0'),
|
|
636
|
|
- 'grok_enabled' => (get_option('qcld_grok_enabled')=='1'? get_option('qcld_grok_enabled') : '0'),
|
|
637
|
615
|
'qcld_gemini_prepend_content' => get_option('qcld_gemini_prepend_content'),
|
|
638
|
616
|
'qcld_gemini_append_content' => get_option('qcld_gemini_append_content'),
|
|
639
|
617
|
'qcld_openrouter_append_content' => get_option('qcld_openrouter_append_content'),
|
|
640
|
618
|
'qcld_openrouter_prepend_content' => get_option('qcld_openrouter_prepend_content'),
|
|
@@ -649,12 +627,10 @@ |
|
649
|
627
|
'v2_client_url'=> esc_url(get_site_url().'/?action=qcld_dfv2_api'),
|
|
650
|
628
|
'show_menu_after_greetings'=> (get_option('show_menu_after_greetings')!=''?get_option('show_menu_after_greetings'):0),
|
|
651
|
629
|
'disable_back_to_start'=> (get_option('disable_back_to_start_menu')!=''?get_option('disable_back_to_start_menu'):0),
|
|
652
|
630
|
'current_user_id' => $user_id,
|
|
653
|
|
- 'display_name' => esc_html( $display_name ),
|
|
654
|
631
|
'skip_wp_greetings' => get_option('skip_wp_greetings'),
|
|
655
|
632
|
'skip_greetings_and_menu' => get_option('skip_wp_greetings_donot_show_menu'),
|
|
656
|
|
- 'ask_email_wp_greetings' => get_option('enable_asking_for_email'),
|
|
657
|
633
|
'skip_chat_reactions_menu' => get_option('skip_chat_reactions_menu'),
|
|
658
|
634
|
'qlcd_wp_chatbot_like_text' => get_option('qlcd_wp_chatbot_like_text'),
|
|
659
|
635
|
'qlcd_wp_chatbot_dislike_text' => get_option('qlcd_wp_chatbot_dislike_text'),
|
|
660
|
636
|
'enable_chat_report_menu' => get_option('enable_chat_report_menu'),
|
|
@@ -712,11 +688,10 @@ |
|
712
|
688
|
|
|
713
|
689
|
$nonce = wp_create_nonce('wp_chatbot');
|
|
714
|
690
|
// Pass data to JS
|
|
715
|
691
|
wp_localize_script('qcld-wp-chatbot-plugin', 'qcld_chatbot_obj', [
|
|
716
|
|
- 'ajax_url' => admin_url('admin-ajax.php'),
|
|
717
|
|
- 'nonce' => $nonce,
|
|
718
|
|
- 'stream_endpoint' => admin_url('admin-ajax.php?action=qcld_stream_openai'),
|
|
692
|
+ 'ajax_url' => admin_url('admin-ajax.php'),
|
|
693
|
+ 'nonce' => $nonce,
|
|
719
|
694
|
]);
|
|
720
|
695
|
|
|
721
|
696
|
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);
|
|
722
|
697
|
wp_enqueue_script('qcld-wp-chatbot-front-js');
|
|
@@ -1051,169 +1026,151 @@ |
|
1051
|
1026
|
|
|
1052
|
1027
|
function qcld_wb_chatbot_save_options()
|
|
1053
|
1028
|
{
|
|
1054
|
1029
|
//global $wpcommerce;
|
|
1055
|
|
- if (isset($_POST['_wpnonce']) && wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['_wpnonce'])), 'wp_chatbot') && current_user_can('manage_options')) {
|
|
1030
|
+ if (isset($_POST['_wpnonce']) && wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['_wpnonce'])), 'wp_chatbot')) {
|
|
1056
|
1031
|
// Check if the form is submitted or not.
|
|
1057
|
|
- $submit = sanitize_text_field(wp_unslash($_POST['submit']));
|
|
1032
|
+ $submit = sanitize_text_field($_POST['submit']);
|
|
1058
|
1033
|
if (isset($submit)) {
|
|
1059
|
1034
|
//wpwboticon position settings.
|
|
1060
|
1035
|
if (isset($_POST["wp_chatbot_position_x"])) {
|
|
1061
|
|
- $wp_chatbot_position_x = intval(sanitize_text_field(wp_unslash($_POST["wp_chatbot_position_x"])));
|
|
1036
|
+ $wp_chatbot_position_x = intval(sanitize_text_field($_POST["wp_chatbot_position_x"]));
|
|
1062
|
1037
|
update_option('wp_chatbot_position_x', $wp_chatbot_position_x);
|
|
1063
|
1038
|
}
|
|
1064
|
1039
|
if (isset($_POST["wp_chatbot_position_y"])) {
|
|
1065
|
|
- $wp_chatbot_position_y = intval(sanitize_text_field(wp_unslash($_POST["wp_chatbot_position_y"])));
|
|
1040
|
+ $wp_chatbot_position_y = intval(sanitize_text_field($_POST["wp_chatbot_position_y"]));
|
|
1066
|
1041
|
update_option('wp_chatbot_position_y', $wp_chatbot_position_y);
|
|
1067
|
1042
|
}
|
|
1068
|
1043
|
//product search options
|
|
1069
|
1044
|
if(isset($_POST['qlcd_wp_chatbot_search_option'])){
|
|
1070
|
|
- $qlcd_wp_chatbot_search_option = sanitize_text_field(wp_unslash($_POST['qlcd_wp_chatbot_search_option']));
|
|
1045
|
+ $qlcd_wp_chatbot_search_option = sanitize_text_field($_POST['qlcd_wp_chatbot_search_option']);
|
|
1071
|
1046
|
update_option('qlcd_wp_chatbot_search_option', $qlcd_wp_chatbot_search_option);
|
|
1072
|
1047
|
}
|
|
1073
|
1048
|
if(isset( $_POST["disable_floating_button"])){
|
|
1074
|
|
- $disable_floating_button = sanitize_text_field(wp_unslash($_POST["disable_floating_button"]));
|
|
1049
|
+ $disable_floating_button = sanitize_text_field($_POST["disable_floating_button"]);
|
|
1075
|
1050
|
}else{ $disable_floating_button='';}
|
|
1076
|
1051
|
update_option('disable_floating_button', wp_unslash($disable_floating_button));
|
|
1077
|
1052
|
|
|
1078
|
1053
|
if(isset( $_POST["wpbot_enable_on_search"])){
|
|
1079
|
|
- $wpbot_enable_on_search = sanitize_text_field(wp_unslash($_POST["wpbot_enable_on_search"]));
|
|
1054
|
+ $wpbot_enable_on_search = sanitize_text_field($_POST["wpbot_enable_on_search"]);
|
|
1080
|
1055
|
}else{ $wpbot_enable_on_search='';}
|
|
1081
|
1056
|
update_option('wpbot_enable_on_search', wp_unslash($wpbot_enable_on_search));
|
|
1082
|
1057
|
|
|
1083
|
1058
|
if(isset( $_POST["skip_wp_greetings_donot_show_menu"])){
|
|
1084
|
|
- $skip_wp_greetings_donot_show_menu = sanitize_text_field(wp_unslash($_POST["skip_wp_greetings_donot_show_menu"]));
|
|
1059
|
+ $skip_wp_greetings_donot_show_menu = sanitize_text_field($_POST["skip_wp_greetings_donot_show_menu"]);
|
|
1085
|
1060
|
}else{ $skip_wp_greetings_donot_show_menu='';}
|
|
1086
|
1061
|
update_option('skip_wp_greetings_donot_show_menu', wp_unslash($skip_wp_greetings_donot_show_menu));
|
|
1087
|
1062
|
|
|
1088
|
1063
|
if(isset( $_POST["skip_wp_greetings"])){
|
|
1089
|
|
- $skip_wp_greetings = sanitize_text_field(wp_unslash($_POST["skip_wp_greetings"]));
|
|
1064
|
+ $skip_wp_greetings = sanitize_text_field($_POST["skip_wp_greetings"]);
|
|
1090
|
1065
|
}else{ $skip_wp_greetings='';}
|
|
1091
|
1066
|
update_option('skip_wp_greetings', wp_unslash($skip_wp_greetings));
|
|
1092
|
|
-
|
|
1093
|
|
- if( $skip_wp_greetings == '1' || $skip_wp_greetings_donot_show_menu == '1' ){
|
|
1094
|
|
- $ask_email_wp_greetings = '';
|
|
1095
|
|
- $enable_asking_for_email = '';
|
|
1096
|
|
- } else {
|
|
1097
|
|
- if (isset( $_POST["ask_email_wp_greetings"])) {
|
|
1098
|
|
- $ask_email_wp_greetings = sanitize_text_field(wp_unslash($_POST["ask_email_wp_greetings"]));
|
|
1099
|
|
- } else {
|
|
1100
|
|
- $ask_email_wp_greetings = '';
|
|
1101
|
|
- }
|
|
1102
|
|
- if (isset( $_POST["enable_asking_for_email"])) {
|
|
1103
|
|
- $enable_asking_for_email = sanitize_text_field(wp_unslash($_POST["enable_asking_for_email"]));
|
|
1104
|
|
- } else {
|
|
1105
|
|
- $enable_asking_for_email = '';
|
|
1106
|
|
- }
|
|
1107
|
|
- }
|
|
1108
|
|
- update_option('ask_email_wp_greetings', wp_unslash($ask_email_wp_greetings));
|
|
1109
|
|
- update_option('enable_asking_for_email', wp_unslash($enable_asking_for_email));
|
|
1110
|
1067
|
//Enable /disable wpwbot
|
|
1111
|
1068
|
if(isset( $_POST["disable_wp_chatbot"])){
|
|
1112
|
|
- $disable_wp_chatbot = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot"]));
|
|
1069
|
+ $disable_wp_chatbot = sanitize_text_field($_POST["disable_wp_chatbot"]);
|
|
1113
|
1070
|
}else{ $disable_wp_chatbot='';}
|
|
1114
|
1071
|
update_option('disable_wp_chatbot', wp_unslash($disable_wp_chatbot));
|
|
1115
|
1072
|
|
|
1116
|
1073
|
if(isset( $_POST["qlcd_wp_chatbot_admin_email"])){
|
|
1117
|
|
- $qlcd_wp_chatbot_admin_email = sanitize_email(wp_unslash($_POST["qlcd_wp_chatbot_admin_email"]));
|
|
1074
|
+ $qlcd_wp_chatbot_admin_email = sanitize_email($_POST["qlcd_wp_chatbot_admin_email"]);
|
|
1118
|
1075
|
}else{ $qlcd_wp_chatbot_admin_email='';}
|
|
1119
|
1076
|
update_option('qlcd_wp_chatbot_admin_email', wp_unslash($qlcd_wp_chatbot_admin_email));
|
|
1120
|
1077
|
|
|
1121
|
1078
|
|
|
1122
|
1079
|
if(isset( $_POST["open_links_new_window"])){
|
|
1123
|
|
- $open_links_new_window = sanitize_text_field(wp_unslash($_POST["open_links_new_window"]));
|
|
1080
|
+ $open_links_new_window = sanitize_text_field($_POST["open_links_new_window"]);
|
|
1124
|
1081
|
}else{ $open_links_new_window='';}
|
|
1125
|
1082
|
update_option('open_links_new_window', wp_unslash($open_links_new_window));
|
|
1126
|
1083
|
|
|
1127
|
1084
|
|
|
1128
|
1085
|
if(isset( $_POST["qlcd_wp_chatbot_from_email"])){
|
|
1129
|
|
- $qlcd_wp_chatbot_from_email = sanitize_email(wp_unslash($_POST["qlcd_wp_chatbot_from_email"]));
|
|
1086
|
+ $qlcd_wp_chatbot_from_email = sanitize_email($_POST["qlcd_wp_chatbot_from_email"]);
|
|
1130
|
1087
|
}else{ $qlcd_wp_chatbot_from_email='';}
|
|
1131
|
1088
|
update_option('qlcd_wp_chatbot_from_email', wp_unslash($qlcd_wp_chatbot_from_email));
|
|
1132
|
1089
|
|
|
1133
|
1090
|
if(isset( $_POST["disable_wp_chatbot_on_mobile"])) {
|
|
1134
|
|
- $disable_wp_chatbot_on_mobile = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_on_mobile"]));
|
|
1091
|
+ $disable_wp_chatbot_on_mobile = sanitize_text_field($_POST["disable_wp_chatbot_on_mobile"]);
|
|
1135
|
1092
|
}else{ $disable_wp_chatbot_on_mobile='';}
|
|
1136
|
1093
|
update_option('disable_wp_chatbot_on_mobile', wp_unslash($disable_wp_chatbot_on_mobile));
|
|
1137
|
1094
|
if(isset( $_POST["disable_wp_chatbot_product_search"])) {
|
|
1138
|
|
- $disable_wp_chatbot_product_search = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_product_search"]));
|
|
1095
|
+ $disable_wp_chatbot_product_search = sanitize_text_field($_POST["disable_wp_chatbot_product_search"]);
|
|
1139
|
1096
|
}else{ $disable_wp_chatbot_product_search='';}
|
|
1140
|
1097
|
update_option('disable_wp_chatbot_product_search', wp_unslash($disable_wp_chatbot_product_search));
|
|
1141
|
1098
|
if(isset( $_POST["disable_wp_chatbot_catalog"])) {
|
|
1142
|
|
- $disable_wp_chatbot_catalog= sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_catalog"]));
|
|
1099
|
+ $disable_wp_chatbot_catalog= sanitize_text_field($_POST["disable_wp_chatbot_catalog"]);
|
|
1143
|
1100
|
}else{ $disable_wp_chatbot_catalog='';}
|
|
1144
|
1101
|
update_option('disable_wp_chatbot_catalog', wp_unslash($disable_wp_chatbot_catalog));
|
|
1145
|
1102
|
if(isset( $_POST["disable_wp_chatbot_order_status"])) {
|
|
1146
|
|
- $disable_wp_chatbot_order_status = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_order_status"]));
|
|
1103
|
+ $disable_wp_chatbot_order_status = sanitize_text_field($_POST["disable_wp_chatbot_order_status"]);
|
|
1147
|
1104
|
}else{ $disable_wp_chatbot_order_status='';}
|
|
1148
|
1105
|
update_option('disable_wp_chatbot_order_status', wp_unslash($disable_wp_chatbot_order_status));
|
|
1149
|
1106
|
if(isset( $_POST["disable_wp_chatbot_notification"])) {
|
|
1150
|
|
- $disable_wp_chatbot_notification = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_notification"]));
|
|
1107
|
+ $disable_wp_chatbot_notification = sanitize_text_field($_POST["disable_wp_chatbot_notification"]);
|
|
1151
|
1108
|
}else{ $disable_wp_chatbot_notification='1';}
|
|
1152
|
1109
|
update_option('disable_wp_chatbot_notification', wp_unslash($disable_wp_chatbot_notification));
|
|
1153
|
1110
|
|
|
1154
|
1111
|
if(isset( $_POST["enable_wp_chatbot_rtl"])) {
|
|
1155
|
|
- $enable_wp_chatbot_rtl = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_rtl"]));
|
|
1112
|
+ $enable_wp_chatbot_rtl = sanitize_text_field($_POST["enable_wp_chatbot_rtl"]);
|
|
1156
|
1113
|
}else{ $enable_wp_chatbot_rtl='';}
|
|
1157
|
1114
|
update_option('enable_wp_chatbot_rtl', wp_unslash($enable_wp_chatbot_rtl));
|
|
1158
|
1115
|
|
|
1159
|
1116
|
if(isset( $_POST["show_menu_after_greetings"])) {
|
|
1160
|
|
- $show_menu_after_greetings = sanitize_text_field(wp_unslash($_POST["show_menu_after_greetings"]));
|
|
1117
|
+ $show_menu_after_greetings = sanitize_text_field($_POST["show_menu_after_greetings"]);
|
|
1161
|
1118
|
}else{ $show_menu_after_greetings='';}
|
|
1162
|
1119
|
update_option('show_menu_after_greetings', wp_unslash($show_menu_after_greetings));
|
|
1163
|
1120
|
|
|
1164
|
1121
|
if(isset( $_POST["disable_back_to_start_menu"])) {
|
|
1165
|
|
- $disable_back_to_start_menu = sanitize_text_field(wp_unslash($_POST["disable_back_to_start_menu"]));
|
|
1122
|
+ $disable_back_to_start_menu = sanitize_text_field($_POST["disable_back_to_start_menu"]);
|
|
1166
|
1123
|
}else{ $disable_back_to_start_menu='';}
|
|
1167
|
1124
|
update_option('disable_back_to_start_menu', wp_unslash($disable_back_to_start_menu));
|
|
1168
|
1125
|
|
|
1169
|
1126
|
if(isset( $_POST["enable_chat_session"])) {
|
|
1170
|
|
- $enable_chat_session = sanitize_text_field(wp_unslash($_POST["enable_chat_session"]));
|
|
1127
|
+ $enable_chat_session = sanitize_text_field($_POST["enable_chat_session"]);
|
|
1171
|
1128
|
}else{ $enable_chat_session='';}
|
|
1172
|
1129
|
update_option('enable_chat_session', wp_unslash($enable_chat_session));
|
|
1173
|
1130
|
|
|
1174
|
1131
|
|
|
1175
|
1132
|
if(isset( $_POST["enable_wp_chatbot_mobile_full_screen"])) {
|
|
1176
|
|
- $enable_wp_chatbot_mobile_full_screen = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_mobile_full_screen"]));
|
|
1133
|
+ $enable_wp_chatbot_mobile_full_screen = sanitize_text_field($_POST["enable_wp_chatbot_mobile_full_screen"]);
|
|
1177
|
1134
|
}else{ $enable_wp_chatbot_mobile_full_screen='';}
|
|
1178
|
1135
|
update_option('enable_wp_chatbot_mobile_full_screen', wp_unslash($enable_wp_chatbot_mobile_full_screen));
|
|
1179
|
1136
|
|
|
1180
|
1137
|
if(isset( $_POST["wpbot_preloading_time"])) {
|
|
1181
|
|
- $wpbot_preloading_time = sanitize_text_field(wp_unslash($_POST["wpbot_preloading_time"]));
|
|
1138
|
+ $wpbot_preloading_time = sanitize_text_field($_POST["wpbot_preloading_time"]);
|
|
1182
|
1139
|
}else{ $wpbot_preloading_time='800';}
|
|
1183
|
1140
|
update_option('wpbot_preloading_time', wp_unslash($wpbot_preloading_time));
|
|
1184
|
1141
|
|
|
1185
|
1142
|
if(isset( $_POST["disable_wp_chatbot_icon_animation"])) {
|
|
1186
|
|
- $disable_wp_chatbot_icon_animation = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_icon_animation"]));
|
|
1143
|
+ $disable_wp_chatbot_icon_animation = sanitize_text_field($_POST["disable_wp_chatbot_icon_animation"]);
|
|
1187
|
1144
|
}else{ $disable_wp_chatbot_icon_animation='';}
|
|
1188
|
1145
|
update_option('disable_wp_chatbot_icon_animation', wp_unslash($disable_wp_chatbot_icon_animation));
|
|
1189
|
1146
|
//Enable /disable Cart Item Number
|
|
1190
|
1147
|
if(isset( $_POST["disable_wp_chatbot_cart_item_number"])) {
|
|
1191
|
|
- $disable_wp_chatbot_cart_item_number = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_cart_item_number"]));
|
|
1148
|
+ $disable_wp_chatbot_cart_item_number = sanitize_text_field($_POST["disable_wp_chatbot_cart_item_number"]);
|
|
1192
|
1149
|
}else{ $disable_wp_chatbot_cart_item_number='';}
|
|
1193
|
1150
|
update_option('disable_wp_chatbot_cart_item_number', wp_unslash($disable_wp_chatbot_cart_item_number));
|
|
1194
|
1151
|
//Enable /disable featured products button.
|
|
1195
|
1152
|
if(isset( $_POST["disable_wp_chatbot_featured_product"])) {
|
|
1196
|
|
- $disable_wp_chatbot_featured_product = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_featured_product"]));
|
|
1153
|
+ $disable_wp_chatbot_featured_product = sanitize_text_field($_POST["disable_wp_chatbot_featured_product"]);
|
|
1197
|
1154
|
}else{ $disable_wp_chatbot_featured_product='';}
|
|
1198
|
1155
|
update_option('disable_wp_chatbot_featured_product', wp_unslash($disable_wp_chatbot_featured_product));
|
|
1199
|
1156
|
//Enable /disable sale products button
|
|
1200
|
1157
|
if(isset( $_POST["disable_wp_chatbot_sale_product"])) {
|
|
1201
|
|
- $disable_wp_chatbot_sale_product = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_sale_product"]));
|
|
1158
|
+ $disable_wp_chatbot_sale_product = sanitize_text_field($_POST["disable_wp_chatbot_sale_product"]);
|
|
1202
|
1159
|
}else{ $disable_wp_chatbot_sale_product='';}
|
|
1203
|
1160
|
update_option('disable_wp_chatbot_sale_product', wp_unslash($disable_wp_chatbot_sale_product));
|
|
1204
|
1161
|
//Enable Product details page.
|
|
1205
|
1162
|
if(isset( $_POST["wp_chatbot_open_product_detail"])) {
|
|
1206
|
|
- $wp_chatbot_open_product_detail = sanitize_text_field(wp_unslash($_POST["wp_chatbot_open_product_detail"]));
|
|
1163
|
+ $wp_chatbot_open_product_detail = sanitize_text_field($_POST["wp_chatbot_open_product_detail"]);
|
|
1207
|
1164
|
}else{ $wp_chatbot_open_product_detail='';}
|
|
1208
|
1165
|
update_option('wp_chatbot_open_product_detail', wp_unslash($wp_chatbot_open_product_detail));
|
|
1209
|
1166
|
//product order and order by
|
|
1210
|
1167
|
if(isset($_POST['qlcd_wp_chatbot_product_orderby'])){
|
|
1211
|
|
- $qlcd_wp_chatbot_product_orderby = sanitize_text_field(wp_unslash($_POST['qlcd_wp_chatbot_product_orderby']));
|
|
1168
|
+ $qlcd_wp_chatbot_product_orderby = sanitize_text_field($_POST['qlcd_wp_chatbot_product_orderby']);
|
|
1212
|
1169
|
update_option('qlcd_wp_chatbot_product_orderby', sanitize_text_field($qlcd_wp_chatbot_product_orderby));
|
|
1213
|
1170
|
}
|
|
1214
|
1171
|
if(isset($_POST['qlcd_wp_chatbot_product_order'])){
|
|
1215
|
|
- $qlcd_wp_chatbot_product_order = sanitize_text_field(wp_unslash($_POST['qlcd_wp_chatbot_product_order']));
|
|
1172
|
+ $qlcd_wp_chatbot_product_order = sanitize_text_field($_POST['qlcd_wp_chatbot_product_order']);
|
|
1216
|
1173
|
update_option('qlcd_wp_chatbot_product_order', sanitize_text_field($qlcd_wp_chatbot_product_order));
|
|
1217
|
1174
|
}
|
|
1218
|
1175
|
|
|
1219
|
1176
|
|
|
@@ -1218,53 +1175,53 @@ |
|
1218
|
1175
|
|
|
1219
|
1176
|
|
|
1220
|
1177
|
//Product per page settings.
|
|
1221
|
1178
|
if (isset($_POST["qlcd_wp_chatbot_ppp"])) {
|
|
1222
|
|
- $qlcd_wp_chatbot_ppp = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_ppp"]));
|
|
1179
|
+ $qlcd_wp_chatbot_ppp = sanitize_text_field($_POST["qlcd_wp_chatbot_ppp"]);
|
|
1223
|
1180
|
update_option('qlcd_wp_chatbot_ppp', intval($qlcd_wp_chatbot_ppp));
|
|
1224
|
1181
|
}
|
|
1225
|
1182
|
if(isset( $_POST["wp_chatbot_exclude_stock_out_product"])) {
|
|
1226
|
|
- $wp_chatbot_exclude_stock_out_product = sanitize_text_field(wp_unslash($_POST['wp_chatbot_exclude_stock_out_product']));
|
|
1183
|
+ $wp_chatbot_exclude_stock_out_product = sanitize_text_field($_POST['wp_chatbot_exclude_stock_out_product']);
|
|
1227
|
1184
|
}else{ $wp_chatbot_exclude_stock_out_product='';}
|
|
1228
|
1185
|
update_option('wp_chatbot_exclude_stock_out_product', wp_unslash($wp_chatbot_exclude_stock_out_product));
|
|
1229
|
1186
|
if(isset( $_POST["wp_chatbot_show_parent_category"])) {
|
|
1230
|
|
- $wp_chatbot_show_parent_category = sanitize_text_field(wp_unslash($_POST['wp_chatbot_show_parent_category']));
|
|
1187
|
+ $wp_chatbot_show_parent_category = sanitize_text_field($_POST['wp_chatbot_show_parent_category']);
|
|
1231
|
1188
|
}else{ $wp_chatbot_show_parent_category='';}
|
|
1232
|
1189
|
update_option('wp_chatbot_show_parent_category', wp_unslash($wp_chatbot_show_parent_category));
|
|
1233
|
1190
|
if(isset( $_POST["wp_chatbot_show_sub_category"])) {
|
|
1234
|
|
- $wp_chatbot_show_sub_category = sanitize_text_field(wp_unslash($_POST['wp_chatbot_show_sub_category']));
|
|
1191
|
+ $wp_chatbot_show_sub_category = sanitize_text_field($_POST['wp_chatbot_show_sub_category']);
|
|
1235
|
1192
|
}else{ $wp_chatbot_show_sub_category='';}
|
|
1236
|
1193
|
update_option('wp_chatbot_show_sub_category', wp_unslash($wp_chatbot_show_sub_category));
|
|
1237
|
1194
|
if (isset($_POST["qlcd_wp_chatbot_order_user"])) {
|
|
1238
|
|
- $qlcd_wp_chatbot_order_user = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_order_user"]));
|
|
1195
|
+ $qlcd_wp_chatbot_order_user = sanitize_text_field($_POST["qlcd_wp_chatbot_order_user"]);
|
|
1239
|
1196
|
update_option('qlcd_wp_chatbot_order_user', sanitize_text_field($qlcd_wp_chatbot_order_user));
|
|
1240
|
1197
|
}
|
|
1241
|
1198
|
|
|
1242
|
1199
|
if(isset( $_POST["qc_wpbot_menu_order"]) && !empty($_POST["qc_wpbot_menu_order"])) {
|
|
1243
|
|
- $qc_wpbot_menu_order = wp_kses_post(wp_unslash($_POST["qc_wpbot_menu_order"]));
|
|
1200
|
+ $qc_wpbot_menu_order = wp_kses_post($_POST["qc_wpbot_menu_order"]);
|
|
1244
|
1201
|
}else{ $qc_wpbot_menu_order='';}
|
|
1245
|
1202
|
update_option('qc_wpbot_menu_order', ($qc_wpbot_menu_order));
|
|
1246
|
1203
|
|
|
1247
|
1204
|
//wpwBot Load control
|
|
1248
|
1205
|
if(isset($_POST["wp_chatbot_show_home_page"])){
|
|
1249
|
|
- $wp_chatbot_show_home_page = sanitize_key((wp_unslash($_POST["wp_chatbot_show_home_page"])));
|
|
1206
|
+ $wp_chatbot_show_home_page = sanitize_key(($_POST["wp_chatbot_show_home_page"]));
|
|
1250
|
1207
|
update_option('wp_chatbot_show_home_page', $wp_chatbot_show_home_page);
|
|
1251
|
1208
|
}
|
|
1252
|
1209
|
|
|
1253
|
1210
|
|
|
1254
|
1211
|
if(isset($_POST["wp_chatbot_show_posts"])){
|
|
1255
|
|
- $wp_chatbot_show_posts = sanitize_key((wp_unslash($_POST["wp_chatbot_show_posts"])));
|
|
1212
|
+ $wp_chatbot_show_posts = sanitize_key(($_POST["wp_chatbot_show_posts"]));
|
|
1256
|
1213
|
update_option('wp_chatbot_show_posts', $wp_chatbot_show_posts);
|
|
1257
|
1214
|
}
|
|
1258
|
1215
|
|
|
1259
|
1216
|
|
|
1260
|
1217
|
if(isset($_POST["wp_chatbot_show_pages"])){
|
|
1261
|
|
- $wp_chatbot_show_pages = sanitize_key((wp_unslash($_POST["wp_chatbot_show_pages"])));
|
|
1218
|
+ $wp_chatbot_show_pages = sanitize_key(($_POST["wp_chatbot_show_pages"]));
|
|
1262
|
1219
|
update_option('wp_chatbot_show_pages', $wp_chatbot_show_pages);
|
|
1263
|
1220
|
}
|
|
1264
|
1221
|
|
|
1265
|
1222
|
if(isset( $_POST["wp_chatbot_show_pages_list"])) {
|
|
1266
|
|
- $wp_chatbot_show_pages_list = wp_parse_id_list(wp_unslash($_POST["wp_chatbot_show_pages_list"]));
|
|
1223
|
+ $wp_chatbot_show_pages_list = wp_parse_id_list($_POST["wp_chatbot_show_pages_list"]);
|
|
1267
|
1224
|
update_option('wp_chatbot_show_pages_list', maybe_serialize(sanitize_array($wp_chatbot_show_pages_list)));
|
|
1268
|
1225
|
}else{
|
|
1269
|
1226
|
$wp_chatbot_show_pages_list='';
|
|
1270
|
1227
|
update_option('wp_chatbot_show_pages_list', maybe_serialize(sanitize_array($wp_chatbot_show_pages_list)));
|
|
@@ -1269,9 +1226,9 @@ |
|
1269
|
1226
|
$wp_chatbot_show_pages_list='';
|
|
1270
|
1227
|
update_option('wp_chatbot_show_pages_list', maybe_serialize(sanitize_array($wp_chatbot_show_pages_list)));
|
|
1271
|
1228
|
}
|
|
1272
|
1229
|
if(isset( $_POST["wp_chatbot_exclude_post_list"])) {
|
|
1273
|
|
- $wp_chatbot_exclude_post_list = wp_unslash($_POST["wp_chatbot_exclude_post_list"]);
|
|
1230
|
+ $wp_chatbot_exclude_post_list = $_POST["wp_chatbot_exclude_post_list"];
|
|
1274
|
1231
|
update_option('wp_chatbot_exclude_post_list', maybe_serialize(sanitize_array($wp_chatbot_exclude_post_list)));
|
|
1275
|
1232
|
}else{
|
|
1276
|
1233
|
$wp_chatbot_exclude_post_list='';
|
|
1277
|
1234
|
update_option('wp_chatbot_exclude_post_list', maybe_serialize(sanitize_array($wp_chatbot_exclude_post_list)));
|
|
@@ -1277,9 +1234,9 @@ |
|
1277
|
1234
|
update_option('wp_chatbot_exclude_post_list', maybe_serialize(sanitize_array($wp_chatbot_exclude_post_list)));
|
|
1278
|
1235
|
}
|
|
1279
|
1236
|
|
|
1280
|
1237
|
if(isset($_POST["wp_chatbot_show_wpcommerce"])){
|
|
1281
|
|
- $wp_chatbot_show_wpcommerce = sanitize_key((wp_unslash($_POST["wp_chatbot_show_wpcommerce"])));
|
|
1238
|
+ $wp_chatbot_show_wpcommerce = sanitize_key(($_POST["wp_chatbot_show_wpcommerce"]));
|
|
1282
|
1239
|
update_option('wp_chatbot_show_wpcommerce', $wp_chatbot_show_wpcommerce);
|
|
1283
|
1240
|
}
|
|
1284
|
1241
|
|
|
1285
|
1242
|
|
|
@@ -1284,51 +1241,45 @@ |
|
1284
|
1241
|
|
|
1285
|
1242
|
|
|
1286
|
1243
|
//Stop Words Settings
|
|
1287
|
1244
|
if (isset($_POST["qlcd_wp_chatbot_stop_words_name"])) {
|
|
1288
|
|
- $qlcd_wp_chatbot_stop_words_name = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_stop_words_name"]));
|
|
1245
|
+ $qlcd_wp_chatbot_stop_words_name = sanitize_text_field($_POST["qlcd_wp_chatbot_stop_words_name"]);
|
|
1289
|
1246
|
update_option('qlcd_wp_chatbot_stop_words_name', $qlcd_wp_chatbot_stop_words_name);
|
|
1290
|
1247
|
}
|
|
1291
|
1248
|
if (isset($_POST["qlcd_wp_chatbot_stop_words"])) {
|
|
1292
|
|
- $qlcd_wp_chatbot_stop_words = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_stop_words"]));
|
|
1249
|
+ $qlcd_wp_chatbot_stop_words = sanitize_text_field($_POST["qlcd_wp_chatbot_stop_words"]);
|
|
1293
|
1250
|
update_option('qlcd_wp_chatbot_stop_words', $qlcd_wp_chatbot_stop_words);
|
|
1294
|
1251
|
}
|
|
1295
|
1252
|
//wpwbot icon settings.
|
|
1296
|
|
- $wp_chatbot_icon = isset( $_POST['wp_chatbot_icon'] ) ? sanitize_text_field(wp_unslash($_POST['wp_chatbot_icon'])) : 'icon-3.png';
|
|
1253
|
+ $wp_chatbot_icon = isset( $_POST['wp_chatbot_icon'] ) ? sanitize_text_field($_POST['wp_chatbot_icon']) : 'icon-3.png';
|
|
1297
|
1254
|
update_option('wp_chatbot_icon', $wp_chatbot_icon);
|
|
1298
|
1255
|
|
|
1299
|
|
- $wp_chatbot_floatingiconbg_color = isset( $_POST['wp_chatbot_floatingiconbg_color'] ) ? sanitize_text_field(wp_unslash($_POST['wp_chatbot_floatingiconbg_color'])) : '#fff';
|
|
1256
|
+ $wp_chatbot_floatingiconbg_color = isset( $_POST['wp_chatbot_floatingiconbg_color'] ) ? sanitize_text_field($_POST['wp_chatbot_floatingiconbg_color']) : '#fff';
|
|
1300
|
1257
|
update_option('wp_chatbot_floatingiconbg_color', $wp_chatbot_floatingiconbg_color);
|
|
1301
|
1258
|
|
|
1302
|
1259
|
// upload custom wpwbot icon path
|
|
1303
|
|
- $wp_chatbot_custom_icon_path = sanitize_text_field(wp_unslash($_POST['wp_chatbot_custom_icon_path']));
|
|
1260
|
+ $wp_chatbot_custom_icon_path = sanitize_text_field($_POST['wp_chatbot_custom_icon_path']);
|
|
1304
|
1261
|
update_option('wp_chatbot_custom_icon_path', $wp_chatbot_custom_icon_path);
|
|
1305
|
1262
|
//Agent image
|
|
1306
|
1263
|
//wpwbot icon settings.
|
|
1307
|
|
- $wp_chatbot_icon = (isset($_POST['wp_chatbot_agent_image']) ? sanitize_text_field(wp_unslash($_POST['wp_chatbot_agent_image'])) : 'agent-13.png');
|
|
1264
|
+ $wp_chatbot_icon = (isset($_POST['wp_chatbot_agent_image']) ? sanitize_text_field($_POST['wp_chatbot_agent_image']) : 'agent-13.png');
|
|
1308
|
1265
|
update_option('wp_chatbot_agent_image', $wp_chatbot_icon);
|
|
1309
|
1266
|
// upload custom wpwbot icon
|
|
1310
|
1267
|
if(isset($_POST['wp_chatbot_custom_agent_path'])){
|
|
1311
|
|
- $wp_chatbot_custom_agent_path = sanitize_text_field(wp_unslash($_POST['wp_chatbot_custom_agent_path']));
|
|
1268
|
+ $wp_chatbot_custom_agent_path = sanitize_text_field($_POST['wp_chatbot_custom_agent_path']);
|
|
1312
|
1269
|
update_option('wp_chatbot_custom_agent_path', $wp_chatbot_custom_agent_path);
|
|
1313
|
1270
|
}
|
|
1314
|
1271
|
|
|
1315
|
1272
|
//Theming
|
|
1316
|
|
- $qcld_wb_chatbot_theme = (isset($_POST['qcld_wb_chatbot_theme']) ? sanitize_text_field(wp_unslash($_POST['qcld_wb_chatbot_theme'])) : 'template-00');
|
|
1273
|
+ $qcld_wb_chatbot_theme = (isset($_POST['qcld_wb_chatbot_theme']) ? sanitize_text_field($_POST['qcld_wb_chatbot_theme']) : 'template-00');
|
|
1317
|
1274
|
update_option('qcld_wb_chatbot_theme', $qcld_wb_chatbot_theme);
|
|
1318
|
|
-
|
|
1319
|
|
- //Avatar Location
|
|
1320
|
|
- if(isset($_POST['qcld_chatbot_avatar_location'])) {
|
|
1321
|
|
- $qcld_chatbot_avatar_location = sanitize_text_field(wp_unslash($_POST['qcld_chatbot_avatar_location']));
|
|
1322
|
|
- update_option('qcld_chatbot_avatar_location', $qcld_chatbot_avatar_location);
|
|
1323
|
|
- }
|
|
1324
|
1275
|
//Theme custom background option
|
|
1325
|
1276
|
if(isset( $_POST["qcld_wb_chatbot_change_bg"])) {
|
|
1326
|
|
- $qcld_wb_chatbot_change_bg = sanitize_text_field(wp_unslash($_POST["qcld_wb_chatbot_change_bg"]));
|
|
1277
|
+ $qcld_wb_chatbot_change_bg = sanitize_text_field($_POST["qcld_wb_chatbot_change_bg"]);
|
|
1327
|
1278
|
}else{$qcld_wb_chatbot_change_bg='';}
|
|
1328
|
1279
|
update_option('qcld_wb_chatbot_change_bg', $qcld_wb_chatbot_change_bg);
|
|
1329
|
1280
|
if(isset($_POST["qcld_wb_chatbot_board_bg_path"])){
|
|
1330
|
|
- $qcld_wb_chatbot_board_bg_path = sanitize_text_field(wp_unslash($_POST["qcld_wb_chatbot_board_bg_path"]));
|
|
1281
|
+ $qcld_wb_chatbot_board_bg_path = sanitize_text_field($_POST["qcld_wb_chatbot_board_bg_path"]);
|
|
1331
|
1282
|
update_option('qcld_wb_chatbot_board_bg_path', wp_unslash($qcld_wb_chatbot_board_bg_path));
|
|
1332
|
1283
|
}
|
|
1333
|
1284
|
|
|
1334
|
1285
|
|
|
@@ -1585,52 +1536,52 @@ |
|
1585
|
1536
|
}
|
|
1586
|
1537
|
update_option('qlcd_wp_chatbot_viewed_products', maybe_serialize($qlcd_wp_chatbot_viewed_products));
|
|
1587
|
1538
|
|
|
1588
|
1539
|
if(isset($_POST["qlcd_wp_chatbot_shopping_cart"])){
|
|
1589
|
|
- $qlcd_wp_chatbot_shopping_cart= esc_html((@wp_unslash($_POST["qlcd_wp_chatbot_shopping_cart"])));
|
|
1540
|
+ $qlcd_wp_chatbot_shopping_cart= esc_html((@$_POST["qlcd_wp_chatbot_shopping_cart"]));
|
|
1590
|
1541
|
update_option('qlcd_wp_chatbot_shopping_cart', maybe_serialize(sanitize_array($qlcd_wp_chatbot_shopping_cart)));
|
|
1591
|
1542
|
}
|
|
1592
|
1543
|
|
|
1593
|
1544
|
if(isset($_POST["qlcd_wp_chatbot_add_to_cart"])){
|
|
1594
|
|
- $qlcd_wp_chatbot_add_to_cart= (@wp_unslash($_POST["qlcd_wp_chatbot_add_to_cart"]));
|
|
1545
|
+ $qlcd_wp_chatbot_add_to_cart= (@$_POST["qlcd_wp_chatbot_add_to_cart"]);
|
|
1595
|
1546
|
update_option('qlcd_wp_chatbot_add_to_cart', maybe_serialize(sanitize_array($qlcd_wp_chatbot_add_to_cart)));
|
|
1596
|
1547
|
}
|
|
1597
|
1548
|
if(isset($_POST["qlcd_wp_chatbot_cart_link"])){
|
|
1598
|
|
- $qlcd_wp_chatbot_cart_link= @wp_unslash($_POST["qlcd_wp_chatbot_cart_link"]);
|
|
1549
|
+ $qlcd_wp_chatbot_cart_link= @$_POST["qlcd_wp_chatbot_cart_link"];
|
|
1599
|
1550
|
update_option('qlcd_wp_chatbot_cart_link', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_link)));
|
|
1600
|
1551
|
}
|
|
1601
|
1552
|
if(isset($_POST["qlcd_wp_chatbot_checkout_link"])){
|
|
1602
|
|
- $qlcd_wp_chatbot_checkout_link= @wp_unslash($_POST["qlcd_wp_chatbot_checkout_link"]);
|
|
1553
|
+ $qlcd_wp_chatbot_checkout_link= @$_POST["qlcd_wp_chatbot_checkout_link"];
|
|
1603
|
1554
|
update_option('qlcd_wp_chatbot_checkout_link', maybe_serialize(sanitize_array($qlcd_wp_chatbot_checkout_link)));
|
|
1604
|
1555
|
}
|
|
1605
|
1556
|
if(isset($_POST["qlcd_wp_chatbot_cart_welcome"])){
|
|
1606
|
|
- $qlcd_wp_chatbot_cart_welcome= (@wp_unslash($_POST["qlcd_wp_chatbot_cart_welcome"]));
|
|
1557
|
+ $qlcd_wp_chatbot_cart_welcome= (@$_POST["qlcd_wp_chatbot_cart_welcome"]);
|
|
1607
|
1558
|
update_option('qlcd_wp_chatbot_cart_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_welcome)));
|
|
1608
|
1559
|
}
|
|
1609
|
1560
|
if(isset($_POST["qlcd_wp_chatbot_featured_product_welcome"])){
|
|
1610
|
|
- $qlcd_wp_chatbot_featured_product_welcome= @wp_unslash($_POST["qlcd_wp_chatbot_featured_product_welcome"]);
|
|
1561
|
+ $qlcd_wp_chatbot_featured_product_welcome= @$_POST["qlcd_wp_chatbot_featured_product_welcome"];
|
|
1611
|
1562
|
update_option('qlcd_wp_chatbot_featured_product_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_featured_product_welcome)));
|
|
1612
|
1563
|
}
|
|
1613
|
1564
|
|
|
1614
|
1565
|
if(isset($_POST["qlcd_wp_chatbot_viewed_product_welcome"])){
|
|
1615
|
|
- $qlcd_wp_chatbot_viewed_product_welcome= @wp_unslash($_POST["qlcd_wp_chatbot_viewed_product_welcome"]);
|
|
1566
|
+ $qlcd_wp_chatbot_viewed_product_welcome= @$_POST["qlcd_wp_chatbot_viewed_product_welcome"];
|
|
1616
|
1567
|
update_option('qlcd_wp_chatbot_viewed_product_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_viewed_product_welcome)));
|
|
1617
|
1568
|
}
|
|
1618
|
1569
|
if(isset($_POST["qlcd_wp_chatbot_latest_product_welcome"])){
|
|
1619
|
|
- $qlcd_wp_chatbot_latest_product_welcome= @wp_unslash($_POST["qlcd_wp_chatbot_latest_product_welcome"]);
|
|
1570
|
+ $qlcd_wp_chatbot_latest_product_welcome= @$_POST["qlcd_wp_chatbot_latest_product_welcome"];
|
|
1620
|
1571
|
update_option('qlcd_wp_chatbot_latest_product_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_latest_product_welcome)));
|
|
1621
|
1572
|
}
|
|
1622
|
1573
|
|
|
1623
|
1574
|
if(isset($_POST["qlcd_wp_chatbot_cart_title"])){
|
|
1624
|
|
- $qlcd_wp_chatbot_cart_title= @wp_unslash($_POST["qlcd_wp_chatbot_cart_title"]);
|
|
1575
|
+ $qlcd_wp_chatbot_cart_title= @$_POST["qlcd_wp_chatbot_cart_title"];
|
|
1625
|
1576
|
update_option('qlcd_wp_chatbot_cart_title', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_title)));
|
|
1626
|
1577
|
}
|
|
1627
|
1578
|
if(isset($_POST["qlcd_wp_chatbot_cart_quantity"])){
|
|
1628
|
|
- $qlcd_wp_chatbot_cart_quantity= @wp_unslash($_POST["qlcd_wp_chatbot_cart_quantity"]);
|
|
1579
|
+ $qlcd_wp_chatbot_cart_quantity= @$_POST["qlcd_wp_chatbot_cart_quantity"];
|
|
1629
|
1580
|
update_option('qlcd_wp_chatbot_cart_quantity', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_quantity)));
|
|
1630
|
1581
|
}
|
|
1631
|
1582
|
if(isset($_POST["qlcd_wp_chatbot_cart_price"])){
|
|
1632
|
|
- $qlcd_wp_chatbot_cart_price= @wp_unslash($_POST["qlcd_wp_chatbot_cart_price"]);
|
|
1583
|
+ $qlcd_wp_chatbot_cart_price= @$_POST["qlcd_wp_chatbot_cart_price"];
|
|
1633
|
1584
|
update_option('qlcd_wp_chatbot_cart_price', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_price)));
|
|
1634
|
1585
|
}
|
|
1635
|
1586
|
if(isset($_POST["qlcd_wp_chatbot_no_cart_items"])){
|
|
1636
|
1587
|
$qlcd_wp_chatbot_no_cart_items= wp_unslash(@$_POST["qlcd_wp_chatbot_no_cart_items"]);
|
|
@@ -1636,13 +1587,13 @@ |
|
1636
|
1587
|
$qlcd_wp_chatbot_no_cart_items= wp_unslash(@$_POST["qlcd_wp_chatbot_no_cart_items"]);
|
|
1637
|
1588
|
update_option('qlcd_wp_chatbot_no_cart_items', maybe_serialize(sanitize_array($qlcd_wp_chatbot_no_cart_items)));
|
|
1638
|
1589
|
}
|
|
1639
|
1590
|
if(isset($_POST["qlcd_wp_chatbot_cart_updating"])){
|
|
1640
|
|
- $qlcd_wp_chatbot_cart_updating= @wp_unslash($_POST["qlcd_wp_chatbot_cart_updating"]);
|
|
1591
|
+ $qlcd_wp_chatbot_cart_updating= @$_POST["qlcd_wp_chatbot_cart_updating"];
|
|
1641
|
1592
|
update_option('qlcd_wp_chatbot_cart_updating', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_updating)));
|
|
1642
|
1593
|
}
|
|
1643
|
1594
|
if(isset($_POST["qlcd_wp_chatbot_cart_removing"])){
|
|
1644
|
|
- $qlcd_wp_chatbot_cart_removing= @wp_unslash($_POST["qlcd_wp_chatbot_cart_removing"]);
|
|
1595
|
+ $qlcd_wp_chatbot_cart_removing= @$_POST["qlcd_wp_chatbot_cart_removing"];
|
|
1645
|
1596
|
update_option('qlcd_wp_chatbot_cart_removing', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_removing)));
|
|
1646
|
1597
|
}
|
|
1647
|
1598
|
//wpwBot wildcard settings
|
|
1648
|
1599
|
if (isset($_POST["qlcd_wp_chatbot_wildcard_msg"])) {
|
|
@@ -1700,17 +1651,17 @@ |
|
1700
|
1651
|
} else {
|
|
1701
|
1652
|
update_option('qlcd_wp_chatbot_sys_key_help', '');
|
|
1702
|
1653
|
}
|
|
1703
|
1654
|
if(isset($_POST["qlcd_wp_chatbot_sys_key_product"])){
|
|
1704
|
|
- $qlcd_wp_chatbot_sys_key_product = esc_html((@wp_unslash($_POST["qlcd_wp_chatbot_sys_key_product"])));
|
|
1655
|
+ $qlcd_wp_chatbot_sys_key_product = esc_html((@$_POST["qlcd_wp_chatbot_sys_key_product"]));
|
|
1705
|
1656
|
update_option('qlcd_wp_chatbot_sys_key_product', sanitize_text_field($qlcd_wp_chatbot_sys_key_product));
|
|
1706
|
1657
|
}
|
|
1707
|
1658
|
if(isset($_POST["qlcd_wp_chatbot_sys_key_catalog"])){
|
|
1708
|
|
- $qlcd_wp_chatbot_sys_key_catalog = (@wp_unslash($_POST["qlcd_wp_chatbot_sys_key_catalog"]));
|
|
1659
|
+ $qlcd_wp_chatbot_sys_key_catalog = (@$_POST["qlcd_wp_chatbot_sys_key_catalog"]);
|
|
1709
|
1660
|
update_option('qlcd_wp_chatbot_sys_key_catalog', sanitize_text_field($qlcd_wp_chatbot_sys_key_catalog));
|
|
1710
|
1661
|
}
|
|
1711
|
1662
|
if(isset($_POST["qlcd_wp_chatbot_sys_key_order"])){
|
|
1712
|
|
- $qlcd_wp_chatbot_sys_key_order = (@wp_unslash($_POST["qlcd_wp_chatbot_sys_key_order"]));
|
|
1663
|
+ $qlcd_wp_chatbot_sys_key_order = (@$_POST["qlcd_wp_chatbot_sys_key_order"]);
|
|
1713
|
1664
|
update_option('qlcd_wp_chatbot_sys_key_order', sanitize_text_field($qlcd_wp_chatbot_sys_key_order));
|
|
1714
|
1665
|
}
|
|
1715
|
1666
|
if (isset($_POST["qlcd_wp_chatbot_sys_key_support"])) {
|
|
1716
|
1667
|
$qlcd_wp_chatbot_sys_key_support = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_sys_key_support"]));
|
|
@@ -1730,21 +1681,21 @@ |
|
1730
|
1681
|
} else {
|
|
1731
|
1682
|
update_option('qlcd_wp_chatbot_sys_key_email', '');
|
|
1732
|
1683
|
}
|
|
1733
|
1684
|
if(isset($_POST["qlcd_wp_chatbot_wildcard_product"])){
|
|
1734
|
|
- $qlcd_wp_chatbot_wildcard_product = (@wp_unslash($_POST["qlcd_wp_chatbot_wildcard_product"]));
|
|
1685
|
+ $qlcd_wp_chatbot_wildcard_product = (@$_POST["qlcd_wp_chatbot_wildcard_product"]);
|
|
1735
|
1686
|
update_option('qlcd_wp_chatbot_wildcard_product', maybe_serialize(sanitize_array($qlcd_wp_chatbot_wildcard_product)));
|
|
1736
|
1687
|
}
|
|
1737
|
1688
|
if(isset($_POST["qlcd_wp_chatbot_wildcard_catalog"])){
|
|
1738
|
|
- $qlcd_wp_chatbot_wildcard_catalog = (@wp_unslash($_POST["qlcd_wp_chatbot_wildcard_catalog"]));
|
|
1689
|
+ $qlcd_wp_chatbot_wildcard_catalog = (@$_POST["qlcd_wp_chatbot_wildcard_catalog"]);
|
|
1739
|
1690
|
update_option('qlcd_wp_chatbot_wildcard_catalog', maybe_serialize(sanitize_array($qlcd_wp_chatbot_wildcard_catalog)));
|
|
1740
|
1691
|
}
|
|
1741
|
1692
|
if(isset($_POST["qlcd_wp_chatbot_featured_products"])){
|
|
1742
|
|
- $qlcd_wp_chatbot_featured_products = (@wp_unslash($_POST["qlcd_wp_chatbot_featured_products"]));
|
|
1693
|
+ $qlcd_wp_chatbot_featured_products = (@$_POST["qlcd_wp_chatbot_featured_products"]);
|
|
1743
|
1694
|
update_option('qlcd_wp_chatbot_featured_products', maybe_serialize(sanitize_array($qlcd_wp_chatbot_featured_products)));
|
|
1744
|
1695
|
}
|
|
1745
|
1696
|
if(isset($_POST["qlcd_wp_chatbot_sale_products"])){
|
|
1746
|
|
- $qlcd_wp_chatbot_sale_products = (@wp_unslash($_POST["qlcd_wp_chatbot_sale_products"]));
|
|
1697
|
+ $qlcd_wp_chatbot_sale_products = (@$_POST["qlcd_wp_chatbot_sale_products"]);
|
|
1747
|
1698
|
update_option('qlcd_wp_chatbot_sale_products', maybe_serialize(sanitize_array($qlcd_wp_chatbot_sale_products)));
|
|
1748
|
1699
|
}
|
|
1749
|
1700
|
|
|
1750
|
1701
|
if (isset($_POST["qlcd_wp_chatbot_wildcard_support"])) {
|
|
@@ -1761,9 +1712,9 @@ |
|
1761
|
1712
|
update_option('qlcd_wp_chatbot_wildcard_site_search', '');
|
|
1762
|
1713
|
}
|
|
1763
|
1714
|
|
|
1764
|
1715
|
if(isset($_POST["qlcd_wp_chatbot_messenger_label"])){
|
|
1765
|
|
- $qlcd_wp_chatbot_messenger_label = (@wp_unslash($_POST["qlcd_wp_chatbot_messenger_label"]));
|
|
1716
|
+ $qlcd_wp_chatbot_messenger_label = (@$_POST["qlcd_wp_chatbot_messenger_label"]);
|
|
1766
|
1717
|
update_option('qlcd_wp_chatbot_messenger_label', maybe_serialize(sanitize_array($qlcd_wp_chatbot_messenger_label)));
|
|
1767
|
1718
|
}
|
|
1768
|
1719
|
//Products search .
|
|
1769
|
1720
|
if (isset($_POST["qlcd_wp_chatbot_product_success"])) {
|
|
@@ -1772,42 +1723,42 @@ |
|
1772
|
1723
|
$qlcd_wp_chatbot_product_success = map_deep($unslashed_data, 'sanitize_text_field');
|
|
1773
|
1724
|
update_option('qlcd_wp_chatbot_product_success', maybe_serialize($qlcd_wp_chatbot_product_success));
|
|
1774
|
1725
|
}
|
|
1775
|
1726
|
if (isset($_POST["qlcd_wp_chatbot_product_fail"])) {
|
|
1776
|
|
- $qlcd_wp_chatbot_product_fail = @wp_unslash($_POST["qlcd_wp_chatbot_product_fail"]);
|
|
1727
|
+ $qlcd_wp_chatbot_product_fail = @$_POST["qlcd_wp_chatbot_product_fail"];
|
|
1777
|
1728
|
update_option('qlcd_wp_chatbot_product_fail', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_fail)));
|
|
1778
|
1729
|
}
|
|
1779
|
1730
|
if(isset($_POST["qlcd_wp_chatbot_product_asking"])){
|
|
1780
|
|
- $qlcd_wp_chatbot_product_asking = @wp_unslash($_POST["qlcd_wp_chatbot_product_asking"]);
|
|
1731
|
+ $qlcd_wp_chatbot_product_asking = @$_POST["qlcd_wp_chatbot_product_asking"];
|
|
1781
|
1732
|
update_option('qlcd_wp_chatbot_product_asking', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_asking)));
|
|
1782
|
1733
|
}
|
|
1783
|
1734
|
if(isset($_POST["qlcd_wp_chatbot_product_suggest"])){
|
|
1784
|
|
- $qlcd_wp_chatbot_product_suggest = @wp_unslash($_POST["qlcd_wp_chatbot_product_suggest"]);
|
|
1735
|
+ $qlcd_wp_chatbot_product_suggest = @$_POST["qlcd_wp_chatbot_product_suggest"];
|
|
1785
|
1736
|
update_option('qlcd_wp_chatbot_product_suggest', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_suggest)));
|
|
1786
|
1737
|
}
|
|
1787
|
1738
|
if(isset($_POST["qlcd_wp_chatbot_product_infinite"])){
|
|
1788
|
|
- $qlcd_wp_chatbot_product_infinite = @wp_unslash($_POST["qlcd_wp_chatbot_product_infinite"]);
|
|
1739
|
+ $qlcd_wp_chatbot_product_infinite = @$_POST["qlcd_wp_chatbot_product_infinite"];
|
|
1789
|
1740
|
update_option('qlcd_wp_chatbot_product_infinite', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_infinite)));
|
|
1790
|
1741
|
}
|
|
1791
|
1742
|
if(isset($_POST["qlcd_wp_chatbot_load_more"])){
|
|
1792
|
|
- $qlcd_wp_chatbot_load_more = @wp_unslash($_POST["qlcd_wp_chatbot_load_more"]);
|
|
1743
|
+ $qlcd_wp_chatbot_load_more = @$_POST["qlcd_wp_chatbot_load_more"];
|
|
1793
|
1744
|
update_option('qlcd_wp_chatbot_load_more', maybe_serialize(sanitize_array($qlcd_wp_chatbot_load_more)));
|
|
1794
|
1745
|
}
|
|
1795
|
1746
|
//Order
|
|
1796
|
1747
|
if(isset($_POST["qlcd_wp_chatbot_wildcard_order"])){
|
|
1797
|
|
- $qlcd_wp_chatbot_wildcard_order = @wp_unslash($_POST["qlcd_wp_chatbot_wildcard_order"]);
|
|
1748
|
+ $qlcd_wp_chatbot_wildcard_order = @$_POST["qlcd_wp_chatbot_wildcard_order"];
|
|
1798
|
1749
|
update_option('qlcd_wp_chatbot_wildcard_order', maybe_serialize(sanitize_array($qlcd_wp_chatbot_wildcard_order)));
|
|
1799
|
1750
|
}
|
|
1800
|
1751
|
if(isset($_POST["qlcd_wp_chatbot_order_welcome"])){
|
|
1801
|
|
- $qlcd_wp_chatbot_order_welcome = @wp_unslash($_POST["qlcd_wp_chatbot_order_welcome"]);
|
|
1752
|
+ $qlcd_wp_chatbot_order_welcome = @$_POST["qlcd_wp_chatbot_order_welcome"];
|
|
1802
|
1753
|
update_option('qlcd_wp_chatbot_order_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_welcome)));
|
|
1803
|
1754
|
}
|
|
1804
|
1755
|
if(isset($_POST["qlcd_wp_chatbot_order_username_asking"])){
|
|
1805
|
|
- $qlcd_wp_chatbot_order_username_asking = @wp_unslash($_POST["qlcd_wp_chatbot_order_username_asking"]);
|
|
1756
|
+ $qlcd_wp_chatbot_order_username_asking = @$_POST["qlcd_wp_chatbot_order_username_asking"];
|
|
1806
|
1757
|
update_option('qlcd_wp_chatbot_order_username_asking', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_username_asking)));
|
|
1807
|
1758
|
}
|
|
1808
|
1759
|
if(isset($_POST["qlcd_wp_chatbot_order_username_not_exist"])){
|
|
1809
|
|
- $qlcd_wp_chatbot_order_username_not_exist = @wp_unslash($_POST["qlcd_wp_chatbot_order_username_not_exist"]);
|
|
1760
|
+ $qlcd_wp_chatbot_order_username_not_exist = @$_POST["qlcd_wp_chatbot_order_username_not_exist"];
|
|
1810
|
1761
|
update_option('qlcd_wp_chatbot_order_username_not_exist', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_username_not_exist)));
|
|
1811
|
1762
|
}
|
|
1812
|
1763
|
if (isset($_POST["qlcd_wp_chatbot_order_username_thanks"])) {
|
|
1813
|
1764
|
// Unslash the input first, then sanitize deeply as text, assuming it's an array of texts or a single text.
|
|
@@ -1815,55 +1766,52 @@ |
|
1815
|
1766
|
$qlcd_wp_chatbot_order_username_thanks = map_deep($unslashed_data, 'sanitize_text_field');
|
|
1816
|
1767
|
update_option('qlcd_wp_chatbot_order_username_thanks', maybe_serialize($qlcd_wp_chatbot_order_username_thanks));
|
|
1817
|
1768
|
}
|
|
1818
|
1769
|
if(isset($_POST["qlcd_wp_chatbot_order_username_password"])){
|
|
1819
|
|
- $qlcd_wp_chatbot_order_username_password = @wp_unslash($_POST["qlcd_wp_chatbot_order_username_password"]);
|
|
1770
|
+ $qlcd_wp_chatbot_order_username_password = @$_POST["qlcd_wp_chatbot_order_username_password"];
|
|
1820
|
1771
|
update_option('qlcd_wp_chatbot_order_username_password', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_username_password)));
|
|
1821
|
1772
|
}
|
|
1822
|
1773
|
if(isset($_POST["qlcd_wp_chatbot_order_password_incorrect"])){
|
|
1823
|
|
- $qlcd_wp_chatbot_order_password_incorrect= @wp_unslash($_POST["qlcd_wp_chatbot_order_password_incorrect"]);
|
|
1774
|
+ $qlcd_wp_chatbot_order_password_incorrect= @$_POST["qlcd_wp_chatbot_order_password_incorrect"];
|
|
1824
|
1775
|
update_option('qlcd_wp_chatbot_order_password_incorrect', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_password_incorrect)));
|
|
1825
|
1776
|
}
|
|
1826
|
1777
|
if(isset($_POST["qlcd_wp_chatbot_order_not_found"])){
|
|
1827
|
|
- $qlcd_wp_chatbot_order_not_found= @wp_unslash($_POST["qlcd_wp_chatbot_order_not_found"]);
|
|
1778
|
+ $qlcd_wp_chatbot_order_not_found= @$_POST["qlcd_wp_chatbot_order_not_found"];
|
|
1828
|
1779
|
update_option('qlcd_wp_chatbot_order_not_found', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_not_found)));
|
|
1829
|
1780
|
}
|
|
1830
|
1781
|
if(isset($_POST["qlcd_wp_chatbot_order_found"])){
|
|
1831
|
|
- $qlcd_wp_chatbot_order_found= @wp_unslash($_POST["qlcd_wp_chatbot_order_found"]);
|
|
1782
|
+ $qlcd_wp_chatbot_order_found= @$_POST["qlcd_wp_chatbot_order_found"];
|
|
1832
|
1783
|
update_option('qlcd_wp_chatbot_order_found', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_found)));
|
|
1833
|
1784
|
}
|
|
1834
|
1785
|
if(isset( $_POST["qlcd_wp_chatbot_order_email_support"])){
|
|
1835
|
|
- $qlcd_wp_chatbot_order_email_support= @wp_unslash($_POST["qlcd_wp_chatbot_order_email_support"]);
|
|
1786
|
+ $qlcd_wp_chatbot_order_email_support= @$_POST["qlcd_wp_chatbot_order_email_support"];
|
|
1836
|
1787
|
update_option('qlcd_wp_chatbot_order_email_support', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_email_support)));
|
|
1837
|
1788
|
}
|
|
1838
|
1789
|
//Support
|
|
1839
|
1790
|
if (isset($_POST["qlcd_wp_chatbot_support_welcome"])) {
|
|
1840
|
|
- $qlcd_wp_chatbot_support_welcome = wp_unslash($_POST["qlcd_wp_chatbot_support_welcome"]);
|
|
1841
|
|
- $qlcd_wp_chatbot_support_welcome = sanitize_array($qlcd_wp_chatbot_support_welcome);
|
|
1791
|
+ $qlcd_wp_chatbot_support_welcome = sanitize_array($_POST["qlcd_wp_chatbot_support_welcome"]);
|
|
1842
|
1792
|
update_option('qlcd_wp_chatbot_support_welcome', maybe_serialize($qlcd_wp_chatbot_support_welcome));
|
|
1843
|
1793
|
}
|
|
1844
|
1794
|
if (isset($_POST["qlcd_wp_chatbot_support_email"])) {
|
|
1845
|
|
- $qlcd_wp_chatbot_support_email = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_support_email"]));
|
|
1795
|
+ $qlcd_wp_chatbot_support_email = sanitize_text_field($_POST["qlcd_wp_chatbot_support_email"]);
|
|
1846
|
1796
|
update_option('qlcd_wp_chatbot_support_email', $qlcd_wp_chatbot_support_email);
|
|
1847
|
1797
|
}
|
|
1848
|
1798
|
if (isset($_POST["qlcd_wp_chatbot_asking_email"])) {
|
|
1849
|
|
- $qlcd_wp_chatbot_asking_email = wp_unslash($_POST["qlcd_wp_chatbot_asking_email"]);
|
|
1850
|
|
- $qlcd_wp_chatbot_asking_email = sanitize_array($qlcd_wp_chatbot_asking_email);
|
|
1799
|
+ $qlcd_wp_chatbot_asking_email = sanitize_array($_POST["qlcd_wp_chatbot_asking_email"]);
|
|
1851
|
1800
|
update_option('qlcd_wp_chatbot_asking_email', maybe_serialize($qlcd_wp_chatbot_asking_email));
|
|
1852
|
1801
|
}
|
|
1853
|
1802
|
if (isset($_POST["qlcd_wp_chatbot_asking_msg"])) {
|
|
1854
|
|
- $qlcd_wp_chatbot_asking_msg = wp_unslash($_POST["qlcd_wp_chatbot_asking_msg"]);
|
|
1855
|
|
- $qlcd_wp_chatbot_asking_msg = sanitize_array($qlcd_wp_chatbot_asking_msg);
|
|
1803
|
+ $qlcd_wp_chatbot_asking_msg = sanitize_array($_POST["qlcd_wp_chatbot_asking_msg"]);
|
|
1856
|
1804
|
update_option('qlcd_wp_chatbot_asking_msg', maybe_serialize($qlcd_wp_chatbot_asking_msg));
|
|
1857
|
1805
|
}
|
|
1858
|
1806
|
|
|
1859
|
1807
|
if(isset($_POST["qlcd_wp_chatbot_no_result"])){
|
|
1860
|
|
- $qlcd_wp_chatbot_no_result = @wp_unslash($_POST["qlcd_wp_chatbot_no_result"]);
|
|
1808
|
+ $qlcd_wp_chatbot_no_result = @$_POST["qlcd_wp_chatbot_no_result"];
|
|
1861
|
1809
|
update_option('qlcd_wp_chatbot_no_result', maybe_serialize(sanitize_array($qlcd_wp_chatbot_no_result)));
|
|
1862
|
1810
|
}
|
|
1863
|
1811
|
|
|
1864
|
1812
|
if (isset($_POST["qlcd_wp_chatbot_support_option_again"])) {
|
|
1865
|
|
- $qlcd_wp_chatbot_support_option_again = wp_unslash($_POST["qlcd_wp_chatbot_support_option_again"]);
|
|
1813
|
+ $qlcd_wp_chatbot_support_option_again = $_POST["qlcd_wp_chatbot_support_option_again"];
|
|
1866
|
1814
|
update_option('qlcd_wp_chatbot_support_option_again', maybe_serialize(sanitize_array($qlcd_wp_chatbot_support_option_again)));
|
|
1867
|
1815
|
} else {
|
|
1868
|
1816
|
update_option('qlcd_wp_chatbot_support_option_again', maybe_serialize(array()));
|
|
1869
|
1817
|
}
|
|
@@ -1868,9 +1816,9 @@ |
|
1868
|
1816
|
update_option('qlcd_wp_chatbot_support_option_again', maybe_serialize(array()));
|
|
1869
|
1817
|
}
|
|
1870
|
1818
|
|
|
1871
|
1819
|
if (isset($_POST["qlcd_wp_chatbot_invalid_email"])) {
|
|
1872
|
|
- $qlcd_wp_chatbot_invalid_email = wp_unslash($_POST["qlcd_wp_chatbot_invalid_email"]);
|
|
1820
|
+ $qlcd_wp_chatbot_invalid_email = $_POST["qlcd_wp_chatbot_invalid_email"];
|
|
1873
|
1821
|
update_option('qlcd_wp_chatbot_invalid_email', maybe_serialize(sanitize_array($qlcd_wp_chatbot_invalid_email)));
|
|
1874
|
1822
|
} else {
|
|
1875
|
1823
|
update_option('qlcd_wp_chatbot_invalid_email', maybe_serialize(array()));
|
|
1876
|
1824
|
}
|
|
@@ -1875,9 +1823,9 @@ |
|
1875
|
1823
|
update_option('qlcd_wp_chatbot_invalid_email', maybe_serialize(array()));
|
|
1876
|
1824
|
}
|
|
1877
|
1825
|
|
|
1878
|
1826
|
if (isset($_POST["qlcd_wp_chatbot_support_phone"])) {
|
|
1879
|
|
- $qlcd_wp_chatbot_support_phone = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_support_phone"]));
|
|
1827
|
+ $qlcd_wp_chatbot_support_phone = sanitize_text_field($_POST["qlcd_wp_chatbot_support_phone"]);
|
|
1880
|
1828
|
update_option('qlcd_wp_chatbot_support_phone', $qlcd_wp_chatbot_support_phone);
|
|
1881
|
1829
|
} else {
|
|
1882
|
1830
|
update_option('qlcd_wp_chatbot_support_phone', '');
|
|
1883
|
1831
|
}
|
|
@@ -1882,9 +1830,9 @@ |
|
1882
|
1830
|
update_option('qlcd_wp_chatbot_support_phone', '');
|
|
1883
|
1831
|
}
|
|
1884
|
1832
|
|
|
1885
|
1833
|
if (isset($_POST["qlcd_wp_chatbot_asking_phone"])) {
|
|
1886
|
|
- $qlcd_wp_chatbot_asking_phone = wp_unslash($_POST["qlcd_wp_chatbot_asking_phone"]);
|
|
1834
|
+ $qlcd_wp_chatbot_asking_phone = $_POST["qlcd_wp_chatbot_asking_phone"];
|
|
1887
|
1835
|
update_option('qlcd_wp_chatbot_asking_phone', maybe_serialize(sanitize_array($qlcd_wp_chatbot_asking_phone)));
|
|
1888
|
1836
|
} else {
|
|
1889
|
1837
|
update_option('qlcd_wp_chatbot_asking_phone', maybe_serialize(array()));
|
|
1890
|
1838
|
}
|
|
@@ -1889,9 +1837,9 @@ |
|
1889
|
1837
|
update_option('qlcd_wp_chatbot_asking_phone', maybe_serialize(array()));
|
|
1890
|
1838
|
}
|
|
1891
|
1839
|
|
|
1892
|
1840
|
if (isset($_POST["qlcd_wp_chatbot_thank_for_phone"])) {
|
|
1893
|
|
- $qlcd_wp_chatbot_thank_for_phone = wp_unslash($_POST["qlcd_wp_chatbot_thank_for_phone"]);
|
|
1841
|
+ $qlcd_wp_chatbot_thank_for_phone = $_POST["qlcd_wp_chatbot_thank_for_phone"];
|
|
1894
|
1842
|
update_option('qlcd_wp_chatbot_thank_for_phone', maybe_serialize(sanitize_array($qlcd_wp_chatbot_thank_for_phone)));
|
|
1895
|
1843
|
} else {
|
|
1896
|
1844
|
update_option('qlcd_wp_chatbot_thank_for_phone', maybe_serialize(array()));
|
|
1897
|
1845
|
}
|
|
@@ -1896,9 +1844,9 @@ |
|
1896
|
1844
|
update_option('qlcd_wp_chatbot_thank_for_phone', maybe_serialize(array()));
|
|
1897
|
1845
|
}
|
|
1898
|
1846
|
|
|
1899
|
1847
|
if (isset($_POST["qlcd_wp_chatbot_admin_email"])) {
|
|
1900
|
|
- $qlcd_wp_chatbot_admin_email = sanitize_email(wp_unslash($_POST["qlcd_wp_chatbot_admin_email"]));
|
|
1848
|
+ $qlcd_wp_chatbot_admin_email = sanitize_email($_POST["qlcd_wp_chatbot_admin_email"]);
|
|
1901
|
1849
|
} else {
|
|
1902
|
1850
|
$qlcd_wp_chatbot_admin_email = '';
|
|
1903
|
1851
|
}
|
|
1904
|
1852
|
|
|
@@ -1943,9 +1891,9 @@ |
|
1943
|
1891
|
update_option('qlcd_wp_chatbot_notification_interval', $qlcd_wp_chatbot_notification_interval);
|
|
1944
|
1892
|
}
|
|
1945
|
1893
|
|
|
1946
|
1894
|
if(isset($_POST["qlcd_wp_chatbot_notifications"])){
|
|
1947
|
|
- $qlcd_wp_chatbot_notifications = @wp_unslash($_POST["qlcd_wp_chatbot_notifications"]);
|
|
1895
|
+ $qlcd_wp_chatbot_notifications = @$_POST["qlcd_wp_chatbot_notifications"];
|
|
1948
|
1896
|
update_option('qlcd_wp_chatbot_notifications', maybe_serialize(sanitize_array($qlcd_wp_chatbot_notifications)));
|
|
1949
|
1897
|
}
|
|
1950
|
1898
|
//Support building part.
|
|
1951
|
1899
|
|
|
@@ -1957,9 +1905,9 @@ |
|
1957
|
1905
|
'br' => array(),
|
|
1958
|
1906
|
'em' => array(),
|
|
1959
|
1907
|
'strong' => array(),
|
|
1960
|
1908
|
);
|
|
1961
|
|
- $support_query = @wp_unslash($_POST["support_query"]);
|
|
1909
|
+ $support_query = @$_POST["support_query"];
|
|
1962
|
1910
|
$clean_support_query = [];
|
|
1963
|
1911
|
if(!empty($support_query)){
|
|
1964
|
1912
|
foreach($support_query as $key => $val) {
|
|
1965
|
1913
|
|
|
@@ -1966,9 +1914,9 @@ |
|
1966
|
1914
|
$clean_support_query[wp_kses($key,$allowed_html)] = wp_kses($val,$allowed_html);
|
|
1967
|
1915
|
}
|
|
1968
|
1916
|
}
|
|
1969
|
1917
|
update_option('support_query', (maybe_serialize($clean_support_query)));
|
|
1970
|
|
- $support_ans = @wp_unslash($_POST["support_ans"]);
|
|
1918
|
+ $support_ans = @$_POST["support_ans"];
|
|
1971
|
1919
|
$clean_support_ans = [];
|
|
1972
|
1920
|
if(!empty($support_query)){
|
|
1973
|
1921
|
foreach($support_ans as $key => $val) {
|
|
1974
|
1922
|
$clean_support_ans[wp_kses($key,$allowed_html)] = wp_kses($val,$allowed_html);
|
|
@@ -1976,241 +1924,241 @@ |
|
1976
|
1924
|
}
|
|
1977
|
1925
|
update_option('support_ans', (maybe_serialize($clean_support_ans)));
|
|
1978
|
1926
|
//Create Mobile app pages.
|
|
1979
|
1927
|
if(isset( $_POST["wp_chatbot_app_pages"])) {
|
|
1980
|
|
- $wp_chatbot_app_pages = wp_unslash($_POST["wp_chatbot_app_pages"]);
|
|
1928
|
+ $wp_chatbot_app_pages = $_POST["wp_chatbot_app_pages"];
|
|
1981
|
1929
|
}else{ $wp_chatbot_app_pages='';}
|
|
1982
|
1930
|
update_option('wp_chatbot_app_pages', wp_unslash($wp_chatbot_app_pages));
|
|
1983
|
1931
|
//Messenger Options
|
|
1984
|
1932
|
if(isset( $_POST["enable_wp_chatbot_messenger"])) {
|
|
1985
|
|
- $enable_wp_chatbot_messenger = wp_unslash($_POST["enable_wp_chatbot_messenger"]);
|
|
1933
|
+ $enable_wp_chatbot_messenger = $_POST["enable_wp_chatbot_messenger"];
|
|
1986
|
1934
|
}else{ $enable_wp_chatbot_messenger='';}
|
|
1987
|
1935
|
update_option('enable_wp_chatbot_messenger', wp_unslash($enable_wp_chatbot_messenger));
|
|
1988
|
1936
|
if(isset( $_POST["enable_wp_chatbot_messenger_floating_icon"])) {
|
|
1989
|
|
- $enable_wp_chatbot_messenger_floating_icon = wp_unslash($_POST["enable_wp_chatbot_messenger_floating_icon"]);
|
|
1937
|
+ $enable_wp_chatbot_messenger_floating_icon = $_POST["enable_wp_chatbot_messenger_floating_icon"];
|
|
1990
|
1938
|
}else{ $enable_wp_chatbot_messenger_floating_icon='';}
|
|
1991
|
1939
|
update_option('enable_wp_chatbot_messenger_floating_icon', wp_unslash($enable_wp_chatbot_messenger_floating_icon));
|
|
1992
|
1940
|
if(isset($_POST["qlcd_wp_chatbot_fb_app_id"])){
|
|
1993
|
|
- $qlcd_wp_chatbot_fb_app_id = @wp_unslash($_POST["qlcd_wp_chatbot_fb_app_id"]);
|
|
1941
|
+ $qlcd_wp_chatbot_fb_app_id = @$_POST["qlcd_wp_chatbot_fb_app_id"];
|
|
1994
|
1942
|
update_option('qlcd_wp_chatbot_fb_app_id', sanitize_text_field($qlcd_wp_chatbot_fb_app_id));
|
|
1995
|
1943
|
}
|
|
1996
|
1944
|
if(isset($_POST["qlcd_wp_chatbot_fb_page_id"])){
|
|
1997
|
|
- $qlcd_wp_chatbot_fb_page_id = @wp_unslash($_POST["qlcd_wp_chatbot_fb_page_id"]);
|
|
1945
|
+ $qlcd_wp_chatbot_fb_page_id = @$_POST["qlcd_wp_chatbot_fb_page_id"];
|
|
1998
|
1946
|
update_option('qlcd_wp_chatbot_fb_page_id', sanitize_text_field($qlcd_wp_chatbot_fb_page_id));
|
|
1999
|
1947
|
}
|
|
2000
|
1948
|
if(isset($_POST["qlcd_wp_chatbot_fb_color"])){
|
|
2001
|
|
- $qlcd_wp_chatbot_fb_color= @wp_unslash($_POST["qlcd_wp_chatbot_fb_color"]);
|
|
1949
|
+ $qlcd_wp_chatbot_fb_color= @$_POST["qlcd_wp_chatbot_fb_color"];
|
|
2002
|
1950
|
update_option('qlcd_wp_chatbot_fb_color', wp_unslash($qlcd_wp_chatbot_fb_color));
|
|
2003
|
1951
|
}
|
|
2004
|
1952
|
if(isset($_POST["qlcd_wp_chatbot_fb_in_msg"])){
|
|
2005
|
|
- $qlcd_wp_chatbot_fb_in_msg = @wp_unslash($_POST["qlcd_wp_chatbot_fb_in_msg"]);
|
|
1953
|
+ $qlcd_wp_chatbot_fb_in_msg = @$_POST["qlcd_wp_chatbot_fb_in_msg"];
|
|
2006
|
1954
|
update_option('qlcd_wp_chatbot_fb_in_msg', stripslashes(sanitize_text_field($qlcd_wp_chatbot_fb_in_msg)));
|
|
2007
|
1955
|
}
|
|
2008
|
1956
|
if(isset($_POST["qlcd_wp_chatbot_fb_out_msg"])){
|
|
2009
|
|
- $qlcd_wp_chatbot_fb_out_msg = @wp_unslash($_POST["qlcd_wp_chatbot_fb_out_msg"]);
|
|
1957
|
+ $qlcd_wp_chatbot_fb_out_msg = @$_POST["qlcd_wp_chatbot_fb_out_msg"];
|
|
2010
|
1958
|
update_option('qlcd_wp_chatbot_fb_out_msg', stripslashes(sanitize_text_field($qlcd_wp_chatbot_fb_out_msg)));
|
|
2011
|
1959
|
}
|
|
2012
|
1960
|
//Skype option
|
|
2013
|
1961
|
if(isset( $_POST["enable_wp_chatbot_skype_floating_icon"])) {
|
|
2014
|
|
- $enable_wp_chatbot_skype_floating_icon = wp_unslash($_POST["enable_wp_chatbot_skype_floating_icon"]);
|
|
1962
|
+ $enable_wp_chatbot_skype_floating_icon = $_POST["enable_wp_chatbot_skype_floating_icon"];
|
|
2015
|
1963
|
}else{ $enable_wp_chatbot_skype_floating_icon='';}
|
|
2016
|
1964
|
update_option('enable_wp_chatbot_skype_floating_icon', sanitize_text_field($enable_wp_chatbot_skype_floating_icon));
|
|
2017
|
1965
|
if(isset( $_POST["enable_wp_chatbot_skype_id"])) {
|
|
2018
|
|
- $enable_wp_chatbot_skype_id = wp_unslash($_POST["enable_wp_chatbot_skype_id"]);
|
|
1966
|
+ $enable_wp_chatbot_skype_id = $_POST["enable_wp_chatbot_skype_id"];
|
|
2019
|
1967
|
}else{ $enable_wp_chatbot_skype_id='';}
|
|
2020
|
1968
|
update_option('enable_wp_chatbot_skype_id', sanitize_text_field($enable_wp_chatbot_skype_id));
|
|
2021
|
1969
|
//WhatsApp
|
|
2022
|
1970
|
if(isset( $_POST["enable_wp_chatbot_whats"])) {
|
|
2023
|
|
- $enable_wp_chatbot_whats= wp_unslash($_POST["enable_wp_chatbot_whats"]);
|
|
1971
|
+ $enable_wp_chatbot_whats= $_POST["enable_wp_chatbot_whats"];
|
|
2024
|
1972
|
}else{ $enable_wp_chatbot_whats='';}
|
|
2025
|
1973
|
update_option('enable_wp_chatbot_whats', sanitize_text_field($enable_wp_chatbot_whats));
|
|
2026
|
1974
|
if(isset($_POST["qlcd_wp_chatbot_whats_label"])){
|
|
2027
|
|
- $qlcd_wp_chatbot_whats_label = @wp_unslash($_POST["qlcd_wp_chatbot_whats_label"]);
|
|
1975
|
+ $qlcd_wp_chatbot_whats_label = @$_POST["qlcd_wp_chatbot_whats_label"];
|
|
2028
|
1976
|
update_option('qlcd_wp_chatbot_whats_label', maybe_serialize(sanitize_array($qlcd_wp_chatbot_whats_label)));
|
|
2029
|
1977
|
}
|
|
2030
|
1978
|
if(isset( $_POST["enable_wp_chatbot_floating_whats"])) {
|
|
2031
|
|
- $enable_wp_chatbot_floating_whats= wp_unslash($_POST["enable_wp_chatbot_floating_whats"]);
|
|
1979
|
+ $enable_wp_chatbot_floating_whats= $_POST["enable_wp_chatbot_floating_whats"];
|
|
2032
|
1980
|
}else{ $enable_wp_chatbot_floating_whats='';}
|
|
2033
|
1981
|
update_option('enable_wp_chatbot_floating_whats', sanitize_text_field($enable_wp_chatbot_floating_whats));
|
|
2034
|
1982
|
if(isset($_POST["qlcd_wp_chatbot_whats_num"])){
|
|
2035
|
|
- $qlcd_wp_chatbot_whats_num = @wp_unslash($_POST["qlcd_wp_chatbot_whats_num"]);
|
|
1983
|
+ $qlcd_wp_chatbot_whats_num = @$_POST["qlcd_wp_chatbot_whats_num"];
|
|
2036
|
1984
|
update_option('qlcd_wp_chatbot_whats_num', sanitize_text_field($qlcd_wp_chatbot_whats_num));
|
|
2037
|
1985
|
}
|
|
2038
|
1986
|
//Viber
|
|
2039
|
1987
|
if(isset( $_POST["enable_wp_chatbot_floating_viber"])) {
|
|
2040
|
|
- $enable_wp_chatbot_floating_viber = wp_unslash($_POST["enable_wp_chatbot_floating_viber"]);
|
|
1988
|
+ $enable_wp_chatbot_floating_viber = $_POST["enable_wp_chatbot_floating_viber"];
|
|
2041
|
1989
|
}else{ $enable_wp_chatbot_floating_viber='';}
|
|
2042
|
1990
|
update_option('enable_wp_chatbot_floating_viber', sanitize_text_field($enable_wp_chatbot_floating_viber));
|
|
2043
|
1991
|
if(isset($_POST["qlcd_wp_chatbot_viber_acc"])){
|
|
2044
|
|
- $qlcd_wp_chatbot_viber_acc = @wp_unslash($_POST["qlcd_wp_chatbot_viber_acc"]);
|
|
1992
|
+ $qlcd_wp_chatbot_viber_acc = @$_POST["qlcd_wp_chatbot_viber_acc"];
|
|
2045
|
1993
|
update_option('qlcd_wp_chatbot_viber_acc', sanitize_text_field($qlcd_wp_chatbot_viber_acc));
|
|
2046
|
1994
|
}
|
|
2047
|
1995
|
//Others integration
|
|
2048
|
1996
|
if(isset( $_POST["enable_wp_chatbot_floating_phone"])) {
|
|
2049
|
|
- $enable_wp_chatbot_floating_phone = wp_unslash($_POST["enable_wp_chatbot_floating_phone"]);
|
|
1997
|
+ $enable_wp_chatbot_floating_phone = $_POST["enable_wp_chatbot_floating_phone"];
|
|
2050
|
1998
|
}else{ $enable_wp_chatbot_floating_phone='';}
|
|
2051
|
1999
|
update_option('enable_wp_chatbot_floating_phone', sanitize_text_field($enable_wp_chatbot_floating_phone));
|
|
2052
|
2000
|
if(isset($_POST["qlcd_wp_chatbot_phone"])){
|
|
2053
|
|
- $qlcd_wp_chatbot_phone = @wp_unslash($_POST["qlcd_wp_chatbot_phone"]);
|
|
2001
|
+ $qlcd_wp_chatbot_phone = @$_POST["qlcd_wp_chatbot_phone"];
|
|
2054
|
2002
|
update_option('qlcd_wp_chatbot_phone', sanitize_text_field($qlcd_wp_chatbot_phone));
|
|
2055
|
2003
|
}
|
|
2056
|
2004
|
|
|
2057
|
2005
|
if(isset( $_POST["enable_wp_chatbot_floating_link"])) {
|
|
2058
|
|
- $enable_wp_chatbot_floating_link = wp_unslash($_POST["enable_wp_chatbot_floating_link"]);
|
|
2006
|
+ $enable_wp_chatbot_floating_link = $_POST["enable_wp_chatbot_floating_link"];
|
|
2059
|
2007
|
}else{ $enable_wp_chatbot_floating_link='';}
|
|
2060
|
2008
|
update_option('enable_wp_chatbot_floating_link', sanitize_text_field($enable_wp_chatbot_floating_link));
|
|
2061
|
2009
|
if(isset($_POST["qlcd_wp_chatbot_weblink"])){
|
|
2062
|
|
- $qlcd_wp_chatbot_weblink = @wp_unslash($_POST["qlcd_wp_chatbot_weblink"]);
|
|
2010
|
+ $qlcd_wp_chatbot_weblink = @$_POST["qlcd_wp_chatbot_weblink"];
|
|
2063
|
2011
|
update_option('qlcd_wp_chatbot_weblink', sanitize_text_field($qlcd_wp_chatbot_weblink));
|
|
2064
|
2012
|
}
|
|
2065
|
2013
|
|
|
2066
|
2014
|
//Re Targetting.
|
|
2067
|
2015
|
if(isset($_POST["qlcd_wp_chatbot_ret_greet"])){
|
|
2068
|
|
- $qlcd_wp_chatbot_ret_greet = @wp_unslash($_POST["qlcd_wp_chatbot_ret_greet"]);
|
|
2016
|
+ $qlcd_wp_chatbot_ret_greet = @$_POST["qlcd_wp_chatbot_ret_greet"];
|
|
2069
|
2017
|
update_option('qlcd_wp_chatbot_ret_greet', sanitize_text_field($qlcd_wp_chatbot_ret_greet));
|
|
2070
|
2018
|
}
|
|
2071
|
2019
|
|
|
2072
|
2020
|
if(isset( $_POST["enable_wp_chatbot_exit_intent"])) {
|
|
2073
|
|
- $enable_wp_chatbot_exit_intent = wp_unslash($_POST["enable_wp_chatbot_exit_intent"]);
|
|
2021
|
+ $enable_wp_chatbot_exit_intent = $_POST["enable_wp_chatbot_exit_intent"];
|
|
2074
|
2022
|
}else{ $enable_wp_chatbot_exit_intent='';}
|
|
2075
|
2023
|
update_option('enable_wp_chatbot_exit_intent', sanitize_text_field($enable_wp_chatbot_exit_intent));
|
|
2076
|
2024
|
|
|
2077
|
2025
|
if(isset($_POST["wp_chatbot_exit_intent_msg"])){
|
|
2078
|
|
- $wp_chatbot_exit_intent_msg = @wp_unslash($_POST["wp_chatbot_exit_intent_msg"]);
|
|
2026
|
+ $wp_chatbot_exit_intent_msg = @$_POST["wp_chatbot_exit_intent_msg"];
|
|
2079
|
2027
|
update_option('wp_chatbot_exit_intent_msg', wp_unslash($wp_chatbot_exit_intent_msg));
|
|
2080
|
2028
|
}
|
|
2081
|
2029
|
|
|
2082
|
2030
|
if(isset( $_POST["wp_chatbot_exit_intent_once"])) {
|
|
2083
|
|
- $wp_chatbot_exit_intent_once = wp_unslash($_POST["wp_chatbot_exit_intent_once"]);
|
|
2031
|
+ $wp_chatbot_exit_intent_once = $_POST["wp_chatbot_exit_intent_once"];
|
|
2084
|
2032
|
}else{ $wp_chatbot_exit_intent_once='';}
|
|
2085
|
2033
|
update_option('wp_chatbot_exit_intent_once', sanitize_text_field($wp_chatbot_exit_intent_once));
|
|
2086
|
2034
|
|
|
2087
|
2035
|
if(isset( $_POST["enable_wp_chatbot_scroll_open"])) {
|
|
2088
|
|
- $enable_wp_chatbot_scroll_open = wp_unslash($_POST["enable_wp_chatbot_scroll_open"]);
|
|
2036
|
+ $enable_wp_chatbot_scroll_open = $_POST["enable_wp_chatbot_scroll_open"];
|
|
2089
|
2037
|
}else{ $enable_wp_chatbot_scroll_open='';}
|
|
2090
|
2038
|
update_option('enable_wp_chatbot_scroll_open', sanitize_text_field($enable_wp_chatbot_scroll_open));
|
|
2091
|
2039
|
|
|
2092
|
2040
|
if(isset($_POST["wp_chatbot_scroll_open_msg"])){
|
|
2093
|
|
- $wp_chatbot_scroll_open_msg= @wp_unslash($_POST["wp_chatbot_scroll_open_msg"]);
|
|
2041
|
+ $wp_chatbot_scroll_open_msg= @$_POST["wp_chatbot_scroll_open_msg"];
|
|
2094
|
2042
|
update_option('wp_chatbot_scroll_open_msg', wp_unslash($wp_chatbot_scroll_open_msg));
|
|
2095
|
2043
|
}
|
|
2096
|
2044
|
|
|
2097
|
2045
|
if(isset($_POST["wp_chatbot_scroll_percent"])){
|
|
2098
|
|
- $wp_chatbot_scroll_percent= @wp_unslash($_POST["wp_chatbot_scroll_percent"]);
|
|
2046
|
+ $wp_chatbot_scroll_percent= @$_POST["wp_chatbot_scroll_percent"];
|
|
2099
|
2047
|
update_option('wp_chatbot_scroll_percent', wp_unslash($wp_chatbot_scroll_percent));
|
|
2100
|
2048
|
}
|
|
2101
|
2049
|
|
|
2102
|
2050
|
if(isset( $_POST["wp_chatbot_scroll_once"])) {
|
|
2103
|
|
- $wp_chatbot_scroll_once = sanitize_text_field(wp_unslash($_POST["wp_chatbot_scroll_once"]));
|
|
2051
|
+ $wp_chatbot_scroll_once = sanitize_text_field($_POST["wp_chatbot_scroll_once"]);
|
|
2104
|
2052
|
}else{ $wp_chatbot_scroll_once='';}
|
|
2105
|
2053
|
update_option('wp_chatbot_scroll_once', $wp_chatbot_scroll_once);
|
|
2106
|
2054
|
|
|
2107
|
2055
|
if(isset( $_POST["enable_wp_chatbot_auto_open"])) {
|
|
2108
|
|
- $enable_wp_chatbot_auto_open = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_auto_open"]));
|
|
2056
|
+ $enable_wp_chatbot_auto_open = sanitize_text_field($_POST["enable_wp_chatbot_auto_open"]);
|
|
2109
|
2057
|
}else{ $enable_wp_chatbot_auto_open='';}
|
|
2110
|
2058
|
update_option('enable_wp_chatbot_auto_open', $enable_wp_chatbot_auto_open);
|
|
2111
|
2059
|
|
|
2112
|
2060
|
if(isset( $_POST["enable_wp_chatbot_ret_sound"])) {
|
|
2113
|
|
- $enable_wp_chatbot_ret_sound = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_ret_sound"]));
|
|
2061
|
+ $enable_wp_chatbot_ret_sound = sanitize_text_field($_POST["enable_wp_chatbot_ret_sound"]);
|
|
2114
|
2062
|
}else{ $enable_wp_chatbot_ret_sound='';}
|
|
2115
|
2063
|
update_option('enable_wp_chatbot_ret_sound', $enable_wp_chatbot_ret_sound);
|
|
2116
|
2064
|
|
|
2117
|
2065
|
if(isset( $_POST["enable_wp_chatbot_sound_initial"])) {
|
|
2118
|
|
- $enable_wp_chatbot_sound_initial = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_sound_initial"]));
|
|
2066
|
+ $enable_wp_chatbot_sound_initial = sanitize_text_field($_POST["enable_wp_chatbot_sound_initial"]);
|
|
2119
|
2067
|
}else{ $enable_wp_chatbot_sound_initial='';}
|
|
2120
|
2068
|
update_option('enable_wp_chatbot_sound_initial', $enable_wp_chatbot_sound_initial);
|
|
2121
|
2069
|
|
|
2122
|
2070
|
|
|
2123
|
2071
|
if(isset($_POST["wp_chatbot_auto_open_msg"])){
|
|
2124
|
|
- $wp_chatbot_auto_open_msg = @wp_unslash($_POST["wp_chatbot_auto_open_msg"]);
|
|
2072
|
+ $wp_chatbot_auto_open_msg = @$_POST["wp_chatbot_auto_open_msg"];
|
|
2125
|
2073
|
update_option('wp_chatbot_auto_open_msg', wp_unslash($wp_chatbot_auto_open_msg));
|
|
2126
|
2074
|
}
|
|
2127
|
2075
|
|
|
2128
|
2076
|
if(isset($_POST["wp_chatbot_auto_open_time"])){
|
|
2129
|
|
- $wp_chatbot_auto_open_time = @wp_unslash($_POST["wp_chatbot_auto_open_time"]);
|
|
2077
|
+ $wp_chatbot_auto_open_time = @$_POST["wp_chatbot_auto_open_time"];
|
|
2130
|
2078
|
update_option('wp_chatbot_auto_open_time', wp_unslash($wp_chatbot_auto_open_time));
|
|
2131
|
2079
|
}
|
|
2132
|
2080
|
//to complate checkout.
|
|
2133
|
2081
|
if(isset( $_POST["enable_wp_chatbot_ret_user_show"])) {
|
|
2134
|
|
- $enable_wp_chatbot_ret_user_show = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_ret_user_show"]));
|
|
2082
|
+ $enable_wp_chatbot_ret_user_show = sanitize_text_field($_POST["enable_wp_chatbot_ret_user_show"]);
|
|
2135
|
2083
|
}else{ $enable_wp_chatbot_ret_user_show='';}
|
|
2136
|
2084
|
update_option('enable_wp_chatbot_ret_user_show', $enable_wp_chatbot_ret_user_show);
|
|
2137
|
2085
|
|
|
2138
|
2086
|
if(isset( $_POST["enable_wp_chatbot_inactive_time_show"])) {
|
|
2139
|
|
- $enable_wp_chatbot_inactive_time_show = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_inactive_time_show"]));
|
|
2087
|
+ $enable_wp_chatbot_inactive_time_show = sanitize_text_field($_POST["enable_wp_chatbot_inactive_time_show"]);
|
|
2140
|
2088
|
}else{ $enable_wp_chatbot_inactive_time_show='';}
|
|
2141
|
2089
|
update_option('enable_wp_chatbot_inactive_time_show', $enable_wp_chatbot_inactive_time_show);
|
|
2142
|
2090
|
|
|
2143
|
2091
|
if(isset($_POST["wp_chatbot_inactive_time"])){
|
|
2144
|
|
- $wp_chatbot_inactive_time = @wp_unslash($_POST["wp_chatbot_inactive_time"]);
|
|
2092
|
+ $wp_chatbot_inactive_time = @$_POST["wp_chatbot_inactive_time"];
|
|
2145
|
2093
|
update_option('wp_chatbot_inactive_time', sanitize_text_field($wp_chatbot_inactive_time));
|
|
2146
|
2094
|
}
|
|
2147
|
2095
|
|
|
2148
|
2096
|
if(isset($_POST["wp_chatbot_checkout_msg"])){
|
|
2149
|
|
- $wp_chatbot_checkout_msg = @wp_unslash($_POST["wp_chatbot_checkout_msg"]);
|
|
2097
|
+ $wp_chatbot_checkout_msg = @$_POST["wp_chatbot_checkout_msg"];
|
|
2150
|
2098
|
update_option('wp_chatbot_checkout_msg', wp_unslash($wp_chatbot_checkout_msg));
|
|
2151
|
2099
|
}
|
|
2152
|
2100
|
|
|
2153
|
2101
|
if(isset( $_POST["wp_chatbot_auto_open_once"])) {
|
|
2154
|
|
- $wp_chatbot_auto_open_once = sanitize_text_field(wp_unslash($_POST["wp_chatbot_auto_open_once"]));
|
|
2102
|
+ $wp_chatbot_auto_open_once = sanitize_text_field($_POST["wp_chatbot_auto_open_once"]);
|
|
2155
|
2103
|
}else{ $wp_chatbot_auto_open_once='';}
|
|
2156
|
2104
|
update_option('wp_chatbot_auto_open_once', $wp_chatbot_auto_open_once);
|
|
2157
|
2105
|
|
|
2158
|
2106
|
if(isset( $_POST["wp_chatbot_inactive_once"])) {
|
|
2159
|
|
- $wp_chatbot_inactive_once = sanitize_text_field(wp_unslash($_POST["wp_chatbot_inactive_once"]));
|
|
2107
|
+ $wp_chatbot_inactive_once = sanitize_text_field($_POST["wp_chatbot_inactive_once"]);
|
|
2160
|
2108
|
}else{ $wp_chatbot_inactive_once='';}
|
|
2161
|
2109
|
update_option('wp_chatbot_inactive_once', $wp_chatbot_inactive_once);
|
|
2162
|
2110
|
|
|
2163
|
2111
|
|
|
2164
|
2112
|
if(isset($_POST["wp_chatbot_proactive_bg_color"])){
|
|
2165
|
|
- $wp_chatbot_proactive_bg_color = @wp_unslash($_POST["wp_chatbot_proactive_bg_color"]);
|
|
2113
|
+ $wp_chatbot_proactive_bg_color = @$_POST["wp_chatbot_proactive_bg_color"];
|
|
2166
|
2114
|
update_option('wp_chatbot_proactive_bg_color', sanitize_text_field($wp_chatbot_proactive_bg_color));
|
|
2167
|
2115
|
}
|
|
2168
|
2116
|
|
|
2169
|
2117
|
if(isset( $_POST["disable_wp_chatbot_call_gen"])) {
|
|
2170
|
|
- $disable_wp_chatbot_call_gen = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_call_gen"]));
|
|
2118
|
+ $disable_wp_chatbot_call_gen = sanitize_text_field($_POST["disable_wp_chatbot_call_gen"]);
|
|
2171
|
2119
|
}else{ $disable_wp_chatbot_call_gen='';}
|
|
2172
|
2120
|
update_option('disable_wp_chatbot_call_gen', $disable_wp_chatbot_call_gen);
|
|
2173
|
2121
|
|
|
2174
|
2122
|
if(isset( $_POST["disable_wp_chatbot_site_search"])) {
|
|
2175
|
|
- $disable_wp_chatbot_site_search = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_site_search"]));
|
|
2123
|
+ $disable_wp_chatbot_site_search = sanitize_text_field($_POST["disable_wp_chatbot_site_search"]);
|
|
2176
|
2124
|
update_option('enable_wp_chatbot_post_content', '');
|
|
2177
|
2125
|
}else{ $disable_wp_chatbot_site_search='';}
|
|
2178
|
2126
|
update_option('disable_wp_chatbot_site_search', $disable_wp_chatbot_site_search);
|
|
2179
|
2127
|
|
|
2180
|
2128
|
if(isset( $_POST["enable_wp_chatbot_post_content"])) {
|
|
2181
|
|
- $enable_wp_chatbot_post_content = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_post_content"]));
|
|
2129
|
+ $enable_wp_chatbot_post_content = sanitize_text_field($_POST["enable_wp_chatbot_post_content"]);
|
|
2182
|
2130
|
|
|
2183
|
2131
|
}else{ $enable_wp_chatbot_post_content='';}
|
|
2184
|
2132
|
update_option('enable_wp_chatbot_post_content', $enable_wp_chatbot_post_content);
|
|
2185
|
2133
|
|
|
2186
|
2134
|
if(isset( $_POST["disable_wp_chatbot_call_sup"])) {
|
|
2187
|
|
- $disable_wp_chatbot_call_sup = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_call_sup"]));
|
|
2135
|
+ $disable_wp_chatbot_call_sup = sanitize_text_field($_POST["disable_wp_chatbot_call_sup"]);
|
|
2188
|
2136
|
}else{ $disable_wp_chatbot_call_sup='';}
|
|
2189
|
2137
|
update_option('disable_wp_chatbot_call_sup', $disable_wp_chatbot_call_sup);
|
|
2190
|
2138
|
|
|
2191
|
2139
|
if(isset( $_POST["disable_wp_chatbot_feedback"])) {
|
|
2192
|
|
- $disable_wp_chatbot_feedback = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_feedback"]));
|
|
2140
|
+ $disable_wp_chatbot_feedback = sanitize_text_field($_POST["disable_wp_chatbot_feedback"]);
|
|
2193
|
2141
|
}else{ $disable_wp_chatbot_feedback='';}
|
|
2194
|
2142
|
update_option('disable_wp_chatbot_feedback', $disable_wp_chatbot_feedback);
|
|
2195
|
2143
|
|
|
2196
|
2144
|
if(isset( $_POST["disable_wp_chatbot_faq"])) {
|
|
2197
|
|
- $disable_wp_chatbot_faq = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_faq"]));
|
|
2145
|
+ $disable_wp_chatbot_faq = sanitize_text_field($_POST["disable_wp_chatbot_faq"]);
|
|
2198
|
2146
|
}else{ $disable_wp_chatbot_faq='';}
|
|
2199
|
2147
|
update_option('disable_wp_chatbot_faq', $disable_wp_chatbot_faq);
|
|
2200
|
2148
|
|
|
2201
|
2149
|
if(isset($_POST["qlcd_wp_chatbot_feedback_label"])){
|
|
2202
|
|
- $qlcd_wp_chatbot_feedback_label = (@wp_unslash($_POST["qlcd_wp_chatbot_feedback_label"]));
|
|
2150
|
+ $qlcd_wp_chatbot_feedback_label = (@$_POST["qlcd_wp_chatbot_feedback_label"]);
|
|
2203
|
2151
|
update_option('qlcd_wp_chatbot_feedback_label', maybe_serialize(sanitize_array($qlcd_wp_chatbot_feedback_label)));
|
|
2204
|
2152
|
}
|
|
2205
|
2153
|
|
|
2206
|
2154
|
if(isset( $_POST["enable_wp_chatbot_meta_title"])) {
|
|
2207
|
|
- $enable_wp_chatbot_meta_title = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_meta_title"]));
|
|
2155
|
+ $enable_wp_chatbot_meta_title = sanitize_text_field($_POST["enable_wp_chatbot_meta_title"]);
|
|
2208
|
2156
|
}else{ $enable_wp_chatbot_meta_title='';}
|
|
2209
|
2157
|
update_option('enable_wp_chatbot_meta_title', $enable_wp_chatbot_meta_title);
|
|
2210
|
2158
|
|
|
2211
|
2159
|
if(isset($_POST["qlcd_wp_chatbot_meta_label"])){
|
|
2212
|
|
- $qlcd_wp_chatbot_meta_label = esc_html(@wp_unslash($_POST["qlcd_wp_chatbot_meta_label"]));
|
|
2160
|
+ $qlcd_wp_chatbot_meta_label = esc_html(@$_POST["qlcd_wp_chatbot_meta_label"]);
|
|
2213
|
2161
|
update_option('qlcd_wp_chatbot_meta_label', stripslashes(sanitize_text_field($qlcd_wp_chatbot_meta_label)));
|
|
2214
|
2162
|
}
|
|
2215
|
2163
|
|
|
2216
|
2164
|
if (isset($_POST["qlcd_wp_chatbot_phone_sent"])) {
|
|
@@ -2233,24 +2181,24 @@ |
|
2233
|
2181
|
update_option('qlcd_wp_chatbot_found_result', $qlcd_wp_chatbot_found_result);
|
|
2234
|
2182
|
}
|
|
2235
|
2183
|
|
|
2236
|
2184
|
if(isset( $_POST["enable_wp_chatbot_opening_hour"])) {
|
|
2237
|
|
- $enable_wp_chatbot_opening_hour = stripslashes(sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_opening_hour"])));
|
|
2185
|
+ $enable_wp_chatbot_opening_hour = stripslashes(sanitize_text_field($_POST["enable_wp_chatbot_opening_hour"]));
|
|
2238
|
2186
|
}else{ $enable_wp_chatbot_opening_hour='';}
|
|
2239
|
2187
|
update_option('enable_wp_chatbot_opening_hour', esc_html($enable_wp_chatbot_opening_hour));
|
|
2240
|
2188
|
|
|
2241
|
2189
|
if(isset($_POST["wpwbot_hours"])){
|
|
2242
|
|
- $wpwbot_hours= @wp_unslash($_POST["wpwbot_hours"]);
|
|
2190
|
+ $wpwbot_hours= @$_POST["wpwbot_hours"];
|
|
2243
|
2191
|
update_option('wpwbot_hours', maybe_serialize(sanitize_array($wpwbot_hours)));
|
|
2244
|
2192
|
}
|
|
2245
|
2193
|
|
|
2246
|
2194
|
if(isset( $_POST["enable_wp_chatbot_dailogflow"])) {
|
|
2247
|
|
- $enable_wp_chatbot_dailogflow = stripslashes(sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_dailogflow"])));
|
|
2195
|
+ $enable_wp_chatbot_dailogflow = stripslashes(sanitize_text_field($_POST["enable_wp_chatbot_dailogflow"]));
|
|
2248
|
2196
|
}else{ $enable_wp_chatbot_dailogflow='';}
|
|
2249
|
2197
|
update_option('enable_wp_chatbot_dailogflow', $enable_wp_chatbot_dailogflow);
|
|
2250
|
2198
|
|
|
2251
|
2199
|
if(isset($_POST["qlcd_wp_chatbot_dialogflow_client_token"])){
|
|
2252
|
|
- $qlcd_wp_chatbot_dialogflow_client_token= esc_html(@wp_unslash($_POST["qlcd_wp_chatbot_dialogflow_client_token"]));
|
|
2200
|
+ $qlcd_wp_chatbot_dialogflow_client_token= esc_html(@$_POST["qlcd_wp_chatbot_dialogflow_client_token"]);
|
|
2253
|
2201
|
update_option('qlcd_wp_chatbot_dialogflow_client_token', stripslashes(sanitize_text_field($qlcd_wp_chatbot_dialogflow_client_token)));
|
|
2254
|
2202
|
}
|
|
2255
|
2203
|
|
|
2256
|
2204
|
if (isset($_POST["qlcd_wp_chatbot_dialogflow_defualt_reply"])) {
|
|
@@ -2263,99 +2211,99 @@ |
|
2263
|
2211
|
update_option('qlcd_wp_chatbot_dialogflow_agent_language', $qlcd_wp_chatbot_dialogflow_agent_language);
|
|
2264
|
2212
|
}
|
|
2265
|
2213
|
// style option save.
|
|
2266
|
2214
|
if(isset( $_POST["enable_wp_chatbot_custom_color"])) {
|
|
2267
|
|
- $enable_wp_chatbot_custom_color = esc_html(wp_unslash($_POST["enable_wp_chatbot_custom_color"]));
|
|
2215
|
+ $enable_wp_chatbot_custom_color = esc_html($_POST["enable_wp_chatbot_custom_color"]);
|
|
2268
|
2216
|
}else{ $enable_wp_chatbot_custom_color='';}
|
|
2269
|
2217
|
update_option('enable_wp_chatbot_custom_color', stripslashes(sanitize_text_field($enable_wp_chatbot_custom_color)));
|
|
2270
|
2218
|
if (isset($_POST["wp_chatbot_text_color"])) {
|
|
2271
|
|
- $wp_chatbot_text_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_text_color"]));
|
|
2219
|
+ $wp_chatbot_text_color = sanitize_hex_color($_POST["wp_chatbot_text_color"]);
|
|
2272
|
2220
|
update_option('wp_chatbot_text_color', $wp_chatbot_text_color);
|
|
2273
|
2221
|
}
|
|
2274
|
2222
|
|
|
2275
|
2223
|
if (isset($_POST["wp_chatbot_floatingiconbg_color"])) {
|
|
2276
|
|
- $wp_chatbot_floatingiconbg_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_floatingiconbg_color"]));
|
|
2224
|
+ $wp_chatbot_floatingiconbg_color = sanitize_hex_color($_POST["wp_chatbot_floatingiconbg_color"]);
|
|
2277
|
2225
|
update_option('wp_chatbot_floatingiconbg_color', $wp_chatbot_floatingiconbg_color);
|
|
2278
|
2226
|
}
|
|
2279
|
2227
|
|
|
2280
|
2228
|
if (isset($_POST["wp_chatbot_link_color"])) {
|
|
2281
|
|
- $wp_chatbot_link_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_link_color"]));
|
|
2229
|
+ $wp_chatbot_link_color = sanitize_hex_color($_POST["wp_chatbot_link_color"]);
|
|
2282
|
2230
|
update_option('wp_chatbot_link_color', $wp_chatbot_link_color);
|
|
2283
|
2231
|
}
|
|
2284
|
2232
|
|
|
2285
|
2233
|
if (isset($_POST["wp_chatbot_link_hover_color"])) {
|
|
2286
|
|
- $wp_chatbot_link_hover_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_link_hover_color"]));
|
|
2234
|
+ $wp_chatbot_link_hover_color = sanitize_hex_color($_POST["wp_chatbot_link_hover_color"]);
|
|
2287
|
2235
|
update_option('wp_chatbot_link_hover_color', $wp_chatbot_link_hover_color);
|
|
2288
|
2236
|
}
|
|
2289
|
2237
|
|
|
2290
|
2238
|
if (isset($_POST["wp_chatbot_bot_msg_bg_color"])) {
|
|
2291
|
|
- $wp_chatbot_bot_msg_bg_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_bot_msg_bg_color"]));
|
|
2239
|
+ $wp_chatbot_bot_msg_bg_color = sanitize_hex_color($_POST["wp_chatbot_bot_msg_bg_color"]);
|
|
2292
|
2240
|
update_option('wp_chatbot_bot_msg_bg_color', $wp_chatbot_bot_msg_bg_color);
|
|
2293
|
2241
|
}
|
|
2294
|
2242
|
|
|
2295
|
2243
|
if (isset($_POST["wp_chatbot_bot_msg_text_color"])) {
|
|
2296
|
|
- $wp_chatbot_bot_msg_text_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_bot_msg_text_color"]));
|
|
2244
|
+ $wp_chatbot_bot_msg_text_color = sanitize_hex_color($_POST["wp_chatbot_bot_msg_text_color"]);
|
|
2297
|
2245
|
update_option('wp_chatbot_bot_msg_text_color', $wp_chatbot_bot_msg_text_color);
|
|
2298
|
2246
|
}
|
|
2299
|
2247
|
|
|
2300
|
2248
|
if (isset($_POST["wp_chatbot_user_msg_bg_color"])) {
|
|
2301
|
|
- $wp_chatbot_user_msg_bg_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_user_msg_bg_color"]));
|
|
2249
|
+ $wp_chatbot_user_msg_bg_color = sanitize_hex_color($_POST["wp_chatbot_user_msg_bg_color"]);
|
|
2302
|
2250
|
update_option('wp_chatbot_user_msg_bg_color', $wp_chatbot_user_msg_bg_color);
|
|
2303
|
2251
|
}
|
|
2304
|
2252
|
|
|
2305
|
2253
|
if (isset($_POST["wp_chatbot_user_msg_text_color"])) {
|
|
2306
|
|
- $wp_chatbot_user_msg_text_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_user_msg_text_color"]));
|
|
2254
|
+ $wp_chatbot_user_msg_text_color = sanitize_hex_color($_POST["wp_chatbot_user_msg_text_color"]);
|
|
2307
|
2255
|
update_option('wp_chatbot_user_msg_text_color', $wp_chatbot_user_msg_text_color);
|
|
2308
|
2256
|
}
|
|
2309
|
2257
|
|
|
2310
|
2258
|
if (isset($_POST["wp_chatbot_buttons_bg_color"])) {
|
|
2311
|
|
- $wp_chatbot_buttons_bg_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_buttons_bg_color"]));
|
|
2259
|
+ $wp_chatbot_buttons_bg_color = sanitize_hex_color($_POST["wp_chatbot_buttons_bg_color"]);
|
|
2312
|
2260
|
update_option('wp_chatbot_buttons_bg_color', $wp_chatbot_buttons_bg_color);
|
|
2313
|
2261
|
}
|
|
2314
|
2262
|
|
|
2315
|
2263
|
if (isset($_POST["wp_chatbot_buttons_text_color"])) {
|
|
2316
|
|
- $wp_chatbot_buttons_text_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_buttons_text_color"]));
|
|
2264
|
+ $wp_chatbot_buttons_text_color = sanitize_hex_color($_POST["wp_chatbot_buttons_text_color"]);
|
|
2317
|
2265
|
update_option('wp_chatbot_buttons_text_color', $wp_chatbot_buttons_text_color);
|
|
2318
|
2266
|
}
|
|
2319
|
2267
|
|
|
2320
|
2268
|
if (isset($_POST["wp_chatbot_buttons_bg_color_hover"])) {
|
|
2321
|
|
- $wp_chatbot_buttons_bg_color_hover = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_buttons_bg_color_hover"]));
|
|
2269
|
+ $wp_chatbot_buttons_bg_color_hover = sanitize_hex_color($_POST["wp_chatbot_buttons_bg_color_hover"]);
|
|
2322
|
2270
|
update_option('wp_chatbot_buttons_bg_color_hover', $wp_chatbot_buttons_bg_color_hover);
|
|
2323
|
2271
|
}
|
|
2324
|
2272
|
|
|
2325
|
2273
|
if (isset($_POST["wp_chatbot_buttons_text_color_hover"])) {
|
|
2326
|
|
- $wp_chatbot_buttons_text_color_hover = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_buttons_text_color_hover"]));
|
|
2274
|
+ $wp_chatbot_buttons_text_color_hover = sanitize_hex_color($_POST["wp_chatbot_buttons_text_color_hover"]);
|
|
2327
|
2275
|
update_option('wp_chatbot_buttons_text_color_hover', $wp_chatbot_buttons_text_color_hover);
|
|
2328
|
2276
|
}
|
|
2329
|
2277
|
|
|
2330
|
2278
|
if (isset($_POST["wp_chatbot_theme_secondary_color"])) {
|
|
2331
|
|
- $wp_chatbot_theme_secondary_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_theme_secondary_color"]));
|
|
2279
|
+ $wp_chatbot_theme_secondary_color = sanitize_hex_color($_POST["wp_chatbot_theme_secondary_color"]);
|
|
2332
|
2280
|
update_option('wp_chatbot_theme_secondary_color', $wp_chatbot_theme_secondary_color);
|
|
2333
|
2281
|
}
|
|
2334
|
2282
|
if (isset($_POST["wp_chatbot_header_background_color"])) {
|
|
2335
|
|
- $wp_chatbot_header_background_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_header_background_color"]));
|
|
2283
|
+ $wp_chatbot_header_background_color = sanitize_hex_color($_POST["wp_chatbot_header_background_color"]);
|
|
2336
|
2284
|
update_option('wp_chatbot_header_background_color', $wp_chatbot_header_background_color);
|
|
2337
|
2285
|
}
|
|
2338
|
2286
|
|
|
2339
|
2287
|
if (isset($_POST["wp_chatbot_font_size"])) {
|
|
2340
|
|
- $wp_chatbot_font_size = sanitize_text_field(wp_unslash($_POST["wp_chatbot_font_size"]));
|
|
2288
|
+ $wp_chatbot_font_size = sanitize_text_field($_POST["wp_chatbot_font_size"]);
|
|
2341
|
2289
|
// Additional validation for font size format (e.g., '14px', '1.2em') could be added here if strict adherence to CSS units is required.
|
|
2342
|
2290
|
update_option('wp_chatbot_font_size', $wp_chatbot_font_size);
|
|
2343
|
2291
|
}
|
|
2344
|
2292
|
if (isset($_POST["wp_chat_bot_font_family"])) {
|
|
2345
|
|
- $wp_chat_bot_font_family = sanitize_text_field(wp_unslash($_POST["wp_chat_bot_font_family"]));
|
|
2293
|
+ $wp_chat_bot_font_family = sanitize_text_field($_POST["wp_chat_bot_font_family"]);
|
|
2346
|
2294
|
update_option('wp_chat_bot_font_family', $wp_chat_bot_font_family);
|
|
2347
|
2295
|
}
|
|
2348
|
2296
|
if (isset($_POST["wp_chat_user_font_family"])) {
|
|
2349
|
|
- $wp_chat_user_font_family = sanitize_text_field(wp_unslash($_POST["wp_chat_user_font_family"]));
|
|
2297
|
+ $wp_chat_user_font_family = sanitize_text_field($_POST["wp_chat_user_font_family"]);
|
|
2350
|
2298
|
update_option('wp_chat_user_font_family', $wp_chat_user_font_family);
|
|
2351
|
2299
|
}
|
|
2352
|
2300
|
if (isset($_POST['wp_chatbot_user_font'])) {
|
|
2353
|
|
- $wp_chatbot_user_font = sanitize_text_field(wp_unslash($_POST['wp_chatbot_user_font']));
|
|
2301
|
+ $wp_chatbot_user_font = sanitize_text_field($_POST['wp_chatbot_user_font']);
|
|
2354
|
2302
|
update_option('wp_chatbot_user_font', $wp_chatbot_user_font);
|
|
2355
|
2303
|
}
|
|
2356
|
2304
|
if (isset($_POST['wp_chatbot_bot_font'])) {
|
|
2357
|
|
- $wp_chatbot_bot_font = sanitize_text_field(wp_unslash($_POST['wp_chatbot_bot_font']));
|
|
2305
|
+ $wp_chatbot_bot_font = sanitize_text_field($_POST['wp_chatbot_bot_font']);
|
|
2358
|
2306
|
update_option('wp_chatbot_bot_font', $wp_chatbot_bot_font);
|
|
2359
|
2307
|
}
|
|
2360
|
2308
|
|
|
2361
|
2309
|
set_transient( 'qcld_bot_clear_cache', 1, DAY_IN_SECONDS );
|
|
@@ -2503,15 +2451,13 @@ |
|
2503
|
2451
|
|
|
2504
|
2452
|
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
|
2505
|
2453
|
dbDelta( $sql_sliders_Table1 );
|
|
2506
|
2454
|
|
|
2507
|
|
-
|
|
2508
|
2455
|
//Bot Response Table
|
|
2509
|
2456
|
$table_rag_documents = $wpdb->prefix . "rag_documents";
|
|
2510
|
2457
|
|
|
2511
|
2458
|
$charset = $wpdb->get_charset_collate();
|
|
2512
|
|
- 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
|
|
2513
|
|
- // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange
|
|
2459
|
+ if ($wpdb->get_var("SHOW TABLES LIKE '$table_rag_documents'") != $table_rag_documents) {
|
|
2514
|
2460
|
$sql_rag_documents = "CREATE TABLE $table_rag_documents (
|
|
2515
|
2461
|
id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
|
|
2516
|
2462
|
doc_id VARCHAR(100) DEFAULT NULL,
|
|
2517
|
2463
|
title VARCHAR(255) NOT NULL,
|
|
@@ -2525,14 +2471,12 @@ |
|
2525
|
2471
|
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
|
2526
|
2472
|
) $charset;";
|
|
2527
|
2473
|
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
|
|
2528
|
2474
|
dbDelta($sql_rag_documents);
|
|
2529
|
|
- // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange
|
|
2530
|
2475
|
}
|
|
2531
|
2476
|
$table_report = $wpdb->prefix . 'wpbot_chat_report';
|
|
2532
|
2477
|
|
|
2533
|
|
- 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
|
|
2534
|
|
- // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange
|
|
2478
|
+ if ( $wpdb->get_var( "SHOW TABLES LIKE '$table_report'" ) != $table_report ) {
|
|
2535
|
2479
|
$sql_report = "
|
|
2536
|
2480
|
CREATE TABLE `$table_report` (
|
|
2537
|
2481
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
2538
|
2482
|
`user_id` int(11) NOT NULL,
|
|
@@ -2546,40 +2490,20 @@ |
|
2546
|
2490
|
";
|
|
2547
|
2491
|
|
|
2548
|
2492
|
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
|
|
2549
|
2493
|
dbDelta( $sql_report );
|
|
2550
|
|
- // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange
|
|
2551
|
2494
|
}
|
|
2552
|
2495
|
|
|
2553
|
|
- $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
|
|
2496
|
+ $sqlqry = $wpdb->get_results($wpdb->prepare("select * from $table1 where id = %d", 1)); //DB Call OK, No Caching OK
|
|
2554
|
2497
|
if(empty($sqlqry)){
|
|
2555
|
2498
|
|
|
2556
|
|
- $query = 'What are you?';
|
|
2557
|
|
- $response = 'I am an Automated ChatBot to answer your questions. This is a sample Simple Text Response that can be edited or deleted.';
|
|
2499
|
+ $query = 'What Can WPBot do for you?';
|
|
2500
|
+ $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!';
|
|
2558
|
2501
|
|
|
2559
|
2502
|
$data = array('query' => $query, 'keyword' => '', 'response'=> $response, 'intent'=> '');
|
|
2560
|
2503
|
$format = array('%s','%s', '%s', '%s');
|
|
2561
|
|
- $wpdb->insert($table1,$data,$format); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, PluginCheck.Security.DirectDB.UnescapedDBParameter
|
|
2504
|
+ $wpdb->insert($table1,$data,$format); //DB Call OK, No Caching OK
|
|
2562
|
2505
|
}
|
|
2563
|
|
-
|
|
2564
|
|
- $table = $wpdb->prefix . 'wpbot_subscription';
|
|
2565
|
|
- 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
|
|
2566
|
|
- // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange
|
|
2567
|
|
- $sql_sliders_Table = "
|
|
2568
|
|
- CREATE TABLE IF NOT EXISTS `$table` (
|
|
2569
|
|
- `id` int(11) NOT NULL AUTO_INCREMENT,
|
|
2570
|
|
- `name` varchar(256) NOT NULL,
|
|
2571
|
|
- `email` varchar(256) NOT NULL,
|
|
2572
|
|
- `phone` varchar(256) NOT NULL,
|
|
2573
|
|
- `url` text NOT NULL,
|
|
2574
|
|
- `date` datetime NOT NULL,
|
|
2575
|
|
- `user_agent` text NOT NULL,
|
|
2576
|
|
- PRIMARY KEY (`id`)
|
|
2577
|
|
- ) $collate AUTO_INCREMENT=1 ";
|
|
2578
|
|
- require_once ABSPATH . 'wp-admin/includes/upgrade.php';
|
|
2579
|
|
- dbDelta($sql_sliders_Table);
|
|
2580
|
|
- // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange
|
|
2581
|
|
- }
|
|
2582
|
2506
|
|
|
2583
|
2507
|
$url = get_site_url();
|
|
2584
|
2508
|
$url = wp_parse_url($url);
|
|
2585
|
2509
|
$domain = $url['host'];
|
|
@@ -2584,13 +2508,14 @@ |
|
2584
|
2508
|
$url = wp_parse_url($url);
|
|
2585
|
2509
|
$domain = $url['host'];
|
|
2586
|
2510
|
//$admin_email = "admin@" . $domain;
|
|
2587
|
2511
|
$admin_email = get_option('admin_email');
|
|
2512
|
+
|
|
2588
|
2513
|
if(!get_option('wp_chatbot_position_x')) {
|
|
2589
|
|
- update_option('wp_chatbot_position_x', 30);
|
|
2514
|
+ update_option('wp_chatbot_position_x', 50);
|
|
2590
|
2515
|
}
|
|
2591
|
2516
|
if(!get_option('wp_chatbot_position_y')) {
|
|
2592
|
|
- update_option('wp_chatbot_position_y', 30);
|
|
2517
|
+ update_option('wp_chatbot_position_y', 50);
|
|
2593
|
2518
|
}
|
|
2594
|
2519
|
if(!get_option('disable_wp_chatbot')) {
|
|
2595
|
2520
|
update_option('disable_wp_chatbot', '');
|
|
2596
|
2521
|
}
|
|
@@ -2671,19 +2596,11 @@ |
|
2671
|
2596
|
if(!get_option('wp_chatbot_show_home_page')) {
|
|
2672
|
2597
|
update_option('wp_chatbot_show_home_page', 'on');
|
|
2673
|
2598
|
}
|
|
2674
|
2599
|
if(!get_option('qc_wpbot_menu_order')) {
|
|
2675
|
|
- $site_search_label = get_option('qlcd_wp_chatbot_wildcard_site_search') != '' ? get_option('qlcd_wp_chatbot_wildcard_site_search') : 'Site Search';
|
|
2676
|
|
- $support_email_label = get_option('qlcd_wp_chatbot_support_email') != '' ? get_option('qlcd_wp_chatbot_support_email') : 'Send us Email.';
|
|
2677
|
|
- $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!';
|
|
2678
|
|
- $default_menu = '<span class="qcld-chatbot-wildcard qc_draggable_item qcld-chatbot-site-search" data-wildcart="site_search">' . esc_attr($site_search_label) . '</span>';
|
|
2679
|
|
- $default_menu .= '<span class="qcld-chatbot-suggest-email qc_draggable_item">' . esc_attr($support_email_label) . '</span>';
|
|
2680
|
|
- $default_menu .= '<span class="qcld-chatbot-suggest-phone qc_draggable_item">' . esc_attr($support_phone_label) . '</span>';
|
|
2681
|
|
- update_option('qc_wpbot_menu_order', $default_menu);
|
|
2600
|
+ update_option('qc_wpbot_menu_order', '');
|
|
2682
|
2601
|
}
|
|
2683
|
|
- if(!get_option('qcld_chatbot_avatar_location')) {
|
|
2684
|
|
- update_option('qcld_chatbot_avatar_location', 'side');
|
|
2685
|
|
- }
|
|
2602
|
+
|
|
2686
|
2603
|
if(!get_option('wp_chatbot_show_posts')) {
|
|
2687
|
2604
|
update_option('wp_chatbot_show_posts', 'on');
|
|
2688
|
2605
|
}
|
|
2689
|
2606
|
if(!get_option('wp_chatbot_show_pages')){
|
|
@@ -3010,12 +2927,12 @@ |
|
3010
|
2927
|
if(!get_option('qlcd_wp_chatbot_notifications')) {
|
|
3011
|
2928
|
update_option('qlcd_wp_chatbot_notifications', maybe_serialize(array('Welcome to WPBot')));
|
|
3012
|
2929
|
}
|
|
3013
|
2930
|
if(!get_option('support_query')) {
|
|
3014
|
|
- update_option('support_query', maybe_serialize(array('What are you?')));
|
|
2931
|
+ update_option('support_query', maybe_serialize(array('What is WPBot?')));
|
|
3015
|
2932
|
}
|
|
3016
|
2933
|
if(!get_option('support_ans')) {
|
|
3017
|
|
- update_option('support_ans', maybe_serialize(array('I am an Automated ChatBot to answer your questions. This is a sample Simple Text Response that can be edited or deleted.')));
|
|
2934
|
+ 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.')));
|
|
3018
|
2935
|
}
|
|
3019
|
2936
|
if(!get_option('qlcd_wp_chatbot_search_option')) {
|
|
3020
|
2937
|
update_option('qlcd_wp_chatbot_search_option', 'standard');
|
|
3021
|
2938
|
}
|
|
@@ -3479,9 +3396,8 @@ |
|
3479
|
3396
|
delete_option('wp_chat_user_font_family');
|
|
3480
|
3397
|
delete_option('wp_chat_bot_font_family');
|
|
3481
|
3398
|
delete_option('wp_chatbot_bot_font');
|
|
3482
|
3399
|
delete_option('wp_chatbot_user_font');
|
|
3483
|
|
- delete_option('qcld_chatbot_avatar_location');
|
|
3484
|
3400
|
set_transient( 'qcld_bot_clear_cache', 1, DAY_IN_SECONDS );
|
|
3485
|
3401
|
qcld_wb_chatboot_defualt_options();
|
|
3486
|
3402
|
$html='Reset all options to default successfully.';
|
|
3487
|
3403
|
wp_send_json($html);
|
|
@@ -3548,20 +3464,17 @@ |
|
3548
|
3464
|
|
|
3549
|
3465
|
|
|
3550
|
3466
|
|
|
3551
|
3467
|
<div class="wrap qcld-main-wrapper">
|
|
3552
|
|
-<div class="qcld-wp-chatbot-wrap-header">
|
|
3553
|
|
-
|
|
3554
|
|
- <div class="qcld-wp-chatbot-wrap-header-logo"><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>
|
|
3555
|
|
- <p><strong>Core Version:</strong> v<?php echo esc_html( QCLD_wpCHATBOT_VERSION ); ?></p>
|
|
3556
|
|
- </div>
|
|
3557
|
|
- <ul class="qcld-wp-chatbot-wrap-version-wrapper">
|
|
3558
|
|
- <li>
|
|
3559
|
|
- <a class="wpchatbot-Upgrade" href="https://www.wpbot.pro/" target="_blank">Upgrade To Pro</a>
|
|
3560
|
|
-
|
|
3561
|
|
- </li>
|
|
3562
|
|
- </ul>
|
|
3563
|
|
-</div>
|
|
3468
|
+ <div class="qcld-wp-chatbot-wrap-header">
|
|
3469
|
+ <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>
|
|
3470
|
+ <p><strong>Core Version:</strong> v<?php echo QCLD_wpCHATBOT_VERSION; ?></p>
|
|
3471
|
+ <ul class="qcld-wp-chatbot-wrap-version-wrapper">
|
|
3472
|
+ <li>
|
|
3473
|
+ <a class="wpchatbot-Upgrade" href="https://www.wpbot.pro/" target="_blank">Upgrade To Pro</a>
|
|
3474
|
+ </li>
|
|
3475
|
+ </ul>
|
|
3476
|
+ </div>
|
|
3564
|
3477
|
<div class="qcld-wrap swpm-admin-menu-wrap">
|
|
3565
|
3478
|
<div class="nav-tab-wrapper sld_nav_container wppt_nav_container qcld_help_wppt_nav_container">
|
|
3566
|
3479
|
<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>
|
|
3567
|
3480
|
<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>
|
|
@@ -3877,194 +3790,79 @@ |
|
3877
|
3790
|
<h3><?php esc_html_e('Note', 'chatbot'); ?></h3>
|
|
3878
|
3791
|
<p><?php esc_html_e('You could use <br> tag in Language Center & Dialogflow Responses for line break.', 'chatbot'); ?></p>
|
|
3879
|
3792
|
</div>
|
|
3880
|
3793
|
</div>
|
|
3881
|
|
-
|
|
3882
|
|
-
|
|
3883
|
|
-
|
|
3884
|
|
-
|
|
3885
|
|
-
|
|
3886
|
|
-
|
|
3887
|
|
-
|
|
3888
|
|
- <div class="panel panel-default">
|
|
3889
|
|
- <div class="panel-heading" role="tab" id="faqone">
|
|
3890
|
|
- <h4 class="panel-title">
|
|
3891
|
|
- <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>
|
|
3892
|
|
- </h4>
|
|
3893
|
|
- </div>
|
|
3894
|
|
- <div id="faqcollapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqone">
|
|
3895
|
|
- <div class="panel-body">
|
|
3896
|
|
- <?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'); ?>
|
|
3897
|
|
- </div>
|
|
3898
|
|
- </div>
|
|
3899
|
|
- </div>
|
|
3900
|
|
-
|
|
3901
|
|
-
|
|
3902
|
|
-
|
|
3903
|
|
-
|
|
3904
|
|
- <div class="panel panel-default">
|
|
3905
|
|
- <div class="panel-heading" role="tab" id="faqtwo">
|
|
3906
|
|
- <h4 class="panel-title">
|
|
3907
|
|
- <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>
|
|
3908
|
|
- </h4>
|
|
3909
|
|
- </div>
|
|
3910
|
|
- <div id="faqcollapsetwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqtwo">
|
|
3911
|
|
- <div class="panel-body">
|
|
3912
|
|
- <?php echo esc_html_e('To Debug: ', 'chatbot'); ?><br>
|
|
3913
|
|
- <?php echo esc_html_e(' 1. Make sure that you have created the Google Project and the Service account as an Owner', 'chatbot'); ?><br>
|
|
3914
|
|
- <?php echo esc_html_e('2. Make sure that you have connected to the correct Dialogflow agent', 'chatbot'); ?><br>
|
|
3915
|
|
- <?php echo esc_html_e('3. Follow the steps in this tutorial correctly: https://www.wpbot.pro/dialogflow-integration', 'chatbot'); ?><br>
|
|
3916
|
|
- <?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'); ?>
|
|
3917
|
|
- </div>
|
|
3918
|
|
- </div>
|
|
3919
|
|
- </div>
|
|
3920
|
|
-
|
|
3921
|
|
-
|
|
3922
|
|
- <div class="panel panel-default">
|
|
3923
|
|
- <div class="panel-heading" role="tab" id="faqthree">
|
|
3924
|
|
- <h4 class="panel-title">
|
|
3925
|
|
- <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
|
|
3926
|
|
-', 'chatbot'); ?> </a>
|
|
3927
|
|
- </h4>
|
|
3928
|
|
- </div>
|
|
3929
|
|
- <div id="faqcollapsethree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqthree">
|
|
3930
|
|
- <div class="panel-body">
|
|
3931
|
|
- <?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'); ?>
|
|
3932
|
|
- </div>
|
|
3933
|
|
- </div>
|
|
3934
|
|
- </div>
|
|
3935
|
|
-
|
|
3936
|
|
- <div class="panel panel-default">
|
|
3937
|
|
- <div class="panel-heading" role="tab" id="faqfour">
|
|
3938
|
|
- <h4 class="panel-title">
|
|
3939
|
|
- <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
|
|
3940
|
|
-', 'chatbot'); ?> </a>
|
|
3941
|
|
- </h4>
|
|
3942
|
|
- </div>
|
|
3943
|
|
- <div id="faqcollapsefour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqfour">
|
|
3944
|
|
- <div class="panel-body">
|
|
3945
|
|
- <?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'); ?>
|
|
3946
|
|
- </div>
|
|
3947
|
|
- </div>
|
|
3948
|
|
- </div>
|
|
3949
|
|
-
|
|
3950
|
|
-
|
|
3951
|
|
- <div class="panel panel-default">
|
|
3952
|
|
- <div class="panel-heading" role="tab" id="faqfive">
|
|
3953
|
|
- <h4 class="panel-title">
|
|
3954
|
|
- <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>
|
|
3955
|
|
- </h4>
|
|
3956
|
|
- </div>
|
|
3957
|
|
- <div id="faqcollapsefive" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqfive">
|
|
3958
|
|
- <div class="panel-body">
|
|
3959
|
|
- <?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'); ?>
|
|
3960
|
|
- </div>
|
|
3961
|
|
- </div>
|
|
3962
|
|
- </div>
|
|
3963
|
|
-
|
|
3964
|
|
-
|
|
3965
|
|
-
|
|
3966
|
|
- <div class="panel panel-default">
|
|
3967
|
|
- <div class="panel-heading" role="tab" id="faqsix">
|
|
3968
|
|
- <h4 class="panel-title">
|
|
3969
|
|
- <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>
|
|
3970
|
|
- </h4>
|
|
3971
|
|
- </div>
|
|
3972
|
|
- <div id="faqcollapsesix" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqsix">
|
|
3973
|
|
- <div class="panel-body">
|
|
3974
|
|
- <?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>
|
|
3975
|
|
- <?php echo esc_html_e('Also go to Simple Text Responses and press the Re-Index button.', 'chatbot'); ?><br>
|
|
3976
|
|
- <?php echo esc_html_e(' After that try purging any cache and test the chatbot in Incognito mode', 'chatbot'); ?><br>
|
|
3977
|
|
- <?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'); ?>
|
|
3978
|
|
- </div>
|
|
3979
|
|
- </div>
|
|
3980
|
|
- </div>
|
|
3981
|
|
-
|
|
3982
|
|
-
|
|
3983
|
|
- <div class="panel panel-default">
|
|
3984
|
|
- <div class="panel-heading" role="tab" id="faqseven">
|
|
3985
|
|
- <h4 class="panel-title">
|
|
3986
|
|
- <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>
|
|
3987
|
|
- </h4>
|
|
3988
|
|
- </div>
|
|
3989
|
|
- <div id="faqcollapseseven" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqseven">
|
|
3990
|
|
- <div class="panel-body">
|
|
3991
|
|
- <?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>
|
|
3992
|
|
- <?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>
|
|
3993
|
|
- <?php echo esc_html_e('Also go to Simple Text Responses and press the Re-Index button.', 'chatbot'); ?><br>
|
|
3994
|
|
- <?php echo esc_html_e('After that remember to test in a browser Incognito mode to avoid cache and cookies.', 'chatbot'); ?>
|
|
3995
|
|
- </div>
|
|
3996
|
|
- </div>
|
|
3997
|
|
- </div>
|
|
3998
|
|
-
|
|
3999
|
|
- <div class="panel panel-default">
|
|
4000
|
|
- <div class="panel-heading" role="tab" id="faqeight">
|
|
4001
|
|
- <h4 class="panel-title">
|
|
4002
|
|
- <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>
|
|
4003
|
|
- </h4>
|
|
4004
|
|
- </div>
|
|
4005
|
|
- <div id="faqcollapseeight" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqeight">
|
|
4006
|
|
- <div class="panel-body">
|
|
4007
|
|
- <?php echo esc_html_e('Please check the plugin`s Help Section for details on this', 'chatbot'); ?>
|
|
4008
|
|
- </div>
|
|
4009
|
|
- </div>
|
|
4010
|
|
- </div>
|
|
4011
|
|
-
|
|
4012
|
|
- <div class="panel panel-default">
|
|
4013
|
|
- <div class="panel-heading" role="tab" id="faqnine">
|
|
4014
|
|
- <h4 class="panel-title">
|
|
4015
|
|
- <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>
|
|
4016
|
|
- </h4>
|
|
4017
|
|
- </div>
|
|
4018
|
|
- <div id="faqcollapsenine" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqnine">
|
|
4019
|
|
- <div class="panel-body">
|
|
4020
|
|
- <?php echo esc_html_e('Please use the <br> tag for line breaks.', 'chatbot'); ?>
|
|
4021
|
|
- </div>
|
|
4022
|
|
- </div>
|
|
4023
|
|
- </div>
|
|
4024
|
|
-
|
|
4025
|
|
- <div class="panel panel-default">
|
|
4026
|
|
- <div class="panel-heading" role="tab" id="faqten">
|
|
4027
|
|
- <h4 class="panel-title">
|
|
4028
|
|
- <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>
|
|
4029
|
|
- </h4>
|
|
4030
|
|
- </div>
|
|
4031
|
|
- <div id="faqcollapseten" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqten">
|
|
4032
|
|
- <div class="panel-body">
|
|
4033
|
|
- <?php echo esc_html_e('Yes, common HTML tags link link href, strong, br etc. are supported.', 'chatbot'); ?>
|
|
4034
|
|
- </div>
|
|
4035
|
|
- </div>
|
|
4036
|
|
- </div>
|
|
4037
|
|
-
|
|
4038
|
|
- <div class="panel panel-default">
|
|
4039
|
|
- <div class="panel-heading" role="tab" id="faqeleven">
|
|
4040
|
|
- <h4 class="panel-title">
|
|
4041
|
|
- <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>
|
|
4042
|
|
- </h4>
|
|
4043
|
|
- </div>
|
|
4044
|
|
- <div id="faqcollapseeleven" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqeleven">
|
|
4045
|
|
- <div class="panel-body">
|
|
4046
|
|
- <?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'); ?>
|
|
4047
|
|
- </div>
|
|
4048
|
|
- </div>
|
|
4049
|
|
- </div>
|
|
4050
|
|
-
|
|
4051
|
|
-
|
|
4052
|
|
- <div class="panel panel-default">
|
|
4053
|
|
- <div class="panel-heading" role="tab" id="faqtwelve">
|
|
4054
|
|
- <h4 class="panel-title">
|
|
4055
|
|
- <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>
|
|
4056
|
|
- </h4>
|
|
4057
|
|
- </div>
|
|
4058
|
|
- <div id="faqcollapsetwelve" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqtwelve">
|
|
4059
|
|
- <div class="panel-body">
|
|
4060
|
|
- <?php echo esc_html_e('You can disable predefined intents FAQ, eMail, Call me from WPBot Lite > Settings page`s Start Menu Section.', 'chatbot'); ?>
|
|
4061
|
|
- </div>
|
|
4062
|
|
- </div>
|
|
4063
|
|
- </div>
|
|
4064
|
|
-
|
|
4065
|
|
-
|
|
4066
|
|
-
|
|
3794
|
+ <div class="content form-container qcbot_help_secion">
|
|
3795
|
+ <h3><?php esc_html_e('Problem: I changed language and/or some settings but do not see the changes.', 'chatbot'); ?></h3>
|
|
3796
|
+ <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>
|
|
3797
|
+ </div>
|
|
3798
|
+ <div class="content form-container qcbot_help_secion">
|
|
3799
|
+ <h3><?php esc_html_e('Problem: I cannot connect to the DialogFlow', 'chatbot'); ?></h3>
|
|
3800
|
+ <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>
|
|
3801
|
+ <?php esc_html_e('2. Make sure that you have connected to the correct Dialogflow agent', 'chatbot'); ?><br>
|
|
3802
|
+ <?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>
|
|
3803
|
+ <?php esc_html_e(' 4. Make sure that the Google Client Package is Installed on Your Website.<br>
|
|
3804
|
+ 5. For DialogFlow agent region, try choosing any region other than the EU region which has known issues.<br>
|
|
3805
|
+ 6. Make sure to download and import the sample DialogFlow agent to your agent<br>
|
|
3806
|
+ 7. Test the ChatBot in the browser Incognito mode', 'chatbot'); ?>
|
|
3807
|
+ </p>
|
|
3808
|
+ </div>
|
|
3809
|
+ <div class="content form-container qcbot_help_secion" >
|
|
3810
|
+ <h3><?php esc_html_e('Problem: I am not getting emails from the ChatBot', 'chatbot'); ?></h3>
|
|
3811
|
+ <p>
|
|
3812
|
+ <?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'); ?>
|
|
3813
|
+ </p>
|
|
3814
|
+ </div>
|
|
3815
|
+ <div class="content form-container qcbot_help_secion" >
|
|
3816
|
+ <h3><?php esc_html_e('Problem: Simple text responses are not working or getting an error', 'chatbot'); ?></h3>
|
|
3817
|
+ <p>
|
|
3818
|
+ <?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'); ?>
|
|
3819
|
+ </p>
|
|
3820
|
+ </div>
|
|
3821
|
+ <div class="content form-container qcbot_help_secion">
|
|
3822
|
+ <h3><?php esc_html_e('Problem: I changed language or some other settings but do not see them when testing', 'chatbot'); ?></h3>
|
|
3823
|
+ <p>
|
|
3824
|
+ <?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'); ?>
|
|
3825
|
+ </p>
|
|
3826
|
+ </div>
|
|
3827
|
+ <div class="content form-container qcbot_help_secion">
|
|
3828
|
+ <h3><?php esc_html_e('Problem: The ChatBot is NOT working in the front end.', 'chatbot'); ?></h3>
|
|
3829
|
+ <p>
|
|
3830
|
+ <?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>
|
|
3831
|
+ <?php esc_html_e(' Also go to Simple Text Responses and press the Re-Index button.', 'chatbot'); ?></br>
|
|
3832
|
+ <?php esc_html_e(' After that try purging any cache and test the chatbot in Incognito mode', 'chatbot'); ?><br>
|
|
3833
|
+ <?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'); ?>
|
|
3834
|
+ </p>
|
|
3835
|
+ </div>
|
|
3836
|
+ <div class="content form-container qcbot_help_secion">
|
|
3837
|
+ <h3><?php esc_html_e('Problem: The ChatBot is stuck on typing or loading', 'chatbot'); ?></h3>
|
|
3838
|
+ <p>
|
|
3839
|
+ <?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>
|
|
3840
|
+ <?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>
|
|
3841
|
+ <?php esc_html_e('Also go to Simple Text Responses and press the Re-Index button.', 'chatbot'); ?></br>
|
|
3842
|
+ <?php esc_html_e('After that remember to test in a browser Incognito mode to avoid cache and cookies.', 'chatbot'); ?>
|
|
3843
|
+ </p>
|
|
3844
|
+ </div>
|
|
3845
|
+ <div class="content form-container qcbot_help_secion">
|
|
3846
|
+ <h3><?php esc_html_e('Problem: How do I add new conversations to the ChatBot?', 'chatbot'); ?></h3>
|
|
3847
|
+ <p><?php esc_html_e('Please check the plugin`s Help Section for details on this', 'chatbot'); ?></p>
|
|
3848
|
+ </div>
|
|
3849
|
+ <div class="content form-container qcbot_help_secion" >
|
|
3850
|
+ <h3><?php esc_html_e('Problem: How do I add Line Breaks?', 'chatbot'); ?></h3>
|
|
3851
|
+ <p><?php esc_html_e('Please use the <br> tag for line breaks.', 'chatbot'); ?></p>
|
|
3852
|
+ </div>
|
|
3853
|
+ <div class="content form-container qcbot_help_secion">
|
|
3854
|
+ <h3><?php esc_html_e('Problem: Are HTML tags supported?', 'chatbot'); ?> </h3>
|
|
3855
|
+ <p><?php esc_html_e('Yes, common HTML tags link link href, strong, br etc. are supported.', 'chatbot'); ?></p>
|
|
3856
|
+ </div>
|
|
3857
|
+ <div class="content form-container qcbot_help_secion">
|
|
3858
|
+ <h3><?php esc_html_e('Problem: I want to add images, GIFs, Videos', 'chatbot'); ?></h3>
|
|
3859
|
+ <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>
|
|
3860
|
+ </div>
|
|
3861
|
+ <div class="content form-container qcbot_help_secion">
|
|
3862
|
+ <h3><?php esc_html_e('How to disable Predefined Intent?', 'chatbot'); ?></h3>
|
|
3863
|
+ <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>
|
|
3864
|
+ </div>
|
|
4067
|
3865
|
</div>
|
|
4068
|
3866
|
</div>
|
|
4069
|
3867
|
</div>
|
|
4070
|
3868
|
</div>
|
|
@@ -4153,17 +3951,17 @@ |
|
4153
|
3951
|
if(!get_option('qlcd_wp_chatbot_did_you_mean')) {
|
|
4154
|
3952
|
update_option('qlcd_wp_chatbot_did_you_mean', maybe_serialize(array('Did you mean?')));
|
|
4155
|
3953
|
}
|
|
4156
|
3954
|
|
|
4157
|
|
- $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
|
|
3955
|
+ $sqlqry = $wpdb->get_results( $wpdb->prepare( "select * from $table1 where id = %d", 1 ) ); //DB Call OK, No Caching OK
|
|
4158
|
3956
|
if(empty($sqlqry)){
|
|
4159
|
3957
|
|
|
4160
|
|
- $query = 'What are you?';
|
|
4161
|
|
- $response = 'I am an Automated ChatBot to answer your questions. This is a sample Simple Text Response that can be edited or deleted.';
|
|
3958
|
+ $query = 'What Can WPBot do for you?';
|
|
3959
|
+ $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!';
|
|
4162
|
3960
|
|
|
4163
|
3961
|
$data = array('query' => $query, 'keyword' => '', 'response'=> $response, 'intent'=> '');
|
|
4164
|
3962
|
$format = array('%s','%s', '%s', '%s');
|
|
4165
|
|
- $wpdb->insert($table1,$data,$format); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, PluginCheck.Security.DirectDB.UnescapedDBParameter
|
|
3963
|
+ $wpdb->insert($table1,$data,$format); //DB Call OK, No Caching OK
|
|
4166
|
3964
|
}
|
|
4167
|
3965
|
|
|
4168
|
3966
|
update_option('qc_wpb_simple_response_db_upgrade_free2', 'done');
|
|
4169
|
3967
|
|
|
@@ -4205,15 +4003,15 @@ |
|
4205
|
4003
|
$table = $wpdb->prefix.'wpbot_response';
|
|
4206
|
4004
|
$data = array('query' => $query, 'keyword' => $keyword, 'response'=> $response, 'intent'=> $intent, 'category'=> $category);
|
|
4207
|
4005
|
$format = array('%s','%s', '%s', '%s', '%s');
|
|
4208
|
4006
|
|
|
4209
|
|
- if(isset($_POST['qc_bot_str_id']) && wp_unslash($_POST['qc_bot_str_id'])!=''){
|
|
4210
|
|
- $id = sanitize_text_field(wp_unslash($_POST['qc_bot_str_id']));
|
|
4007
|
+ if(isset($_POST['qc_bot_str_id']) && $_POST['qc_bot_str_id']!=''){
|
|
4008
|
+ $id = sanitize_text_field($_POST['qc_bot_str_id']);
|
|
4211
|
4009
|
$where = array('id'=>$id);
|
|
4212
|
4010
|
$whereformat = array('%d');
|
|
4213
|
|
- $wpdb->update( $table, $data, $where, $format, $whereformat ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
|
|
4011
|
+ $wpdb->update( $table, $data, $where, $format, $whereformat ); //DB Call OK, No Caching OK
|
|
4214
|
4012
|
}else{
|
|
4215
|
|
- $wpdb->insert($table,$data,$format); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery
|
|
4013
|
+ $wpdb->insert($table,$data,$format); //DB Call OK, No Caching OK
|
|
4216
|
4014
|
}
|
|
4217
|
4015
|
|
|
4218
|
4016
|
qcld_mysql_remove_existing_indexes();
|
|
4219
|
4017
|
|
|
@@ -4219,9 +4017,9 @@ |
|
4219
|
4017
|
|
|
4220
|
4018
|
// phpcs:ignore
|
|
4221
|
4019
|
$wpdb->query("ALTER TABLE $table ADD FULLTEXT(`query`, `keyword`, `response`)");
|
|
4222
|
4020
|
|
|
4223
|
|
- wp_safe_redirect(admin_url('admin.php?page=simple-text-response'));exit;
|
|
4021
|
+ wp_redirect(admin_url('admin.php?page=simple-text-response'));exit;
|
|
4224
|
4022
|
|
|
4225
|
4023
|
}
|
|
4226
|
4024
|
$table = $wpdb->prefix.'wpbot_response';
|
|
4227
|
4025
|
|
|
@@ -4234,19 +4032,19 @@ |
|
4234
|
4032
|
|
|
4235
|
4033
|
add_action('admin_notices', 'general_admin_notice_str' );
|
|
4236
|
4034
|
|
|
4237
|
4035
|
}
|
|
4238
|
|
- if(isset($_POST['qc_bot_str_weight']) && wp_unslash($_POST['qc_bot_str_weight'])!=''){
|
|
4239
|
|
- $weight = sanitize_text_field(wp_unslash($_POST['qc_bot_str_weight']));
|
|
4036
|
+ if(isset($_POST['qc_bot_str_weight']) && $_POST['qc_bot_str_weight']!=''){
|
|
4037
|
+ $weight = sanitize_text_field($_POST['qc_bot_str_weight']);
|
|
4240
|
4038
|
update_option('qc_bot_str_weight', $weight);
|
|
4241
|
4039
|
}
|
|
4242
|
|
- if(isset($_POST['qc_bot_str_remove_stopwords']) && wp_unslash($_POST['qc_bot_str_remove_stopwords'])!=''){
|
|
4040
|
+ if(isset($_POST['qc_bot_str_remove_stopwords']) && $_POST['qc_bot_str_remove_stopwords']!=''){
|
|
4243
|
4041
|
|
|
4244
|
|
- $stopwords = sanitize_text_field(wp_unslash($_POST['qc_bot_str_remove_stopwords']));
|
|
4042
|
+ $stopwords = sanitize_text_field($_POST['qc_bot_str_remove_stopwords']);
|
|
4245
|
4043
|
update_option('qc_bot_str_remove_stopwords', '1');
|
|
4246
|
4044
|
}
|
|
4247
|
|
- if ( isset($_POST['qc_bot_str_allow_author_editor']) && wp_unslash($_POST['qc_bot_str_allow_author_editor']) != '' ) {
|
|
4248
|
|
- $qc_bot_str_allow_author_editor = sanitize_text_field(wp_unslash($_POST['qc_bot_str_allow_author_editor']));
|
|
4045
|
+ if ( isset( $_POST['qc_bot_str_allow_author_editor'] ) && $_POST['qc_bot_str_allow_author_editor'] != '' ) {
|
|
4046
|
+ $qc_bot_str_allow_author_editor = sanitize_text_field( $_POST['qc_bot_str_allow_author_editor'] );
|
|
4249
|
4047
|
update_option( 'qc_bot_str_allow_author_editor', $qc_bot_str_allow_author_editor );
|
|
4250
|
4048
|
} else {
|
|
4251
|
4049
|
delete_option( 'qc_bot_str_allow_author_editor' );
|
|
4252
|
4050
|
}
|
|
@@ -4251,28 +4049,16 @@ |
|
4251
|
4049
|
delete_option( 'qc_bot_str_allow_author_editor' );
|
|
4252
|
4050
|
}
|
|
4253
|
4051
|
if(isset($_POST['qc_bot_str_fields']) && !empty($_POST['qc_bot_str_fields'])){
|
|
4254
|
4052
|
$table = $wpdb->prefix.'wpbot_response';
|
|
4255
|
|
- $fields = rest_sanitize_array(wp_unslash($_POST['qc_bot_str_fields']));
|
|
4256
|
|
-
|
|
4257
|
|
- $allowed_fields = array('query', 'keyword', 'response');
|
|
4258
|
|
- $valid_fields = array();
|
|
4259
|
|
- if(is_array($fields)){
|
|
4260
|
|
- foreach($fields as $field){
|
|
4261
|
|
- if(in_array($field, $allowed_fields)){
|
|
4262
|
|
- $valid_fields[] = $field;
|
|
4263
|
|
- }
|
|
4264
|
|
- }
|
|
4265
|
|
- }
|
|
4266
|
|
- $fields = $valid_fields;
|
|
4267
|
|
-
|
|
4053
|
+ $fields = rest_sanitize_array($_POST['qc_bot_str_fields']);
|
|
4268
|
4054
|
update_option('qc_bot_str_fields', $fields);
|
|
4269
|
4055
|
qcld_mysql_remove_existing_indexes();
|
|
4270
|
4056
|
|
|
4271
|
4057
|
if($fields && !empty($fields)){
|
|
4272
|
|
- $safe_fields = array_map(function($f) { return '`' . $f . '`'; }, $fields);
|
|
4058
|
+
|
|
4273
|
4059
|
// phpcs:ignore
|
|
4274
|
|
- $wpdb->query("ALTER TABLE $table ADD FULLTEXT(".implode(', ', $safe_fields).")");
|
|
4060
|
+ $wpdb->query("ALTER TABLE $table ADD FULLTEXT(".implode(', ', $fields).")");
|
|
4275
|
4061
|
|
|
4276
|
4062
|
}
|
|
4277
|
4063
|
}
|
|
4278
|
4064
|
|
|
@@ -4296,9 +4082,9 @@ |
|
4296
|
4082
|
if( !function_exists('qcld_wpbot_simple_response_intent') ){
|
|
4297
|
4083
|
function qcld_wpbot_simple_response_intent(){
|
|
4298
|
4084
|
global $wpdb;
|
|
4299
|
4085
|
$table = $wpdb->prefix.'wpbot_response';
|
|
4300
|
|
- $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
|
|
4086
|
+ $results = $wpdb->get_results("SELECT `intent` FROM `$table` WHERE 1 and `intent` !=''"); //DB Call OK, No Caching OK
|
|
4301
|
4087
|
$response = array();
|
|
4302
|
4088
|
if(!empty($results)){
|
|
4303
|
4089
|
foreach($results as $result){
|
|
4304
|
4090
|
$response[] = $result->intent;
|
|
@@ -4311,9 +4097,9 @@ |
|
4311
|
4097
|
function qcld_mysql_remove_existing_indexes(){
|
|
4312
|
4098
|
global $wpdb;
|
|
4313
|
4099
|
$table = $wpdb->prefix.'wpbot_response';
|
|
4314
|
4100
|
|
|
4315
|
|
- $results = $wpdb->get_results("SHOW INDEX FROM {$table}"); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter
|
|
4101
|
+ $results = $wpdb->get_results("SHOW INDEX FROM $table"); //DB Call OK, No Caching OK
|
|
4316
|
4102
|
$indexes = array();
|
|
4317
|
4103
|
foreach($results as $result){
|
|
4318
|
4104
|
|
|
4319
|
4105
|
|