PluginProbe
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services / 6.8.5
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services v6.8.5
8.7.9 8.7.8 8.7.7 8.7.6 8.7.5 8.7.4 8.7.3 8.7.2 8.7.1 8.7.0 8.6.9 8.6.8 8.6.7 8.6.6 8.6.5 8.6.4 8.6.2 8.6.1 8.6.0 8.5.9 8.5.8 8.5.7 8.5.6 8.5.5 8.5.4 All 535 releases
← All changes | qcld-wpwbot.php +772 -1502 8.5.56.8.5 View file →
@@ -1,95 +1,41 @@
1 1 <?php
2 2 /**
3 - * Plugin Name: AI ChatBot - WPBot
3 + * Plugin Name: WPBot ChatBot for WordPress for Live Support and Lead Generation
4 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.5.5
7 + * Version: 6.8.5
8 8 * @author QuantumCloud
9 9 * Author: ChatBot for WordPress - WPBot
10 10 * Author URI: https://www.wpbot.pro/
11 11 * Requires at least: 4.6
12 - * Tested up to: 7.0
13 - * Text Domain: chatbot
14 - * Domain Path: /languages
12 + * Tested up to: 6.8
13 + * Text Domain: wpbot
14 + * Domain Path: /lang
15 15 * License: GPL2
16 16 */
17 17
18 18
19 19
20 -if (!defined('ABSPATH')) exit; // Exit if accessed directly.
21 -
22 -
23 -// Abort execution if Pro version is active to prevent conflicts
24 -if ( ! function_exists( 'is_plugin_active' ) ) {
25 - require_once ABSPATH . 'wp-admin/includes/plugin.php';
26 -}
27 -
28 -$active_plugins = (array) get_option( 'active_plugins', array() );
29 -if ( is_multisite() ) {
30 - $active_plugins = array_merge( $active_plugins, array_keys( (array) get_site_option( 'active_sitewide_plugins', array() ) ) );
31 -}
32 -
33 -$current_plugin = plugin_basename( __FILE__ );
34 -
35 -foreach ( $active_plugins as $plugin ) {
36 - if ( $plugin !== $current_plugin && basename( $plugin ) === 'qcld-wpwbot.php' ) {
37 - return;
38 - }
39 -}
40 -
41 -// Also abort if we are currently activating the Pro plugin
42 -if ( isset($_REQUEST['action']) ) {
43 - 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 ) ) ) {
44 - return;
45 - }
46 - 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']) ) ) {
47 - return;
48 - }
49 -}
50 -
51 -if ( ! defined( 'QCLD_wpCHATBOT_VERSION' ) ) {
52 - define('QCLD_wpCHATBOT_VERSION', '8.5.5');
53 -}
54 -if ( ! defined( 'QCLD_wpCHATBOT_REQUIRED_wpCOMMERCE_VERSION' ) ) {
55 - define('QCLD_wpCHATBOT_REQUIRED_wpCOMMERCE_VERSION', 2.2);
56 -}
57 -if ( ! defined( 'QCLD_wpCHATBOT_PLUGIN_DIR_PATH' ) ) {
58 - define('QCLD_wpCHATBOT_PLUGIN_DIR_PATH', plugin_dir_path(__FILE__));
59 -}
60 -if ( ! defined( 'QCLD_wpCHATBOT_PLUGIN_URL' ) ) {
61 - define('QCLD_wpCHATBOT_PLUGIN_URL', plugin_dir_url(__FILE__));
62 -}
63 -if ( ! defined( 'QCLD_wpCHATBOT_IMG_URL' ) ) {
64 - define('QCLD_wpCHATBOT_IMG_URL', QCLD_wpCHATBOT_PLUGIN_URL . "images/");
65 -}
66 -if ( ! defined( 'QCLD_wpCHATBOT_IMG_ABSOLUTE_PATH' ) ) {
67 - define('QCLD_wpCHATBOT_IMG_ABSOLUTE_PATH', plugin_dir_path(__FILE__) . "images");
68 -}
69 -if ( ! defined( 'QCLD_wpCHATBOT_INDEX_TABLE' ) ) {
70 - define('QCLD_wpCHATBOT_INDEX_TABLE', 'wpwbot_index');
71 -}
72 -
73 -
74 -
20 +if (!defined('ABSPATH')) exit; // Exit if accessed directly
21 +define('QCLD_wpCHATBOT_VERSION', '6.8.5');
22 +define('QCLD_wpCHATBOT_REQUIRED_wpCOMMERCE_VERSION', 2.2);
23 +define('QCLD_wpCHATBOT_PLUGIN_DIR_PATH', plugin_dir_path(__FILE__));
24 +define('QCLD_wpCHATBOT_PLUGIN_URL', plugin_dir_url(__FILE__));
25 +define('QCLD_wpCHATBOT_IMG_URL', QCLD_wpCHATBOT_PLUGIN_URL . "images/");
26 +define('QCLD_wpCHATBOT_IMG_ABSOLUTE_PATH', plugin_dir_path(__FILE__) . "images");
27 +define('QCLD_wpCHATBOT_INDEX_TABLE', 'wpwbot_index');
75 28 //define('QCLD_wpCHATBOT_CACHE_TABLE', 'wpwbot_cache');
76 29
77 -if ( ! defined( 'QCLD_wpCHATBOT_GC_DIRNAME' ) ) {
78 - $gcdirpath = __DIR__.'/../../wpbot-dfv2-client';
79 - define('QCLD_wpCHATBOT_GC_DIRNAME', $gcdirpath);
80 -}
81 -if ( ! defined( 'QCLD_wpCHATBOT_GC_ROOT' ) ) {
82 - $wpcontentpath = __DIR__.'/../../';
83 - define('QCLD_wpCHATBOT_GC_ROOT', $wpcontentpath);
84 -}
30 +$gcdirpath = __DIR__.'/../../wpbot-dfv2-client';
31 +define('QCLD_wpCHATBOT_GC_DIRNAME', $gcdirpath);
32 +$wpcontentpath = __DIR__.'/../../';
33 +define('QCLD_wpCHATBOT_GC_ROOT', $wpcontentpath);
85 34
86 35 require_once("qcld-wpwbot-search.php");
87 -require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/class-qcld-bot-rag.php");
88 36 require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/integration/openai/qcld-bot-openai.php");
89 37 require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/integration/openrouter/qcld-bot-openrouter.php");
90 -require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/integration/gemini/qcld-bot-gemini.php");
91 -require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/integration/grok/qcld-bot-grok.php");
92 38 require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."class-qc-free-plugin-upgrade-notice.php");
93 39 require_once("class-plugin-deactivate-feedback.php");
94 40 require_once("qc-support-promo-page/class-qc-support-promo-page.php");
95 41 require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."/functions.php");
@@ -94,9 +40,8 @@
94 40 require_once("qc-support-promo-page/class-qc-support-promo-page.php");
95 41 require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."/functions.php");
96 42 require_once('qcld_df_api.php');
97 43 require_once('includes/class-wpbot-gc-download.php');
98 -require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/class-common-function.php");
99 44 require_once('includes/class-response-list.php');
100 45 require_once('qc-rating-feature/qc-rating-class.php');
101 46 // if ( is_admin() ) {
102 47 // require_once( QCLD_wpCHATBOT_PLUGIN_DIR_PATH . '/inc/parsedown.php' );
@@ -103,17 +48,13 @@
103 48 // require_once( QCLD_wpCHATBOT_PLUGIN_DIR_PATH . '/inc/qcld-floating-openai-style-filter.php' );
104 49 // require_once( QCLD_wpCHATBOT_PLUGIN_DIR_PATH . '/inc/qcld_openai_floating_content.php' );
105 50 // }
106 51
107 -// Built-in Chat Sessions & Analytics module.
108 -// Defers to the Pro addon automatically when it's active.
109 -require_once( QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/chat-sessions/wpbot-chat-sessions.php' );
110 -
111 52 /**
112 53 * Main Class.
113 54 */
114 55
115 -class qcld_wb_Chatbot_free
56 +class qcld_wb_Chatbot
116 57 {
117 58 private $id = 'wpbot';
118 59 private static $instance;
119 60 public $mysql_version = '';
@@ -135,9 +76,9 @@
135 76 * Construct empty on purpose
136 77 */
137 78 private function __construct()
138 79 {
139 - $this->promotion = QCLD_wpCHATBOT_IMG_URL . "/NY-26-wpbot.jpg";
80 + $this->promotion = QCLD_wpCHATBOT_IMG_URL . "/july4th.jpg";
140 81 }
141 82 /**
142 83 * Init behaves like, and replaces, construct
143 84 */
@@ -153,14 +94,12 @@
153 94 if ((!empty($_GET["page"])) && ($_GET["page"] == "wpbot")) {
154 95 add_action('admin_init', array($this, 'qcld_wb_chatbot_save_options'));
155 96
156 97 }
157 -
158 - 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') ){
159 - // add_action( 'admin_notices', array( $this, 'promotion_notice' ) );
160 -
161 - }
162 -
98 + // 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') ){
99 +
100 + // add_action( 'admin_notices', array( $this, 'promotion_notice' ) );
101 + // }
163 102 if (is_admin() && !empty($_GET["page"]) && ($_GET["page"] == "wpbot") || (!empty($_GET['page']) && $_GET['page']=='wpbot_help_page')
164 103
165 104 || (!empty($_GET['page']) && $_GET['page']=='wpbot_openAi')
166 105
@@ -238,31 +177,27 @@
238 177 */
239 178 public function qcld_wb_chatbot_admin_menu()
240 179 {
241 180 /* add_submenu_page('wpcommerce',
242 - __('wpwBot Pro', 'chatbot'),
243 - __('wpwBot Pro', 'chatbot'),
181 + __('wpwBot Pro', 'wpchatbot'),
182 + __('wpwBot Pro', 'wpchatbot'),
244 183 'manage_wpcommerce',
245 184 $this->id,
246 185 array($this, 'qcld_wb_chatbot_admin_page'));*/
247 - if( get_option( 'qc_bot_str_allow_author_editor' ) == 1 ){
248 - $capability = 'publish_posts';
249 - }else{
250 - $capability = 'manage_options';
251 - }
252 - 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 );
186 +
187 + 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 );
253 188
254 189 add_submenu_page( 'wpbot-panel', esc_html('Settings'), esc_html('Settings'), 'manage_options','wpbot', array($this, 'qcld_wb_chatbot_admin_page_settings') );
255 190
256 - add_submenu_page( 'wpbot-panel', esc_html('AI Settings'), esc_html('AI Settings'), 'manage_options','wpbot_openAi', 'wpbot_openAi_setting_func' );
191 + add_submenu_page( 'wpbot-panel', esc_html('OpenAI Settings'), esc_html('AI Settings'), 'manage_options','wpbot_openAi', 'wpbot_openAi_setting_func' );
257 192
258 - $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') );
193 + $hook = add_submenu_page( 'wpbot-panel', esc_html('Simple Text Responses'), esc_html('Simple Text Responses'), 'manage_options','simple-text-response', array($this, 'qcld_wb_chatbot_admin_str') );
259 194
260 195 add_action( "load-$hook", [ $this, 'screen_option' ] );
261 196
262 197 // add_submenu_page( 'wpbot-panel', esc_html('Conversational Form '), esc_html('Conversational Form'), 'manage_options','wpbots', [$this, 'qcld_wb_chatbot_admin_conversational_settings'] );
263 198
264 - 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' );
199 + add_submenu_page( 'wpbot-panel', esc_html('Support'), esc_html('Support'), 'manage_options','wpbot_support_page', 'qcpromo_wpbot_free_support_page_callback_func' );
265 200
266 201 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' );
267 202
268 203
@@ -268,9 +203,9 @@
268 203
269 204 }
270 205
271 206 function screen_option(){
272 - if( isset($_POST['wp_screen_options']) && !empty($_POST['wp_screen_options'])){
207 + if( !empty($_POST['wp_screen_options'])){
273 208 $per_page_str = (int)$_POST['wp_screen_options']["value"];
274 209
275 210 }else{
276 211 $per_page_str = 20;
@@ -300,9 +235,9 @@
300 235 {
301 236 global $wpcommerce, $wp_scripts;
302 237 $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
303 238
304 - if (((!empty($_GET["page"])) && ($_GET["page"] == "wpbot")) || ($hook == "widgets.php") || $_GET['page']=='wpbot_help_page' || $_GET['page']=='wpbot_openAi' || $_GET['page']=='simple-text-response'
239 + if (((!empty($_GET["page"])) && ($_GET["page"] == "wpbot")) || ($hook == "widgets.php") || $_GET['page']=='wpbot_help_page' || $_GET['page']=='wpbot_openAi'
305 240 || $_GET['page']=='wpbot-panel' || $_GET["page"] == "wbcs-botsessions-page" ) {
306 241
307 242 wp_enqueue_script('jquery');
308 243 //wp_enqueue_style('wpcommerce_admin_styles', $wpcommerce->plugin_url() . '/assets/css/admin.css');
@@ -308,8 +243,11 @@
308 243 //wp_enqueue_style('wpcommerce_admin_styles', $wpcommerce->plugin_url() . '/assets/css/admin.css');
309 244
310 245 wp_register_style('qlcd-wp-chatbot-admin-style', plugins_url(basename(plugin_dir_path(__FILE__)) . '/css/admin-style.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen');
311 246 wp_enqueue_style('qlcd-wp-chatbot-admin-style');
247 +
248 + wp_register_style('qlcd-wp-chatbot-font-awesome', plugins_url(basename(plugin_dir_path(__FILE__)) . '/css/font-awesome.min.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen');
249 + wp_enqueue_style('qlcd-wp-chatbot-font-awesome');
312 250 wp_register_style('qlcd-wp-chatbot-tabs-style', plugins_url(basename(plugin_dir_path(__FILE__)) . '/css/wp-chatbot-tabs.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen');
313 251 wp_enqueue_style('qlcd-wp-chatbot-tabs-style');
314 252 wp_register_style('jquery.fontpicker.min.css', QCLD_wpCHATBOT_PLUGIN_URL . 'css/fontpicker.min.css', '', QCLD_wpCHATBOT_VERSION, 'screen');
315 253 wp_enqueue_style('jquery.fontpicker.min.css');
@@ -351,27 +289,26 @@
351 289 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');
352 290 wp_enqueue_style('qcld-wp-chatbot-timepicker-css');
353 291 wp_register_script('qcld-wp-chatbot-sweetalrt', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/sweetalrt.js', basename(__FILE__)), array(), true);
354 292 wp_enqueue_script('qcld-wp-chatbot-sweetalrt');
355 - 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);
293 + 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);
356 294 wp_enqueue_script('qcld-wp-chatbot-admin-js');
357 - wp_localize_script('qcld-wp-chatbot-admin-js', 'qcld_gemini_admin_data',
295 + wp_localize_script('qcld-wp-chatbot-admin-js', 'ajax_object',
358 296 array('ajax_url' => admin_url('admin-ajax.php'),'ajax_nonce' => wp_create_nonce('wp_chatbot'),'image_path' => QCLD_wpCHATBOT_IMG_URL));
359 297 // WordPress Media library
360 298 wp_enqueue_media();
361 299
300 +
362 301
363 -
364 302 }
365 -
366 303 }
367 304
368 305
369 - public function qcld_get_formbuilder_forms(){
306 + public function qc_get_formbuilder_forms(){
370 307 global $wpdb;
371 308 $forms = array();
372 309 if(class_exists('Qcformbuilder_Forms_Admin')){
373 - $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
310 + $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ". $wpdb->prefix."wfb_forms WHERE type=%s", 'primary')); //DB Call OK, No Caching OK
374 311 if(!empty($results)){
375 312 foreach($results as $result){
376 313 $form = maybe_unserialize($result->config);
377 314 $forms[] = trim($form['name']);
@@ -383,12 +320,12 @@
383 320 }else{
384 321 return array();
385 322 }
386 323 }
387 - public function qcld_wpbot_simple_response_intent(){
324 + public function qc_wpbot_simple_response_intent(){
388 325 global $wpdb;
389 326 $table = $wpdb->prefix.'wpbot_response';
390 - $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
327 + $results = $wpdb->get_results("SELECT `intent` FROM `$table` WHERE 1 and `intent` !=''"); //DB Call OK, No Caching OK
391 328 $response = array();
392 329 if(!empty($results)){
393 330 foreach($results as $result){
394 331 $response[] = $result->intent;
@@ -395,14 +332,14 @@
395 332 }
396 333 }
397 334 return $response;
398 335 }
399 - public function qcld_get_formbuilder_form_commands(){
336 + public function qc_get_formbuilder_form_commands(){
400 337 global $wpdb;
401 338 $command = array();
402 339 if(class_exists('Qcformbuilder_Forms_Admin')){
403 340 $primary = 'primary';
404 - $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
341 + $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ". $wpdb->prefix."wfb_forms WHERE type = %s", $primary)); //DB Call OK, No Caching OK
405 342
406 343 if(!empty($results)){
407 344 foreach($results as $result){
408 345 $form = maybe_unserialize($result->config);
@@ -424,13 +361,13 @@
424 361 $screen = get_current_screen();
425 362 // var_dump($screen->base );
426 363 // if( isset($screen->base) && (( $screen->base == 'wpbot-lite_page_wpbot') || ( $screen->base == 'toplevel_page_wpbot-panel"'))){
427 364 ?>
428 - <div id="promotion-wpchatbot" data-dismiss-type="qcbot-feedback-notice" class="notice is-dismissible qcbot-feedback" style="background: #120976 !important">
365 + <div id="promotion-wpchatbot" data-dismiss-type="qcbot-feedback-notice" class="notice is-dismissible qcbot-feedback" style="background: #5c62b6 !important">
429 366 <div class="">
430 367
431 368 <div class="qc-review-text" >
432 - <a href="<?php echo esc_url('https://www.wpbot.pro/pricing/'); ?>" target="_blank">
369 + <a href="https://www.wpbot.pro/pricing/" target="_blank">
433 370 <img src="<?php echo esc_url($this->promotion); ?>" alt="promotion" style="position: flex !important;"></a>
434 371 </div>
435 372 </div>
436 373 </div>
@@ -436,13 +373,13 @@
436 373 </div>
437 374 <?php
438 375 // }
439 376 }
440 - public function qcld_get_formbuilder_form_ids(){
377 + public function qc_get_formbuilder_form_ids(){
441 378 global $wpdb;
442 379 $forms = array();
443 380 if(class_exists('Qcformbuilder_Forms_Admin')){
444 - $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
381 + $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ". $wpdb->prefix."wfb_forms WHERE type=%s", 'primary')); //DB Call OK, No Caching OK
445 382
446 383 if(!empty($results)){
447 384 foreach($results as $result){
448 385 $form = maybe_unserialize($result->config);
@@ -476,13 +413,13 @@
476 413 $conversation_form_ids = array();
477 414 $conversation_form_names = array();
478 415
479 416 if(class_exists('Qcformbuilder_Forms_Admin')){
480 - $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
417 + $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ". $wpdb->prefix."wfb_forms WHERE type=%s", 'primary')); //DB Call OK, No Caching OK
481 418 if(!empty($results)){
482 419
483 420 foreach($results as $result){
484 - $form = maybe_unserialize($result->config);
421 + $form = unserialize($result->config);
485 422 $conversation_form_ids[] = $form['ID'];
486 423 $conversation_form_names[] = $form['name'];
487 424 }
488 425
@@ -487,8 +424,10 @@
487 424 }
488 425
489 426 }
490 427 }
428 +
429 + // var_dump( str_replace('<', '',esc_html(get_option('qlcd_wp_chatbot_agent'))));wp_die();
491 430 $wp_chatbot_obj = array(
492 431 'wp_chatbot_position_x' => get_option('wp_chatbot_position_x'),
493 432 'wp_chatbot_position_y' => get_option('wp_chatbot_position_y'),
494 433 'disable_icon_animation' => get_option('disable_wp_chatbot_icon_animation'),
@@ -504,31 +443,31 @@
504 443 'yes' => str_replace('\\', '',get_option('qlcd_wp_chatbot_yes')),
505 444 'no' => str_replace('\\', '',get_option('qlcd_wp_chatbot_no')),
506 445 'or' => str_replace('\\', '',get_option('qlcd_wp_chatbot_or')),
507 446 'host' => str_replace('\\', '',get_option('qlcd_wp_chatbot_host')),
508 - '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'))),
447 + 'agent' => str_replace(['\\','<','>'], '',esc_html(get_option('qlcd_wp_chatbot_agent'))),
509 448 'agent_image' => get_option('wp_chatbot_agent_image'),
510 - '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'),
511 - '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')),
512 - 'agent_join' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_agent_join'))),
513 - 'welcome' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_welcome'))),
514 - 'welcome_back' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_welcome_back'))),
515 - 'hi_there' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_hi_there'))),
449 + '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',
450 + 'shopper_demo_name' => str_replace('\\', '',get_option('qlcd_wp_chatbot_shopper_demo_name')),
451 + 'agent_join' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_agent_join'))),
452 + 'welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_welcome'))),
453 + 'welcome_back' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_welcome_back'))),
454 + 'hi_there' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_hi_there'))),
516 455 'hello' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_hello'))),
517 - 'asking_name' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_asking_name'))),
518 - 'i_am' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_i_am'))),
519 - 'name_greeting' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_name_greeting'))),
520 - 'wildcard_msg' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_wildcard_msg'))),
521 - 'empty_filter_msg' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_empty_filter_msg'))),
522 - 'did_you_mean' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_did_you_mean'))),
523 - 'is_typing' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_is_typing'))),
524 - 'send_a_msg' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_send_a_msg'))),
456 + 'asking_name' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_name'))),
457 + 'i_am' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_i_am'))),
458 + 'name_greeting' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_name_greeting'))),
459 + 'wildcard_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_msg'))),
460 + 'empty_filter_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_empty_filter_msg'))),
461 + 'did_you_mean' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_did_you_mean'))),
462 + 'is_typing' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_is_typing'))),
463 + 'send_a_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_send_a_msg'))),
525 464
526 - 'viewed_products' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_viewed_products'))),
465 + 'viewed_products' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_viewed_products'))),
527 466
528 - 'shopping_cart' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_shopping_cart'))),
529 - 'cart_updating' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_cart_updating'))),
530 - 'cart_removing' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_cart_removing'))),
467 + 'shopping_cart' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_shopping_cart'))),
468 + 'cart_updating' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_cart_updating'))),
469 + 'cart_removing' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_cart_removing'))),
531 470 'imgurl' => QCLD_wpCHATBOT_IMG_URL,
532 471 'sys_key_help' => get_option('qlcd_wp_chatbot_sys_key_help'),
533 472 'sys_key_product' => get_option('qlcd_wp_chatbot_sys_key_product'),
534 473 'sys_key_catalog' => get_option('qlcd_wp_chatbot_sys_key_catalog'),
@@ -535,54 +474,54 @@
535 474 'sys_key_order' => get_option('qlcd_wp_chatbot_sys_key_order'),
536 475 'sys_key_support' => get_option('qlcd_wp_chatbot_sys_key_support'),
537 476 'sys_key_reset' => get_option('qlcd_wp_chatbot_sys_key_reset'),
538 477 'sys_key_email' => get_option('qlcd_wp_chatbot_sys_key_email'),
539 - 'help_welcome' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_help_welcome'))),
540 - 'back_to_start' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_back_to_start'))),
541 - 'help_msg' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_help_msg'))),
542 - 'reset' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_reset'))),
543 - 'wildcard_product' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_wildcard_product'))),
544 - 'wildcard_catalog' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_wildcard_catalog'))),
545 - 'featured_products' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_featured_products'))),
546 - 'sale_products' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_sale_products'))),
547 - 'wildcard_order' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_wildcard_order'))),
478 + 'help_welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_help_welcome'))),
479 + 'back_to_start' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_back_to_start'))),
480 + 'help_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_help_msg'))),
481 + 'reset' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_reset'))),
482 + 'wildcard_product' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_product'))),
483 + 'wildcard_catalog' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_catalog'))),
484 + 'featured_products' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_featured_products'))),
485 + 'sale_products' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_sale_products'))),
486 + 'wildcard_order' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_order'))),
548 487 'wildcard_support' => get_option('qlcd_wp_chatbot_wildcard_support'),
549 - 'product_asking' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_product_asking'))),
550 - 'product_suggest' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_product_suggest'))),
551 - 'product_infinite' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_product_infinite'))),
552 - 'product_success' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_product_success'))),
553 - 'product_fail' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_product_fail'))),
554 - 'support_welcome' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_support_welcome'))),
488 + 'product_asking' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_asking'))),
489 + 'product_suggest' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_suggest'))),
490 + 'product_infinite' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_infinite'))),
491 + 'product_success' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_success'))),
492 + 'product_fail' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_fail'))),
493 + 'support_welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_support_welcome'))),
555 494 'support_email' => get_option('qlcd_wp_chatbot_support_email'),
556 - 'support_option_again' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_support_option_again'))),
557 - 'asking_email' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_asking_email'))),
558 - 'asking_msg' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_asking_msg'))),
559 - 'no_result' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_no_result'))),
495 + 'support_option_again' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_support_option_again'))),
496 + 'asking_email' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_email'))),
497 + 'asking_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_msg'))),
498 + 'no_result' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_no_result'))),
560 499 'support_phone' => get_option('qlcd_wp_chatbot_support_phone'),
561 - 'asking_phone' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_asking_phone'))),
562 - 'thank_for_phone' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_thank_for_phone'))),
563 - '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')))),
564 - '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'))),
500 + 'asking_phone' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_phone'))),
501 + 'thank_for_phone' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_thank_for_phone'))),
502 + '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')))),
503 + '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'))),
565 504 'notification_interval' => get_option('qlcd_wp_chatbot_notification_interval'),
566 - 'notifications' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_notifications'))),
567 - 'order_welcome' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_order_welcome'))),
568 - 'order_username_asking' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_order_username_asking'))),
569 - 'order_username_password' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_order_username_password'))),
505 + 'notifications' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_notifications'))),
506 + 'order_welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_welcome'))),
507 + 'order_username_asking' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_username_asking'))),
508 + 'order_username_password' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_username_password'))),
570 509 'order_user' => get_option('qlcd_wp_chatbot_order_user'),
571 510 'order_login' => is_user_logged_in(),
572 511 'is_chat_session_active' => qcld_wpbot_is_active_chat_history(),
573 512 'order_nonce' => wp_create_nonce("wpwbot-order-nonce"),
574 - 'order_email_support' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_order_email_support'))),
513 + 'order_email_support' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_email_support'))),
575 514 'email_fail' => str_replace('\\', '', get_option('qlcd_wp_chatbot_email_fail')),
576 - 'invalid_email' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_invalid_email'))),
515 + 'invalid_email' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_invalid_email'))),
577 516 'stop_words' => str_replace('\\', '', get_option('qlcd_wp_chatbot_stop_words')),
578 517 'currency_symbol' => '',
579 518 'enable_messenger' => get_option('enable_wp_chatbot_messenger'),
580 - 'messenger_label' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_messenger_label'))),
519 + 'messenger_label' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_messenger_label'))),
581 520 'fb_page_id' => get_option('qlcd_wp_chatbot_fb_page_id'),
582 521 'enable_skype' => get_option('enable_wp_chatbot_skype'),
583 522 'enable_whats' => get_option('enable_wp_chatbot_whats'),
584 - 'whats_label' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_whats_label'))),
523 + 'whats_label' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_whats_label'))),
585 524 'whats_num' => get_option('qlcd_wp_chatbot_whats_num'),
586 525 'ret_greet' => get_option('qlcd_wp_chatbot_ret_greet'),
587 526 'enable_exit_intent' => get_option('enable_wp_chatbot_exit_intent'),
588 527 'exit_intent_msg' => str_replace('\\', '', get_option('wp_chatbot_exit_intent_msg')),
@@ -597,9 +536,9 @@
597 536 'auto_open_once' => get_option('wp_chatbot_auto_open_once'),
598 537 'proactive_bg_color' => get_option('wp_chatbot_proactive_bg_color'),
599 538 'disable_feedback' => get_option('disable_wp_chatbot_feedback'),
600 539 'disable_faq' => get_option('disable_wp_chatbot_faq'),
601 - 'feedback_label' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_feedback_label'))),
540 + 'feedback_label' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_feedback_label'))),
602 541 'enable_meta_title' =>get_option('enable_wp_chatbot_meta_title'),
603 542 'meta_label' =>str_replace('\\', '', get_option('qlcd_wp_chatbot_meta_label')),
604 543 'phone_number' => get_option('qlcd_wp_chatbot_phone'),
605 544 'disable_site_search' => get_option('disable_wp_chatbot_site_search'),
@@ -604,9 +543,8 @@
604 543 'phone_number' => get_option('qlcd_wp_chatbot_phone'),
605 544 'disable_site_search' => get_option('disable_wp_chatbot_site_search'),
606 545 'search_keyword' => get_option('qlcd_wp_chatbot_asking_search_keyword'),
607 546 'ajax_nonce'=> wp_create_nonce('qcsecretbotnonceval123qc'),
608 - 'session_nonce'=> wp_create_nonce('wp_chatbot'),
609 547 'site_search' => get_option('qlcd_wp_site_search'),
610 548 'open_links_newtab' => get_option('open_links_new_window'),
611 549 'call_gen' => get_option('disable_wp_chatbot_call_gen'),
612 550 'call_sup' => get_option('disable_wp_chatbot_call_sup'),
@@ -615,9 +553,9 @@
615 553 'enable_ret_user_show' => get_option('enable_wp_chatbot_ret_user_show'),
616 554 'enable_inactive_time_show' => get_option('enable_wp_chatbot_inactive_time_show'),
617 555 'ret_inactive_user_once' => get_option('wp_chatbot_inactive_once'),
618 556 'mobile_full_screen' => '1',
619 - 'botpreloadingtime' => (get_option('wpbot_preloading_time')?get_option('wpbot_preloading_time'):800),
557 + 'botpreloadingtime' => (get_option('wpbot_preloading_time')?get_option('wpbot_preloading_time'):100),
620 558 'inactive_time' => get_option('wp_chatbot_inactive_time'),
621 559 'checkout_msg' => str_replace('\\', '', get_option('wp_chatbot_checkout_msg')),
622 560 'ai_df_enable' => get_option('enable_wp_chatbot_dailogflow'),
623 561 'ai_df_token' => get_option('qlcd_wp_chatbot_dialogflow_client_token'),
@@ -623,78 +561,55 @@
623 561 'ai_df_token' => get_option('qlcd_wp_chatbot_dialogflow_client_token'),
624 562 'df_defualt_reply' => str_replace('\\', '', get_option('qlcd_wp_chatbot_dialogflow_defualt_reply')),
625 563 'df_agent_lan' => get_option('qlcd_wp_chatbot_dialogflow_agent_language'),
626 564 'openai_enabled' => get_option('ai_enabled'),
627 - 'is_stream_enabled' => ( get_option('is_stream_enabled', '1') == '1' ? '1' : '0' ),
628 565 'qcld_openai_append_content' => get_option('qcld_openai_append_content'),
629 566 'openrouter_enabled' => (get_option('qcld_openrouter_enabled')=='1'? get_option('qcld_openrouter_enabled') : '0'),
630 - 'gemini_enabled' => (get_option('qcld_gemini_enabled')=='1'? get_option('qcld_gemini_enabled') : '0'),
631 - 'grok_enabled' => (get_option('qcld_grok_enabled')=='1'? get_option('qcld_grok_enabled') : '0'),
632 - 'qcld_gemini_prepend_content' => get_option('qcld_gemini_prepend_content'),
633 - 'qcld_gemini_append_content' => get_option('qcld_gemini_append_content'),
634 567 'qcld_openrouter_append_content' => get_option('qcld_openrouter_append_content'),
635 568 'qcld_openrouter_prepend_content' => get_option('qcld_openrouter_prepend_content'),
636 569 'start_menu' => wp_unslash(get_option('qc_wpbot_menu_order')),
637 570 'conversation_form_ids' => $conversation_form_ids,
638 571 'conversation_form_names' => $conversation_form_names,
639 - 'simple_response_intent' => $this->qcld_wpbot_simple_response_intent(),
640 - 'forms' => $this->qcld_get_formbuilder_forms(),
641 - 'form_ids' =>$this->qcld_get_formbuilder_form_ids(),
642 - 'form_commands' => $this->qcld_get_formbuilder_form_commands(),
572 + 'simple_response_intent' => $this->qc_wpbot_simple_response_intent(),
573 + 'forms' => $this->qc_get_formbuilder_forms(),
574 + 'form_ids' =>$this->qc_get_formbuilder_form_ids(),
575 + 'form_commands' => $this->qc_get_formbuilder_form_commands(),
643 576 'df_api_version' => (get_option('wp_chatbot_df_api')==''?'v1':get_option('wp_chatbot_df_api')),
644 577 'v2_client_url'=> esc_url(get_site_url().'/?action=qcld_dfv2_api'),
645 578 'show_menu_after_greetings'=> (get_option('show_menu_after_greetings')!=''?get_option('show_menu_after_greetings'):0),
646 - 'disable_back_to_start'=> (get_option('disable_back_to_start_menu')!=''?get_option('disable_back_to_start_menu'):0),
647 579 'current_user_id' => $user_id,
648 - 'display_name' => esc_html( $display_name ),
649 580 'skip_wp_greetings' => get_option('skip_wp_greetings'),
650 581 'skip_greetings_and_menu' => get_option('skip_wp_greetings_donot_show_menu'),
651 - 'skip_chat_reactions_menu' => get_option('skip_chat_reactions_menu'),
652 - 'qlcd_wp_chatbot_like_text' => get_option('qlcd_wp_chatbot_like_text'),
653 - 'qlcd_wp_chatbot_dislike_text' => get_option('qlcd_wp_chatbot_dislike_text'),
654 - 'enable_chat_report_menu' => get_option('enable_chat_report_menu'),
655 - 'qlcd_wp_chatbot_report_text' => get_option('qlcd_wp_chatbot_report_text'),
656 - 'enable_chat_share_menu' => get_option('enable_chat_share_menu'),
657 - 'qlcd_wp_chatbot_share_text' => get_option('qlcd_wp_chatbot_share_text'),
658 582
659 583 );
660 - $user_font = get_option('wp_chatbot_user_font') != '' ? get_option('wp_chatbot_user_font') : '';
584 + $user_font = get_option('wp_chat_user_font_family') != '' ? get_option('wp_chat_user_font_family') : '';
661 585 if($user_font != '' ){
662 - $parts = explode(':', $user_font);
663 - // Create an object
664 - $user_font_family = new stdClass();
665 - // Assign values
666 - $user_font_family->fontfamily = $parts[0];
667 - $user_font_family->fontWeight = isset($parts[1]) ? $parts[1] : '400'; // default weight
668 - $user_font_family->fontStyle = 'normal';
586 + $user_font_family = str_replace('\\', '',$user_font);
587 + $user_font_family = json_decode($user_font_family);
588 + $user_font_name = $user_font_family->fontFamily;
589 + $user_font_name = str_replace(' ', '+', $user_font_name);
590 + $user_font_name = str_replace("'","",$user_font_name );
669 591 if(get_option('enable_wp_chatbot_custom_color')==1){
670 - $user_enqueue_font = 'https://fonts.googleapis.com/css2?family='. $user_font_family->fontfamily;
592 + $user_enqueue_font = 'https://fonts.googleapis.com/css2?family='.$user_font_name;
671 593 wp_enqueue_style( 'qcld-chatbot-user-google-fonts', $user_enqueue_font, false );
672 594 wp_enqueue_style( 'qcld-chatbot-user-google-fonts');
673 595 }
674 596 }
675 597
676 - $bot_font = get_option('wp_chatbot_bot_font') != '' ? get_option('wp_chatbot_bot_font') : '';
598 + $bot_font = get_option('wp_chat_bot_font_family') != '' ? get_option('wp_chat_bot_font_family') : '';
677 599 if($bot_font != '' ){
678 - $parts = explode(':', $bot_font);
679 - // Create an object
680 - $bot_font_family = new stdClass();
681 - // Assign values
682 - $bot_font_family->fontFamily = $parts[0];
683 - $bot_font_family->fontWeight = isset($parts[1]) ? $parts[1] : '400'; // default weight
684 - $bot_font_family->fontStyle = 'normal';
685 -
686 -
687 -
600 + $bot_font_family = str_replace('\\', '',$bot_font);
601 + $bot_font_family = json_decode($bot_font_family);
602 + $bot_font_name =$bot_font_family->fontFamily;
603 + $bot_font_name = str_replace(' ', '+', $bot_font_name );
604 + $bot_font_name = str_replace("'","",$bot_font_name );
688 605 if(get_option('enable_wp_chatbot_custom_color')==1){
689 - $bot_enqueue_font = 'https://fonts.googleapis.com/css2?family='.$bot_font_family->fontFamily;
606 + $bot_enqueue_font = 'https://fonts.googleapis.com/css2?family='.$bot_font_name;
690 607 wp_enqueue_style( 'qcld-chatbot-bot-google-fonts', $bot_enqueue_font, false );
691 608 wp_enqueue_style( 'qcld-chatbot-bot-google-fonts');
692 609 }
693 610 }
694 611
695 -
696 -
697 612 wp_enqueue_style( 'dashicons' );
698 613 wp_register_script('qcld-wp-chatbot-slimscroll-js', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/jquery.slimscroll.min.js', basename(__FILE__)), array('jquery'), QCLD_wpCHATBOT_VERSION, true);
699 614 wp_enqueue_script('qcld-wp-chatbot-slimscroll-js');
700 615 wp_register_script('qcld-wp-chatbot-jquery-cookie', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/jquery.cookie.js', basename(__FILE__)), array('jquery'), QCLD_wpCHATBOT_VERSION, true);
@@ -703,16 +618,8 @@
703 618 wp_enqueue_script('qcld-wp-chatbot-magnify-popup');
704 619 wp_register_script('qcld-wp-chatbot-plugin', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/qcld-wp-chatbot-plugin.js', basename(__FILE__)), array('jquery', 'qcld-wp-chatbot-jquery-cookie','qcld-wp-chatbot-magnify-popup'), QCLD_wpCHATBOT_VERSION, true);
705 620 wp_enqueue_script('qcld-wp-chatbot-plugin');
706 621
707 - $nonce = wp_create_nonce('wp_chatbot');
708 - // Pass data to JS
709 - wp_localize_script('qcld-wp-chatbot-plugin', 'qcld_chatbot_obj', [
710 - 'ajax_url' => admin_url('admin-ajax.php'),
711 - 'nonce' => $nonce,
712 - 'stream_endpoint' => admin_url('admin-ajax.php?action=qcld_stream_openai'),
713 - ]);
714 -
715 622 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);
716 623 wp_enqueue_script('qcld-wp-chatbot-front-js');
717 624 wp_localize_script('qcld-wp-chatbot-front-js', 'wp_chatbot_obj', $wp_chatbot_obj);
718 625 //wp_register_script('qcld-wp-chatbot-frontend', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/qcld-wp-chatbot-frontend.js', basename(__FILE__)), array('jquery','qcld-wp-chatbot-jquery-cookie'), QCLD_wpCHATBOT_VERSION, true);
@@ -718,37 +625,25 @@
718 625 //wp_register_script('qcld-wp-chatbot-frontend', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/qcld-wp-chatbot-frontend.js', basename(__FILE__)), array('jquery','qcld-wp-chatbot-jquery-cookie'), QCLD_wpCHATBOT_VERSION, true);
719 626 //wp_enqueue_script('qcld-wp-chatbot-frontend');
720 627 //wp_localize_script('qcld-wp-chatbot-frontend', 'wp_chatbot_obj', $wp_chatbot_obj);
721 628 wp_localize_script('qcld-wp-chatbot-frontend', 'wp_chatbot_obj', $wp_chatbot_obj);
722 -
723 - if ( ! function_exists( 'wp_register_style' ) || ! function_exists( 'wp_enqueue_style' ) || ! function_exists( 'plugins_url' ) || ! function_exists( 'plugin_dir_path' ) || ! function_exists( 'get_option' ) || ! function_exists( 'sanitize_hex_color' ) || ! function_exists( 'wp_add_inline_style' ) ) {
724 - // Return early if critical WordPress functions are not available.
725 - // This indicates the code needs to be hooked into an appropriate action.
726 - return;
727 - }
728 -
729 629 wp_register_style('qcld-wp-chatbot-common-style', plugins_url(basename(plugin_dir_path(__FILE__)) . '/css/common-style.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen');
730 630 wp_enqueue_style('qcld-wp-chatbot-common-style');
731 631
732 - $floating_icon_bg_color = get_option('wp_chatbot_floatingiconbg_color');
733 - $floating_icon_bg_color = sanitize_hex_color($floating_icon_bg_color); // ensures it's a valid hex color like #ffffff
632 + if(get_option('wp_chatbot_floatingiconbg_color')!="") {
633 + $custom_colors = ".wp-chatbot-ball{
634 + background: ". get_option('wp_chatbot_floatingiconbg_color')." !important;
635 + }
636 + .wp-chatbot-ball:hover, .wp-chatbot-ball:focus{
637 + background: ".get_option('wp_chatbot_floatingiconbg_color')." !important;
638 + }";
734 639
735 - if ( ! empty($floating_icon_bg_color) ) {
736 - $inline_floating_icon_styles = "
737 - .wp-chatbot-ball {
738 - background: {$floating_icon_bg_color} !important;
739 - }
740 - .wp-chatbot-ball:hover,
741 - .wp-chatbot-ball:focus {
742 - background: {$floating_icon_bg_color} !important;
743 - }";
744 -
745 - wp_add_inline_style( 'qcld-wp-chatbot-common-style', $inline_floating_icon_styles );
640 + wp_add_inline_style( 'qcld-wp-chatbot-common-style', $custom_colors );
746 641 }
747 -
642 +
643 +
748 644 wp_register_style('qcld-wp-chatbot-magnific-popup', plugins_url(basename(plugin_dir_path(__FILE__)) . '/css/magnific-popup.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen');
749 645 wp_enqueue_style('qcld-wp-chatbot-magnific-popup');
750 -
751 646 $qcld_wb_chatbot_theme = get_option('qcld_wb_chatbot_theme');
752 647 /* if (file_exists(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . '/templates/' . $qcld_wb_chatbot_theme . '/style.css')) {
753 648 wp_register_style('qcld-wp-chatbot-style', plugins_url(basename(plugin_dir_path(__FILE__)) . '/templates/' . $qcld_wb_chatbot_theme . '/style.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen');
754 649 wp_enqueue_style('qcld-wp-chatbot-style');
@@ -757,146 +652,85 @@
757 652 if (file_exists(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . '/templates/' . $qcld_wb_chatbot_theme . '/shortcode.css')) {
758 653 wp_register_style('qcld-wp-chatbot-shortcode-style', plugins_url(basename(plugin_dir_path(__FILE__)) . '/templates/' . $qcld_wb_chatbot_theme . '/shortcode.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen');
759 654 wp_enqueue_style('qcld-wp-chatbot-shortcode-style');
760 655 }
761 -
762 - $inline_chat_custom_styles = ''; // Initialize a new variable for general chat custom styles.
763 - if(get_option('enable_wp_chatbot_custom_color')==1){
764 - // Sanitize all color options before using them in CSS to prevent invalid values.
765 - $text_color = sanitize_hex_color( get_option('wp_chatbot_text_color') );
766 - $link_color = sanitize_hex_color( get_option('wp_chatbot_link_color') );
767 - $link_hover_color = sanitize_hex_color( get_option('wp_chatbot_link_hover_color') );
768 - $bot_msg_text_color = sanitize_hex_color( get_option('wp_chatbot_bot_msg_text_color') );
769 - $bot_msg_bg_color = sanitize_hex_color( get_option('wp_chatbot_bot_msg_bg_color') );
770 - $buttons_text_color = sanitize_hex_color( get_option('wp_chatbot_buttons_text_color') );
771 - $buttons_bg_color = sanitize_hex_color( get_option('wp_chatbot_buttons_bg_color') );
772 - $buttons_text_color_hover = sanitize_hex_color( get_option('wp_chatbot_buttons_text_color_hover') );
773 - $buttons_bg_color_hover = sanitize_hex_color( get_option('wp_chatbot_buttons_bg_color_hover') );
774 - $user_msg_text_color = sanitize_hex_color( get_option('wp_chatbot_user_msg_text_color') );
775 - $wp_chatbot_text_color = sanitize_hex_color( get_option('wp_chatbot_text_color') );
776 - $user_msg_bg_color = sanitize_hex_color( get_option('wp_chatbot_user_msg_bg_color') );
777 - $header_background_color = sanitize_hex_color( get_option('wp_chatbot_header_background_color') );
778 -
779 - $inline_chat_custom_styles .= "
656 + $custom_colors = '';
657 + if(get_option('enable_wp_chatbot_custom_color')==1){
658 + $custom_colors .="
780 659 #wp-chatbot-chat-container, .wp-chatbot-product-description, .wp-chatbot-product-description p,.wp-chatbot-product-quantity label, .wp-chatbot-product-variable label {
781 - color: ". $text_color ." !important;
660 + color: ". get_option('wp_chatbot_text_color')." !important;
782 661 }
783 662 #wp-chatbot-chat-container a {
784 - color: ". $link_color ." !important;
663 + color: ". get_option('wp_chatbot_link_color')." !important;
785 664 }
786 -
787 - #wp-chatbot-chat-container a p{
788 - color: ". $link_color ." !important;
789 - }
790 - #wp-chatbot-chat-container a p span{
791 - color: ". $link_color ." !important;
792 - }
793 665 #wp-chatbot-chat-container a:hover {
794 - color: ". $link_hover_color ." !important;
666 + color: ". get_option('wp_chatbot_link_hover_color')." !important;
795 667 }
796 668
797 669 ul.wp-chatbot-messages-container > li.wp-chatbot-msg .wp-chatbot-paragraph,
798 670 .wp-chatbot-agent-profile .wp-chatbot-bubble {
799 - color: ". $bot_msg_text_color ." !important;
800 - background-color: ". $bot_msg_bg_color ." !important;
671 + color: ". get_option('wp_chatbot_bot_msg_text_color')." !important;
672 + background-color: ". get_option('wp_chatbot_bot_msg_bg_color')." !important;
801 673 word-break: break-word;
802 674 }
803 675 span.qcld-chatbot-product-category, span.qcld-chatbot-support-items, span.qcld-chatbot-wildcard, span.qcld-chatbot-suggest-email, span.qcld-chatbot-reset-btn, #woo-chatbot-loadmore, .wp-chatbot-shortcode-template-container span.qcld-chatbot-product-category, .wp-chatbot-shortcode-template-container span.qcld-chatbot-support-items, .wp-chatbot-shortcode-template-container span.qcld-chatbot-wildcard, .wp-chatbot-shortcode-template-container span.wp-chatbot-card-button, .wp-chatbot-shortcode-template-container span.qcld-chatbot-suggest-email, span.qcld-chatbot-suggest-phone, .wp-chatbot-shortcode-template-container span.qcld-chatbot-reset-btn, .wp-chatbot-shortcode-template-container #wp-chatbot-loadmore, .wp-chatbot-ball-cart-items, .wpbd_subscription, .qcld-chatbot-site-search, .qcld_subscribe_confirm, .qcld-chat-common, .qcld-chatbot-custom-intent {
804 - color: ". $buttons_text_color ." !important;
805 - background-color: ". $buttons_bg_color ." !important;
676 + color: ". get_option('wp_chatbot_buttons_text_color') ." !important;
677 + background-color: ". get_option('wp_chatbot_buttons_bg_color') ." !important;
806 678 background-image: none !important;
807 679 }
808 680
809 681 span.qcld-chatbot-product-category:hover, span.qcld-chatbot-support-items:hover, span.qcld-chatbot-wildcard:hover, span.qcld-chatbot-suggest-email:hover, span.qcld-chatbot-reset-btn:hover, #woo-chatbot-loadmore:hover, .wp-chatbot-shortcode-template-container:hover span.qcld-chatbot-product-category:hover, .wp-chatbot-shortcode-template-container:hover span.qcld-chatbot-support-items:hover, .wp-chatbot-shortcode-template-container:hover span.qcld-chatbot-wildcard:hover, .wp-chatbot-shortcode-template-container:hover span.wp-chatbot-card-button:hover, .wp-chatbot-shortcode-template-container:hover span.qcld-chatbot-suggest-email:hover, span.qcld-chatbot-suggest-phone:hover, .wp-chatbot-shortcode-template-container:hover span.qcld-chatbot-reset-btn:hover, .wp-chatbot-shortcode-template-container:hover #wp-chatbot-loadmore:hover, .wp-chatbot-ball-cart-items:hover, .wpbd_subscription:hover, .qcld-chatbot-site-search:hover, .qcld_subscribe_confirm:hover, .qcld-chat-common:hover, .qcld-chatbot-custom-intent:hover {
810 - color: ". $buttons_text_color_hover ." !important;
811 - background-color: ". $buttons_bg_color_hover ." !important;
682 + color: ". get_option('wp_chatbot_buttons_text_color_hover') ." !important;
683 + background-color: ". get_option('wp_chatbot_buttons_bg_color_hover') ." !important;
812 684 background-image: none !important;
813 685 }
814 686
815 687 li.wp-chat-user-msg .wp-chatbot-paragraph {
816 - color: ". $user_msg_text_color ." !important;
817 - background: ". $user_msg_bg_color ." !important;
818 - }
819 -
820 - ul.wp-chatbot-messages-container li:first-child.wp-chatbot-msg .wp-chatbot-paragraph {
821 - color: ". $wp_chatbot_text_color ." !important;
688 + color: ". get_option('wp_chatbot_user_msg_text_color')." !important;
689 + background: ". get_option('wp_chatbot_user_msg_bg_color')." !important;
822 690 }
823 -
824 691 ul.wp-chatbot-messages-container > li.wp-chatbot-msg > .wp-chatbot-paragraph:before,
825 692 .wp-chatbot-bubble:before {
826 - border-right: 10px solid ". $bot_msg_bg_color ." !important;
693 + border-right: 10px solid ". get_option('wp_chatbot_bot_msg_bg_color')." !important;
827 694
828 695 }
829 696 ul.wp-chatbot-messages-container > li.wp-chat-user-msg > .wp-chatbot-paragraph:before {
830 - border-left: 10px solid ". $user_msg_bg_color ." !important;
697 + border-left: 10px solid ". get_option('wp_chatbot_user_msg_bg_color')." !important;
831 698 }
832 699 #wp-chatbot-chat-container .wp-chatbot-header{
833 - background: ". $header_background_color ." !important;
700 + background: ". get_option('wp_chatbot_header_background_color')." !important;
834 701 }
835 - .wp-chatbot-container ul.wp-chatbot-messages-container > li.wp-chatbot-msg .chat-container, .wp-chatbot-container .wp-chatbot-agent-profile .wp-chatbot-bubble {
836 - color: ". $bot_msg_text_color ." !important;
837 - background: ". $bot_msg_bg_color ." !important;
702 + .wp-chatbot-container ul.wp-chatbot-messages-container > li.wp-chatbot-msg .wp-chatbot-paragraph, .wp-chatbot-container .wp-chatbot-agent-profile .wp-chatbot-bubble {
703 + color: ". get_option('wp_chatbot_bot_msg_text_color')." !important;
704 + background: ". get_option('wp_chatbot_bot_msg_bg_color')." !important;
838 705 }
706 +
707 +
839 708 ";
840 - // Apply the accumulated general chat custom styles.
841 - // This ensures these styles are added if the custom color option is enabled.
842 - wp_add_inline_style( 'qcld-wp-chatbot-common-style', $inline_chat_custom_styles );
709 +
843 710 }
844 - $custom_colors ="";
845 - if((get_option('enable_wp_chatbot_custom_color')==1) && $user_font != ''){
711 + if((get_option('enable_wp_chatbot_custom_color')==1) && $user_font != ''){
846 712 $custom_colors .="
847 -
848 -
849 713 #wp-chatbot-messages-container > li.wp-chatbot-msg > .wp-chatbot-paragraph,
850 714 #wp-chatbot-messages-container > li.wp-chatbot-msg > span{
851 715 font-family: ".$bot_font_family->fontFamily.";
852 716 font-weight: ".$bot_font_family->fontWeight.";
853 717 font-style: ".$bot_font_family->fontStyle.";
854 - font-size: ". get_option('wp_chatbot_font_size'). "px;
718 + font-size: ". get_option('wp_chatbot_font_size'). ";
855 719 }
856 -
857 - ul.wp-chatbot-messages-container > li.wp-chatbot-msg .wp-chatbot-paragraph, .wp-chatbot-agent-profile .wp-chatbot-bubble {
858 - font-family: ".$bot_font_family->fontFamily.";
859 - font-weight: ".$bot_font_family->fontWeight.";
860 - font-style: ".$bot_font_family->fontStyle.";
861 - font-size: ". get_option('wp_chatbot_font_size'). "px;
862 - }
863 -
864 - ul#wp-chatbot-messages-container .wp-chatbot-textanimation span {
865 - font-family: ".$bot_font_family->fontFamily.";
866 - font-weight: ".$bot_font_family->fontWeight.";
867 - font-style: ".$bot_font_family->fontStyle.";
868 - font-size: ". get_option('wp_chatbot_font_size'). "px;
869 - }
870 -
871 720 ";
872 721 }
873 - if ( get_option('enable_wp_chatbot_custom_color') == 1 && ! empty($bot_font) ) {
874 -
875 - // Sanitize each CSS-related value
876 - $font_family = isset( $user_font_family->fontfamily ) ? esc_attr( $user_font_family->fontfamily ) : 'inherit';
877 - $font_weight = isset( $user_font_family->fontWeight ) ? esc_attr( $user_font_family->fontWeight ) : 'normal';
878 - $font_style = isset( $user_font_family->fontStyle ) ? esc_attr( $user_font_family->fontStyle ) : 'normal';
879 - $font_size = get_option( 'wp_chatbot_font_size' );
880 - $font_size = esc_attr( trim( $font_size ) );
881 -
882 - // Optional: ensure font size includes units.
883 - if ( ! preg_match( '/(px|em|rem|%)$/', $font_size ) ) {
884 - $font_size .= 'px'; // fallback to px if unit missing.
722 + if((get_option('enable_wp_chatbot_custom_color')==1) && $bot_font != ''){
723 + $custom_colors .="
724 + #wp-chatbot-messages-container > li.wp-chat-user-msg > .wp-chatbot-paragraph{
725 + font-family: ".$user_font_family->fontFamily.";
726 + font-weight: ".$user_font_family->fontWeight.";
727 + font-style: ".$user_font_family->fontStyle.";
728 + font-size: ". get_option('wp_chatbot_font_size'). ";
885 729 }
886 -
887 - $custom_colors .= "
888 - #wp-chatbot-messages-container > li.wp-chat-user-msg > .wp-chatbot-paragraph {
889 - font-family: {$font_family};
890 - font-weight: {$font_weight};
891 - font-style: {$font_style};
892 - font-size: {$font_size};
893 - }
894 - ";
895 -
896 - wp_add_inline_style( 'qcld-wp-chatbot-common-style', $custom_colors );
730 + ";
897 731 }
898 -
732 + wp_add_inline_style( 'qcld-wp-chatbot-common-style', $custom_colors );
899 733 if(get_option('wp_chatbot_custom_css')!=""){
900 734
901 735 wp_add_inline_style( 'qcld-wp-chatbot-common-style', get_option('wp_chatbot_custom_css') );
902 736 }
@@ -1000,9 +834,9 @@
1000 834 {
1001 835 ?>
1002 836
1003 837 <h4 class="qc-opt-title">
1004 - <?php echo esc_html($option_text); ?>
838 + <?php esc_html_e($option_text, 'wpchatbot'); ?>
1005 839 </h4>
1006 840 <div class="wp-chatbot-lng-items">
1007 841 <?php
1008 842 if (is_array($options) && count($options) > 0) {
@@ -1008,15 +842,15 @@
1008 842 if (is_array($options) && count($options) > 0) {
1009 843 foreach ($options as $key => $value) {
1010 844 ?>
1011 845 <div class="row" class="wp-chatbot-lng-item">
1012 - <div class="col-xs-11">
846 + <div class="col-xs-10">
1013 847 <input type="text"
1014 848 class="form-control qc-opt-dcs-font"
1015 849 name="<?php echo esc_attr( $option_name ); ?>[]"
1016 850 value="<?php echo esc_attr(str_replace('\\', '', $value)); ?>">
1017 851 </div>
1018 - <div class="col-xs-1">
852 + <div class="col-xs-2">
1019 853 <button type="button" class="btn btn-danger btn-sm wp-chatbot-lng-item-remove"> <span class="glyphicon glyphicon-remove"></span> </button>
1020 854 </div>
1021 855 </div>
1022 856 <?php
@@ -1022,22 +856,22 @@
1022 856 <?php
1023 857 }
1024 858 } else { ?>
1025 859 <div class="row" class="wp-chatbot-lng-item">
1026 -<div class="col-xs-11">
860 +<div class="col-xs-10">
1027 861 <input type="text"
1028 862 class="form-control qc-opt-dcs-font"
1029 863 name="<?php echo esc_attr( $option_name ); ?>[]"
1030 864 value="<?php echo esc_attr($option_text); ?>">
1031 865 </div>
1032 -<div class="col-xs-1"> <span class="wp-chatbot-lng-item-remove">
1033 - <?php esc_html_e('X', 'chatbot'); ?>
866 +<div class="col-xs-2"> <span class="wp-chatbot-lng-item-remove">
867 + <?php esc_html_e('X', 'wpchatbot'); ?>
1034 868 </span> </div>
1035 869 </div>
1036 870 <?php } ?>
1037 871 </div>
1038 872 <div class="row">
1039 - <div class="col-sm-1 col-sm-offset-11">
873 + <div class="col-sm-2 col-sm-offset-10">
1040 874 <button type="button" class="btn btn-success btn-sm wp-chatbot-lng-item-add"> <span class="glyphicon glyphicon-plus"></span> </button>
1041 875 </div>
1042 876 </div>
1043 877 <?php
@@ -1045,151 +879,139 @@
1045 879
1046 880 function qcld_wb_chatbot_save_options()
1047 881 {
1048 882 //global $wpcommerce;
1049 - if (isset($_POST['_wpnonce']) && wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['_wpnonce'])), 'wp_chatbot') && current_user_can('manage_options')) {
1050 - // Check if the form is submitted or not.
1051 - $submit = sanitize_text_field(wp_unslash($_POST['submit']));
883 + if (isset($_POST['_wpnonce']) && wp_verify_nonce($_POST['_wpnonce'], 'wp_chatbot')) {
884 + //wp_verify_nonce($_POST['_wpnonce'], 'wp_chatbot');
885 +
886 + // Check if the form is submitted or not
887 + $submit = sanitize_text_field($_POST['submit']);
1052 888 if (isset($submit)) {
1053 889 //wpwboticon position settings.
1054 890 if (isset($_POST["wp_chatbot_position_x"])) {
1055 - $wp_chatbot_position_x = intval(sanitize_text_field(wp_unslash($_POST["wp_chatbot_position_x"])));
891 + $wp_chatbot_position_x = intval(sanitize_text_field($_POST["wp_chatbot_position_x"]));
1056 892 update_option('wp_chatbot_position_x', $wp_chatbot_position_x);
1057 893 }
1058 894 if (isset($_POST["wp_chatbot_position_y"])) {
1059 - $wp_chatbot_position_y = intval(sanitize_text_field(wp_unslash($_POST["wp_chatbot_position_y"])));
895 + $wp_chatbot_position_y = intval(sanitize_text_field($_POST["wp_chatbot_position_y"]));
1060 896 update_option('wp_chatbot_position_y', $wp_chatbot_position_y);
1061 897 }
1062 898 //product search options
1063 899 if(isset($_POST['qlcd_wp_chatbot_search_option'])){
1064 - $qlcd_wp_chatbot_search_option = sanitize_text_field(wp_unslash($_POST['qlcd_wp_chatbot_search_option']));
900 + $qlcd_wp_chatbot_search_option = sanitize_text_field($_POST['qlcd_wp_chatbot_search_option']);
1065 901 update_option('qlcd_wp_chatbot_search_option', $qlcd_wp_chatbot_search_option);
1066 902 }
1067 - if(isset( $_POST["disable_floating_button"])){
1068 - $disable_floating_button = sanitize_text_field(wp_unslash($_POST["disable_floating_button"]));
1069 - }else{ $disable_floating_button='';}
1070 - update_option('disable_floating_button', wp_unslash($disable_floating_button));
903 +
1071 904
1072 - if(isset( $_POST["wpbot_enable_on_search"])){
1073 - $wpbot_enable_on_search = sanitize_text_field(wp_unslash($_POST["wpbot_enable_on_search"]));
1074 - }else{ $wpbot_enable_on_search='';}
1075 - update_option('wpbot_enable_on_search', wp_unslash($wpbot_enable_on_search));
1076 -
1077 905 if(isset( $_POST["skip_wp_greetings_donot_show_menu"])){
1078 - $skip_wp_greetings_donot_show_menu = sanitize_text_field(wp_unslash($_POST["skip_wp_greetings_donot_show_menu"]));
906 + $skip_wp_greetings_donot_show_menu = sanitize_text_field($_POST["skip_wp_greetings_donot_show_menu"]);
1079 907 }else{ $skip_wp_greetings_donot_show_menu='';}
1080 908 update_option('skip_wp_greetings_donot_show_menu', wp_unslash($skip_wp_greetings_donot_show_menu));
1081 909
1082 910 if(isset( $_POST["skip_wp_greetings"])){
1083 - $skip_wp_greetings = sanitize_text_field(wp_unslash($_POST["skip_wp_greetings"]));
911 + $skip_wp_greetings = sanitize_text_field($_POST["skip_wp_greetings"]);
1084 912 }else{ $skip_wp_greetings='';}
1085 913 update_option('skip_wp_greetings', wp_unslash($skip_wp_greetings));
1086 914 //Enable /disable wpwbot
1087 915 if(isset( $_POST["disable_wp_chatbot"])){
1088 - $disable_wp_chatbot = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot"]));
916 + $disable_wp_chatbot = sanitize_text_field($_POST["disable_wp_chatbot"]);
1089 917 }else{ $disable_wp_chatbot='';}
1090 918 update_option('disable_wp_chatbot', wp_unslash($disable_wp_chatbot));
1091 919
1092 920 if(isset( $_POST["qlcd_wp_chatbot_admin_email"])){
1093 - $qlcd_wp_chatbot_admin_email = sanitize_email(wp_unslash($_POST["qlcd_wp_chatbot_admin_email"]));
921 + $qlcd_wp_chatbot_admin_email = sanitize_email($_POST["qlcd_wp_chatbot_admin_email"]);
1094 922 }else{ $qlcd_wp_chatbot_admin_email='';}
1095 923 update_option('qlcd_wp_chatbot_admin_email', wp_unslash($qlcd_wp_chatbot_admin_email));
1096 924
1097 925
1098 926 if(isset( $_POST["open_links_new_window"])){
1099 - $open_links_new_window = sanitize_text_field(wp_unslash($_POST["open_links_new_window"]));
927 + $open_links_new_window = sanitize_text_field($_POST["open_links_new_window"]);
1100 928 }else{ $open_links_new_window='';}
1101 929 update_option('open_links_new_window', wp_unslash($open_links_new_window));
1102 930
1103 931
1104 932 if(isset( $_POST["qlcd_wp_chatbot_from_email"])){
1105 - $qlcd_wp_chatbot_from_email = sanitize_email(wp_unslash($_POST["qlcd_wp_chatbot_from_email"]));
933 + $qlcd_wp_chatbot_from_email = sanitize_email($_POST["qlcd_wp_chatbot_from_email"]);
1106 934 }else{ $qlcd_wp_chatbot_from_email='';}
1107 935 update_option('qlcd_wp_chatbot_from_email', wp_unslash($qlcd_wp_chatbot_from_email));
1108 936
1109 937 if(isset( $_POST["disable_wp_chatbot_on_mobile"])) {
1110 - $disable_wp_chatbot_on_mobile = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_on_mobile"]));
938 + $disable_wp_chatbot_on_mobile = sanitize_text_field($_POST["disable_wp_chatbot_on_mobile"]);
1111 939 }else{ $disable_wp_chatbot_on_mobile='';}
1112 940 update_option('disable_wp_chatbot_on_mobile', wp_unslash($disable_wp_chatbot_on_mobile));
1113 941 if(isset( $_POST["disable_wp_chatbot_product_search"])) {
1114 - $disable_wp_chatbot_product_search = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_product_search"]));
942 + $disable_wp_chatbot_product_search = sanitize_text_field($_POST["disable_wp_chatbot_product_search"]);
1115 943 }else{ $disable_wp_chatbot_product_search='';}
1116 944 update_option('disable_wp_chatbot_product_search', wp_unslash($disable_wp_chatbot_product_search));
1117 945 if(isset( $_POST["disable_wp_chatbot_catalog"])) {
1118 - $disable_wp_chatbot_catalog= sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_catalog"]));
946 + $disable_wp_chatbot_catalog= sanitize_text_field($_POST["disable_wp_chatbot_catalog"]);
1119 947 }else{ $disable_wp_chatbot_catalog='';}
1120 948 update_option('disable_wp_chatbot_catalog', wp_unslash($disable_wp_chatbot_catalog));
1121 949 if(isset( $_POST["disable_wp_chatbot_order_status"])) {
1122 - $disable_wp_chatbot_order_status = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_order_status"]));
950 + $disable_wp_chatbot_order_status = sanitize_text_field($_POST["disable_wp_chatbot_order_status"]);
1123 951 }else{ $disable_wp_chatbot_order_status='';}
1124 952 update_option('disable_wp_chatbot_order_status', wp_unslash($disable_wp_chatbot_order_status));
1125 953 if(isset( $_POST["disable_wp_chatbot_notification"])) {
1126 - $disable_wp_chatbot_notification = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_notification"]));
954 + $disable_wp_chatbot_notification = sanitize_text_field($_POST["disable_wp_chatbot_notification"]);
1127 955 }else{ $disable_wp_chatbot_notification='1';}
1128 956 update_option('disable_wp_chatbot_notification', wp_unslash($disable_wp_chatbot_notification));
1129 957
1130 958 if(isset( $_POST["enable_wp_chatbot_rtl"])) {
1131 - $enable_wp_chatbot_rtl = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_rtl"]));
959 + $enable_wp_chatbot_rtl = sanitize_text_field($_POST["enable_wp_chatbot_rtl"]);
1132 960 }else{ $enable_wp_chatbot_rtl='';}
1133 961 update_option('enable_wp_chatbot_rtl', wp_unslash($enable_wp_chatbot_rtl));
1134 962
1135 963 if(isset( $_POST["show_menu_after_greetings"])) {
1136 - $show_menu_after_greetings = sanitize_text_field(wp_unslash($_POST["show_menu_after_greetings"]));
964 + $show_menu_after_greetings = sanitize_text_field($_POST["show_menu_after_greetings"]);
1137 965 }else{ $show_menu_after_greetings='';}
1138 966 update_option('show_menu_after_greetings', wp_unslash($show_menu_after_greetings));
1139 -
1140 - if(isset( $_POST["disable_back_to_start_menu"])) {
1141 - $disable_back_to_start_menu = sanitize_text_field(wp_unslash($_POST["disable_back_to_start_menu"]));
1142 - }else{ $disable_back_to_start_menu='';}
1143 - update_option('disable_back_to_start_menu', wp_unslash($disable_back_to_start_menu));
1144 -
1145 967 if(isset( $_POST["enable_chat_session"])) {
1146 - $enable_chat_session = sanitize_text_field(wp_unslash($_POST["enable_chat_session"]));
968 + $enable_chat_session = sanitize_text_field($_POST["enable_chat_session"]);
1147 969 }else{ $enable_chat_session='';}
1148 970 update_option('enable_chat_session', wp_unslash($enable_chat_session));
1149 971
1150 972
1151 973 if(isset( $_POST["enable_wp_chatbot_mobile_full_screen"])) {
1152 - $enable_wp_chatbot_mobile_full_screen = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_mobile_full_screen"]));
974 + $enable_wp_chatbot_mobile_full_screen = sanitize_text_field($_POST["enable_wp_chatbot_mobile_full_screen"]);
1153 975 }else{ $enable_wp_chatbot_mobile_full_screen='';}
1154 976 update_option('enable_wp_chatbot_mobile_full_screen', wp_unslash($enable_wp_chatbot_mobile_full_screen));
1155 977
1156 978 if(isset( $_POST["wpbot_preloading_time"])) {
1157 - $wpbot_preloading_time = sanitize_text_field(wp_unslash($_POST["wpbot_preloading_time"]));
1158 - }else{ $wpbot_preloading_time='800';}
979 + $wpbot_preloading_time = sanitize_text_field($_POST["wpbot_preloading_time"]);
980 + }else{ $wpbot_preloading_time='100';}
1159 981 update_option('wpbot_preloading_time', wp_unslash($wpbot_preloading_time));
1160 982
1161 983 if(isset( $_POST["disable_wp_chatbot_icon_animation"])) {
1162 - $disable_wp_chatbot_icon_animation = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_icon_animation"]));
984 + $disable_wp_chatbot_icon_animation = sanitize_text_field($_POST["disable_wp_chatbot_icon_animation"]);
1163 985 }else{ $disable_wp_chatbot_icon_animation='';}
1164 986 update_option('disable_wp_chatbot_icon_animation', wp_unslash($disable_wp_chatbot_icon_animation));
1165 987 //Enable /disable Cart Item Number
1166 988 if(isset( $_POST["disable_wp_chatbot_cart_item_number"])) {
1167 - $disable_wp_chatbot_cart_item_number = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_cart_item_number"]));
989 + $disable_wp_chatbot_cart_item_number = sanitize_text_field($_POST["disable_wp_chatbot_cart_item_number"]);
1168 990 }else{ $disable_wp_chatbot_cart_item_number='';}
1169 991 update_option('disable_wp_chatbot_cart_item_number', wp_unslash($disable_wp_chatbot_cart_item_number));
1170 992 //Enable /disable featured products button.
1171 993 if(isset( $_POST["disable_wp_chatbot_featured_product"])) {
1172 - $disable_wp_chatbot_featured_product = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_featured_product"]));
994 + $disable_wp_chatbot_featured_product = sanitize_text_field($_POST["disable_wp_chatbot_featured_product"]);
1173 995 }else{ $disable_wp_chatbot_featured_product='';}
1174 996 update_option('disable_wp_chatbot_featured_product', wp_unslash($disable_wp_chatbot_featured_product));
1175 997 //Enable /disable sale products button
1176 998 if(isset( $_POST["disable_wp_chatbot_sale_product"])) {
1177 - $disable_wp_chatbot_sale_product = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_sale_product"]));
999 + $disable_wp_chatbot_sale_product = sanitize_text_field($_POST["disable_wp_chatbot_sale_product"]);
1178 1000 }else{ $disable_wp_chatbot_sale_product='';}
1179 1001 update_option('disable_wp_chatbot_sale_product', wp_unslash($disable_wp_chatbot_sale_product));
1180 1002 //Enable Product details page.
1181 1003 if(isset( $_POST["wp_chatbot_open_product_detail"])) {
1182 - $wp_chatbot_open_product_detail = sanitize_text_field(wp_unslash($_POST["wp_chatbot_open_product_detail"]));
1004 + $wp_chatbot_open_product_detail = sanitize_text_field($_POST["wp_chatbot_open_product_detail"]);
1183 1005 }else{ $wp_chatbot_open_product_detail='';}
1184 1006 update_option('wp_chatbot_open_product_detail', wp_unslash($wp_chatbot_open_product_detail));
1185 1007 //product order and order by
1186 1008 if(isset($_POST['qlcd_wp_chatbot_product_orderby'])){
1187 - $qlcd_wp_chatbot_product_orderby = sanitize_text_field(wp_unslash($_POST['qlcd_wp_chatbot_product_orderby']));
1009 + $qlcd_wp_chatbot_product_orderby = sanitize_text_field($_POST['qlcd_wp_chatbot_product_orderby']);
1188 1010 update_option('qlcd_wp_chatbot_product_orderby', sanitize_text_field($qlcd_wp_chatbot_product_orderby));
1189 1011 }
1190 1012 if(isset($_POST['qlcd_wp_chatbot_product_order'])){
1191 - $qlcd_wp_chatbot_product_order = sanitize_text_field(wp_unslash($_POST['qlcd_wp_chatbot_product_order']));
1013 + $qlcd_wp_chatbot_product_order = sanitize_text_field($_POST['qlcd_wp_chatbot_product_order']);
1192 1014 update_option('qlcd_wp_chatbot_product_order', sanitize_text_field($qlcd_wp_chatbot_product_order));
1193 1015 }
1194 1016
1195 1017
@@ -1194,53 +1016,53 @@
1194 1016
1195 1017
1196 1018 //Product per page settings.
1197 1019 if (isset($_POST["qlcd_wp_chatbot_ppp"])) {
1198 - $qlcd_wp_chatbot_ppp = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_ppp"]));
1020 + $qlcd_wp_chatbot_ppp = sanitize_text_field($_POST["qlcd_wp_chatbot_ppp"]);
1199 1021 update_option('qlcd_wp_chatbot_ppp', intval($qlcd_wp_chatbot_ppp));
1200 1022 }
1201 1023 if(isset( $_POST["wp_chatbot_exclude_stock_out_product"])) {
1202 - $wp_chatbot_exclude_stock_out_product = sanitize_text_field(wp_unslash($_POST['wp_chatbot_exclude_stock_out_product']));
1024 + $wp_chatbot_exclude_stock_out_product = sanitize_text_field($_POST['wp_chatbot_exclude_stock_out_product']);
1203 1025 }else{ $wp_chatbot_exclude_stock_out_product='';}
1204 1026 update_option('wp_chatbot_exclude_stock_out_product', wp_unslash($wp_chatbot_exclude_stock_out_product));
1205 1027 if(isset( $_POST["wp_chatbot_show_parent_category"])) {
1206 - $wp_chatbot_show_parent_category = sanitize_text_field(wp_unslash($_POST['wp_chatbot_show_parent_category']));
1028 + $wp_chatbot_show_parent_category = sanitize_text_field($_POST['wp_chatbot_show_parent_category']);
1207 1029 }else{ $wp_chatbot_show_parent_category='';}
1208 1030 update_option('wp_chatbot_show_parent_category', wp_unslash($wp_chatbot_show_parent_category));
1209 1031 if(isset( $_POST["wp_chatbot_show_sub_category"])) {
1210 - $wp_chatbot_show_sub_category = sanitize_text_field(wp_unslash($_POST['wp_chatbot_show_sub_category']));
1032 + $wp_chatbot_show_sub_category = sanitize_text_field($_POST['wp_chatbot_show_sub_category']);
1211 1033 }else{ $wp_chatbot_show_sub_category='';}
1212 1034 update_option('wp_chatbot_show_sub_category', wp_unslash($wp_chatbot_show_sub_category));
1213 1035 if (isset($_POST["qlcd_wp_chatbot_order_user"])) {
1214 - $qlcd_wp_chatbot_order_user = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_order_user"]));
1036 + $qlcd_wp_chatbot_order_user = sanitize_text_field($_POST["qlcd_wp_chatbot_order_user"]);
1215 1037 update_option('qlcd_wp_chatbot_order_user', sanitize_text_field($qlcd_wp_chatbot_order_user));
1216 1038 }
1217 1039
1218 1040 if(isset( $_POST["qc_wpbot_menu_order"]) && !empty($_POST["qc_wpbot_menu_order"])) {
1219 - $qc_wpbot_menu_order = wp_kses_post(wp_unslash($_POST["qc_wpbot_menu_order"]));
1041 + $qc_wpbot_menu_order = wp_kses_post($_POST["qc_wpbot_menu_order"]);
1220 1042 }else{ $qc_wpbot_menu_order='';}
1221 1043 update_option('qc_wpbot_menu_order', ($qc_wpbot_menu_order));
1222 1044
1223 1045 //wpwBot Load control
1224 1046 if(isset($_POST["wp_chatbot_show_home_page"])){
1225 - $wp_chatbot_show_home_page = sanitize_key((wp_unslash($_POST["wp_chatbot_show_home_page"])));
1047 + $wp_chatbot_show_home_page = sanitize_key(($_POST["wp_chatbot_show_home_page"]));
1226 1048 update_option('wp_chatbot_show_home_page', $wp_chatbot_show_home_page);
1227 1049 }
1228 1050
1229 1051
1230 1052 if(isset($_POST["wp_chatbot_show_posts"])){
1231 - $wp_chatbot_show_posts = sanitize_key((wp_unslash($_POST["wp_chatbot_show_posts"])));
1053 + $wp_chatbot_show_posts = sanitize_key(($_POST["wp_chatbot_show_posts"]));
1232 1054 update_option('wp_chatbot_show_posts', $wp_chatbot_show_posts);
1233 1055 }
1234 1056
1235 1057
1236 1058 if(isset($_POST["wp_chatbot_show_pages"])){
1237 - $wp_chatbot_show_pages = sanitize_key((wp_unslash($_POST["wp_chatbot_show_pages"])));
1059 + $wp_chatbot_show_pages = sanitize_key(($_POST["wp_chatbot_show_pages"]));
1238 1060 update_option('wp_chatbot_show_pages', $wp_chatbot_show_pages);
1239 1061 }
1240 1062
1241 1063 if(isset( $_POST["wp_chatbot_show_pages_list"])) {
1242 - $wp_chatbot_show_pages_list = wp_parse_id_list(wp_unslash($_POST["wp_chatbot_show_pages_list"]));
1064 + $wp_chatbot_show_pages_list = wp_parse_id_list($_POST["wp_chatbot_show_pages_list"]);
1243 1065 update_option('wp_chatbot_show_pages_list', maybe_serialize(sanitize_array($wp_chatbot_show_pages_list)));
1244 1066 }else{
1245 1067 $wp_chatbot_show_pages_list='';
1246 1068 update_option('wp_chatbot_show_pages_list', maybe_serialize(sanitize_array($wp_chatbot_show_pages_list)));
@@ -1245,9 +1067,9 @@
1245 1067 $wp_chatbot_show_pages_list='';
1246 1068 update_option('wp_chatbot_show_pages_list', maybe_serialize(sanitize_array($wp_chatbot_show_pages_list)));
1247 1069 }
1248 1070 if(isset( $_POST["wp_chatbot_exclude_post_list"])) {
1249 - $wp_chatbot_exclude_post_list = wp_unslash($_POST["wp_chatbot_exclude_post_list"]);
1071 + $wp_chatbot_exclude_post_list = $_POST["wp_chatbot_exclude_post_list"];
1250 1072 update_option('wp_chatbot_exclude_post_list', maybe_serialize(sanitize_array($wp_chatbot_exclude_post_list)));
1251 1073 }else{
1252 1074 $wp_chatbot_exclude_post_list='';
1253 1075 update_option('wp_chatbot_exclude_post_list', maybe_serialize(sanitize_array($wp_chatbot_exclude_post_list)));
@@ -1253,9 +1075,9 @@
1253 1075 update_option('wp_chatbot_exclude_post_list', maybe_serialize(sanitize_array($wp_chatbot_exclude_post_list)));
1254 1076 }
1255 1077
1256 1078 if(isset($_POST["wp_chatbot_show_wpcommerce"])){
1257 - $wp_chatbot_show_wpcommerce = sanitize_key((wp_unslash($_POST["wp_chatbot_show_wpcommerce"])));
1079 + $wp_chatbot_show_wpcommerce = sanitize_key(($_POST["wp_chatbot_show_wpcommerce"]));
1258 1080 update_option('wp_chatbot_show_wpcommerce', $wp_chatbot_show_wpcommerce);
1259 1081 }
1260 1082
1261 1083
@@ -1260,45 +1082,45 @@
1260 1082
1261 1083
1262 1084 //Stop Words Settings
1263 1085 if (isset($_POST["qlcd_wp_chatbot_stop_words_name"])) {
1264 - $qlcd_wp_chatbot_stop_words_name = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_stop_words_name"]));
1086 + $qlcd_wp_chatbot_stop_words_name = sanitize_text_field($_POST["qlcd_wp_chatbot_stop_words_name"]);
1265 1087 update_option('qlcd_wp_chatbot_stop_words_name', $qlcd_wp_chatbot_stop_words_name);
1266 1088 }
1267 1089 if (isset($_POST["qlcd_wp_chatbot_stop_words"])) {
1268 - $qlcd_wp_chatbot_stop_words = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_stop_words"]));
1090 + $qlcd_wp_chatbot_stop_words = sanitize_text_field($_POST["qlcd_wp_chatbot_stop_words"]);
1269 1091 update_option('qlcd_wp_chatbot_stop_words', $qlcd_wp_chatbot_stop_words);
1270 1092 }
1271 1093 //wpwbot icon settings.
1272 - $wp_chatbot_icon = isset( $_POST['wp_chatbot_icon'] ) ? sanitize_text_field(wp_unslash($_POST['wp_chatbot_icon'])) : 'icon-3.png';
1094 + $wp_chatbot_icon = isset( $_POST['wp_chatbot_icon'] ) ? sanitize_text_field($_POST['wp_chatbot_icon']) : 'icon-3.png';
1273 1095 update_option('wp_chatbot_icon', $wp_chatbot_icon);
1274 1096
1275 - $wp_chatbot_floatingiconbg_color = isset( $_POST['wp_chatbot_floatingiconbg_color'] ) ? sanitize_text_field(wp_unslash($_POST['wp_chatbot_floatingiconbg_color'])) : '#fff';
1097 + $wp_chatbot_floatingiconbg_color = isset( $_POST['wp_chatbot_floatingiconbg_color'] ) ? sanitize_text_field($_POST['wp_chatbot_floatingiconbg_color']) : '#fff';
1276 1098 update_option('wp_chatbot_floatingiconbg_color', $wp_chatbot_floatingiconbg_color);
1277 1099
1278 1100 // upload custom wpwbot icon path
1279 - $wp_chatbot_custom_icon_path = sanitize_text_field(wp_unslash($_POST['wp_chatbot_custom_icon_path']));
1101 + $wp_chatbot_custom_icon_path = sanitize_text_field($_POST['wp_chatbot_custom_icon_path']);
1280 1102 update_option('wp_chatbot_custom_icon_path', $wp_chatbot_custom_icon_path);
1281 1103 //Agent image
1282 1104 //wpwbot icon settings.
1283 - $wp_chatbot_icon = (isset($_POST['wp_chatbot_agent_image']) ? sanitize_text_field(wp_unslash($_POST['wp_chatbot_agent_image'])) : 'agent-13.png');
1105 + $wp_chatbot_icon = (isset($_POST['wp_chatbot_agent_image']) ? sanitize_text_field($_POST['wp_chatbot_agent_image']) : 'agent-13.png');
1284 1106 update_option('wp_chatbot_agent_image', $wp_chatbot_icon);
1285 1107 // upload custom wpwbot icon
1286 1108 if(isset($_POST['wp_chatbot_custom_agent_path'])){
1287 - $wp_chatbot_custom_agent_path = sanitize_text_field(wp_unslash($_POST['wp_chatbot_custom_agent_path']));
1109 + $wp_chatbot_custom_agent_path = sanitize_text_field($_POST['wp_chatbot_custom_agent_path']);
1288 1110 update_option('wp_chatbot_custom_agent_path', $wp_chatbot_custom_agent_path);
1289 1111 }
1290 1112
1291 1113 //Theming
1292 - $qcld_wb_chatbot_theme = (isset($_POST['qcld_wb_chatbot_theme']) ? sanitize_text_field(wp_unslash($_POST['qcld_wb_chatbot_theme'])) : 'template-00');
1114 + $qcld_wb_chatbot_theme = (isset($_POST['qcld_wb_chatbot_theme']) ? sanitize_text_field($_POST['qcld_wb_chatbot_theme']) : 'template-00');
1293 1115 update_option('qcld_wb_chatbot_theme', $qcld_wb_chatbot_theme);
1294 1116 //Theme custom background option
1295 1117 if(isset( $_POST["qcld_wb_chatbot_change_bg"])) {
1296 - $qcld_wb_chatbot_change_bg = sanitize_text_field(wp_unslash($_POST["qcld_wb_chatbot_change_bg"]));
1118 + $qcld_wb_chatbot_change_bg = sanitize_text_field($_POST["qcld_wb_chatbot_change_bg"]);
1297 1119 }else{$qcld_wb_chatbot_change_bg='';}
1298 1120 update_option('qcld_wb_chatbot_change_bg', $qcld_wb_chatbot_change_bg);
1299 1121 if(isset($_POST["qcld_wb_chatbot_board_bg_path"])){
1300 - $qcld_wb_chatbot_board_bg_path = sanitize_text_field(wp_unslash($_POST["qcld_wb_chatbot_board_bg_path"]));
1122 + $qcld_wb_chatbot_board_bg_path = sanitize_text_field($_POST["qcld_wb_chatbot_board_bg_path"]);
1301 1123 update_option('qcld_wb_chatbot_board_bg_path', wp_unslash($qcld_wb_chatbot_board_bg_path));
1302 1124 }
1303 1125
1304 1126
@@ -1308,614 +1130,310 @@
1308 1130 $wp_chatbot_custom_css = wp_unslash($_POST["wp_chatbot_custom_css"]);
1309 1131 update_option('wp_chatbot_custom_css', sanitize_text_field($wp_chatbot_custom_css));
1310 1132 }
1311 1133
1312 - if (isset($_POST["qlcd_wp_chatbot_dialogflow_project_id"])) {
1313 - $qlcd_wp_chatbot_dialogflow_project_id = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_dialogflow_project_id"]));
1314 - } else {
1315 - $qlcd_wp_chatbot_dialogflow_project_id = '';
1316 - }
1317 - update_option('qlcd_wp_chatbot_dialogflow_project_id', $qlcd_wp_chatbot_dialogflow_project_id);
1134 + $qlcd_wp_chatbot_dialogflow_project_id= @$_POST["qlcd_wp_chatbot_dialogflow_project_id"];
1135 + update_option('qlcd_wp_chatbot_dialogflow_project_id', sanitize_text_field($qlcd_wp_chatbot_dialogflow_project_id));
1318 1136
1319 - if (isset($_POST["wp_chatbot_df_api"])) {
1320 - $wp_chatbot_df_api = sanitize_text_field(wp_unslash($_POST["wp_chatbot_df_api"]));
1321 - } else {
1322 - $wp_chatbot_df_api = '';
1323 - }
1324 - update_option('wp_chatbot_df_api', $wp_chatbot_df_api);
1137 + $wp_chatbot_df_api= @$_POST["wp_chatbot_df_api"];
1138 + update_option('wp_chatbot_df_api', sanitize_text_field($wp_chatbot_df_api));
1325 1139
1326 - if (isset($_POST["qlcd_wp_chatbot_dialogflow_project_key"])) {
1327 - $qlcd_wp_chatbot_dialogflow_project_key = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_dialogflow_project_key"]));
1328 - } else {
1329 - $qlcd_wp_chatbot_dialogflow_project_key = '';
1330 - }
1331 - update_option('qlcd_wp_chatbot_dialogflow_project_key', $qlcd_wp_chatbot_dialogflow_project_key);
1140 +
1141 +
1142 + $qlcd_wp_chatbot_dialogflow_project_key= @$_POST["qlcd_wp_chatbot_dialogflow_project_key"];
1143 + update_option('qlcd_wp_chatbot_dialogflow_project_key', wp_unslash($qlcd_wp_chatbot_dialogflow_project_key));
1332 1144
1333 1145 /****Language center settings. ****/
1334 1146 //identity
1335 - if (isset($_POST["qlcd_wp_chatbot_host"])) {
1336 - $qlcd_wp_chatbot_host = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_host"]));
1337 - } else {
1338 - $qlcd_wp_chatbot_host = '';
1339 - }
1340 - update_option('qlcd_wp_chatbot_host', $qlcd_wp_chatbot_host);
1341 -
1342 - if (isset($_POST["qlcd_wp_chatbot_agent"])) {
1343 - $qlcd_wp_chatbot_agent = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_agent"]));
1344 - } else {
1345 - $qlcd_wp_chatbot_agent = '';
1346 - }
1347 - update_option('qlcd_wp_chatbot_agent', $qlcd_wp_chatbot_agent);
1348 -
1349 - if (isset($_POST["qlcd_wp_chatbot_shopper_demo_name"])) {
1350 - $qlcd_wp_chatbot_shopper_demo_name = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_shopper_demo_name"]));
1351 - } else {
1352 - $qlcd_wp_chatbot_shopper_demo_name = '';
1353 - }
1354 - update_option('qlcd_wp_chatbot_shopper_demo_name', $qlcd_wp_chatbot_shopper_demo_name);
1355 -
1356 - if (isset($_POST["qlcd_wp_chatbot_yes"])) {
1357 - $qlcd_wp_chatbot_yes = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_yes"]));
1358 - } else {
1359 - $qlcd_wp_chatbot_yes = '';
1360 - }
1361 - update_option('qlcd_wp_chatbot_yes', $qlcd_wp_chatbot_yes);
1362 -
1363 - if (isset($_POST["qlcd_wp_chatbot_no"])) {
1364 - $qlcd_wp_chatbot_no = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_no"]));
1365 - } else {
1366 - $qlcd_wp_chatbot_no = '';
1367 - }
1368 - update_option('qlcd_wp_chatbot_no', $qlcd_wp_chatbot_no);
1369 -
1370 - if (isset($_POST["qlcd_wp_chatbot_or"])) {
1371 - $qlcd_wp_chatbot_or = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_or"]));
1372 - } else {
1373 - $qlcd_wp_chatbot_or = '';
1374 - }
1375 - update_option('qlcd_wp_chatbot_or', $qlcd_wp_chatbot_or);
1376 -
1377 - if (isset($_POST["qlcd_wp_chatbot_sorry"])) {
1378 - $qlcd_wp_chatbot_sorry = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_sorry"]));
1379 - } else {
1380 - $qlcd_wp_chatbot_sorry = '';
1381 - }
1382 - update_option('qlcd_wp_chatbot_sorry', $qlcd_wp_chatbot_sorry);
1383 -
1384 - if (isset($_POST["skip_chat_reactions_menu"])) {
1385 - $skip_chat_reactions_menu = sanitize_text_field(wp_unslash($_POST["skip_chat_reactions_menu"]));
1386 - } else {
1387 - $skip_chat_reactions_menu = '';
1388 - }
1389 - update_option('skip_chat_reactions_menu', $skip_chat_reactions_menu);
1390 -
1391 - if (isset($_POST["qlcd_wp_chatbot_report_text"])) {
1392 - $qlcd_wp_chatbot_report_text = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_report_text"]));
1393 - } else {
1394 - $qlcd_wp_chatbot_report_text = '';
1395 - }
1396 - update_option('qlcd_wp_chatbot_report_text', $qlcd_wp_chatbot_report_text);
1397 -
1398 - if (isset($_POST["qlcd_wp_chatbot_report_text"])) {
1399 - $qlcd_wp_chatbot_report_text = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_report_text"]));
1400 - } else {
1401 - $qlcd_wp_chatbot_report_text = '';
1402 - }
1403 - update_option('qlcd_wp_chatbot_report_text', $qlcd_wp_chatbot_report_text);
1404 -
1405 - if (isset($_POST["enable_chat_report_menu"])) {
1406 - $enable_chat_report_menu = sanitize_text_field(wp_unslash($_POST["enable_chat_report_menu"]));
1407 - } else {
1408 - $enable_chat_report_menu = '';
1409 - }
1410 - update_option('enable_chat_report_menu', $enable_chat_report_menu);
1411 -
1412 - if (isset($_POST["qlcd_wp_chatbot_like_text"])) {
1413 - $qlcd_wp_chatbot_like_text = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_like_text"]));
1414 - } else {
1415 - $qlcd_wp_chatbot_like_text = '';
1416 - }
1417 - update_option('qlcd_wp_chatbot_like_text', $qlcd_wp_chatbot_like_text);
1418 -
1419 - if (isset($_POST["qlcd_wp_chatbot_dislike_text"])) {
1420 - $qlcd_wp_chatbot_dislike_text = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_dislike_text"]));
1421 - } else {
1422 - $qlcd_wp_chatbot_dislike_text = '';
1423 - }
1424 - update_option('qlcd_wp_chatbot_dislike_text', $qlcd_wp_chatbot_dislike_text);
1425 -
1426 - if (isset($_POST["enable_chat_share_menu"])) {
1427 - $enable_chat_share_menu = sanitize_text_field(wp_unslash($_POST["enable_chat_share_menu"]));
1428 - } else {
1429 - $enable_chat_share_menu = '';
1430 - }
1431 - update_option('enable_chat_share_menu', $enable_chat_share_menu);
1432 -
1433 - if (isset($_POST["qlcd_wp_chatbot_share_text"])) {
1434 - $qlcd_wp_chatbot_share_text = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_share_text"]));
1435 - } else {
1436 - $qlcd_wp_chatbot_share_text = '';
1437 - }
1438 - update_option('qlcd_wp_chatbot_share_text', $qlcd_wp_chatbot_share_text);
1439 -
1440 - if (isset($_POST["qlcd_wp_chatbot_agent_join"])) {
1441 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1442 - $qlcd_wp_chatbot_agent_join = wp_unslash($_POST["qlcd_wp_chatbot_agent_join"]);
1443 - $qlcd_wp_chatbot_agent_join = sanitize_array($qlcd_wp_chatbot_agent_join);
1444 - } else {
1445 - $qlcd_wp_chatbot_agent_join = array();
1446 - }
1447 - update_option('qlcd_wp_chatbot_agent_join', maybe_serialize($qlcd_wp_chatbot_agent_join));
1448 -
1147 + $qlcd_wp_chatbot_host = esc_html(stripslashes(@$_POST["qlcd_wp_chatbot_host"]));
1148 + update_option('qlcd_wp_chatbot_host', sanitize_text_field($qlcd_wp_chatbot_host));
1149 + $qlcd_wp_chatbot_agent = esc_html(stripslashes($_POST["qlcd_wp_chatbot_agent"]));
1150 + update_option('qlcd_wp_chatbot_agent', sanitize_text_field($qlcd_wp_chatbot_agent));
1151 + $qlcd_wp_chatbot_shopper_demo_name = esc_html(stripslashes(@$_POST["qlcd_wp_chatbot_shopper_demo_name"]));
1152 + update_option('qlcd_wp_chatbot_shopper_demo_name', sanitize_text_field($qlcd_wp_chatbot_shopper_demo_name));
1153 + $qlcd_wp_chatbot_yes = esc_html(stripslashes(@$_POST["qlcd_wp_chatbot_yes"]));
1154 + update_option('qlcd_wp_chatbot_yes', sanitize_text_field($qlcd_wp_chatbot_yes));
1155 + $qlcd_wp_chatbot_no = esc_html(stripslashes(@$_POST["qlcd_wp_chatbot_no"]));
1156 + update_option('qlcd_wp_chatbot_no', sanitize_text_field($qlcd_wp_chatbot_no));
1157 + $qlcd_wp_chatbot_or = esc_html(stripslashes(@$_POST["qlcd_wp_chatbot_or"]));
1158 + update_option('qlcd_wp_chatbot_or', sanitize_text_field($qlcd_wp_chatbot_or));
1159 + $qlcd_wp_chatbot_sorry = esc_html(stripslashes(@$_POST["qlcd_wp_chatbot_sorry"]));
1160 + update_option('qlcd_wp_chatbot_sorry', sanitize_text_field($qlcd_wp_chatbot_sorry));
1161 + $qlcd_wp_chatbot_agent_join = ((@$_POST["qlcd_wp_chatbot_agent_join"]));
1162 + update_option('qlcd_wp_chatbot_agent_join', maybe_serialize(sanitize_array($qlcd_wp_chatbot_agent_join)));
1449 1163 //Greeting.
1450 - if (isset($_POST["qlcd_wp_chatbot_welcome"])) {
1451 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1452 - $qlcd_wp_chatbot_welcome = wp_unslash($_POST["qlcd_wp_chatbot_welcome"]);
1453 - $qlcd_wp_chatbot_welcome = sanitize_array($qlcd_wp_chatbot_welcome);
1454 - } else {
1455 - $qlcd_wp_chatbot_welcome = array();
1456 - }
1457 - update_option('qlcd_wp_chatbot_welcome', maybe_serialize($qlcd_wp_chatbot_welcome));
1164 + $qlcd_wp_chatbot_welcome = ((@$_POST["qlcd_wp_chatbot_welcome"]));
1165 + update_option('qlcd_wp_chatbot_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_welcome)));
1166 + $qlcd_wp_chatbot_back_to_start = ((@$_POST["qlcd_wp_chatbot_back_to_start"]));
1167 + update_option('qlcd_wp_chatbot_back_to_start', maybe_serialize(sanitize_array($qlcd_wp_chatbot_back_to_start)));
1168 + $qlcd_wp_chatbot_hi_there = ((@$_POST["qlcd_wp_chatbot_hi_there"]));
1169 + update_option('qlcd_wp_chatbot_hi_there', maybe_serialize(sanitize_array($qlcd_wp_chatbot_hi_there)));
1170 + $qlcd_wp_chatbot_hello = ((@$_POST["qlcd_wp_chatbot_hello"]));
1171 + update_option('qlcd_wp_chatbot_hello', maybe_serialize(sanitize_array($qlcd_wp_chatbot_hello)));
1172 + $qlcd_wp_chatbot_welcome_back = ((@$_POST["qlcd_wp_chatbot_welcome_back"]));
1173 + update_option('qlcd_wp_chatbot_welcome_back', maybe_serialize(sanitize_array($qlcd_wp_chatbot_welcome_back)));
1174 + $qlcd_wp_chatbot_asking_name = ((@$_POST["qlcd_wp_chatbot_asking_name"]));
1175 + update_option('qlcd_wp_chatbot_asking_name', maybe_serialize(sanitize_array($qlcd_wp_chatbot_asking_name)));
1176 + $qlcd_wp_chatbot_name_greeting = ((@$_POST["qlcd_wp_chatbot_name_greeting"]));
1177 + update_option('qlcd_wp_chatbot_name_greeting', maybe_serialize(sanitize_array($qlcd_wp_chatbot_name_greeting)));
1178 + $qlcd_wp_chatbot_i_am = ((@$_POST["qlcd_wp_chatbot_i_am"]));
1179 + update_option('qlcd_wp_chatbot_i_am', maybe_serialize(sanitize_array($qlcd_wp_chatbot_i_am)));
1180 + $qlcd_wp_chatbot_is_typing = ((@$_POST["qlcd_wp_chatbot_is_typing"]));
1181 + update_option('qlcd_wp_chatbot_is_typing', maybe_serialize(sanitize_array($qlcd_wp_chatbot_is_typing)));
1182 + $qlcd_wp_chatbot_send_a_msg= ((@$_POST["qlcd_wp_chatbot_send_a_msg"]));
1183 + update_option('qlcd_wp_chatbot_send_a_msg', maybe_serialize(sanitize_array($qlcd_wp_chatbot_send_a_msg)));
1184 + $qlcd_wp_chatbot_choose_option= ((@$_POST["qlcd_wp_chatbot_choose_option"]));
1185 + update_option('qlcd_wp_chatbot_choose_option', maybe_serialize(sanitize_array($qlcd_wp_chatbot_choose_option)));
1458 1186
1459 - if (isset($_POST["qlcd_wp_chatbot_back_to_start"])) {
1460 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1461 - $qlcd_wp_chatbot_back_to_start = wp_unslash($_POST["qlcd_wp_chatbot_back_to_start"]);
1462 - $qlcd_wp_chatbot_back_to_start = sanitize_array($qlcd_wp_chatbot_back_to_start);
1463 - } else {
1464 - $qlcd_wp_chatbot_back_to_start = array();
1187 + if(isset($_POST["qlcd_wp_chatbot_viewed_products"])){
1188 + $qlcd_wp_chatbot_viewed_products= esc_html((@$_POST["qlcd_wp_chatbot_viewed_products"]));
1189 + update_option('qlcd_wp_chatbot_viewed_products', maybe_serialize(sanitize_array($qlcd_wp_chatbot_viewed_products)));
1465 1190 }
1466 - update_option('qlcd_wp_chatbot_back_to_start', maybe_serialize($qlcd_wp_chatbot_back_to_start));
1467 1191
1468 - if (isset($_POST["qlcd_wp_chatbot_hi_there"])) {
1469 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1470 - $qlcd_wp_chatbot_hi_there = wp_unslash($_POST["qlcd_wp_chatbot_hi_there"]);
1471 - $qlcd_wp_chatbot_hi_there = sanitize_array($qlcd_wp_chatbot_hi_there);
1472 - } else {
1473 - $qlcd_wp_chatbot_hi_there = array();
1474 - }
1475 - update_option('qlcd_wp_chatbot_hi_there', maybe_serialize($qlcd_wp_chatbot_hi_there));
1476 -
1477 - if (isset($_POST["qlcd_wp_chatbot_hello"])) {
1478 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1479 - $qlcd_wp_chatbot_hello = wp_unslash($_POST["qlcd_wp_chatbot_hello"]);
1480 - $qlcd_wp_chatbot_hello = sanitize_array($qlcd_wp_chatbot_hello);
1481 - } else {
1482 - $qlcd_wp_chatbot_hello = array();
1483 - }
1484 - update_option('qlcd_wp_chatbot_hello', maybe_serialize($qlcd_wp_chatbot_hello));
1485 -
1486 - if (isset($_POST["qlcd_wp_chatbot_welcome_back"])) {
1487 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1488 - $qlcd_wp_chatbot_welcome_back = wp_unslash( $_POST["qlcd_wp_chatbot_welcome_back"] );
1489 - $qlcd_wp_chatbot_welcome_back = sanitize_array( $qlcd_wp_chatbot_welcome_back );
1490 - } else {
1491 - $qlcd_wp_chatbot_welcome_back = array();
1492 - }
1493 - update_option('qlcd_wp_chatbot_welcome_back', maybe_serialize($qlcd_wp_chatbot_welcome_back));
1494 -
1495 - if (isset($_POST["qlcd_wp_chatbot_asking_name"])) {
1496 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1497 - $qlcd_wp_chatbot_asking_name = wp_unslash( $_POST["qlcd_wp_chatbot_asking_name"] );
1498 - $qlcd_wp_chatbot_asking_name = sanitize_array( $qlcd_wp_chatbot_asking_name );
1499 - } else {
1500 - $qlcd_wp_chatbot_asking_name = array();
1501 - }
1502 - update_option('qlcd_wp_chatbot_asking_name', maybe_serialize($qlcd_wp_chatbot_asking_name));
1503 -
1504 - if (isset($_POST["qlcd_wp_chatbot_name_greeting"])) {
1505 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1506 - $qlcd_wp_chatbot_name_greeting = wp_unslash( $_POST["qlcd_wp_chatbot_name_greeting"] );
1507 - $qlcd_wp_chatbot_name_greeting = sanitize_array( $qlcd_wp_chatbot_name_greeting );
1508 - } else {
1509 - $qlcd_wp_chatbot_name_greeting = array();
1510 - }
1511 - update_option('qlcd_wp_chatbot_name_greeting', maybe_serialize($qlcd_wp_chatbot_name_greeting));
1512 -
1513 - if (isset($_POST["qlcd_wp_chatbot_i_am"])) {
1514 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1515 - $qlcd_wp_chatbot_i_am = wp_unslash( $_POST["qlcd_wp_chatbot_i_am"] );
1516 - $qlcd_wp_chatbot_i_am = sanitize_array( $qlcd_wp_chatbot_i_am );
1517 - } else {
1518 - $qlcd_wp_chatbot_i_am = array();
1519 - }
1520 - update_option('qlcd_wp_chatbot_i_am', maybe_serialize($qlcd_wp_chatbot_i_am));
1521 -
1522 - if (isset($_POST["qlcd_wp_chatbot_is_typing"])) {
1523 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1524 - $qlcd_wp_chatbot_is_typing = wp_unslash( $_POST["qlcd_wp_chatbot_is_typing"] );
1525 - $qlcd_wp_chatbot_is_typing = sanitize_array( $qlcd_wp_chatbot_is_typing );
1526 - } else {
1527 - $qlcd_wp_chatbot_is_typing = array();
1528 - }
1529 - update_option('qlcd_wp_chatbot_is_typing', maybe_serialize($qlcd_wp_chatbot_is_typing));
1530 -
1531 - if (isset($_POST["qlcd_wp_chatbot_send_a_msg"])) {
1532 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1533 - $qlcd_wp_chatbot_send_a_msg = wp_unslash( $_POST["qlcd_wp_chatbot_send_a_msg"] );
1534 - $qlcd_wp_chatbot_send_a_msg = sanitize_array( $qlcd_wp_chatbot_send_a_msg );
1535 - } else {
1536 - $qlcd_wp_chatbot_send_a_msg = array();
1537 - }
1538 - update_option('qlcd_wp_chatbot_send_a_msg', maybe_serialize($qlcd_wp_chatbot_send_a_msg));
1539 -
1540 - if (isset($_POST["qlcd_wp_chatbot_choose_option"])) {
1541 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1542 - $qlcd_wp_chatbot_choose_option = wp_unslash( $_POST["qlcd_wp_chatbot_choose_option"] );
1543 - $qlcd_wp_chatbot_choose_option = sanitize_array( $qlcd_wp_chatbot_choose_option );
1544 - } else {
1545 - $qlcd_wp_chatbot_choose_option = array();
1546 - }
1547 - update_option('qlcd_wp_chatbot_choose_option', maybe_serialize($qlcd_wp_chatbot_choose_option));
1548 -
1549 - if (isset($_POST["qlcd_wp_chatbot_viewed_products"])) {
1550 -
1551 - $qlcd_wp_chatbot_viewed_products = wp_unslash( $_POST["qlcd_wp_chatbot_viewed_products"] );
1552 - $qlcd_wp_chatbot_viewed_products = sanitize_array( $qlcd_wp_chatbot_viewed_products );
1553 - } else {
1554 - $qlcd_wp_chatbot_viewed_products = array();
1555 - }
1556 - update_option('qlcd_wp_chatbot_viewed_products', maybe_serialize($qlcd_wp_chatbot_viewed_products));
1557 -
1558 1192 if(isset($_POST["qlcd_wp_chatbot_shopping_cart"])){
1559 - $qlcd_wp_chatbot_shopping_cart= esc_html((@wp_unslash($_POST["qlcd_wp_chatbot_shopping_cart"])));
1193 + $qlcd_wp_chatbot_shopping_cart= esc_html((@$_POST["qlcd_wp_chatbot_shopping_cart"]));
1560 1194 update_option('qlcd_wp_chatbot_shopping_cart', maybe_serialize(sanitize_array($qlcd_wp_chatbot_shopping_cart)));
1561 1195 }
1562 1196
1563 1197 if(isset($_POST["qlcd_wp_chatbot_add_to_cart"])){
1564 - $qlcd_wp_chatbot_add_to_cart= (@wp_unslash($_POST["qlcd_wp_chatbot_add_to_cart"]));
1198 + $qlcd_wp_chatbot_add_to_cart= (@$_POST["qlcd_wp_chatbot_add_to_cart"]);
1565 1199 update_option('qlcd_wp_chatbot_add_to_cart', maybe_serialize(sanitize_array($qlcd_wp_chatbot_add_to_cart)));
1566 1200 }
1567 1201 if(isset($_POST["qlcd_wp_chatbot_cart_link"])){
1568 - $qlcd_wp_chatbot_cart_link= @wp_unslash($_POST["qlcd_wp_chatbot_cart_link"]);
1202 + $qlcd_wp_chatbot_cart_link= @$_POST["qlcd_wp_chatbot_cart_link"];
1569 1203 update_option('qlcd_wp_chatbot_cart_link', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_link)));
1570 1204 }
1571 1205 if(isset($_POST["qlcd_wp_chatbot_checkout_link"])){
1572 - $qlcd_wp_chatbot_checkout_link= @wp_unslash($_POST["qlcd_wp_chatbot_checkout_link"]);
1206 + $qlcd_wp_chatbot_checkout_link= @$_POST["qlcd_wp_chatbot_checkout_link"];
1573 1207 update_option('qlcd_wp_chatbot_checkout_link', maybe_serialize(sanitize_array($qlcd_wp_chatbot_checkout_link)));
1574 1208 }
1575 1209 if(isset($_POST["qlcd_wp_chatbot_cart_welcome"])){
1576 - $qlcd_wp_chatbot_cart_welcome= (@wp_unslash($_POST["qlcd_wp_chatbot_cart_welcome"]));
1210 + $qlcd_wp_chatbot_cart_welcome= (@$_POST["qlcd_wp_chatbot_cart_welcome"]);
1577 1211 update_option('qlcd_wp_chatbot_cart_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_welcome)));
1578 1212 }
1579 1213 if(isset($_POST["qlcd_wp_chatbot_featured_product_welcome"])){
1580 - $qlcd_wp_chatbot_featured_product_welcome= @wp_unslash($_POST["qlcd_wp_chatbot_featured_product_welcome"]);
1214 + $qlcd_wp_chatbot_featured_product_welcome= @$_POST["qlcd_wp_chatbot_featured_product_welcome"];
1581 1215 update_option('qlcd_wp_chatbot_featured_product_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_featured_product_welcome)));
1582 1216 }
1583 1217
1584 1218 if(isset($_POST["qlcd_wp_chatbot_viewed_product_welcome"])){
1585 - $qlcd_wp_chatbot_viewed_product_welcome= @wp_unslash($_POST["qlcd_wp_chatbot_viewed_product_welcome"]);
1219 + $qlcd_wp_chatbot_viewed_product_welcome= @$_POST["qlcd_wp_chatbot_viewed_product_welcome"];
1586 1220 update_option('qlcd_wp_chatbot_viewed_product_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_viewed_product_welcome)));
1587 1221 }
1588 1222 if(isset($_POST["qlcd_wp_chatbot_latest_product_welcome"])){
1589 - $qlcd_wp_chatbot_latest_product_welcome= @wp_unslash($_POST["qlcd_wp_chatbot_latest_product_welcome"]);
1223 + $qlcd_wp_chatbot_latest_product_welcome= @$_POST["qlcd_wp_chatbot_latest_product_welcome"];
1590 1224 update_option('qlcd_wp_chatbot_latest_product_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_latest_product_welcome)));
1591 1225 }
1592 1226
1593 1227 if(isset($_POST["qlcd_wp_chatbot_cart_title"])){
1594 - $qlcd_wp_chatbot_cart_title= @wp_unslash($_POST["qlcd_wp_chatbot_cart_title"]);
1228 + $qlcd_wp_chatbot_cart_title= @$_POST["qlcd_wp_chatbot_cart_title"];
1595 1229 update_option('qlcd_wp_chatbot_cart_title', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_title)));
1596 1230 }
1597 1231 if(isset($_POST["qlcd_wp_chatbot_cart_quantity"])){
1598 - $qlcd_wp_chatbot_cart_quantity= @wp_unslash($_POST["qlcd_wp_chatbot_cart_quantity"]);
1232 + $qlcd_wp_chatbot_cart_quantity= @$_POST["qlcd_wp_chatbot_cart_quantity"];
1599 1233 update_option('qlcd_wp_chatbot_cart_quantity', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_quantity)));
1600 1234 }
1601 1235 if(isset($_POST["qlcd_wp_chatbot_cart_price"])){
1602 - $qlcd_wp_chatbot_cart_price= @wp_unslash($_POST["qlcd_wp_chatbot_cart_price"]);
1236 + $qlcd_wp_chatbot_cart_price= @$_POST["qlcd_wp_chatbot_cart_price"];
1603 1237 update_option('qlcd_wp_chatbot_cart_price', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_price)));
1604 1238 }
1605 1239 if(isset($_POST["qlcd_wp_chatbot_no_cart_items"])){
1606 - $qlcd_wp_chatbot_no_cart_items= wp_unslash(@$_POST["qlcd_wp_chatbot_no_cart_items"]);
1240 + $qlcd_wp_chatbot_no_cart_items= @$_POST["qlcd_wp_chatbot_no_cart_items"];
1607 1241 update_option('qlcd_wp_chatbot_no_cart_items', maybe_serialize(sanitize_array($qlcd_wp_chatbot_no_cart_items)));
1608 1242 }
1609 1243 if(isset($_POST["qlcd_wp_chatbot_cart_updating"])){
1610 - $qlcd_wp_chatbot_cart_updating= @wp_unslash($_POST["qlcd_wp_chatbot_cart_updating"]);
1244 + $qlcd_wp_chatbot_cart_updating= @$_POST["qlcd_wp_chatbot_cart_updating"];
1611 1245 update_option('qlcd_wp_chatbot_cart_updating', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_updating)));
1612 1246 }
1613 1247 if(isset($_POST["qlcd_wp_chatbot_cart_removing"])){
1614 - $qlcd_wp_chatbot_cart_removing= @wp_unslash($_POST["qlcd_wp_chatbot_cart_removing"]);
1248 + $qlcd_wp_chatbot_cart_removing= @$_POST["qlcd_wp_chatbot_cart_removing"];
1615 1249 update_option('qlcd_wp_chatbot_cart_removing', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_removing)));
1616 1250 }
1617 1251 //wpwBot wildcard settings
1618 - if (isset($_POST["qlcd_wp_chatbot_wildcard_msg"])) {
1619 - $qlcd_wp_chatbot_wildcard_msg = wp_unslash( $_POST["qlcd_wp_chatbot_wildcard_msg"] );
1620 - $qlcd_wp_chatbot_wildcard_msg = sanitize_array( $qlcd_wp_chatbot_wildcard_msg );
1621 -
1622 - update_option('qlcd_wp_chatbot_wildcard_msg', maybe_serialize($qlcd_wp_chatbot_wildcard_msg));
1623 - } else {
1624 - update_option('qlcd_wp_chatbot_wildcard_msg', maybe_serialize(array()));
1625 - }
1252 + $qlcd_wp_chatbot_wildcard_msg = @$_POST["qlcd_wp_chatbot_wildcard_msg"];
1253 + update_option('qlcd_wp_chatbot_wildcard_msg', maybe_serialize(sanitize_array($qlcd_wp_chatbot_wildcard_msg)));
1626 1254 //empty filter message repeat.
1627 - if (isset($_POST["qlcd_wp_chatbot_empty_filter_msg"])) {
1628 - $qlcd_wp_chatbot_empty_filter_msg = wp_unslash( $_POST["qlcd_wp_chatbot_empty_filter_msg"] );
1629 - $qlcd_wp_chatbot_empty_filter_msg = sanitize_array( $qlcd_wp_chatbot_empty_filter_msg );
1630 -
1631 - update_option('qlcd_wp_chatbot_empty_filter_msg', maybe_serialize($qlcd_wp_chatbot_empty_filter_msg));
1632 - } else {
1633 - update_option('qlcd_wp_chatbot_empty_filter_msg', maybe_serialize(array()));
1634 - }
1255 + $qlcd_wp_chatbot_empty_filter_msg = @$_POST["qlcd_wp_chatbot_empty_filter_msg"];
1256 + update_option('qlcd_wp_chatbot_empty_filter_msg', maybe_serialize(sanitize_array($qlcd_wp_chatbot_empty_filter_msg)));
1635 1257
1636 - if (isset($_POST["qlcd_wp_chatbot_did_you_mean"])) {
1637 - $qlcd_wp_chatbot_did_you_mean = wp_unslash( $_POST["qlcd_wp_chatbot_did_you_mean"] );
1638 - $qlcd_wp_chatbot_did_you_mean = sanitize_array( $qlcd_wp_chatbot_did_you_mean );
1639 - update_option('qlcd_wp_chatbot_did_you_mean', maybe_serialize($qlcd_wp_chatbot_did_you_mean));
1640 - } else {
1641 - update_option('qlcd_wp_chatbot_did_you_mean', maybe_serialize(array()));
1642 - }
1258 + $qlcd_wp_chatbot_did_you_mean = @$_POST["qlcd_wp_chatbot_did_you_mean"];
1259 + update_option('qlcd_wp_chatbot_did_you_mean', maybe_serialize(sanitize_array($qlcd_wp_chatbot_did_you_mean)));
1643 1260 //help welcome and message
1644 - if (isset($_POST["qlcd_wp_chatbot_help_welcome"])) {
1645 - $qlcd_wp_chatbot_help_welcome = wp_unslash( $_POST["qlcd_wp_chatbot_help_welcome"] );
1646 - $qlcd_wp_chatbot_help_welcome = sanitize_array( $qlcd_wp_chatbot_help_welcome );
1647 - update_option('qlcd_wp_chatbot_help_welcome', maybe_serialize($qlcd_wp_chatbot_help_welcome));
1648 - } else {
1649 - update_option('qlcd_wp_chatbot_help_welcome', maybe_serialize(array()));
1650 - }
1651 - if (isset($_POST["qlcd_wp_chatbot_help_msg"])) {
1652 - $qlcd_wp_chatbot_help_msg = wp_unslash( $_POST["qlcd_wp_chatbot_help_msg"] );
1653 - $qlcd_wp_chatbot_help_msg = sanitize_array( $qlcd_wp_chatbot_help_msg );
1654 - update_option('qlcd_wp_chatbot_help_msg', maybe_serialize($qlcd_wp_chatbot_help_msg));
1655 - } else {
1656 - update_option('qlcd_wp_chatbot_help_msg', maybe_serialize(array()));
1657 - }
1261 + $qlcd_wp_chatbot_help_welcome = (@$_POST["qlcd_wp_chatbot_help_welcome"]);
1262 + update_option('qlcd_wp_chatbot_help_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_help_welcome)));
1263 + $qlcd_wp_chatbot_help_msg = (@$_POST["qlcd_wp_chatbot_help_msg"]);
1264 + update_option('qlcd_wp_chatbot_help_msg', maybe_serialize(sanitize_array($qlcd_wp_chatbot_help_msg)));
1658 1265 //To clear Conversation history.
1659 - if (isset($_POST["qlcd_wp_chatbot_reset"])) {
1660 - $qlcd_wp_chatbot_reset = wp_unslash( $_POST["qlcd_wp_chatbot_reset"] );
1661 - $qlcd_wp_chatbot_reset = sanitize_array( $qlcd_wp_chatbot_reset );
1662 - update_option('qlcd_wp_chatbot_reset', maybe_serialize($qlcd_wp_chatbot_reset));
1663 - } else {
1664 - update_option('qlcd_wp_chatbot_reset', maybe_serialize(array()));
1665 - }
1266 + $qlcd_wp_chatbot_reset = (@$_POST["qlcd_wp_chatbot_reset"]);
1267 + update_option('qlcd_wp_chatbot_reset', maybe_serialize(sanitize_array($qlcd_wp_chatbot_reset)));
1666 1268 //systems keyword.
1667 - if (isset($_POST["qlcd_wp_chatbot_sys_key_help"])) {
1668 - $qlcd_wp_chatbot_sys_key_help = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_sys_key_help"]));
1669 - update_option('qlcd_wp_chatbot_sys_key_help', $qlcd_wp_chatbot_sys_key_help);
1670 - } else {
1671 - update_option('qlcd_wp_chatbot_sys_key_help', '');
1672 - }
1269 + $qlcd_wp_chatbot_sys_key_help = stripslashes(esc_html(@$_POST["qlcd_wp_chatbot_sys_key_help"]));
1270 + update_option('qlcd_wp_chatbot_sys_key_help', sanitize_text_field($qlcd_wp_chatbot_sys_key_help));
1673 1271 if(isset($_POST["qlcd_wp_chatbot_sys_key_product"])){
1674 - $qlcd_wp_chatbot_sys_key_product = esc_html((@wp_unslash($_POST["qlcd_wp_chatbot_sys_key_product"])));
1272 + $qlcd_wp_chatbot_sys_key_product = esc_html((@$_POST["qlcd_wp_chatbot_sys_key_product"]));
1675 1273 update_option('qlcd_wp_chatbot_sys_key_product', sanitize_text_field($qlcd_wp_chatbot_sys_key_product));
1676 1274 }
1677 1275 if(isset($_POST["qlcd_wp_chatbot_sys_key_catalog"])){
1678 - $qlcd_wp_chatbot_sys_key_catalog = (@wp_unslash($_POST["qlcd_wp_chatbot_sys_key_catalog"]));
1276 + $qlcd_wp_chatbot_sys_key_catalog = (@$_POST["qlcd_wp_chatbot_sys_key_catalog"]);
1679 1277 update_option('qlcd_wp_chatbot_sys_key_catalog', sanitize_text_field($qlcd_wp_chatbot_sys_key_catalog));
1680 1278 }
1681 1279 if(isset($_POST["qlcd_wp_chatbot_sys_key_order"])){
1682 - $qlcd_wp_chatbot_sys_key_order = (@wp_unslash($_POST["qlcd_wp_chatbot_sys_key_order"]));
1280 + $qlcd_wp_chatbot_sys_key_order = (@$_POST["qlcd_wp_chatbot_sys_key_order"]);
1683 1281 update_option('qlcd_wp_chatbot_sys_key_order', sanitize_text_field($qlcd_wp_chatbot_sys_key_order));
1684 1282 }
1685 - if (isset($_POST["qlcd_wp_chatbot_sys_key_support"])) {
1686 - $qlcd_wp_chatbot_sys_key_support = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_sys_key_support"]));
1687 - update_option('qlcd_wp_chatbot_sys_key_support', $qlcd_wp_chatbot_sys_key_support);
1688 - } else {
1689 - update_option('qlcd_wp_chatbot_sys_key_support', '');
1690 - }
1691 - if (isset($_POST["qlcd_wp_chatbot_sys_key_reset"])) {
1692 - $qlcd_wp_chatbot_sys_key_reset = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_sys_key_reset"]));
1693 - update_option('qlcd_wp_chatbot_sys_key_reset', $qlcd_wp_chatbot_sys_key_reset);
1694 - } else {
1695 - update_option('qlcd_wp_chatbot_sys_key_reset', '');
1696 - }
1697 - if (isset($_POST["qlcd_wp_chatbot_sys_key_email"])) {
1698 - $qlcd_wp_chatbot_sys_key_email = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_sys_key_email"]));
1699 - update_option('qlcd_wp_chatbot_sys_key_email', $qlcd_wp_chatbot_sys_key_email);
1700 - } else {
1701 - update_option('qlcd_wp_chatbot_sys_key_email', '');
1702 - }
1283 + $qlcd_wp_chatbot_sys_key_support = esc_html(stripslashes(@$_POST["qlcd_wp_chatbot_sys_key_support"]));
1284 + update_option('qlcd_wp_chatbot_sys_key_support', sanitize_text_field($qlcd_wp_chatbot_sys_key_support));
1285 + $qlcd_wp_chatbot_sys_key_reset = esc_html(stripslashes(@$_POST["qlcd_wp_chatbot_sys_key_reset"]));
1286 + update_option('qlcd_wp_chatbot_sys_key_reset', sanitize_text_field($qlcd_wp_chatbot_sys_key_reset));
1287 + $qlcd_wp_chatbot_sys_key_email = esc_html(stripslashes( @$_POST["qlcd_wp_chatbot_sys_key_email"]));
1288 + update_option('qlcd_wp_chatbot_sys_key_email', sanitize_text_field($qlcd_wp_chatbot_sys_key_email));
1703 1289 if(isset($_POST["qlcd_wp_chatbot_wildcard_product"])){
1704 - $qlcd_wp_chatbot_wildcard_product = (@wp_unslash($_POST["qlcd_wp_chatbot_wildcard_product"]));
1290 + $qlcd_wp_chatbot_wildcard_product = (@$_POST["qlcd_wp_chatbot_wildcard_product"]);
1705 1291 update_option('qlcd_wp_chatbot_wildcard_product', maybe_serialize(sanitize_array($qlcd_wp_chatbot_wildcard_product)));
1706 1292 }
1707 1293 if(isset($_POST["qlcd_wp_chatbot_wildcard_catalog"])){
1708 - $qlcd_wp_chatbot_wildcard_catalog = (@wp_unslash($_POST["qlcd_wp_chatbot_wildcard_catalog"]));
1294 + $qlcd_wp_chatbot_wildcard_catalog = (@$_POST["qlcd_wp_chatbot_wildcard_catalog"]);
1709 1295 update_option('qlcd_wp_chatbot_wildcard_catalog', maybe_serialize(sanitize_array($qlcd_wp_chatbot_wildcard_catalog)));
1710 1296 }
1711 1297 if(isset($_POST["qlcd_wp_chatbot_featured_products"])){
1712 - $qlcd_wp_chatbot_featured_products = (@wp_unslash($_POST["qlcd_wp_chatbot_featured_products"]));
1298 + $qlcd_wp_chatbot_featured_products = (@$_POST["qlcd_wp_chatbot_featured_products"]);
1713 1299 update_option('qlcd_wp_chatbot_featured_products', maybe_serialize(sanitize_array($qlcd_wp_chatbot_featured_products)));
1714 1300 }
1715 1301 if(isset($_POST["qlcd_wp_chatbot_sale_products"])){
1716 - $qlcd_wp_chatbot_sale_products = (@wp_unslash($_POST["qlcd_wp_chatbot_sale_products"]));
1302 + $qlcd_wp_chatbot_sale_products = (@$_POST["qlcd_wp_chatbot_sale_products"]);
1717 1303 update_option('qlcd_wp_chatbot_sale_products', maybe_serialize(sanitize_array($qlcd_wp_chatbot_sale_products)));
1718 1304 }
1719 1305
1720 - if (isset($_POST["qlcd_wp_chatbot_wildcard_support"])) {
1721 - $qlcd_wp_chatbot_wildcard_support = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_wildcard_support"]));
1722 - update_option('qlcd_wp_chatbot_wildcard_support', $qlcd_wp_chatbot_wildcard_support);
1723 - } else {
1724 - update_option('qlcd_wp_chatbot_wildcard_support', '');
1725 - }
1306 + $qlcd_wp_chatbot_wildcard_support = stripslashes(@$_POST["qlcd_wp_chatbot_wildcard_support"]);
1307 + update_option('qlcd_wp_chatbot_wildcard_support', sanitize_text_field($qlcd_wp_chatbot_wildcard_support));
1308 +
1726 1309
1727 - if (isset($_POST["qlcd_wp_chatbot_wildcard_site_search"])) {
1728 - $qlcd_wp_chatbot_wildcard_site_search = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_wildcard_site_search"]));
1729 - update_option('qlcd_wp_chatbot_wildcard_site_search', $qlcd_wp_chatbot_wildcard_site_search);
1730 - } else {
1731 - update_option('qlcd_wp_chatbot_wildcard_site_search', '');
1732 - }
1310 + $qlcd_wp_chatbot_wildcard_site_search = stripslashes(@$_POST["qlcd_wp_chatbot_wildcard_site_search"]);
1311 + update_option('qlcd_wp_chatbot_wildcard_site_search', sanitize_text_field($qlcd_wp_chatbot_wildcard_site_search));
1733 1312
1734 1313 if(isset($_POST["qlcd_wp_chatbot_messenger_label"])){
1735 - $qlcd_wp_chatbot_messenger_label = (@wp_unslash($_POST["qlcd_wp_chatbot_messenger_label"]));
1314 + $qlcd_wp_chatbot_messenger_label = (@$_POST["qlcd_wp_chatbot_messenger_label"]);
1736 1315 update_option('qlcd_wp_chatbot_messenger_label', maybe_serialize(sanitize_array($qlcd_wp_chatbot_messenger_label)));
1737 1316 }
1738 1317 //Products search .
1739 1318 if (isset($_POST["qlcd_wp_chatbot_product_success"])) {
1740 - // Unslash the input first, then sanitize deeply as text, assuming it's an array of texts or a single text.
1741 - $unslashed_data = wp_unslash($_POST["qlcd_wp_chatbot_product_success"]);
1742 - $qlcd_wp_chatbot_product_success = map_deep($unslashed_data, 'sanitize_text_field');
1743 - update_option('qlcd_wp_chatbot_product_success', maybe_serialize($qlcd_wp_chatbot_product_success));
1319 + $qlcd_wp_chatbot_product_success = stripslashes(@$_POST["qlcd_wp_chatbot_product_success"]);
1320 + update_option('qlcd_wp_chatbot_product_success', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_success)));
1744 1321 }
1745 1322 if (isset($_POST["qlcd_wp_chatbot_product_fail"])) {
1746 - $qlcd_wp_chatbot_product_fail = @wp_unslash($_POST["qlcd_wp_chatbot_product_fail"]);
1323 + $qlcd_wp_chatbot_product_fail = @$_POST["qlcd_wp_chatbot_product_fail"];
1747 1324 update_option('qlcd_wp_chatbot_product_fail', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_fail)));
1748 1325 }
1749 1326 if(isset($_POST["qlcd_wp_chatbot_product_asking"])){
1750 - $qlcd_wp_chatbot_product_asking = @wp_unslash($_POST["qlcd_wp_chatbot_product_asking"]);
1327 + $qlcd_wp_chatbot_product_asking = @$_POST["qlcd_wp_chatbot_product_asking"];
1751 1328 update_option('qlcd_wp_chatbot_product_asking', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_asking)));
1752 1329 }
1753 1330 if(isset($_POST["qlcd_wp_chatbot_product_suggest"])){
1754 - $qlcd_wp_chatbot_product_suggest = @wp_unslash($_POST["qlcd_wp_chatbot_product_suggest"]);
1331 + $qlcd_wp_chatbot_product_suggest = @$_POST["qlcd_wp_chatbot_product_suggest"];
1755 1332 update_option('qlcd_wp_chatbot_product_suggest', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_suggest)));
1756 1333 }
1757 1334 if(isset($_POST["qlcd_wp_chatbot_product_infinite"])){
1758 - $qlcd_wp_chatbot_product_infinite = @wp_unslash($_POST["qlcd_wp_chatbot_product_infinite"]);
1335 + $qlcd_wp_chatbot_product_infinite = @$_POST["qlcd_wp_chatbot_product_infinite"];
1759 1336 update_option('qlcd_wp_chatbot_product_infinite', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_infinite)));
1760 1337 }
1761 1338 if(isset($_POST["qlcd_wp_chatbot_load_more"])){
1762 - $qlcd_wp_chatbot_load_more = @wp_unslash($_POST["qlcd_wp_chatbot_load_more"]);
1339 + $qlcd_wp_chatbot_load_more = @$_POST["qlcd_wp_chatbot_load_more"];
1763 1340 update_option('qlcd_wp_chatbot_load_more', maybe_serialize(sanitize_array($qlcd_wp_chatbot_load_more)));
1764 1341 }
1765 1342 //Order
1766 1343 if(isset($_POST["qlcd_wp_chatbot_wildcard_order"])){
1767 - $qlcd_wp_chatbot_wildcard_order = @wp_unslash($_POST["qlcd_wp_chatbot_wildcard_order"]);
1344 + $qlcd_wp_chatbot_wildcard_order = @$_POST["qlcd_wp_chatbot_wildcard_order"];
1768 1345 update_option('qlcd_wp_chatbot_wildcard_order', maybe_serialize(sanitize_array($qlcd_wp_chatbot_wildcard_order)));
1769 1346 }
1770 1347 if(isset($_POST["qlcd_wp_chatbot_order_welcome"])){
1771 - $qlcd_wp_chatbot_order_welcome = @wp_unslash($_POST["qlcd_wp_chatbot_order_welcome"]);
1348 + $qlcd_wp_chatbot_order_welcome = @$_POST["qlcd_wp_chatbot_order_welcome"];
1772 1349 update_option('qlcd_wp_chatbot_order_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_welcome)));
1773 1350 }
1774 1351 if(isset($_POST["qlcd_wp_chatbot_order_username_asking"])){
1775 - $qlcd_wp_chatbot_order_username_asking = @wp_unslash($_POST["qlcd_wp_chatbot_order_username_asking"]);
1352 + $qlcd_wp_chatbot_order_username_asking = @$_POST["qlcd_wp_chatbot_order_username_asking"];
1776 1353 update_option('qlcd_wp_chatbot_order_username_asking', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_username_asking)));
1777 1354 }
1778 1355 if(isset($_POST["qlcd_wp_chatbot_order_username_not_exist"])){
1779 - $qlcd_wp_chatbot_order_username_not_exist = @wp_unslash($_POST["qlcd_wp_chatbot_order_username_not_exist"]);
1356 + $qlcd_wp_chatbot_order_username_not_exist = @$_POST["qlcd_wp_chatbot_order_username_not_exist"];
1780 1357 update_option('qlcd_wp_chatbot_order_username_not_exist', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_username_not_exist)));
1781 1358 }
1782 - if (isset($_POST["qlcd_wp_chatbot_order_username_thanks"])) {
1783 - // Unslash the input first, then sanitize deeply as text, assuming it's an array of texts or a single text.
1784 - $unslashed_data = wp_unslash($_POST["qlcd_wp_chatbot_order_username_thanks"]);
1785 - $qlcd_wp_chatbot_order_username_thanks = map_deep($unslashed_data, 'sanitize_text_field');
1786 - update_option('qlcd_wp_chatbot_order_username_thanks', maybe_serialize($qlcd_wp_chatbot_order_username_thanks));
1359 + if(isset($_POST["qlcd_wp_chatbot_order_username_thanks"])){
1360 + $qlcd_wp_chatbot_order_username_thanks = @$_POST["qlcd_wp_chatbot_order_username_thanks"];
1361 + update_option('qlcd_wp_chatbot_order_username_thanks', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_username_thanks)));
1787 1362 }
1788 1363 if(isset($_POST["qlcd_wp_chatbot_order_username_password"])){
1789 - $qlcd_wp_chatbot_order_username_password = @wp_unslash($_POST["qlcd_wp_chatbot_order_username_password"]);
1364 + $qlcd_wp_chatbot_order_username_password = @$_POST["qlcd_wp_chatbot_order_username_password"];
1790 1365 update_option('qlcd_wp_chatbot_order_username_password', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_username_password)));
1791 1366 }
1792 1367 if(isset($_POST["qlcd_wp_chatbot_order_password_incorrect"])){
1793 - $qlcd_wp_chatbot_order_password_incorrect= @wp_unslash($_POST["qlcd_wp_chatbot_order_password_incorrect"]);
1368 + $qlcd_wp_chatbot_order_password_incorrect= @$_POST["qlcd_wp_chatbot_order_password_incorrect"];
1794 1369 update_option('qlcd_wp_chatbot_order_password_incorrect', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_password_incorrect)));
1795 1370 }
1796 1371 if(isset($_POST["qlcd_wp_chatbot_order_not_found"])){
1797 - $qlcd_wp_chatbot_order_not_found= @wp_unslash($_POST["qlcd_wp_chatbot_order_not_found"]);
1372 + $qlcd_wp_chatbot_order_not_found= @$_POST["qlcd_wp_chatbot_order_not_found"];
1798 1373 update_option('qlcd_wp_chatbot_order_not_found', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_not_found)));
1799 1374 }
1800 1375 if(isset($_POST["qlcd_wp_chatbot_order_found"])){
1801 - $qlcd_wp_chatbot_order_found= @wp_unslash($_POST["qlcd_wp_chatbot_order_found"]);
1376 + $qlcd_wp_chatbot_order_found= @$_POST["qlcd_wp_chatbot_order_found"];
1802 1377 update_option('qlcd_wp_chatbot_order_found', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_found)));
1803 1378 }
1804 1379 if(isset( $_POST["qlcd_wp_chatbot_order_email_support"])){
1805 - $qlcd_wp_chatbot_order_email_support= @wp_unslash($_POST["qlcd_wp_chatbot_order_email_support"]);
1380 + $qlcd_wp_chatbot_order_email_support= @$_POST["qlcd_wp_chatbot_order_email_support"];
1806 1381 update_option('qlcd_wp_chatbot_order_email_support', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_email_support)));
1807 1382 }
1808 1383 //Support
1809 - if (isset($_POST["qlcd_wp_chatbot_support_welcome"])) {
1810 - $qlcd_wp_chatbot_support_welcome = wp_unslash($_POST["qlcd_wp_chatbot_support_welcome"]);
1811 - $qlcd_wp_chatbot_support_welcome = sanitize_array($qlcd_wp_chatbot_support_welcome);
1812 - update_option('qlcd_wp_chatbot_support_welcome', maybe_serialize($qlcd_wp_chatbot_support_welcome));
1813 - }
1814 - if (isset($_POST["qlcd_wp_chatbot_support_email"])) {
1815 - $qlcd_wp_chatbot_support_email = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_support_email"]));
1816 - update_option('qlcd_wp_chatbot_support_email', $qlcd_wp_chatbot_support_email);
1817 - }
1818 - if (isset($_POST["qlcd_wp_chatbot_asking_email"])) {
1819 - $qlcd_wp_chatbot_asking_email = wp_unslash($_POST["qlcd_wp_chatbot_asking_email"]);
1820 - $qlcd_wp_chatbot_asking_email = sanitize_array($qlcd_wp_chatbot_asking_email);
1821 - update_option('qlcd_wp_chatbot_asking_email', maybe_serialize($qlcd_wp_chatbot_asking_email));
1822 - }
1823 - if (isset($_POST["qlcd_wp_chatbot_asking_msg"])) {
1824 - $qlcd_wp_chatbot_asking_msg = wp_unslash($_POST["qlcd_wp_chatbot_asking_msg"]);
1825 - $qlcd_wp_chatbot_asking_msg = sanitize_array($qlcd_wp_chatbot_asking_msg);
1826 - update_option('qlcd_wp_chatbot_asking_msg', maybe_serialize($qlcd_wp_chatbot_asking_msg));
1827 - }
1384 + $qlcd_wp_chatbot_support_welcome = @$_POST["qlcd_wp_chatbot_support_welcome"];
1385 + update_option('qlcd_wp_chatbot_support_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_support_welcome)));
1386 + $qlcd_wp_chatbot_support_email = @$_POST["qlcd_wp_chatbot_support_email"];
1387 + update_option('qlcd_wp_chatbot_support_email', sanitize_text_field($qlcd_wp_chatbot_support_email));
1388 + $qlcd_wp_chatbot_asking_email = @$_POST["qlcd_wp_chatbot_asking_email"];
1389 + update_option('qlcd_wp_chatbot_asking_email', maybe_serialize(sanitize_array($qlcd_wp_chatbot_asking_email)));
1390 + $qlcd_wp_chatbot_asking_msg = @$_POST["qlcd_wp_chatbot_asking_msg"];
1391 + update_option('qlcd_wp_chatbot_asking_msg', maybe_serialize(sanitize_array($qlcd_wp_chatbot_asking_msg)));
1828 1392
1829 1393 if(isset($_POST["qlcd_wp_chatbot_no_result"])){
1830 - $qlcd_wp_chatbot_no_result = @wp_unslash($_POST["qlcd_wp_chatbot_no_result"]);
1394 + $qlcd_wp_chatbot_no_result = @$_POST["qlcd_wp_chatbot_no_result"];
1831 1395 update_option('qlcd_wp_chatbot_no_result', maybe_serialize(sanitize_array($qlcd_wp_chatbot_no_result)));
1832 1396 }
1833 1397
1834 - if (isset($_POST["qlcd_wp_chatbot_support_option_again"])) {
1835 - $qlcd_wp_chatbot_support_option_again = wp_unslash($_POST["qlcd_wp_chatbot_support_option_again"]);
1836 - update_option('qlcd_wp_chatbot_support_option_again', maybe_serialize(sanitize_array($qlcd_wp_chatbot_support_option_again)));
1837 - } else {
1838 - update_option('qlcd_wp_chatbot_support_option_again', maybe_serialize(array()));
1839 - }
1840 -
1841 - if (isset($_POST["qlcd_wp_chatbot_invalid_email"])) {
1842 - $qlcd_wp_chatbot_invalid_email = wp_unslash($_POST["qlcd_wp_chatbot_invalid_email"]);
1843 - update_option('qlcd_wp_chatbot_invalid_email', maybe_serialize(sanitize_array($qlcd_wp_chatbot_invalid_email)));
1844 - } else {
1845 - update_option('qlcd_wp_chatbot_invalid_email', maybe_serialize(array()));
1846 - }
1847 -
1848 - if (isset($_POST["qlcd_wp_chatbot_support_phone"])) {
1849 - $qlcd_wp_chatbot_support_phone = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_support_phone"]));
1850 - update_option('qlcd_wp_chatbot_support_phone', $qlcd_wp_chatbot_support_phone);
1851 - } else {
1852 - update_option('qlcd_wp_chatbot_support_phone', '');
1853 - }
1398 + $qlcd_wp_chatbot_support_option_again = @$_POST["qlcd_wp_chatbot_support_option_again"];
1399 + update_option('qlcd_wp_chatbot_support_option_again', maybe_serialize(sanitize_array($qlcd_wp_chatbot_support_option_again)));
1400 + $qlcd_wp_chatbot_invalid_email = @$_POST["qlcd_wp_chatbot_invalid_email"];
1401 + update_option('qlcd_wp_chatbot_invalid_email', maybe_serialize(sanitize_array($qlcd_wp_chatbot_invalid_email)));
1402 + $qlcd_wp_chatbot_support_phone= @$_POST["qlcd_wp_chatbot_support_phone"];
1854 1403
1855 - if (isset($_POST["qlcd_wp_chatbot_asking_phone"])) {
1856 - $qlcd_wp_chatbot_asking_phone = wp_unslash($_POST["qlcd_wp_chatbot_asking_phone"]);
1857 - update_option('qlcd_wp_chatbot_asking_phone', maybe_serialize(sanitize_array($qlcd_wp_chatbot_asking_phone)));
1858 - } else {
1859 - update_option('qlcd_wp_chatbot_asking_phone', maybe_serialize(array()));
1860 - }
1861 -
1862 - if (isset($_POST["qlcd_wp_chatbot_thank_for_phone"])) {
1863 - $qlcd_wp_chatbot_thank_for_phone = wp_unslash($_POST["qlcd_wp_chatbot_thank_for_phone"]);
1864 - update_option('qlcd_wp_chatbot_thank_for_phone', maybe_serialize(sanitize_array($qlcd_wp_chatbot_thank_for_phone)));
1865 - } else {
1866 - update_option('qlcd_wp_chatbot_thank_for_phone', maybe_serialize(array()));
1867 - }
1868 -
1869 - if (isset($_POST["qlcd_wp_chatbot_admin_email"])) {
1870 - $qlcd_wp_chatbot_admin_email = sanitize_email(wp_unslash($_POST["qlcd_wp_chatbot_admin_email"]));
1871 - } else {
1872 - $qlcd_wp_chatbot_admin_email = '';
1873 - }
1404 + update_option('qlcd_wp_chatbot_support_phone', sanitize_text_field($qlcd_wp_chatbot_support_phone));
1405 + $qlcd_wp_chatbot_asking_phone= @$_POST["qlcd_wp_chatbot_asking_phone"];
1406 + update_option('qlcd_wp_chatbot_asking_phone', maybe_serialize(sanitize_array($qlcd_wp_chatbot_asking_phone)));
1407 + $qlcd_wp_chatbot_thank_for_phone= @$_POST["qlcd_wp_chatbot_thank_for_phone"];
1408 + update_option('qlcd_wp_chatbot_thank_for_phone', maybe_serialize(sanitize_array($qlcd_wp_chatbot_thank_for_phone)));
1409 + $qlcd_wp_chatbot_admin_email = sanitize_email(@$_POST["qlcd_wp_chatbot_admin_email"]);
1874 1410
1875 1411 update_option('qlcd_wp_chatbot_admin_email', $qlcd_wp_chatbot_admin_email);
1876 1412
1877 - // Sanitize early for qlcd_wp_chatbot_email_sub
1878 - $qlcd_wp_chatbot_email_sub = '';
1879 - if (isset($_POST["qlcd_wp_chatbot_email_sub"])) {
1880 - $qlcd_wp_chatbot_email_sub = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_email_sub"]));
1881 - }
1882 - update_option('qlcd_wp_chatbot_email_sub', $qlcd_wp_chatbot_email_sub);
1413 + $qlcd_wp_chatbot_email_sub = esc_html(@$_POST["qlcd_wp_chatbot_email_sub"]);
1414 + update_option('qlcd_wp_chatbot_email_sub', sanitize_text_field($qlcd_wp_chatbot_email_sub));
1883 1415
1884 - // Sanitize early for qlcd_wp_site_search, only update if set
1885 - if (isset($_POST["qlcd_wp_site_search"])) {
1886 - $qlcd_wp_site_search = sanitize_text_field(wp_unslash($_POST["qlcd_wp_site_search"]));
1887 - update_option('qlcd_wp_site_search', $qlcd_wp_site_search);
1416 + if(isset($_POST["qlcd_wp_site_search"])){
1417 + $qlcd_wp_site_search = @$_POST["qlcd_wp_site_search"];
1418 + update_option('qlcd_wp_site_search', sanitize_text_field($qlcd_wp_site_search));
1888 1419 }
1889 1420
1890 - // Sanitize early for qlcd_wp_chatbot_email_sent
1891 - $qlcd_wp_chatbot_email_sent = '';
1892 - if (isset($_POST["qlcd_wp_chatbot_email_sent"])) {
1893 - $qlcd_wp_chatbot_email_sent = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_email_sent"]));
1894 - }
1895 - update_option('qlcd_wp_chatbot_email_sent', $qlcd_wp_chatbot_email_sent);
1421 + $qlcd_wp_chatbot_email_sent = esc_html(@$_POST["qlcd_wp_chatbot_email_sent"]);
1422 + update_option('qlcd_wp_chatbot_email_sent', stripslashes(sanitize_text_field($qlcd_wp_chatbot_email_sent)));
1423 + $qlcd_wp_chatbot_email_fail = esc_html(@$_POST["qlcd_wp_chatbot_email_fail"]);
1424 + update_option('qlcd_wp_chatbot_email_fail', stripslashes(sanitize_text_field($qlcd_wp_chatbot_email_fail)));
1896 1425
1897 - // Sanitize early for qlcd_wp_chatbot_email_fail
1898 - $qlcd_wp_chatbot_email_fail = '';
1899 - if (isset($_POST["qlcd_wp_chatbot_email_fail"])) {
1900 - $qlcd_wp_chatbot_email_fail = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_email_fail"]));
1901 - }
1902 - update_option('qlcd_wp_chatbot_email_fail', $qlcd_wp_chatbot_email_fail);
1903 -
1904 - // Sanitize early for qlcd_wp_chatbot_relevant_post_link_openai
1905 - $qlcd_wp_chatbot_relevant_post_link_openai = '';
1906 - if (isset($_POST["qlcd_wp_chatbot_relevant_post_link_openai"])) {
1907 - $qlcd_wp_chatbot_relevant_post_link_openai = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_relevant_post_link_openai"]));
1908 - }
1909 - update_option('qlcd_wp_chatbot_relevant_post_link_openai', $qlcd_wp_chatbot_relevant_post_link_openai);
1426 + $qlcd_wp_chatbot_relevant_post_link_openai = esc_html(@$_POST["qlcd_wp_chatbot_relevant_post_link_openai"]);
1427 + update_option('qlcd_wp_chatbot_relevant_post_link_openai', stripslashes(sanitize_text_field($qlcd_wp_chatbot_relevant_post_link_openai)));
1910 1428 //Notifications messages building.
1911 - if (isset($_POST["qlcd_wp_chatbot_notification_interval"])) {
1912 - $qlcd_wp_chatbot_notification_interval = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_notification_interval"]));
1913 - update_option('qlcd_wp_chatbot_notification_interval', $qlcd_wp_chatbot_notification_interval);
1429 + if(isset($_POST["qlcd_wp_chatbot_notification_interval"])){
1430 + $qlcd_wp_chatbot_notification_interval = esc_html(@$_POST["qlcd_wp_chatbot_notification_interval"]);
1431 + update_option('qlcd_wp_chatbot_notification_interval', stripslashes(sanitize_text_field($qlcd_wp_chatbot_notification_interval)));
1914 1432 }
1915 1433
1916 1434 if(isset($_POST["qlcd_wp_chatbot_notifications"])){
1917 - $qlcd_wp_chatbot_notifications = @wp_unslash($_POST["qlcd_wp_chatbot_notifications"]);
1435 + $qlcd_wp_chatbot_notifications = @$_POST["qlcd_wp_chatbot_notifications"];
1918 1436 update_option('qlcd_wp_chatbot_notifications', maybe_serialize(sanitize_array($qlcd_wp_chatbot_notifications)));
1919 1437 }
1920 1438 //Support building part.
1921 1439
@@ -1927,9 +1445,9 @@
1927 1445 'br' => array(),
1928 1446 'em' => array(),
1929 1447 'strong' => array(),
1930 1448 );
1931 - $support_query = @wp_unslash($_POST["support_query"]);
1449 + $support_query = @$_POST["support_query"];
1932 1450 $clean_support_query = [];
1933 1451 if(!empty($support_query)){
1934 1452 foreach($support_query as $key => $val) {
1935 1453
@@ -1936,9 +1454,9 @@
1936 1454 $clean_support_query[wp_kses($key,$allowed_html)] = wp_kses($val,$allowed_html);
1937 1455 }
1938 1456 }
1939 1457 update_option('support_query', (maybe_serialize($clean_support_query)));
1940 - $support_ans = @wp_unslash($_POST["support_ans"]);
1458 + $support_ans = @$_POST["support_ans"];
1941 1459 $clean_support_ans = [];
1942 1460 if(!empty($support_query)){
1943 1461 foreach($support_ans as $key => $val) {
1944 1462 $clean_support_ans[wp_kses($key,$allowed_html)] = wp_kses($val,$allowed_html);
@@ -1946,391 +1464,343 @@
1946 1464 }
1947 1465 update_option('support_ans', (maybe_serialize($clean_support_ans)));
1948 1466 //Create Mobile app pages.
1949 1467 if(isset( $_POST["wp_chatbot_app_pages"])) {
1950 - $wp_chatbot_app_pages = wp_unslash($_POST["wp_chatbot_app_pages"]);
1468 + $wp_chatbot_app_pages = $_POST["wp_chatbot_app_pages"];
1951 1469 }else{ $wp_chatbot_app_pages='';}
1952 1470 update_option('wp_chatbot_app_pages', wp_unslash($wp_chatbot_app_pages));
1953 1471 //Messenger Options
1954 1472 if(isset( $_POST["enable_wp_chatbot_messenger"])) {
1955 - $enable_wp_chatbot_messenger = wp_unslash($_POST["enable_wp_chatbot_messenger"]);
1473 + $enable_wp_chatbot_messenger = $_POST["enable_wp_chatbot_messenger"];
1956 1474 }else{ $enable_wp_chatbot_messenger='';}
1957 1475 update_option('enable_wp_chatbot_messenger', wp_unslash($enable_wp_chatbot_messenger));
1958 1476 if(isset( $_POST["enable_wp_chatbot_messenger_floating_icon"])) {
1959 - $enable_wp_chatbot_messenger_floating_icon = wp_unslash($_POST["enable_wp_chatbot_messenger_floating_icon"]);
1477 + $enable_wp_chatbot_messenger_floating_icon = $_POST["enable_wp_chatbot_messenger_floating_icon"];
1960 1478 }else{ $enable_wp_chatbot_messenger_floating_icon='';}
1961 1479 update_option('enable_wp_chatbot_messenger_floating_icon', wp_unslash($enable_wp_chatbot_messenger_floating_icon));
1962 1480 if(isset($_POST["qlcd_wp_chatbot_fb_app_id"])){
1963 - $qlcd_wp_chatbot_fb_app_id = @wp_unslash($_POST["qlcd_wp_chatbot_fb_app_id"]);
1481 + $qlcd_wp_chatbot_fb_app_id = @$_POST["qlcd_wp_chatbot_fb_app_id"];
1964 1482 update_option('qlcd_wp_chatbot_fb_app_id', sanitize_text_field($qlcd_wp_chatbot_fb_app_id));
1965 1483 }
1966 1484 if(isset($_POST["qlcd_wp_chatbot_fb_page_id"])){
1967 - $qlcd_wp_chatbot_fb_page_id = @wp_unslash($_POST["qlcd_wp_chatbot_fb_page_id"]);
1485 + $qlcd_wp_chatbot_fb_page_id = @$_POST["qlcd_wp_chatbot_fb_page_id"];
1968 1486 update_option('qlcd_wp_chatbot_fb_page_id', sanitize_text_field($qlcd_wp_chatbot_fb_page_id));
1969 1487 }
1970 1488 if(isset($_POST["qlcd_wp_chatbot_fb_color"])){
1971 - $qlcd_wp_chatbot_fb_color= @wp_unslash($_POST["qlcd_wp_chatbot_fb_color"]);
1489 + $qlcd_wp_chatbot_fb_color= @$_POST["qlcd_wp_chatbot_fb_color"];
1972 1490 update_option('qlcd_wp_chatbot_fb_color', wp_unslash($qlcd_wp_chatbot_fb_color));
1973 1491 }
1974 1492 if(isset($_POST["qlcd_wp_chatbot_fb_in_msg"])){
1975 - $qlcd_wp_chatbot_fb_in_msg = @wp_unslash($_POST["qlcd_wp_chatbot_fb_in_msg"]);
1493 + $qlcd_wp_chatbot_fb_in_msg = @$_POST["qlcd_wp_chatbot_fb_in_msg"];
1976 1494 update_option('qlcd_wp_chatbot_fb_in_msg', stripslashes(sanitize_text_field($qlcd_wp_chatbot_fb_in_msg)));
1977 1495 }
1978 1496 if(isset($_POST["qlcd_wp_chatbot_fb_out_msg"])){
1979 - $qlcd_wp_chatbot_fb_out_msg = @wp_unslash($_POST["qlcd_wp_chatbot_fb_out_msg"]);
1497 + $qlcd_wp_chatbot_fb_out_msg = @$_POST["qlcd_wp_chatbot_fb_out_msg"];
1980 1498 update_option('qlcd_wp_chatbot_fb_out_msg', stripslashes(sanitize_text_field($qlcd_wp_chatbot_fb_out_msg)));
1981 1499 }
1982 1500 //Skype option
1983 1501 if(isset( $_POST["enable_wp_chatbot_skype_floating_icon"])) {
1984 - $enable_wp_chatbot_skype_floating_icon = wp_unslash($_POST["enable_wp_chatbot_skype_floating_icon"]);
1502 + $enable_wp_chatbot_skype_floating_icon = $_POST["enable_wp_chatbot_skype_floating_icon"];
1985 1503 }else{ $enable_wp_chatbot_skype_floating_icon='';}
1986 1504 update_option('enable_wp_chatbot_skype_floating_icon', sanitize_text_field($enable_wp_chatbot_skype_floating_icon));
1987 1505 if(isset( $_POST["enable_wp_chatbot_skype_id"])) {
1988 - $enable_wp_chatbot_skype_id = wp_unslash($_POST["enable_wp_chatbot_skype_id"]);
1506 + $enable_wp_chatbot_skype_id = $_POST["enable_wp_chatbot_skype_id"];
1989 1507 }else{ $enable_wp_chatbot_skype_id='';}
1990 1508 update_option('enable_wp_chatbot_skype_id', sanitize_text_field($enable_wp_chatbot_skype_id));
1991 1509 //WhatsApp
1992 1510 if(isset( $_POST["enable_wp_chatbot_whats"])) {
1993 - $enable_wp_chatbot_whats= wp_unslash($_POST["enable_wp_chatbot_whats"]);
1511 + $enable_wp_chatbot_whats= $_POST["enable_wp_chatbot_whats"];
1994 1512 }else{ $enable_wp_chatbot_whats='';}
1995 1513 update_option('enable_wp_chatbot_whats', sanitize_text_field($enable_wp_chatbot_whats));
1996 1514 if(isset($_POST["qlcd_wp_chatbot_whats_label"])){
1997 - $qlcd_wp_chatbot_whats_label = @wp_unslash($_POST["qlcd_wp_chatbot_whats_label"]);
1515 + $qlcd_wp_chatbot_whats_label = @$_POST["qlcd_wp_chatbot_whats_label"];
1998 1516 update_option('qlcd_wp_chatbot_whats_label', maybe_serialize(sanitize_array($qlcd_wp_chatbot_whats_label)));
1999 1517 }
2000 1518 if(isset( $_POST["enable_wp_chatbot_floating_whats"])) {
2001 - $enable_wp_chatbot_floating_whats= wp_unslash($_POST["enable_wp_chatbot_floating_whats"]);
1519 + $enable_wp_chatbot_floating_whats= $_POST["enable_wp_chatbot_floating_whats"];
2002 1520 }else{ $enable_wp_chatbot_floating_whats='';}
2003 1521 update_option('enable_wp_chatbot_floating_whats', sanitize_text_field($enable_wp_chatbot_floating_whats));
2004 1522 if(isset($_POST["qlcd_wp_chatbot_whats_num"])){
2005 - $qlcd_wp_chatbot_whats_num = @wp_unslash($_POST["qlcd_wp_chatbot_whats_num"]);
1523 + $qlcd_wp_chatbot_whats_num = @$_POST["qlcd_wp_chatbot_whats_num"];
2006 1524 update_option('qlcd_wp_chatbot_whats_num', sanitize_text_field($qlcd_wp_chatbot_whats_num));
2007 1525 }
2008 1526 //Viber
2009 1527 if(isset( $_POST["enable_wp_chatbot_floating_viber"])) {
2010 - $enable_wp_chatbot_floating_viber = wp_unslash($_POST["enable_wp_chatbot_floating_viber"]);
1528 + $enable_wp_chatbot_floating_viber = $_POST["enable_wp_chatbot_floating_viber"];
2011 1529 }else{ $enable_wp_chatbot_floating_viber='';}
2012 1530 update_option('enable_wp_chatbot_floating_viber', sanitize_text_field($enable_wp_chatbot_floating_viber));
2013 1531 if(isset($_POST["qlcd_wp_chatbot_viber_acc"])){
2014 - $qlcd_wp_chatbot_viber_acc = @wp_unslash($_POST["qlcd_wp_chatbot_viber_acc"]);
1532 + $qlcd_wp_chatbot_viber_acc = @$_POST["qlcd_wp_chatbot_viber_acc"];
2015 1533 update_option('qlcd_wp_chatbot_viber_acc', sanitize_text_field($qlcd_wp_chatbot_viber_acc));
2016 1534 }
2017 1535 //Others integration
2018 1536 if(isset( $_POST["enable_wp_chatbot_floating_phone"])) {
2019 - $enable_wp_chatbot_floating_phone = wp_unslash($_POST["enable_wp_chatbot_floating_phone"]);
1537 + $enable_wp_chatbot_floating_phone = $_POST["enable_wp_chatbot_floating_phone"];
2020 1538 }else{ $enable_wp_chatbot_floating_phone='';}
2021 1539 update_option('enable_wp_chatbot_floating_phone', sanitize_text_field($enable_wp_chatbot_floating_phone));
2022 1540 if(isset($_POST["qlcd_wp_chatbot_phone"])){
2023 - $qlcd_wp_chatbot_phone = @wp_unslash($_POST["qlcd_wp_chatbot_phone"]);
1541 + $qlcd_wp_chatbot_phone = @$_POST["qlcd_wp_chatbot_phone"];
2024 1542 update_option('qlcd_wp_chatbot_phone', sanitize_text_field($qlcd_wp_chatbot_phone));
2025 1543 }
2026 1544
2027 1545 if(isset( $_POST["enable_wp_chatbot_floating_link"])) {
2028 - $enable_wp_chatbot_floating_link = wp_unslash($_POST["enable_wp_chatbot_floating_link"]);
1546 + $enable_wp_chatbot_floating_link = $_POST["enable_wp_chatbot_floating_link"];
2029 1547 }else{ $enable_wp_chatbot_floating_link='';}
2030 1548 update_option('enable_wp_chatbot_floating_link', sanitize_text_field($enable_wp_chatbot_floating_link));
2031 1549 if(isset($_POST["qlcd_wp_chatbot_weblink"])){
2032 - $qlcd_wp_chatbot_weblink = @wp_unslash($_POST["qlcd_wp_chatbot_weblink"]);
1550 + $qlcd_wp_chatbot_weblink = @$_POST["qlcd_wp_chatbot_weblink"];
2033 1551 update_option('qlcd_wp_chatbot_weblink', sanitize_text_field($qlcd_wp_chatbot_weblink));
2034 1552 }
2035 1553
2036 1554 //Re Targetting.
2037 1555 if(isset($_POST["qlcd_wp_chatbot_ret_greet"])){
2038 - $qlcd_wp_chatbot_ret_greet = @wp_unslash($_POST["qlcd_wp_chatbot_ret_greet"]);
1556 + $qlcd_wp_chatbot_ret_greet = @$_POST["qlcd_wp_chatbot_ret_greet"];
2039 1557 update_option('qlcd_wp_chatbot_ret_greet', sanitize_text_field($qlcd_wp_chatbot_ret_greet));
2040 1558 }
2041 1559
2042 1560 if(isset( $_POST["enable_wp_chatbot_exit_intent"])) {
2043 - $enable_wp_chatbot_exit_intent = wp_unslash($_POST["enable_wp_chatbot_exit_intent"]);
1561 + $enable_wp_chatbot_exit_intent = $_POST["enable_wp_chatbot_exit_intent"];
2044 1562 }else{ $enable_wp_chatbot_exit_intent='';}
2045 1563 update_option('enable_wp_chatbot_exit_intent', sanitize_text_field($enable_wp_chatbot_exit_intent));
2046 1564
2047 1565 if(isset($_POST["wp_chatbot_exit_intent_msg"])){
2048 - $wp_chatbot_exit_intent_msg = @wp_unslash($_POST["wp_chatbot_exit_intent_msg"]);
1566 + $wp_chatbot_exit_intent_msg = @$_POST["wp_chatbot_exit_intent_msg"];
2049 1567 update_option('wp_chatbot_exit_intent_msg', wp_unslash($wp_chatbot_exit_intent_msg));
2050 1568 }
2051 1569
2052 1570 if(isset( $_POST["wp_chatbot_exit_intent_once"])) {
2053 - $wp_chatbot_exit_intent_once = wp_unslash($_POST["wp_chatbot_exit_intent_once"]);
1571 + $wp_chatbot_exit_intent_once = $_POST["wp_chatbot_exit_intent_once"];
2054 1572 }else{ $wp_chatbot_exit_intent_once='';}
2055 1573 update_option('wp_chatbot_exit_intent_once', sanitize_text_field($wp_chatbot_exit_intent_once));
2056 1574
2057 1575 if(isset( $_POST["enable_wp_chatbot_scroll_open"])) {
2058 - $enable_wp_chatbot_scroll_open = wp_unslash($_POST["enable_wp_chatbot_scroll_open"]);
1576 + $enable_wp_chatbot_scroll_open = $_POST["enable_wp_chatbot_scroll_open"];
2059 1577 }else{ $enable_wp_chatbot_scroll_open='';}
2060 1578 update_option('enable_wp_chatbot_scroll_open', sanitize_text_field($enable_wp_chatbot_scroll_open));
2061 1579
2062 1580 if(isset($_POST["wp_chatbot_scroll_open_msg"])){
2063 - $wp_chatbot_scroll_open_msg= @wp_unslash($_POST["wp_chatbot_scroll_open_msg"]);
1581 + $wp_chatbot_scroll_open_msg= @$_POST["wp_chatbot_scroll_open_msg"];
2064 1582 update_option('wp_chatbot_scroll_open_msg', wp_unslash($wp_chatbot_scroll_open_msg));
2065 1583 }
2066 1584
2067 1585 if(isset($_POST["wp_chatbot_scroll_percent"])){
2068 - $wp_chatbot_scroll_percent= @wp_unslash($_POST["wp_chatbot_scroll_percent"]);
1586 + $wp_chatbot_scroll_percent= @$_POST["wp_chatbot_scroll_percent"];
2069 1587 update_option('wp_chatbot_scroll_percent', wp_unslash($wp_chatbot_scroll_percent));
2070 1588 }
2071 1589
2072 1590 if(isset( $_POST["wp_chatbot_scroll_once"])) {
2073 - $wp_chatbot_scroll_once = sanitize_text_field(wp_unslash($_POST["wp_chatbot_scroll_once"]));
1591 + $wp_chatbot_scroll_once = sanitize_text_field($_POST["wp_chatbot_scroll_once"]);
2074 1592 }else{ $wp_chatbot_scroll_once='';}
2075 1593 update_option('wp_chatbot_scroll_once', $wp_chatbot_scroll_once);
2076 1594
2077 1595 if(isset( $_POST["enable_wp_chatbot_auto_open"])) {
2078 - $enable_wp_chatbot_auto_open = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_auto_open"]));
1596 + $enable_wp_chatbot_auto_open = sanitize_text_field($_POST["enable_wp_chatbot_auto_open"]);
2079 1597 }else{ $enable_wp_chatbot_auto_open='';}
2080 1598 update_option('enable_wp_chatbot_auto_open', $enable_wp_chatbot_auto_open);
2081 1599
2082 1600 if(isset( $_POST["enable_wp_chatbot_ret_sound"])) {
2083 - $enable_wp_chatbot_ret_sound = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_ret_sound"]));
1601 + $enable_wp_chatbot_ret_sound = sanitize_text_field($_POST["enable_wp_chatbot_ret_sound"]);
2084 1602 }else{ $enable_wp_chatbot_ret_sound='';}
2085 1603 update_option('enable_wp_chatbot_ret_sound', $enable_wp_chatbot_ret_sound);
2086 1604
2087 1605 if(isset( $_POST["enable_wp_chatbot_sound_initial"])) {
2088 - $enable_wp_chatbot_sound_initial = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_sound_initial"]));
1606 + $enable_wp_chatbot_sound_initial = sanitize_text_field($_POST["enable_wp_chatbot_sound_initial"]);
2089 1607 }else{ $enable_wp_chatbot_sound_initial='';}
2090 1608 update_option('enable_wp_chatbot_sound_initial', $enable_wp_chatbot_sound_initial);
2091 1609
2092 1610
2093 1611 if(isset($_POST["wp_chatbot_auto_open_msg"])){
2094 - $wp_chatbot_auto_open_msg = @wp_unslash($_POST["wp_chatbot_auto_open_msg"]);
1612 + $wp_chatbot_auto_open_msg = @$_POST["wp_chatbot_auto_open_msg"];
2095 1613 update_option('wp_chatbot_auto_open_msg', wp_unslash($wp_chatbot_auto_open_msg));
2096 1614 }
2097 1615
2098 1616 if(isset($_POST["wp_chatbot_auto_open_time"])){
2099 - $wp_chatbot_auto_open_time = @wp_unslash($_POST["wp_chatbot_auto_open_time"]);
1617 + $wp_chatbot_auto_open_time = @$_POST["wp_chatbot_auto_open_time"];
2100 1618 update_option('wp_chatbot_auto_open_time', wp_unslash($wp_chatbot_auto_open_time));
2101 1619 }
2102 - //to complate checkout.
1620 + //to complate checkout
2103 1621 if(isset( $_POST["enable_wp_chatbot_ret_user_show"])) {
2104 - $enable_wp_chatbot_ret_user_show = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_ret_user_show"]));
1622 + $enable_wp_chatbot_ret_user_show = sanitize_text_field($_POST["enable_wp_chatbot_ret_user_show"]);
2105 1623 }else{ $enable_wp_chatbot_ret_user_show='';}
2106 1624 update_option('enable_wp_chatbot_ret_user_show', $enable_wp_chatbot_ret_user_show);
2107 1625
2108 1626 if(isset( $_POST["enable_wp_chatbot_inactive_time_show"])) {
2109 - $enable_wp_chatbot_inactive_time_show = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_inactive_time_show"]));
1627 + $enable_wp_chatbot_inactive_time_show = sanitize_text_field($_POST["enable_wp_chatbot_inactive_time_show"]);
2110 1628 }else{ $enable_wp_chatbot_inactive_time_show='';}
2111 1629 update_option('enable_wp_chatbot_inactive_time_show', $enable_wp_chatbot_inactive_time_show);
2112 1630
2113 1631 if(isset($_POST["wp_chatbot_inactive_time"])){
2114 - $wp_chatbot_inactive_time = @wp_unslash($_POST["wp_chatbot_inactive_time"]);
1632 + $wp_chatbot_inactive_time = @$_POST["wp_chatbot_inactive_time"];
2115 1633 update_option('wp_chatbot_inactive_time', sanitize_text_field($wp_chatbot_inactive_time));
2116 1634 }
2117 1635
2118 1636 if(isset($_POST["wp_chatbot_checkout_msg"])){
2119 - $wp_chatbot_checkout_msg = @wp_unslash($_POST["wp_chatbot_checkout_msg"]);
1637 + $wp_chatbot_checkout_msg = @$_POST["wp_chatbot_checkout_msg"];
2120 1638 update_option('wp_chatbot_checkout_msg', wp_unslash($wp_chatbot_checkout_msg));
2121 1639 }
2122 1640
2123 1641 if(isset( $_POST["wp_chatbot_auto_open_once"])) {
2124 - $wp_chatbot_auto_open_once = sanitize_text_field(wp_unslash($_POST["wp_chatbot_auto_open_once"]));
1642 + $wp_chatbot_auto_open_once = sanitize_text_field($_POST["wp_chatbot_auto_open_once"]);
2125 1643 }else{ $wp_chatbot_auto_open_once='';}
2126 1644 update_option('wp_chatbot_auto_open_once', $wp_chatbot_auto_open_once);
2127 1645
2128 1646 if(isset( $_POST["wp_chatbot_inactive_once"])) {
2129 - $wp_chatbot_inactive_once = sanitize_text_field(wp_unslash($_POST["wp_chatbot_inactive_once"]));
1647 + $wp_chatbot_inactive_once = sanitize_text_field($_POST["wp_chatbot_inactive_once"]);
2130 1648 }else{ $wp_chatbot_inactive_once='';}
2131 1649 update_option('wp_chatbot_inactive_once', $wp_chatbot_inactive_once);
2132 1650
2133 1651
2134 1652 if(isset($_POST["wp_chatbot_proactive_bg_color"])){
2135 - $wp_chatbot_proactive_bg_color = @wp_unslash($_POST["wp_chatbot_proactive_bg_color"]);
1653 + $wp_chatbot_proactive_bg_color = @$_POST["wp_chatbot_proactive_bg_color"];
2136 1654 update_option('wp_chatbot_proactive_bg_color', sanitize_text_field($wp_chatbot_proactive_bg_color));
2137 1655 }
2138 1656
2139 1657 if(isset( $_POST["disable_wp_chatbot_call_gen"])) {
2140 - $disable_wp_chatbot_call_gen = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_call_gen"]));
1658 + $disable_wp_chatbot_call_gen = sanitize_text_field($_POST["disable_wp_chatbot_call_gen"]);
2141 1659 }else{ $disable_wp_chatbot_call_gen='';}
2142 1660 update_option('disable_wp_chatbot_call_gen', $disable_wp_chatbot_call_gen);
2143 1661
2144 1662 if(isset( $_POST["disable_wp_chatbot_site_search"])) {
2145 - $disable_wp_chatbot_site_search = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_site_search"]));
1663 + $disable_wp_chatbot_site_search = sanitize_text_field($_POST["disable_wp_chatbot_site_search"]);
2146 1664 update_option('enable_wp_chatbot_post_content', '');
2147 1665 }else{ $disable_wp_chatbot_site_search='';}
2148 1666 update_option('disable_wp_chatbot_site_search', $disable_wp_chatbot_site_search);
2149 1667
2150 1668 if(isset( $_POST["enable_wp_chatbot_post_content"])) {
2151 - $enable_wp_chatbot_post_content = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_post_content"]));
1669 + $enable_wp_chatbot_post_content = sanitize_text_field($_POST["enable_wp_chatbot_post_content"]);
2152 1670
2153 1671 }else{ $enable_wp_chatbot_post_content='';}
2154 1672 update_option('enable_wp_chatbot_post_content', $enable_wp_chatbot_post_content);
2155 1673
2156 1674 if(isset( $_POST["disable_wp_chatbot_call_sup"])) {
2157 - $disable_wp_chatbot_call_sup = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_call_sup"]));
1675 + $disable_wp_chatbot_call_sup = sanitize_text_field($_POST["disable_wp_chatbot_call_sup"]);
2158 1676 }else{ $disable_wp_chatbot_call_sup='';}
2159 1677 update_option('disable_wp_chatbot_call_sup', $disable_wp_chatbot_call_sup);
2160 1678
2161 1679 if(isset( $_POST["disable_wp_chatbot_feedback"])) {
2162 - $disable_wp_chatbot_feedback = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_feedback"]));
1680 + $disable_wp_chatbot_feedback = sanitize_text_field($_POST["disable_wp_chatbot_feedback"]);
2163 1681 }else{ $disable_wp_chatbot_feedback='';}
2164 1682 update_option('disable_wp_chatbot_feedback', $disable_wp_chatbot_feedback);
2165 1683
2166 1684 if(isset( $_POST["disable_wp_chatbot_faq"])) {
2167 - $disable_wp_chatbot_faq = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_faq"]));
1685 + $disable_wp_chatbot_faq = sanitize_text_field($_POST["disable_wp_chatbot_faq"]);
2168 1686 }else{ $disable_wp_chatbot_faq='';}
2169 1687 update_option('disable_wp_chatbot_faq', $disable_wp_chatbot_faq);
2170 1688
2171 1689 if(isset($_POST["qlcd_wp_chatbot_feedback_label"])){
2172 - $qlcd_wp_chatbot_feedback_label = (@wp_unslash($_POST["qlcd_wp_chatbot_feedback_label"]));
1690 + $qlcd_wp_chatbot_feedback_label = (@$_POST["qlcd_wp_chatbot_feedback_label"]);
2173 1691 update_option('qlcd_wp_chatbot_feedback_label', maybe_serialize(sanitize_array($qlcd_wp_chatbot_feedback_label)));
2174 1692 }
2175 1693
2176 1694 if(isset( $_POST["enable_wp_chatbot_meta_title"])) {
2177 - $enable_wp_chatbot_meta_title = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_meta_title"]));
1695 + $enable_wp_chatbot_meta_title = sanitize_text_field($_POST["enable_wp_chatbot_meta_title"]);
2178 1696 }else{ $enable_wp_chatbot_meta_title='';}
2179 1697 update_option('enable_wp_chatbot_meta_title', $enable_wp_chatbot_meta_title);
2180 1698
2181 1699 if(isset($_POST["qlcd_wp_chatbot_meta_label"])){
2182 - $qlcd_wp_chatbot_meta_label = esc_html(@wp_unslash($_POST["qlcd_wp_chatbot_meta_label"]));
1700 + $qlcd_wp_chatbot_meta_label = esc_html(@$_POST["qlcd_wp_chatbot_meta_label"]);
2183 1701 update_option('qlcd_wp_chatbot_meta_label', stripslashes(sanitize_text_field($qlcd_wp_chatbot_meta_label)));
2184 1702 }
2185 1703
2186 - if (isset($_POST["qlcd_wp_chatbot_phone_sent"])) {
2187 - $qlcd_wp_chatbot_phone_sent = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_phone_sent"]));
2188 - update_option('qlcd_wp_chatbot_phone_sent', $qlcd_wp_chatbot_phone_sent);
2189 - }
1704 + $qlcd_wp_chatbot_phone_sent = esc_html(@$_POST["qlcd_wp_chatbot_phone_sent"]);
1705 + update_option('qlcd_wp_chatbot_phone_sent', stripslashes(sanitize_text_field($qlcd_wp_chatbot_phone_sent)));
2190 1706
2191 - if (isset($_POST["qlcd_wp_chatbot_phone_fail"])) {
2192 - $qlcd_wp_chatbot_phone_fail = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_phone_fail"]));
2193 - update_option('qlcd_wp_chatbot_phone_fail', $qlcd_wp_chatbot_phone_fail);
2194 - }
1707 + $qlcd_wp_chatbot_phone_fail = esc_html(@$_POST["qlcd_wp_chatbot_phone_fail"]);
1708 + update_option('qlcd_wp_chatbot_phone_fail', stripslashes(sanitize_text_field($qlcd_wp_chatbot_phone_fail)));
2195 1709
2196 - if (isset($_POST["qlcd_wp_chatbot_asking_search_keyword"])) {
2197 - $qlcd_wp_chatbot_asking_search_keyword = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_asking_search_keyword"]));
2198 - update_option('qlcd_wp_chatbot_asking_search_keyword', $qlcd_wp_chatbot_asking_search_keyword);
2199 - }
2200 1710
2201 - if (isset($_POST["qlcd_wp_chatbot_found_result"])) {
2202 - $qlcd_wp_chatbot_found_result = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_found_result"]));
2203 - update_option('qlcd_wp_chatbot_found_result', $qlcd_wp_chatbot_found_result);
2204 - }
1711 + $qlcd_wp_chatbot_asking_search_keyword = esc_html(@$_POST["qlcd_wp_chatbot_asking_search_keyword"]);
1712 + update_option('qlcd_wp_chatbot_asking_search_keyword', stripslashes(sanitize_text_field($qlcd_wp_chatbot_asking_search_keyword)));
1713 + $qlcd_wp_chatbot_found_result = esc_html(@$_POST["qlcd_wp_chatbot_found_result"]);
1714 + update_option('qlcd_wp_chatbot_found_result', stripslashes(sanitize_text_field($qlcd_wp_chatbot_found_result)));
2205 1715
2206 1716 if(isset( $_POST["enable_wp_chatbot_opening_hour"])) {
2207 - $enable_wp_chatbot_opening_hour = stripslashes(sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_opening_hour"])));
1717 + $enable_wp_chatbot_opening_hour = stripslashes(sanitize_text_field($_POST["enable_wp_chatbot_opening_hour"]));
2208 1718 }else{ $enable_wp_chatbot_opening_hour='';}
2209 1719 update_option('enable_wp_chatbot_opening_hour', esc_html($enable_wp_chatbot_opening_hour));
2210 1720
2211 1721 if(isset($_POST["wpwbot_hours"])){
2212 - $wpwbot_hours= @wp_unslash($_POST["wpwbot_hours"]);
1722 + $wpwbot_hours= @$_POST["wpwbot_hours"];
2213 1723 update_option('wpwbot_hours', maybe_serialize(sanitize_array($wpwbot_hours)));
2214 1724 }
2215 1725
2216 1726 if(isset( $_POST["enable_wp_chatbot_dailogflow"])) {
2217 - $enable_wp_chatbot_dailogflow = stripslashes(sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_dailogflow"])));
1727 + $enable_wp_chatbot_dailogflow = stripslashes(sanitize_text_field($_POST["enable_wp_chatbot_dailogflow"]));
2218 1728 }else{ $enable_wp_chatbot_dailogflow='';}
2219 1729 update_option('enable_wp_chatbot_dailogflow', $enable_wp_chatbot_dailogflow);
2220 1730
2221 1731 if(isset($_POST["qlcd_wp_chatbot_dialogflow_client_token"])){
2222 - $qlcd_wp_chatbot_dialogflow_client_token= esc_html(@wp_unslash($_POST["qlcd_wp_chatbot_dialogflow_client_token"]));
1732 + $qlcd_wp_chatbot_dialogflow_client_token= esc_html(@$_POST["qlcd_wp_chatbot_dialogflow_client_token"]);
2223 1733 update_option('qlcd_wp_chatbot_dialogflow_client_token', stripslashes(sanitize_text_field($qlcd_wp_chatbot_dialogflow_client_token)));
2224 1734 }
2225 1735
2226 - if (isset($_POST["qlcd_wp_chatbot_dialogflow_defualt_reply"])) {
2227 - $qlcd_wp_chatbot_dialogflow_defualt_reply = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_dialogflow_defualt_reply"]));
2228 - update_option('qlcd_wp_chatbot_dialogflow_defualt_reply', $qlcd_wp_chatbot_dialogflow_defualt_reply);
2229 - }
1736 + $qlcd_wp_chatbot_dialogflow_defualt_reply= esc_html(@$_POST["qlcd_wp_chatbot_dialogflow_defualt_reply"]);
1737 + update_option('qlcd_wp_chatbot_dialogflow_defualt_reply', sanitize_text_field($qlcd_wp_chatbot_dialogflow_defualt_reply));
2230 1738
2231 - if (isset($_POST["qlcd_wp_chatbot_dialogflow_agent_language"])) {
2232 - $qlcd_wp_chatbot_dialogflow_agent_language = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_dialogflow_agent_language"]));
2233 - update_option('qlcd_wp_chatbot_dialogflow_agent_language', $qlcd_wp_chatbot_dialogflow_agent_language);
2234 - }
2235 - // style option save.
1739 + $qlcd_wp_chatbot_dialogflow_agent_language= esc_html(@$_POST["qlcd_wp_chatbot_dialogflow_agent_language"]);
1740 + update_option('qlcd_wp_chatbot_dialogflow_agent_language', stripslashes(sanitize_text_field($qlcd_wp_chatbot_dialogflow_agent_language)));
1741 + // style option save
2236 1742 if(isset( $_POST["enable_wp_chatbot_custom_color"])) {
2237 - $enable_wp_chatbot_custom_color = esc_html(wp_unslash($_POST["enable_wp_chatbot_custom_color"]));
1743 + $enable_wp_chatbot_custom_color = esc_html($_POST["enable_wp_chatbot_custom_color"]);
2238 1744 }else{ $enable_wp_chatbot_custom_color='';}
2239 1745 update_option('enable_wp_chatbot_custom_color', stripslashes(sanitize_text_field($enable_wp_chatbot_custom_color)));
2240 - if (isset($_POST["wp_chatbot_text_color"])) {
2241 - $wp_chatbot_text_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_text_color"]));
2242 - update_option('wp_chatbot_text_color', $wp_chatbot_text_color);
2243 - }
1746 + $wp_chatbot_text_color = esc_html(@$_POST["wp_chatbot_text_color"]);
1747 + update_option('wp_chatbot_text_color', stripslashes(sanitize_text_field($wp_chatbot_text_color)));
2244 1748
2245 - if (isset($_POST["wp_chatbot_floatingiconbg_color"])) {
2246 - $wp_chatbot_floatingiconbg_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_floatingiconbg_color"]));
2247 - update_option('wp_chatbot_floatingiconbg_color', $wp_chatbot_floatingiconbg_color);
2248 - }
1749 + $wp_chatbot_floatingiconbg_color = esc_html(@$_POST["wp_chatbot_floatingiconbg_color"]);
1750 + update_option('wp_chatbot_floatingiconbg_color', stripslashes(sanitize_text_field($wp_chatbot_floatingiconbg_color)));
2249 1751
2250 - if (isset($_POST["wp_chatbot_link_color"])) {
2251 - $wp_chatbot_link_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_link_color"]));
2252 - update_option('wp_chatbot_link_color', $wp_chatbot_link_color);
2253 - }
1752 + $wp_chatbot_link_color = @$_POST["wp_chatbot_link_color"];
1753 + update_option('wp_chatbot_link_color', stripslashes(sanitize_text_field($wp_chatbot_link_color)));
2254 1754
2255 - if (isset($_POST["wp_chatbot_link_hover_color"])) {
2256 - $wp_chatbot_link_hover_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_link_hover_color"]));
2257 - update_option('wp_chatbot_link_hover_color', $wp_chatbot_link_hover_color);
2258 - }
1755 + $wp_chatbot_link_hover_color = @$_POST["wp_chatbot_link_hover_color"];
1756 + update_option('wp_chatbot_link_hover_color', stripslashes(stripslashes(sanitize_text_field($wp_chatbot_link_hover_color))));
2259 1757
2260 - if (isset($_POST["wp_chatbot_bot_msg_bg_color"])) {
2261 - $wp_chatbot_bot_msg_bg_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_bot_msg_bg_color"]));
2262 - update_option('wp_chatbot_bot_msg_bg_color', $wp_chatbot_bot_msg_bg_color);
2263 - }
1758 + $wp_chatbot_bot_msg_bg_color = @$_POST["wp_chatbot_bot_msg_bg_color"];
1759 + update_option('wp_chatbot_bot_msg_bg_color', stripslashes(sanitize_text_field($wp_chatbot_bot_msg_bg_color)));
2264 1760
2265 - if (isset($_POST["wp_chatbot_bot_msg_text_color"])) {
2266 - $wp_chatbot_bot_msg_text_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_bot_msg_text_color"]));
2267 - update_option('wp_chatbot_bot_msg_text_color', $wp_chatbot_bot_msg_text_color);
2268 - }
1761 + $wp_chatbot_bot_msg_text_color = @$_POST["wp_chatbot_bot_msg_text_color"];
1762 + update_option('wp_chatbot_bot_msg_text_color', stripslashes(sanitize_text_field($wp_chatbot_bot_msg_text_color)));
2269 1763
2270 - if (isset($_POST["wp_chatbot_user_msg_bg_color"])) {
2271 - $wp_chatbot_user_msg_bg_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_user_msg_bg_color"]));
2272 - update_option('wp_chatbot_user_msg_bg_color', $wp_chatbot_user_msg_bg_color);
2273 - }
1764 + $wp_chatbot_user_msg_bg_color = @$_POST["wp_chatbot_user_msg_bg_color"];
1765 + update_option('wp_chatbot_user_msg_bg_color', stripslashes(sanitize_text_field($wp_chatbot_user_msg_bg_color)));
2274 1766
2275 - if (isset($_POST["wp_chatbot_user_msg_text_color"])) {
2276 - $wp_chatbot_user_msg_text_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_user_msg_text_color"]));
2277 - update_option('wp_chatbot_user_msg_text_color', $wp_chatbot_user_msg_text_color);
2278 - }
1767 + $wp_chatbot_user_msg_text_color = @$_POST["wp_chatbot_user_msg_text_color"];
1768 + update_option('wp_chatbot_user_msg_text_color', stripslashes(sanitize_text_field($wp_chatbot_user_msg_text_color)));
2279 1769
2280 - if (isset($_POST["wp_chatbot_buttons_bg_color"])) {
2281 - $wp_chatbot_buttons_bg_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_buttons_bg_color"]));
2282 - update_option('wp_chatbot_buttons_bg_color', $wp_chatbot_buttons_bg_color);
2283 - }
2284 1770
2285 - if (isset($_POST["wp_chatbot_buttons_text_color"])) {
2286 - $wp_chatbot_buttons_text_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_buttons_text_color"]));
2287 - update_option('wp_chatbot_buttons_text_color', $wp_chatbot_buttons_text_color);
2288 - }
1771 + $wp_chatbot_buttons_bg_color = @$_POST["wp_chatbot_buttons_bg_color"];
1772 + update_option('wp_chatbot_buttons_bg_color', stripslashes(sanitize_text_field($wp_chatbot_buttons_bg_color)));
2289 1773
2290 - if (isset($_POST["wp_chatbot_buttons_bg_color_hover"])) {
2291 - $wp_chatbot_buttons_bg_color_hover = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_buttons_bg_color_hover"]));
2292 - update_option('wp_chatbot_buttons_bg_color_hover', $wp_chatbot_buttons_bg_color_hover);
2293 - }
1774 + $wp_chatbot_buttons_text_color = @$_POST["wp_chatbot_buttons_text_color"];
1775 + update_option('wp_chatbot_buttons_text_color', stripslashes(sanitize_text_field($wp_chatbot_buttons_text_color)));
2294 1776
2295 - if (isset($_POST["wp_chatbot_buttons_text_color_hover"])) {
2296 - $wp_chatbot_buttons_text_color_hover = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_buttons_text_color_hover"]));
2297 - update_option('wp_chatbot_buttons_text_color_hover', $wp_chatbot_buttons_text_color_hover);
2298 - }
1777 + $wp_chatbot_buttons_bg_color_hover = @$_POST["wp_chatbot_buttons_bg_color_hover"];
1778 + update_option('wp_chatbot_buttons_bg_color_hover', stripslashes(sanitize_text_field($wp_chatbot_buttons_bg_color_hover)));
2299 1779
2300 - if (isset($_POST["wp_chatbot_theme_secondary_color"])) {
2301 - $wp_chatbot_theme_secondary_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_theme_secondary_color"]));
2302 - update_option('wp_chatbot_theme_secondary_color', $wp_chatbot_theme_secondary_color);
2303 - }
2304 - if (isset($_POST["wp_chatbot_header_background_color"])) {
2305 - $wp_chatbot_header_background_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_header_background_color"]));
2306 - update_option('wp_chatbot_header_background_color', $wp_chatbot_header_background_color);
2307 - }
1780 + $wp_chatbot_buttons_text_color_hover = @$_POST["wp_chatbot_buttons_text_color_hover"];
1781 + update_option('wp_chatbot_buttons_text_color_hover', stripslashes(sanitize_text_field($wp_chatbot_buttons_text_color_hover)));
2308 1782
2309 - if (isset($_POST["wp_chatbot_font_size"])) {
2310 - $wp_chatbot_font_size = sanitize_text_field(wp_unslash($_POST["wp_chatbot_font_size"]));
2311 - // Additional validation for font size format (e.g., '14px', '1.2em') could be added here if strict adherence to CSS units is required.
2312 - update_option('wp_chatbot_font_size', $wp_chatbot_font_size);
2313 - }
2314 - if (isset($_POST["wp_chat_bot_font_family"])) {
2315 - $wp_chat_bot_font_family = sanitize_text_field(wp_unslash($_POST["wp_chat_bot_font_family"]));
2316 - update_option('wp_chat_bot_font_family', $wp_chat_bot_font_family);
2317 - }
2318 - if (isset($_POST["wp_chat_user_font_family"])) {
2319 - $wp_chat_user_font_family = sanitize_text_field(wp_unslash($_POST["wp_chat_user_font_family"]));
2320 - update_option('wp_chat_user_font_family', $wp_chat_user_font_family);
2321 - }
2322 - if (isset($_POST['wp_chatbot_user_font'])) {
2323 - $wp_chatbot_user_font = sanitize_text_field(wp_unslash($_POST['wp_chatbot_user_font']));
2324 - update_option('wp_chatbot_user_font', $wp_chatbot_user_font);
2325 - }
2326 - if (isset($_POST['wp_chatbot_bot_font'])) {
2327 - $wp_chatbot_bot_font = sanitize_text_field(wp_unslash($_POST['wp_chatbot_bot_font']));
2328 - update_option('wp_chatbot_bot_font', $wp_chatbot_bot_font);
2329 - }
2330 1783
2331 - set_transient( 'qcld_bot_clear_cache', 1, DAY_IN_SECONDS );
1784 + $wp_chatbot_theme_secondary_color = @$_POST["wp_chatbot_theme_secondary_color"];
1785 + update_option('wp_chatbot_theme_secondary_color', stripslashes(sanitize_text_field($wp_chatbot_theme_secondary_color)));
1786 + $wp_chatbot_header_background_color = @$_POST["wp_chatbot_header_background_color"];
1787 + update_option('wp_chatbot_header_background_color', stripslashes(sanitize_text_field($wp_chatbot_header_background_color)));
2332 1788
1789 +
1790 + $wp_chatbot_font_size = @$_POST["wp_chatbot_font_size"];
1791 + update_option('wp_chatbot_font_size', sanitize_text_field($wp_chatbot_font_size));
1792 + $wp_chat_bot_font_family = @$_POST["wp_chat_bot_font_family"];
1793 + update_option('wp_chat_bot_font_family', sanitize_text_field($wp_chat_bot_font_family));
1794 + $wp_chat_user_font_family = @$_POST["wp_chat_user_font_family"];
1795 + update_option('wp_chat_user_font_family', sanitize_text_field($wp_chat_user_font_family));
1796 + $wp_chatbot_user_font = @$_POST['wp_chatbot_user_font'];
1797 + update_option('wp_chatbot_user_font', sanitize_text_field($wp_chatbot_user_font));
1798 + $wp_chatbot_bot_font = @$_POST['wp_chatbot_bot_font'];
1799 + update_option('wp_chatbot_bot_font', sanitize_text_field($wp_chatbot_bot_font));
1800 +
1801 + set_transient( 'bot_clear_cache', 1, DAY_IN_SECONDS );
1802 +
2333 1803 wp_enqueue_script( 'wp_chatbot_bot-front-js', plugins_url(basename(plugin_dir_path(__FILE__))) . '/js/sweetalrt.js', array('jquery'), '', true);
2334 1804 $script = "
2335 1805 console.log('sdaas');
2336 1806 function callsweetalert(){
@@ -2402,11 +1872,9 @@
2402 1872 * Admin notice for table reindex
2403 1873 */
2404 1874 public function admin_notice_reindex() { ?>
2405 1875 <div class="updated notice is-dismissible">
2406 - <p><?php
2407 - // translators: %s: A link to the Re-Index Products page.
2408 - printf( esc_html__( 'WPBot Pro : To Enable Title, Content, Excerpt, Categories, Tag and SKU Search Re-Index Products is required. %s', 'chatbot' ),'<a class="button button-secondary" href="'.esc_url( admin_url( 'admin.php?page=wpbot') ).'">'.esc_html__( 'Re-Index Products', 'chatbot' ).'</a>'); ?></p>
1876 + <p><?php printf( esc_html__( 'WPBot Pro : To Enable Title, Content, Excerpt, Categories, Tag and SKU Search Re-Index Products is required. %s', 'wpchatbot' ),'<a class="button button-secondary" href="'.esc_url( admin_url( 'admin.php?page=wpbot') ).'">'.esc_html__( 'Re-Index Products', 'wp_chatbot' ).'</a>'); ?></p>
2409 1877 </div>
2410 1878 <?php }
2411 1879 }
2412 1880 /**
@@ -2416,9 +1884,9 @@
2416 1884 if (!function_exists('qcld_wb_chatboot_plugin_init')) {
2417 1885 function qcld_wb_chatboot_plugin_init()
2418 1886 {
2419 1887 global $qcld_wb_chatbot;
2420 - $qcld_wb_chatbot = qcld_wb_Chatbot_free::qcld_wb_chatbot_get_instance();
1888 + $qcld_wb_chatbot = qcld_wb_Chatbot::qcld_wb_chatbot_get_instance();
2421 1889 }
2422 1890 }
2423 1891 add_action('plugins_loaded', 'qcld_wb_chatboot_plugin_init');
2424 1892 /*
@@ -2424,9 +1892,8 @@
2424 1892 /*
2425 1893 * Initial Options will be insert as defualt data
2426 1894 */
2427 1895 register_activation_hook(__FILE__, 'qcld_wb_chatboot_defualt_options');
2428 -if( !function_exists('qcld_wb_chatboot_defualt_options') ){
2429 1896 function qcld_wb_chatboot_defualt_options(){
2430 1897
2431 1898 global $wpdb;
2432 1899 $collate = '';
@@ -2472,56 +1939,10 @@
2472 1939 ) $collate AUTO_INCREMENT=1 ENGINE=InnoDB";
2473 1940
2474 1941 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
2475 1942 dbDelta( $sql_sliders_Table1 );
2476 -
2477 -
2478 - //Bot Response Table
2479 - $table_rag_documents = $wpdb->prefix . "rag_documents";
2480 -
2481 - $charset = $wpdb->get_charset_collate();
2482 - 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
2483 - // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange
2484 - $sql_rag_documents = "CREATE TABLE $table_rag_documents (
2485 - id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
2486 - doc_id VARCHAR(100) DEFAULT NULL,
2487 - title VARCHAR(255) NOT NULL,
2488 - content LONGTEXT NOT NULL,
2489 - embedding LONGTEXT NOT NULL,
2490 - source_type VARCHAR(20) DEFAULT 'post',
2491 - source_url VARCHAR(255) DEFAULT NULL,
2492 - file_url TEXT DEFAULT NULL,
2493 - metadata LONGTEXT DEFAULT NULL,
2494 - status VARCHAR(50) DEFAULT 'complete',
2495 - created_at DATETIME DEFAULT CURRENT_TIMESTAMP
2496 - ) $charset;";
2497 - require_once ABSPATH . 'wp-admin/includes/upgrade.php';
2498 - dbDelta($sql_rag_documents);
2499 - // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange
2500 - }
2501 - $table_report = $wpdb->prefix . 'wpbot_chat_report';
2502 -
2503 - 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
2504 - // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange
2505 - $sql_report = "
2506 - CREATE TABLE `$table_report` (
2507 - `id` int(11) NOT NULL AUTO_INCREMENT,
2508 - `user_id` int(11) NOT NULL,
2509 - `conversation_id` int(11) DEFAULT NULL,
2510 - `message` longtext NOT NULL,
2511 - `feedback` varchar(20) DEFAULT NULL,
2512 - `meta_info` text DEFAULT NULL,
2513 - `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
2514 - PRIMARY KEY (`id`)
2515 - ) $charset_collate AUTO_INCREMENT=1;
2516 - ";
2517 -
2518 - require_once ABSPATH . 'wp-admin/includes/upgrade.php';
2519 - dbDelta( $sql_report );
2520 - // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange
2521 - }
2522 1943
2523 - $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
1944 + $sqlqry = $wpdb->get_results($wpdb->prepare("select * from $table1")); //DB Call OK, No Caching OK
2524 1945 if(empty($sqlqry)){
2525 1946
2526 1947 $query = 'What Can WPBot do for you?';
2527 1948 $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!';
@@ -2527,9 +1948,9 @@
2527 1948 $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!';
2528 1949
2529 1950 $data = array('query' => $query, 'keyword' => '', 'response'=> $response, 'intent'=> '');
2530 1951 $format = array('%s','%s', '%s', '%s');
2531 - $wpdb->insert($table1,$data,$format); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, PluginCheck.Security.DirectDB.UnescapedDBParameter
1952 + $wpdb->insert($table1,$data,$format); //DB Call OK, No Caching OK
2532 1953 }
2533 1954
2534 1955 $url = get_site_url();
2535 1956 $url = wp_parse_url($url);
@@ -2535,13 +1956,14 @@
2535 1956 $url = wp_parse_url($url);
2536 1957 $domain = $url['host'];
2537 1958 //$admin_email = "admin@" . $domain;
2538 1959 $admin_email = get_option('admin_email');
1960 +
2539 1961 if(!get_option('wp_chatbot_position_x')) {
2540 - update_option('wp_chatbot_position_x', 30);
1962 + update_option('wp_chatbot_position_x', 50);
2541 1963 }
2542 1964 if(!get_option('wp_chatbot_position_y')) {
2543 - update_option('wp_chatbot_position_y', 30);
1965 + update_option('wp_chatbot_position_y', 50);
2544 1966 }
2545 1967 if(!get_option('disable_wp_chatbot')) {
2546 1968 update_option('disable_wp_chatbot', '');
2547 1969 }
@@ -2568,14 +1990,8 @@
2568 1990 }
2569 1991 if(!get_option('show_menu_after_greetings')) {
2570 1992 update_option('show_menu_after_greetings', 1);
2571 1993 }
2572 - if(!get_option('disable_back_to_start_menu')) {
2573 - update_option('disable_back_to_start_menu', '');
2574 - }
2575 - if(!get_option('disable_floating_button')) {
2576 - update_option('disable_floating_button', '');
2577 - }
2578 1994 if(!get_option('enable_chat_session')) {
2579 1995 update_option('enable_chat_session', '');
2580 1996 }
2581 1997
@@ -2582,9 +1998,9 @@
2582 1998 if(!get_option('enable_wp_chatbot_mobile_full_screen')) {
2583 1999 update_option('enable_wp_chatbot_mobile_full_screen', 1);
2584 2000 }
2585 2001 if(!get_option('wpbot_preloading_time')) {
2586 - update_option('wpbot_preloading_time', '800');
2002 + update_option('wpbot_preloading_time', '0.5');
2587 2003 }
2588 2004
2589 2005 if(!get_option('disable_wp_chatbot_notification')) {
2590 2006 update_option('disable_wp_chatbot_notification', '1');
@@ -2847,9 +2263,9 @@
2847 2263 }
2848 2264 if(!get_option('qlcd_wp_chatbot_wildcard_site_search')) {
2849 2265 update_option('qlcd_wp_chatbot_wildcard_site_search', 'Site Search');
2850 2266 }
2851 - if(!get_option('qlcd_wp_chatbot_messenger_label')) {
2267 + if(!get_option('qlcd_wp_chatbot_messenger_label')) {
2852 2268 update_option('qlcd_wp_chatbot_messenger_label', maybe_serialize(array('Chat with Us on Facebook Messenger')));
2853 2269 }
2854 2270 if(!get_option('qlcd_wp_chatbot_product_success')) {
2855 2271 update_option('qlcd_wp_chatbot_product_success', maybe_serialize(array('Great! We have these products for', 'Found these products for')));
@@ -3004,20 +2420,20 @@
3004 2420 if(!get_option('qlcd_wp_chatbot_whats_label')) {
3005 2421 update_option('qlcd_wp_chatbot_whats_label', maybe_serialize(array('Chat with Us on WhatsApp')));
3006 2422 }
3007 2423 if(!get_option('enable_wp_chatbot_floating_whats')) {
3008 - update_option('enable_wp_chatbot_floating_whats', '');
3009 - }
3010 - if(!get_option('qlcd_wp_chatbot_whats_num')) {
3011 - update_option('qlcd_wp_chatbot_whats_num', '');
3012 - }
2424 + update_option('enable_wp_chatbot_floating_whats', '');
2425 + }
2426 + if(!get_option('qlcd_wp_chatbot_whats_num')) {
2427 + update_option('qlcd_wp_chatbot_whats_num', '');
2428 + }
3013 2429 //Viber
3014 - if(!get_option('enable_wp_chatbot_floating_viber')) {
3015 - update_option('enable_wp_chatbot_floating_viber', '');
3016 - }
3017 - if(!get_option('qlcd_wp_chatbot_viber_acc')) {
3018 - update_option('qlcd_wp_chatbot_viber_acc', '');
3019 - }
2430 + if(!get_option('enable_wp_chatbot_floating_viber')) {
2431 + update_option('enable_wp_chatbot_floating_viber', '');
2432 + }
2433 + if(!get_option('qlcd_wp_chatbot_viber_acc')) {
2434 + update_option('qlcd_wp_chatbot_viber_acc', '');
2435 + }
3020 2436 //Integration others
3021 2437 if(!get_option('enable_wp_chatbot_floating_phone')) {
3022 2438 update_option('enable_wp_chatbot_floating_phone', '');
3023 2439 }
@@ -3173,11 +2589,10 @@
3173 2589 }
3174 2590 // if(!get_option('skip_wp_greetings')) {
3175 2591 update_option('skip_wp_greetings', '');
3176 2592 //}
3177 - set_transient( 'qcld_bot_clear_cache', 1, DAY_IN_SECONDS );
2593 + set_transient( 'bot_clear_cache', 1, DAY_IN_SECONDS );
3178 2594 }
3179 -}
3180 2595 /*
3181 2596 * Reset Options will be insert as defualt data
3182 2597 */
3183 2598 add_action('wp_ajax_qcld_wb_chatboot_delete_all_options', 'qcld_wb_chatboot_delete_all_options');
@@ -3182,9 +2597,8 @@
3182 2597 */
3183 2598 add_action('wp_ajax_qcld_wb_chatboot_delete_all_options', 'qcld_wb_chatboot_delete_all_options');
3184 2599 //add_action('wp_ajax_nopriv_qcld_wb_chatboot_delete_all_options', 'qcld_wb_chatboot_delete_all_options');
3185 2600 //Jarvis all option will be delete during uninstlling.
3186 -if( !function_exists('qcld_wb_chatboot_delete_all_options') ){
3187 2601 function qcld_wb_chatboot_delete_all_options(){
3188 2602
3189 2603 if ( ! current_user_can( 'manage_options' ) ) {
3190 2604 wp_die( 'Unauthorized access' );
@@ -3189,9 +2603,9 @@
3189 2603 if ( ! current_user_can( 'manage_options' ) ) {
3190 2604 wp_die( 'Unauthorized access' );
3191 2605 }
3192 2606
3193 - if ( ! isset( $_POST['wpnonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['wpnonce'] ) ), 'wp_chatbot' ) ) {
2607 + if ( ! wp_verify_nonce( $_POST['wpnonce'], 'wp_chatbot' ) ) {
3194 2608 wp_die( 'No cheating' );
3195 2609 }
3196 2610 delete_option('disable_wp_chatbot');
3197 2611 delete_option('disable_wp_chatbot_icon_animation');
@@ -3197,11 +2611,8 @@
3197 2611 delete_option('disable_wp_chatbot_icon_animation');
3198 2612 delete_option('disable_wp_chatbot_on_mobile');
3199 2613 delete_option('qlcd_wp_chatbot_admin_email');
3200 2614 delete_option('qlcd_wp_chatbot_from_email');
3201 -
3202 - delete_option('disable_back_to_start_menu');
3203 - delete_option('disable_floating_button');
3204 2615
3205 2616 delete_option('disable_wp_chatbot_product_search');
3206 2617 delete_option('disable_wp_chatbot_catalog');
3207 2618 delete_option('disable_wp_chatbot_order_status');
@@ -3422,30 +2833,27 @@
3422 2833 delete_option('wp_chat_user_font_family');
3423 2834 delete_option('wp_chat_bot_font_family');
3424 2835 delete_option('wp_chatbot_bot_font');
3425 2836 delete_option('wp_chatbot_user_font');
3426 - set_transient( 'qcld_bot_clear_cache', 1, DAY_IN_SECONDS );
2837 + set_transient( 'bot_clear_cache', 1, DAY_IN_SECONDS );
3427 2838 qcld_wb_chatboot_defualt_options();
3428 2839 $html='Reset all options to default successfully.';
3429 2840 wp_send_json($html);
3430 2841 }
3431 -}
3432 2842
3433 -if( !function_exists('wpbot_free_qc_upgrade_completed') ){
3434 - function wpbot_free_qc_upgrade_completed( $upgrader_object, $options ) {
3435 - // The path to our plugin's main file
3436 - $our_plugin = plugin_basename( __FILE__ );
3437 - // If an update has taken place and the updated type is plugins and the plugins element exists
3438 - if( $options['action'] == 'update' && $options['type'] == 'plugin' && isset( $options['plugins'] ) ) {
3439 - // Iterate through the plugins being updated and check if ours is there
3440 - foreach( $options['plugins'] as $plugin ) {
3441 - if( $plugin == $our_plugin ) {
3442 - set_transient( 'qcld_bot_clear_cache', 1, DAY_IN_SECONDS );
3443 - }
2843 +function wpbot_free_qc_upgrade_completed( $upgrader_object, $options ) {
2844 + // The path to our plugin's main file
2845 + $our_plugin = plugin_basename( __FILE__ );
2846 + // If an update has taken place and the updated type is plugins and the plugins element exists
2847 + if( $options['action'] == 'update' && $options['type'] == 'plugin' && isset( $options['plugins'] ) ) {
2848 + // Iterate through the plugins being updated and check if ours is there
2849 + foreach( $options['plugins'] as $plugin ) {
2850 + if( $plugin == $our_plugin ) {
2851 + set_transient( 'bot_clear_cache', 1, DAY_IN_SECONDS );
3444 2852 }
3445 2853 }
3446 - update_option( 'qcld_openai_relevant_post', ['post','page'] );
3447 2854 }
2855 + update_option( 'qcld_openai_relevant_post', ['post','page'] );
3448 2856 }
3449 2857 add_action( 'upgrader_process_complete', 'wpbot_free_qc_upgrade_completed', 10, 2 );
3450 2858
3451 2859
@@ -3454,16 +2862,15 @@
3454 2862 *
3455 2863 * Open Ai integration
3456 2864 *
3457 2865 */
3458 -if( !function_exists('wpbot_openAi_setting_func') ){
3459 -function wpbot_openAi_setting_func (){
3460 2866
2867 + function wpbot_openAi_setting_func (){
2868 +
3461 2869 require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/admin/templates/ai-admin.php");
3462 2870 // require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."qcld-openai-bot.php");
3463 2871
3464 -}
3465 -}
2872 + }
3466 2873
3467 2874 /**
3468 2875 *
3469 2876 * Function to load translation files.
@@ -3469,16 +2876,15 @@
3469 2876 * Function to load translation files.
3470 2877 *
3471 2878 */
3472 2879
3473 -if( !function_exists('wp_chatbot_lang_init') ){
3474 - function wp_chatbot_lang_init() {
3475 - load_plugin_textdomain( 'chatbot', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
3476 - }
2880 +
2881 +function wp_chatbot_lang_init() {
2882 + load_plugin_textdomain( 'wpchatbot', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
3477 2883 }
3478 2884 add_action( 'plugins_loaded', 'wp_chatbot_lang_init');
3479 2885
3480 -$wpbot_feedback = new Qcld_Wp_Usage_Feedback(
2886 +$wpbot_feedback = new Wp_Usage_Feedback(
3481 2887 __FILE__,
3482 2888 'plugins@quantumcloud.com',
3483 2889 false,
3484 2890 true
@@ -3483,9 +2889,9 @@
3483 2889 false,
3484 2890 true
3485 2891
3486 2892 );
3487 -if( !function_exists('wpbot_help_page_callback_func') ){
2893 +
3488 2894 function wpbot_help_page_callback_func(){
3489 2895 ?>
3490 2896
3491 2897
@@ -3490,20 +2896,17 @@
3490 2896
3491 2897
3492 2898
3493 2899 <div class="wrap qcld-main-wrapper">
3494 -<div class="qcld-wp-chatbot-wrap-header">
3495 -
3496 - <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>
3497 - <p><strong>Core Version:</strong> v<?php echo esc_html( QCLD_wpCHATBOT_VERSION ); ?></p>
3498 - </div>
3499 - <ul class="qcld-wp-chatbot-wrap-version-wrapper">
3500 - <li>
3501 - <a class="wpchatbot-Upgrade" href="https://www.wpbot.pro/" target="_blank">Upgrade To Pro</a>
3502 -
3503 - </li>
3504 - </ul>
3505 -</div>
2900 + <div class="qcld-wp-chatbot-wrap-header">
2901 + <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>
2902 + <p><strong>Core Version:</strong> v<?php echo QCLD_wpCHATBOT_VERSION; ?></p>
2903 + <ul class="qcld-wp-chatbot-wrap-version-wrapper">
2904 + <li>
2905 + <a class="wpchatbot-Upgrade" href="https://www.wpbot.pro/" target="_blank">Upgrade To Pro</a>
2906 + </li>
2907 + </ul>
2908 + </div>
3506 2909 <div class="qcld-wrap swpm-admin-menu-wrap">
3507 2910 <div class="nav-tab-wrapper sld_nav_container wppt_nav_container qcld_help_wppt_nav_container">
3508 2911 <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>
3509 2912 <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>
@@ -3512,23 +2915,23 @@
3512 2915 <div class="content_qcbot_help_secion">
3513 2916 <div class=" wppt-settings-section" id="general_wp_nutshell" style="display:none;">
3514 2917 <div class="content form-container qcbot_help_secion" style="">
3515 2918 <!-- new Section -->
3516 - <h3 class="qcld-wpbot-main-tabs-title"><?php echo esc_html__('WPBot – In a Nutshell', 'chatbot'); ?></h3>
3517 - <p><?php echo esc_html__('This is by no means a comprehensive list of WPBot features. But knowing these core terms will help you understand how WPBot was designed to work.', 'chatbot'); ?></p>
2919 + <h3 class="qcld-wpbot-main-tabs-title"><?php echo esc_html__('WPBot – In a Nutshell', 'wpbot'); ?></h3>
2920 + <p><?php echo esc_html__('This is by no means a comprehensive list of WPBot features. But knowing these core terms will help you understand how WPBot was designed to work.', 'wpbot'); ?></p>
3518 2921 <div class="panel panel-default">
3519 2922 <div class="panel-heading" role="tab" id="IntentheadingOne">
3520 2923 <h4 class="panel-title">
3521 - <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#IntentcollapseOne" aria-expanded="false" aria-controls="IntentcollapseOne"> <?php esc_html_e('Intents', 'chatbot'); ?> </a>
2924 + <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#IntentcollapseOne" aria-expanded="false" aria-controls="IntentcollapseOne"> <?php esc_html_e('Intents', 'wpbot'); ?> </a>
3522 2925 </h4>
3523 2926 </div>
3524 2927 <div id="IntentcollapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="IntentheadingOne">
3525 2928 <div class="panel-body">
3526 - <?php echo esc_html_e(' Intent is all about what the user wants to get out of the interaction. Whenever a user types something or clicks a button, the ChatBot will try to understand what the user wants and fulfill the request with appropriate responses.', 'chatbot'); ?></br></br>
3527 - <?php echo esc_html_e('You have to create possible Intent Responses using different features of the WPBot so the bot can respond accordingly. You can create Responses for various Intents using:', 'chatbot'); ?><b>
3528 - <?php echo esc_html_e('Simple Text Responses, Conversational form builder, FAQ, Site Search, Send an eMail, Newsletter Subscription, DialogFlow, OpenAI etc.', 'chatbot'); ?></b></br></br>
3529 - <?php echo esc_html_e('Please check this article for', 'chatbot'); ?> <span class="wppt_nav_container qcld-plan-tab-text">
3530 - <a href="#general_int"><?php echo esc_html_e('more details', 'chatbot'); ?></a> </span> <?php echo esc_html_e('on how you can create Intents and Responses.', 'chatbot'); ?>
2929 + <?php echo esc_html_e(' Intent is all about what the user wants to get out of the interaction. Whenever a user types something or clicks a button, the ChatBot will try to understand what the user wants and fulfill the request with appropriate responses.'); ?></br></br>
2930 + <?php echo esc_html_e('You have to create possible Intent Responses using different features of the WPBot so the bot can respond accordingly. You can create Responses for various Intents using:'); ?><b>
2931 + <?php echo esc_html_e('Simple Text Responses, Conversational form builder, FAQ, Site Search, Send an eMail, Newsletter Subscription, DialogFlow, OpenAI etc.'); ?></b></br></br>
2932 + <?php echo esc_html_e('Please check this article for'); ?> <span class="wppt_nav_container qcld-plan-tab-text">
2933 + <a href="#general_int"><?php echo esc_html_e('more details'); ?></a> </span> <?php echo esc_html_e('on how you can create Intents and Responses.'); ?>
3531 2934 </div>
3532 2935 </div>
3533 2936 </div>
3534 2937 <div class="panel panel-default">
@@ -3533,16 +2936,16 @@
3533 2936 </div>
3534 2937 <div class="panel panel-default">
3535 2938 <div class="panel-heading" role="tab" id="headingSix">
3536 2939 <h4 class="panel-title">
3537 - <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseSix" aria-expanded="false" aria-controls="collapseSix"> <?php esc_html_e('Start Menu', 'chatbot'); ?> </a>
2940 + <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseSix" aria-expanded="false" aria-controls="collapseSix"> <?php esc_html_e('Start Menu', 'wpbot'); ?> </a>
3538 2941 </h4>
3539 2942 </div>
3540 2943 <div id="collapseSix" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingSix">
3541 2944 <div class="panel-body">
3542 - <?php echo esc_html_e('While using a ChatBot, users can get lost or not know how to Interact with the Bot. That is why we have a Start menu to always give the user', 'chatbot'); ?> <b><?php echo esc_html_e('options to do more', 'chatbot'); ?></b>. <?php echo esc_html_e('From ChatBot->Settings->Start Menu you can drag Available Menu Items (Intents) to the Active Menu Items area.', 'chatbot'); ?></br></br>
3543 - <?php echo esc_html_e('Besides the built-in Intents, you can also create custom Intents for your Start Menu using', 'chatbot'); ?> <b><?php echo esc_html_e('Simple Text Responses', 'chatbot'); ?></b> and <b><?php echo esc_html_e('Conversational form builder', 'chatbot'); ?></b>. <?php echo esc_html_e('You can create almost any kind of response with the combinations of the two.', 'chatbot'); ?></br></br>
3544 - <?php echo esc_html_e('We recommend enabling', 'chatbot'); ?><b><?php echo esc_html_e(' Show Start Menu After Greetings ', 'chatbot'); ?></b><?php echo esc_html_e('from ChatBot Pro->Settings->General settings.', 'chatbot'); ?>
2945 + <?php echo esc_html_e('While using a ChatBot, users can get lost or not know how to Interact with the Bot. That is why we have a Start menu to always give the user'); ?> <b><?php echo esc_html_e('options to do more'); ?></b>. <?php echo esc_html_e('From ChatBot->Settings->Start Menu you can drag Available Menu Items (Intents) to the Active Menu Items area.'); ?></br></br>
2946 + <?php echo esc_html_e('Besides the built-in Intents, you can also create custom Intents for your Start Menu using'); ?> <b><?php echo esc_html_e('Simple Text Responses'); ?></b> and <b><?php echo esc_html_e('Conversational form builder'); ?></b>. <?php echo esc_html_e('You can create almost any kind of response with the combinations of the two.'); ?></br></br>
2947 + <?php echo esc_html_e('We recommend enabling'); ?><b><?php echo esc_html_e(' Show Start Menu After Greetings '); ?></b><?php echo esc_html_e('from ChatBot Pro->Settings->General settings.'); ?>
3545 2948 </div>
3546 2949 </div>
3547 2950 </div>
3548 2951 <div class="panel panel-default">
@@ -3547,15 +2950,15 @@
3547 2950 </div>
3548 2951 <div class="panel panel-default">
3549 2952 <div class="panel-heading" role="tab" id="headingSeven">
3550 2953 <h4 class="panel-title">
3551 - <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseSeven" aria-expanded="false" aria-controls="collapseSeven"> <?php esc_html_e('Settings', 'chatbot'); ?> </a>
2954 + <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseSeven" aria-expanded="false" aria-controls="collapseSeven"> <?php esc_html_e('Settings', 'wpbot'); ?> </a>
3552 2955 </h4>
3553 2956 </div>
3554 2957 <div id="collapseSeven" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingSeven">
3555 2958 <div class="panel-body">
3556 - <?php echo esc_html_e('Head over to ChatBot Pro->Settings->General and make sure to Enable the Floating Icon. As soon as you do that, the ChatBot can start working for your users. Make sure to drag some items to the Active Menu area under the Start Menu.', 'chatbot'); ?></br></br>
3557 - <?php echo esc_html_e('The ChatBot settings area is full of options. Do not be intimidated by that. You do not need to use all the options – just what you need. Head over to the Settings->', 'chatbot'); ?><b><?php echo esc_html_e('Icons and Themes', 'chatbot'); ?></b> <?php echo esc_html_e('for options to customize your ChatBot. You will also find options to embed the ChatBot on a page, click to chat, FAQ builder etc. under the Setting options.', 'chatbot'); ?>
2959 + <?php echo esc_html_e('Head over to ChatBot Pro->Settings->General and make sure to Enable the Floating Icon. As soon as you do that, the ChatBot can start working for your users. Make sure to drag some items to the Active Menu area under the Start Menu.'); ?></br></br>
2960 + <?php echo esc_html_e('The ChatBot settings area is full of options. Do not be intimidated by that. You do not need to use all the options – just what you need. Head over to the Settings->'); ?><b><?php echo esc_html_e('Icons and Themes'); ?></b> <?php echo esc_html_e('for options to customize your ChatBot. You will also find options to embed the ChatBot on a page, click to chat, FAQ builder etc. under the Setting options.'); ?>
3558 2961 </div>
3559 2962 </div>
3560 2963 </div>
3561 2964 <div class="panel panel-default">
@@ -3560,14 +2963,14 @@
3560 2963 </div>
3561 2964 <div class="panel panel-default">
3562 2965 <div class="panel-heading" role="tab" id="headingEight">
3563 2966 <h4 class="panel-title">
3564 - <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseEight" aria-expanded="false" aria-controls="collapseEight"> <?php esc_html_e('Language Center', 'chatbot'); ?> </a>
2967 + <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseEight" aria-expanded="false" aria-controls="collapseEight"> <?php esc_html_e('Language Center', 'wpbot'); ?> </a>
3565 2968 </h4>
3566 2969 </div>
3567 2970 <div id="collapseEight" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingEight">
3568 2971 <div class="panel-body">
3569 - <?php echo esc_html_e('You can use the ChatBot in', 'chatbot'); ?> <b><?php echo esc_html_e('ANY language', 'chatbot'); ?></b>. <?php echo esc_html_e('Just translate the texts used by the ChatBot from the WordPress dashboard ChatBot Pro->', 'chatbot'); ?><b><?php echo esc_html_e('Language Center. Multi language', 'chatbot'); ?></b> <?php echo esc_html_e('module is available in the Master License..', 'chatbot'); ?>
2972 + <?php echo esc_html_e('You can use the ChatBot in'); ?> <b><?php echo esc_html_e('ANY language'); ?></b>. <?php echo esc_html_e('Just translate the texts used by the ChatBot from the WordPress dashboard ChatBot Pro->'); ?><b><?php echo esc_html_e('Language Center. Multi language'); ?></b> <?php echo esc_html_e('module is available in the Master License..'); ?>
3570 2973 </div>
3571 2974 </div>
3572 2975 </div>
3573 2976 <div class="panel panel-default">
@@ -3572,14 +2975,14 @@
3572 2975 </div>
3573 2976 <div class="panel panel-default">
3574 2977 <div class="panel-heading" role="tab" id="headingtwo">
3575 2978 <h4 class="panel-title">
3576 - <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapsetwo" aria-expanded="false" aria-controls="collapseOne"> <?php esc_html_e('Simple Text Responses', 'chatbot'); ?> </a>
2979 + <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapsetwo" aria-expanded="false" aria-controls="collapseOne"> <?php esc_html_e('Simple Text Responses', 'wpbot'); ?> </a>
3577 2980 </h4>
3578 2981 </div>
3579 2982 <div id="collapsetwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingtwo">
3580 2983 <div class="panel-body">
3581 - <?php echo esc_html_e('You can use ChatBot Pro->Simple Text Responses to create', 'chatbot'); ?> <b><?php echo esc_html_e('text-based responses', 'chatbot'); ?></b> <?php echo esc_html_e('that users may ask your ChatBot. Just define the questions, answers, and some keywords and you are done. This is a much simpler', 'chatbot'); ?> <b><?php echo esc_html_e('alternative ', 'chatbot'); ?></b> <?php echo esc_html_e('to DialogFlow or OpenAI.', 'chatbot'); ?>
2984 + <?php echo esc_html_e('You can use ChatBot Pro->Simple Text Responses to create'); ?> <b><?php echo esc_html_e('text-based responses'); ?></b> <?php echo esc_html_e('that users may ask your ChatBot. Just define the questions, answers, and some keywords and you are done. This is a much simpler'); ?> <b><?php echo esc_html_e('alternative '); ?></b> <?php echo esc_html_e('to DialogFlow or OpenAI.'); ?>
3582 2985 </div>
3583 2986 </div>
3584 2987 </div>
3585 2988 <div class="panel panel-default">
@@ -3584,14 +2987,14 @@
3584 2987 </div>
3585 2988 <div class="panel panel-default">
3586 2989 <div class="panel-heading" role="tab" id="headingThree">
3587 2990 <h4 class="panel-title">
3588 - <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree"> <?php esc_html_e('Conversational Forms', 'chatbot'); ?> </a>
2991 + <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree"> <?php esc_html_e('Conversational Forms', 'wpbot'); ?> </a>
3589 2992 </h4>
3590 2993 </div>
3591 2994 <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
3592 2995 <div class="panel-body">
3593 - <?php echo esc_html_e('Use conversational forms to collect information from the users. This is also great for Button driven workflow. Create conditional conversations and forms for a native WordPress ChatBot experience. Build Standard Forms, Dynamic Forms with', 'chatbot'); ?> <b> <?php echo esc_html_e('conditional fields, Calculators, Appointment booking', 'chatbot'); ?></b> <?php echo esc_html_e('etc.', 'chatbot'); ?>
2996 + <?php echo esc_html_e('Use conversational forms to collect information from the users. This is also great for Button driven workflow. Create conditional conversations and forms for a native WordPress ChatBot experience. Build Standard Forms, Dynamic Forms with'); ?> <b> <?php echo esc_html_e('conditional fields, Calculators, Appointment booking'); ?></b> <?php echo esc_html_e('etc.'); ?>
3594 2997 </div>
3595 2998 </div>
3596 2999 </div>
3597 3000 <div class="panel panel-default">
@@ -3596,14 +2999,14 @@
3596 2999 </div>
3597 3000 <div class="panel panel-default">
3598 3001 <div class="panel-heading" role="tab" id="headingten">
3599 3002 <h4 class="panel-title">
3600 - <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseten" aria-expanded="false" aria-controls="collapseten"> <?php esc_html_e('Retargeting (Pro feature)', 'chatbot'); ?> </a>
3003 + <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseten" aria-expanded="false" aria-controls="collapseten"> <?php esc_html_e('Retargeting (Pro feature)', 'wpbot'); ?> </a>
3601 3004 </h4>
3602 3005 </div>
3603 3006 <div id="collapseten" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingten">
3604 3007 <div class="panel-body">
3605 - <?php echo esc_html_e('Retargeting is a powerful feature to grab your user’s attention with motivating information (a sale, coupon, ebook etc.). You can trigger a Retargeting message and the ChatBot window will automatically', 'chatbot'); ?> <b> <?php echo esc_html_e('automatically ', 'chatbot'); ?></b><?php echo esc_html_e('open up with your message. You can trigger Retargeting for ', 'chatbot'); ?><b> <?php echo esc_html_e('Exit Intent, Exit Intent, Scroll Intent, Auto After “X” Seconds, Checkout', 'chatbot'); ?></b> <?php echo esc_html_e('etc.', 'chatbot'); ?>
3008 + <?php echo esc_html_e('Retargeting is a powerful feature to grab your user’s attention with motivating information (a sale, coupon, ebook etc.). You can trigger a Retargeting message and the ChatBot window will automatically'); ?> <b> <?php echo esc_html_e('automatically '); ?></b><?php echo esc_html_e('open up with your message. You can trigger Retargeting for '); ?><b> <?php echo esc_html_e('Exit Intent, Exit Intent, Scroll Intent, Auto After “X” Seconds, Checkout'); ?></b> <?php echo esc_html_e('etc.'); ?>
3606 3009 </div>
3607 3010 </div>
3608 3011 </div>
3609 3012 <div class="panel panel-default">
@@ -3608,14 +3011,14 @@
3608 3011 </div>
3609 3012 <div class="panel panel-default">
3610 3013 <div class="panel-heading" role="tab" id="headingFour">
3611 3014 <h4 class="panel-title">
3612 - <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseFour" aria-expanded="false" aria-controls="collapseFour"> <?php esc_html_e('OpenAI or DialogFlow', 'chatbot'); ?> </a>
3015 + <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseFour" aria-expanded="false" aria-controls="collapseFour"> <?php esc_html_e('OpenAI or DialogFlow', 'wpbot'); ?> </a>
3613 3016 </h4>
3614 3017 </div>
3615 3018 <div id="collapseFour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFour">
3616 3019 <div class="panel-body">
3617 - <?php echo esc_html_e('If you need a bot that can understand natural language better, use either OpenAI or DialogFlow. Between the two', 'chatbot'); ?> <b> <?php echo esc_html_e('DialogFlow', 'chatbot'); ?></b> <?php echo esc_html_e('is better if you want to', 'chatbot'); ?> <b> <?php echo esc_html_e('provide customer support', 'chatbot'); ?></b>. <?php echo esc_html_e('OpenAI is better at generic questions and training OpenAI also requires a large dataset. But you do not have to use either 3rd party service. Using OpenAI or DialogFlow requires some patience and', 'chatbot'); ?> <b> <?php echo esc_html_e('effort', 'chatbot'); ?></b>. <?php echo esc_html_e('You may very well achieve what you need using ', 'chatbot'); ?><b> <?php echo esc_html_e('Simple Text Responses', 'chatbot'); ?></b> <?php echo esc_html_e('and/or', 'chatbot'); ?> <b> <?php echo esc_html_e('Conversational form builder', 'chatbot'); ?></b> <?php echo esc_html_e('instead.', 'chatbot'); ?>
3020 + <?php echo esc_html_e('If you need a bot that can understand natural language better, use either OpenAI or DialogFlow. Between the two'); ?> <b> <?php echo esc_html_e('DialogFlow'); ?></b> <?php echo esc_html_e('is better if you want to'); ?> <b> <?php echo esc_html_e('provide customer support'); ?></b>. <?php echo esc_html_e('OpenAI is better at generic questions and training OpenAI also requires a large dataset. But you do not have to use either 3rd party service. Using OpenAI or DialogFlow requires some patience and'); ?> <b> <?php echo esc_html_e('effort'); ?></b>. <?php echo esc_html_e('You may very well achieve what you need using '); ?><b> <?php echo esc_html_e('Simple Text Responses'); ?></b> <?php echo esc_html_e('and/or'); ?> <b> <?php echo esc_html_e('Conversational form builder'); ?></b> <?php echo esc_html_e('instead.'); ?>
3618 3021 </div>
3619 3022 </div>
3620 3023 </div>
3621 3024 <div class="panel panel-default">
@@ -3620,14 +3023,14 @@
3620 3023 </div>
3621 3024 <div class="panel panel-default">
3622 3025 <div class="panel-heading" role="tab" id="headingFive">
3623 3026 <h4 class="panel-title">
3624 - <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseFive" aria-expanded="false" aria-controls="collapseFive"> <?php esc_html_e('Getting Help', 'chatbot'); ?> </a>
3027 + <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseFive" aria-expanded="false" aria-controls="collapseFive"> <?php esc_html_e('Getting Help', 'wpbot'); ?> </a>
3625 3028 </h4>
3626 3029 </div>
3627 3030 <div id="collapseFive" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFive">
3628 3031 <div class="panel-body">
3629 - <?php echo esc_html_e('We have built-in Help section under each module. Please check them out and you will get many answers to the questions you may have. If you cannot find the answer to something particular, just contact us.', 'chatbot'); ?> <b><?php echo esc_html_e('Pro version ', 'chatbot'); ?></b><?php echo esc_html_e('users can open a support ticket from here. We are ', 'chatbot'); ?><b><?php echo esc_html_e('friendly ', 'chatbot'); ?></b><?php echo esc_html_e('and always here to help.', 'chatbot'); ?>
3032 + <?php echo esc_html_e('We have built-in Help section under each module. Please check them out and you will get many answers to the questions you may have. If you cannot find the answer to something particular, just contact us.'); ?> <b><?php echo esc_html_e('Pro version '); ?></b><?php echo esc_html_e('users can open a support ticket from here. We are '); ?><b><?php echo esc_html_e('friendly '); ?></b><?php echo esc_html_e('and always here to help.'); ?>
3630 3033 </div>
3631 3034 </div>
3632 3035 </div>
3633 3036 </div>
@@ -3634,31 +3037,31 @@
3634 3037 </div>
3635 3038 <div class=" wppt-settings-section" id="general_int">
3636 3039 <div class="content form-container qcbot_help_secion" style="">
3637 3040 <!-- new Section -->
3638 - <h3 class="qcld-wpbot-main-tabs-title"><?php echo esc_html__('WPBot Interactions', 'chatbot'); ?></h3>
3639 - <p><?php echo esc_html__('You can use WPBot to both answer user questions and collect information from the users.', 'chatbot'); ?></p>
3640 - <h4><?php echo esc_html__('To create answers to user questions you can use:', 'chatbot'); ?></h4>
3641 - <p> <b> <?php echo esc_html__('Simple Text Responses (built-in), FAQ(built-in), Site search(built-in), Product search(built-in Pro feature), DialogFlow(3rd Party) or OpenAI(3rd Party)', 'chatbot'); ?></b></p>
3642 - <h4> <?php echo esc_html__('To collect information from your users you can use:', 'chatbot'); ?></h4>
3643 - <p><?php echo esc_html__('Conversational forms(built-in), Mail us(built-in), Call me back(built-in), Collect feedback(built-in) features', 'chatbot'); ?></p>
3041 + <h3 class="qcld-wpbot-main-tabs-title"><?php echo esc_html__('WPBot Interactions', 'wpbot'); ?></h3>
3042 + <p><?php echo esc_html__('You can use WPBot to both answer user questions and collect information from the users.', 'wpbot'); ?></p>
3043 + <h4><?php echo esc_html__('To create answers to user questions you can use:', 'wpbot'); ?></h4>
3044 + <p> <b> <?php echo esc_html__('Simple Text Responses (built-in), FAQ(built-in), Site search(built-in), Product search(built-in Pro feature), DialogFlow(3rd Party) or OpenAI(3rd Party)', 'wpbot'); ?></b></p>
3045 + <h4> <?php echo esc_html__('To collect information from your users you can use:', 'wpbot'); ?></h4>
3046 + <p><?php echo esc_html__('Conversational forms(built-in), Mail us(built-in), Call me back(built-in), Collect feedback(built-in) features', 'wpbot'); ?></p>
3644 3047 <hr>
3645 3048 <p>
3646 - <b> <?php echo esc_html__('When you activate the plugin, by default only the Site search option will work. Site search displays links to your website pages that contain the keywords in the user query. ', 'chatbot'); ?>
3049 + <b> <?php echo esc_html__('When you activate the plugin, by default only the Site search option will work. Site search displays links to your website pages that contain the keywords in the user query. ', 'wpbot'); ?>
3647 3050 </b></p>
3648 - <p><b><?php echo esc_html__('To generate direct text responses, you need to use either Simple Text Responses or AI services. ', 'chatbot'); ?>
3051 + <p><b><?php echo esc_html__('To generate direct text responses, you need to use either Simple Text Responses or AI services. ', 'wpbot'); ?>
3649 3052 </b></p>
3650 3053 <hr>
3651 - <h4><?php echo esc_html__('You can create user interactions in the following ways:', 'chatbot'); ?></h4>
3054 + <h4><?php echo esc_html__('You can create user interactions in the following ways:', 'wpbot'); ?></h4>
3652 3055 <div class="panel panel-default">
3653 3056 <div class="panel-heading" role="tab" id="headingOne">
3654 3057 <h4 class="panel-title">
3655 - <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="false" aria-controls="collapseOne"> <?php esc_html_e('Predefined intents - Built-in ChatBot Features', 'chatbot'); ?> </a>
3058 + <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="false" aria-controls="collapseOne"> <?php esc_html_e('Predefined intents - Built-in ChatBot Features', 'wpbot'); ?> </a>
3656 3059 </h4>
3657 3060 </div>
3658 3061 <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
3659 3062 <div class="panel-body">
3660 - <?php esc_html_e('Predefined intents can work without integration to DialogFlow API and AI. These are readily available as soon as you install the plugin and can be turned on or off individually.', 'chatbot'); ?>
3063 + <?php esc_html_e('Predefined intents can work without integration to DialogFlow API and AI. These are readily available as soon as you install the plugin and can be turned on or off individually.', 'wpbot'); ?>
3661 3064 <div class="section-container">
3662 3065 <div class="wpb_column vc_column_container vc_col-sm-6">
3663 3066 <div class="vc_column-inner ">
3664 3067 <div class="wpb_wrapper">
@@ -3664,27 +3067,27 @@
3664 3067 <div class="wpb_wrapper">
3665 3068 <div class="to-icon-box left txt-left">
3666 3069 <div class="to-icon-txt fa-4x-txt ">
3667 3070 <h3>
3668 - <span>// </span><?php esc_html_e('Simple Text Responses', 'chatbot'); ?>
3071 + <span>// </span><?php esc_html_e('Simple Text Responses', 'wpbot'); ?>
3669 3072 </h3>
3670 - <p><?php esc_html_e('Create unlimited text responses from your WordPress backend. The ChatBot uses advanced search algorithm for natural language phrase matching with user input.', 'chatbot'); ?> </p>
3073 + <p><?php esc_html_e('Create unlimited text responses from your WordPress backend. The ChatBot uses advanced search algorithm for natural language phrase matching with user input.', 'wpbot'); ?> </p>
3671 3074 </div>
3672 3075 </div>
3673 3076 <div class="to-icon-box left txt-left">
3674 3077 <div class="to-icon-txt fa-4x-txt ">
3675 3078 <h3>
3676 - <span>// </span><?php esc_html_e('Send eMail, Call Me Back &amp; Feedback Collection', 'chatbot'); ?>
3079 + <span>// </span><?php esc_html_e('Send eMail, Call Me Back &amp; Feedback Collection', 'wpbot'); ?>
3677 3080 </h3>
3678 - <p><?php esc_html_e('Users can send a email to the site admin directly from the Chat window for customer support. The Call Me Back feature lets you get call requests from your customers which will be emailed to you. You can also use WPBot to collect Feedback from your customers regarding anything! You can disable/enable these features from the Start Menu.', 'chatbot'); ?></p>
3081 + <p><?php esc_html_e('Users can send a email to the site admin directly from the Chat window for customer support. The Call Me Back feature lets you get call requests from your customers which will be emailed to you. You can also use WPBot to collect Feedback from your customers regarding anything! You can disable/enable these features from the Start Menu.', 'wpbot'); ?></p>
3679 3082 </div>
3680 3083 </div>
3681 3084 <div class="to-icon-box left txt-left">
3682 3085 <div class="to-icon-txt fa-4x-txt ">
3683 3086 <h3>
3684 - <span>// </span><?php esc_html_e('Advanced Site Search', 'chatbot'); ?> <span class="qc_wpbot_pro">PRO</span>
3087 + <span>// </span><?php esc_html_e('Advanced Site Search', 'wpbot'); ?> <span class="qc_wpbot_pro">PRO</span>
3685 3088 </h3>
3686 - <p><?php esc_html_e('If no matching text response is found WPBot will conduct an advanced website search and try to match user queries with your website contents and show results.', 'chatbot'); ?> </p>
3089 + <p><?php esc_html_e('If no matching text response is found WPBot will conduct an advanced website search and try to match user queries with your website contents and show results.', 'wpbot'); ?> </p>
3687 3090 </div>
3688 3091 </div>
3689 3092 </div>
3690 3093 </div>
@@ -3694,11 +3097,11 @@
3694 3097 <div class="wpb_wrapper">
3695 3098 <div class="to-icon-box left txt-left">
3696 3099 <div class="to-icon-txt fa-4x-txt ">
3697 3100 <h3>
3698 - <span>// </span><?php esc_html_e('Frequently Asked Questions', 'chatbot'); ?>
3101 + <span>// </span><?php esc_html_e('Frequently Asked Questions', 'wpbot'); ?>
3699 3102 </h3>
3700 - <p><?php esc_html_e('Create a set of Frequently Asked Questions or FAQ so users can quickly find answers to the most common questions they have.', 'chatbot'); ?></p>
3103 + <p><?php esc_html_e('Create a set of Frequently Asked Questions or FAQ so users can quickly find answers to the most common questions they have.', 'wpbot'); ?></p>
3701 3104 </div>
3702 3105 </div>
3703 3106 <div class="to-icon-box left txt-left">
3704 3107 <div class="to-icon-txt fa-4x-txt ">
@@ -3704,17 +3107,17 @@
3704 3107 <div class="to-icon-txt fa-4x-txt ">
3705 3108 <h3>
3706 3109 <span>// </span>Ask for name, email, phone number etc.
3707 3110 </h3>
3708 - <p><?php esc_html_e('Asking for the name is the default workflow. In the pro version, you can also ask for an email and phone number if you want to or skip the Greetings part altogether and load any intent of your choice.', 'chatbot'); ?></p>
3111 + <p><?php esc_html_e('Asking for the name is the default workflow. In the pro version, you can also ask for an email and phone number if you want to or skip the Greetings part altogether and load any intent of your choice.', 'wpbot'); ?></p>
3709 3112 </div>
3710 3113 </div>
3711 3114 <div class="to-icon-box left txt-left">
3712 3115 <div class="to-icon-txt fa-4x-txt ">
3713 3116 <h3>
3714 - <span>// </span><?php esc_html_e('Newsletter Subscription', 'chatbot'); ?> <span class="qc_wpbot_pro">PRO</span>
3117 + <span>// </span><?php esc_html_e('Newsletter Subscription', 'wpbot'); ?> <span class="qc_wpbot_pro">PRO</span>
3715 3118 </h3>
3716 - <p><?php esc_html_e('WPBot can prompt User for eMail subscription. Link this with your Retargeting ChatBot window popup and a special offer. People can register their email address that you can later export as CSV!', 'chatbot'); ?> <strong>GDPR compliant</strong> with unsubscribe option from the ChatBot! </p>
3119 + <p><?php esc_html_e('WPBot can prompt User for eMail subscription. Link this with your Retargeting ChatBot window popup and a special offer. People can register their email address that you can later export as CSV!', 'wpbot'); ?> <strong>GDPR compliant</strong> with unsubscribe option from the ChatBot! </p>
3717 3120 </div>
3718 3121 </div>
3719 3122 </div>
3720 3123 </div>
@@ -3725,38 +3128,38 @@
3725 3128 </div>
3726 3129 <div class="panel panel-default">
3727 3130 <div class="panel-heading" role="tab" id="headingTwo">
3728 3131 <h4 class="panel-title">
3729 - <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"><?php esc_html_e(' Menu Driven - Created with Conversational Form Builder Addon', 'chatbot'); ?> </a>
3132 + <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"><?php esc_html_e(' Menu Driven - Created with Conversational Form Builder Addon', 'wpbot'); ?> </a>
3730 3133 </h4>
3731 3134 </div>
3732 3135 <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
3733 3136 <div class="panel-body">
3734 - <p><?php esc_html_e('Extend the Start Menu with the', 'chatbot'); ?> <strong><?php esc_html_e('powerful Conversational Forms', 'chatbot'); ?></strong>&nbsp;<?php esc_html_e(' Addon for WPBot. It extends WPBot’s functionality and adds the ability to create', 'chatbot'); ?> <strong><?php esc_html_e('conditional conversations', 'chatbot'); ?></strong> <?php esc_html_e('and/or', 'chatbot'); ?> <strong><?php esc_html_e('forms', 'chatbot'); ?></strong> <?php esc_html_e('for the WPBot. It is a visual,', 'chatbot'); ?> <strong><?php esc_html_e('drag and drop', 'chatbot'); ?></strong><?php esc_html_e(' form builder that is easy to use and very flexible. Supports conditional logic and use of variables to build all types of forms or just', 'chatbot'); ?> <strong><?php esc_html_e('menu driven', 'chatbot'); ?></strong>
3735 - <strong><?php esc_html_e('conversations', 'chatbot'); ?> </strong><?php esc_html_e('with if else logic', 'chatbot'); ?> <strong>. </strong><?php esc_html_e('Conversations or forms can be', 'chatbot'); ?> <strong><?php esc_html_e('eMailed', 'chatbot'); ?></strong> <?php esc_html_e('to you and', 'chatbot'); ?> <strong><?php esc_html_e('saved in the database', 'chatbot'); ?></strong>.
3137 + <p><?php esc_html_e('Extend the Start Menu with the', 'wpbot'); ?> <strong><?php esc_html_e('powerful Conversational Forms', 'wpbot'); ?></strong>&nbsp;<?php esc_html_e(' Addon for WPBot. It extends WPBot’s functionality and adds the ability to create', 'wpbot'); ?> <strong><?php esc_html_e('conditional conversations', 'wpbot'); ?></strong> <?php esc_html_e('and/or', 'wpbot'); ?> <strong><?php esc_html_e('forms', 'wpbot'); ?></strong> <?php esc_html_e('for the WPBot. It is a visual,', 'wpbot'); ?> <strong><?php esc_html_e('drag and drop', 'wpbot'); ?></strong><?php esc_html_e(' form builder that is easy to use and very flexible. Supports conditional logic and use of variables to build all types of forms or just', 'wpbot'); ?> <strong><?php esc_html_e('menu driven', 'wpbot'); ?></strong>
3138 + <strong><?php esc_html_e('conversations', 'wpbot'); ?> </strong><?php esc_html_e('with if else logic', 'wpbot'); ?> <strong>. </strong><?php esc_html_e('Conversations or forms can be', 'wpbot'); ?> <strong><?php esc_html_e('eMailed', 'wpbot'); ?></strong> <?php esc_html_e('to you and', 'wpbot'); ?> <strong><?php esc_html_e('saved in the database', 'wpbot'); ?></strong>.
3736 3139 </p>
3737 - <h4><?php esc_html_e('Conversational Form Builder Free or Pro version works with the WPBot Free or Pro versions.', 'chatbot'); ?></h4>
3738 - <a class="FormBuilder" href="https://wordpress.org/plugins/conversational-forms/" target="_blank"><?php esc_html_e('Download Free Version', 'chatbot'); ?></a>
3739 - <a class="FormBuilder" href="https://www.quantumcloud.com/products/conversations-and-form-builder/" target="_blank"><?php esc_html_e('Grab the Pro version', 'chatbot'); ?></a>
3740 - <h4><?php esc_html_e('What Can You Do with it?', 'chatbot'); ?></h4>
3741 - <p><?php esc_html_e('Conversation Forms allows you to create a wide variety of forms, that might include:', 'chatbot'); ?></p>
3140 + <h4><?php esc_html_e('Conversational Form Builder Free or Pro version works with the WPBot Free or Pro versions.', 'wpbot'); ?></h4>
3141 + <a class="FormBuilder" href="https://wordpress.org/plugins/conversational-forms/" target="_blank"><?php esc_html_e('Download Free Version', 'wpbot'); ?></a>
3142 + <a class="FormBuilder" href="https://www.quantumcloud.com/products/conversations-and-form-builder/" target="_blank"><?php esc_html_e('Grab the Pro version', 'wpbot'); ?></a>
3143 + <h4><?php esc_html_e('What Can You Do with it?', 'wpbot'); ?></h4>
3144 + <p><?php esc_html_e('Conversation Forms allows you to create a wide variety of forms, that might include:', 'wpbot'); ?></p>
3742 3145 <ul>
3743 - <li><?php esc_html_e('Create menu or button driven conversations', 'chatbot'); ?></li>
3744 - <li><?php esc_html_e('Conditional <strong>Menu Driven Conversations', 'chatbot'); ?></strong>
3745 - <span class="qc_wpbot_pro" style="font-size: 9px;"><?php esc_html_e('PRO', 'chatbot'); ?></span>
3146 + <li><?php esc_html_e('Create menu or button driven conversations', 'wpbot'); ?></li>
3147 + <li><?php esc_html_e('Conditional <strong>Menu Driven Conversations', 'wpbot'); ?></strong>
3148 + <span class="qc_wpbot_pro" style="font-size: 9px;"><?php esc_html_e('PRO', 'wpbot'); ?></span>
3746 3149 </li>
3747 - <li><?php esc_html_e('Standard Contact Forms', 'chatbot'); ?></li>
3748 - <li><?php esc_html_e('Dynamic,', 'chatbot'); ?> <strong><?php esc_html_e('conditional Forms', 'chatbot'); ?></strong> <?php esc_html_e('– where fields can change based on the user selections', 'chatbot'); ?> <span class="qc_wpbot_pro" style="font-size: 9px;">PRO</span>
3150 + <li><?php esc_html_e('Standard Contact Forms', 'wpbot'); ?></li>
3151 + <li><?php esc_html_e('Dynamic,', 'wpbot'); ?> <strong><?php esc_html_e('conditional Forms', 'wpbot'); ?></strong> <?php esc_html_e('– where fields can change based on the user selections', 'wpbot'); ?> <span class="qc_wpbot_pro" style="font-size: 9px;">PRO</span>
3749 3152 </li>
3750 - <li>Job <strong><?php esc_html_e('Application Forms', 'chatbot'); ?></strong>
3153 + <li>Job <strong><?php esc_html_e('Application Forms', 'wpbot'); ?></strong>
3751 3154 </li>
3752 3155 <li>
3753 - <strong><?php esc_html_e('Lead Capture', 'chatbot'); ?></strong> <?php esc_html_e('Forms', 'chatbot'); ?>
3156 + <strong><?php esc_html_e('Lead Capture', 'wpbot'); ?></strong> <?php esc_html_e('Forms', 'wpbot'); ?>
3754 3157 </li>
3755 - <li><?php esc_html_e('Various types of', 'chatbot'); ?> <strong><?php esc_html_e('Calculators', 'chatbot'); ?></strong>
3756 - <span class="qc_wpbot_pro" style="font-size: 9px;"><?php esc_html_e('PRO', 'chatbot'); ?></span>
3158 + <li><?php esc_html_e('Various types of', 'wpbot'); ?> <strong><?php esc_html_e('Calculators', 'wpbot'); ?></strong>
3159 + <span class="qc_wpbot_pro" style="font-size: 9px;"><?php esc_html_e('PRO', 'wpbot'); ?></span>
3757 3160 </li>
3758 - <li><?php esc_html_e('Feedback', 'chatbot'); ?> <strong>Survey</strong><?php esc_html_e(' Forms etc.', 'chatbot'); ?> </li>
3161 + <li><?php esc_html_e('Feedback', 'wpbot'); ?> <strong>Survey</strong><?php esc_html_e(' Forms etc.', 'wpbot'); ?> </li>
3759 3162 </ul>
3760 3163 </div>
3761 3164 </div>
3762 3165 </div>
@@ -3762,9 +3165,9 @@
3762 3165 </div>
3763 3166 <div class="panel panel-default">
3764 3167 <div class="panel-heading" role="tab" id="AIheadingThree">
3765 3168 <h4 class="panel-title">
3766 - <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#AIcollapseThree" aria-expanded="false" aria-controls="AIcollapseThree"> <?php esc_html_e('DialogFlow ES and CX, OpenAI', 'chatbot'); ?> </a>
3169 + <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#AIcollapseThree" aria-expanded="false" aria-controls="AIcollapseThree"> <?php esc_html_e('DialogFlow ES and CX, OpenAI', 'wpbot'); ?> </a>
3767 3170 </h4>
3768 3171 </div>
3769 3172 <div id="AIcollapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="AIheadingThree">
3770 3173 <div class="panel-body">
@@ -3770,32 +3173,32 @@
3770 3173 <div class="panel-body">
3771 3174 <div class="section-container">
3772 3175 <div class="wpb_column vc_column_container vc_col-sm-6">
3773 3176 <div class="wpb_wrapper">
3774 - <h3><?php esc_html_e('DialogFlow Essential', 'chatbot'); ?></h3>
3775 - <?php esc_html_e('Intents created in Dialogflow give you the power to build a truly human like, intelligent and comprehensive chatbot. Build any type of Intents and Responses (including rich message responses) directly in DialogFlow and train the bot accordingly. When you create custom intents and responses in DialogFlow, WPBot will automatically display them when user inputs match with your Custom Intents along with the responses you created. You can also build Rich responses by enabling Facebook messenger Response option.', 'chatbot'); ?>
3776 - <p><?php esc_html_e('In addition you can also Enable ', 'chatbot'); ?> <?php esc_html_e('Advanced Chained Question and Answers using follow up Intents, Contexts, Entities etc. and then have resulting answers from your users emailed to you. This feature lets you create a a series of questions in DialogFlow that will be asked by the bot and based on the user inputs a response will be displayed.', 'chatbot'); ?> <span class="qc_wpbot_pro" style="font-size: 9px;">PRO</span>
3177 + <h3><?php esc_html_e('DialogFlow Essential', 'wpbot'); ?></h3>
3178 + <?php esc_html_e('Intents created in Dialogflow give you the power to build a truly human like, intelligent and comprehensive chatbot. Build any type of Intents and Responses (including rich message responses) directly in DialogFlow and train the bot accordingly. When you create custom intents and responses in DialogFlow, WPBot will automatically display them when user inputs match with your Custom Intents along with the responses you created. You can also build Rich responses by enabling Facebook messenger Response option.', 'wpbot'); ?>
3179 + <p><?php esc_html_e('In addition you can also Enable ', 'wpbot'); ?> <?php esc_html_e('Advanced Chained Question and Answers using follow up Intents, Contexts, Entities etc. and then have resulting answers from your users emailed to you. This feature lets you create a a series of questions in DialogFlow that will be asked by the bot and based on the user inputs a response will be displayed.', 'wpbot'); ?> <span class="qc_wpbot_pro" style="font-size: 9px;">PRO</span>
3777 3180 </p>
3778 - <p><?php esc_html_e('WPBot also supports Rich responses using Facebook Messenger integration. This allows you to display Image,', 'chatbot'); ?> Cards<?php esc_html_e(', Quick Text Reply or Custom PayLoad inside the ChatBot window. You can also insert an ', 'chatbot'); ?><?php esc_html_e('image', 'chatbot'); ?><?php esc_html_e(' or', 'chatbot'); ?> <?php esc_html_e('youtube video', 'chatbot'); ?><?php esc_html_e(' link inside the DialogFlow responses and they will be automatically rendered by the WPBot!', 'chatbot'); ?> <span class="qc_wpbot_pro" style="font-size: 9px;"><?php esc_html_e('PRO', 'chatbot'); ?></span>
3181 + <p><?php esc_html_e('WPBot also supports Rich responses using Facebook Messenger integration. This allows you to display Image,', 'wpbot'); ?> Cards<?php esc_html_e(', Quick Text Reply or Custom PayLoad inside the ChatBot window. You can also insert an ', 'wpbot'); ?><?php esc_html_e('image', 'wpbot'); ?><?php esc_html_e(' or', 'wpbot'); ?> <?php esc_html_e('youtube video', 'wpbot'); ?><?php esc_html_e(' link inside the DialogFlow responses and they will be automatically rendered by the WPBot!', 'wpbot'); ?> <span class="qc_wpbot_pro" style="font-size: 9px;"><?php esc_html_e('PRO', 'wpbot'); ?></span>
3779 3182 </p>
3780 - <h3><?php esc_html_e('OpenAI', 'chatbot'); ?></h3>
3781 - <?php esc_html_e('Connect the ChatBot to OpenAI. OpenAI’s API provides access to GPT-3, for a wide variety of natural language tasks. Train your ChatBot with (pre-trained) GPT-3 to answer any user questions using. Select your preferred Engine from DaVinci, Ada, Curie or Babbag! Add your own API key to the addon to connect to your OpenAI account. To go live, you need to apply to OpenAI.', 'chatbot'); ?>
3183 + <h3><?php esc_html_e('OpenAI', 'wpbot'); ?></h3>
3184 + <?php esc_html_e('Connect the ChatBot to OpenAI. OpenAI’s API provides access to GPT-3, for a wide variety of natural language tasks. Train your ChatBot with (pre-trained) GPT-3 to answer any user questions using. Select your preferred Engine from DaVinci, Ada, Curie or Babbag! Add your own API key to the addon to connect to your OpenAI account. To go live, you need to apply to OpenAI.', 'wpbot'); ?>
3782 3185 </div>
3783 3186 </div>
3784 3187 <div class="wpb_column vc_column_container vc_col-sm-6">
3785 3188 <div class="wpb_wrapper">
3786 - <h3><?php esc_html_e('DialogFlow CX', 'chatbot'); ?> <span class="qc_wpbot_pro">PRO</span>
3189 + <h3><?php esc_html_e('DialogFlow CX', 'wpbot'); ?> <span class="qc_wpbot_pro">PRO</span>
3787 3190 </h3>
3788 - <p><?php esc_html_e('WPBot supports', 'chatbot'); ?> <?php esc_html_e('visual workflow builder', 'chatbot'); ?><?php esc_html_e(' Dialogflow CX. It provides a new way of designing agents, taking a state machine approach to agent design. This gives you clear and explicit control over a conversation, a better end-user experience, and a better development', 'chatbot'); ?> <?php esc_html_e('workflow', 'chatbot'); ?>. </p>
3191 + <p><?php esc_html_e('WPBot supports', 'wpbot'); ?> <?php esc_html_e('visual workflow builder', 'wpbot'); ?><?php esc_html_e(' Dialogflow CX. It provides a new way of designing agents, taking a state machine approach to agent design. This gives you clear and explicit control over a conversation, a better end-user experience, and a better development', 'wpbot'); ?> <?php esc_html_e('workflow', 'wpbot'); ?>. </p>
3789 3192 <ul>
3790 3193 <li>
3791 - <?php esc_html_e('Console visualization', 'chatbot'); ?><?php esc_html_e(': A new', 'chatbot'); ?> <?php esc_html_e('visual builder', 'chatbot'); ?> <?php esc_html_e('makes building and maintaining agents easier. Conversation paths are graphed as a state machine model, which makes conversations easier to design, enhance, and maintain.', 'chatbot'); ?>
3194 + <?php esc_html_e('Console visualization', 'wpbot'); ?><?php esc_html_e(': A new', 'wpbot'); ?> <?php esc_html_e('visual builder', 'wpbot'); ?> <?php esc_html_e('makes building and maintaining agents easier. Conversation paths are graphed as a state machine model, which makes conversations easier to design, enhance, and maintain.', 'wpbot'); ?>
3792 3195 </li>
3793 3196 <li>
3794 - <?php esc_html_e('Intuitive and powerful conversation control', 'chatbot'); ?>: <?php esc_html_e('Conversation states and state transitions are first-class types that provide explicit and powerful control over conversation paths. You can clearly define a series of steps that you want the end-user to go through.', 'chatbot'); ?>
3197 + <?php esc_html_e('Intuitive and powerful conversation control', 'wpbot'); ?>: <?php esc_html_e('Conversation states and state transitions are first-class types that provide explicit and powerful control over conversation paths. You can clearly define a series of steps that you want the end-user to go through.', 'wpbot'); ?>
3795 3198 </li>
3796 3199 <li>
3797 - <?php esc_html_e('Flows for agent partitions', 'chatbot'); ?>: <?php esc_html_e('With flows, you can partition your agent into smaller conversation topics. Different team members can own different flows, which makes large and complex agents easy to build.', 'chatbot'); ?>
3200 + <?php esc_html_e('Flows for agent partitions', 'wpbot'); ?>: <?php esc_html_e('With flows, you can partition your agent into smaller conversation topics. Different team members can own different flows, which makes large and complex agents easy to build.', 'wpbot'); ?>
3798 3201 </li>
3799 3202 <img style="width:100%" src="<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/dialogflow-cx-1024x676.jpg' );?>" alt="Dialogflow CX">
3800 3203 </ul>
3801 3204 </div>
@@ -3808,241 +3211,126 @@
3808 3211 </div>
3809 3212 <div class=" wppt-settings-section" id="general_debugging" style="display:none;">
3810 3213 <div class="content form-container qcbot_help_secion" >
3811 3214 <div class="" >
3812 - <h3 class="qcld-wpbot-main-tabs-title"><?php esc_html_e('Tips', 'chatbot'); ?></h3>
3813 - <h3><?php esc_html_e('Tutorial', 'chatbot'); ?></h3>
3814 - <p><?php esc_html_e('You will find some helpful video tutorials and the ChatBot workflow on this', 'chatbot'); ?> <a href="https://www.wpbot.pro/chatbot-workflow/" target="_blank">page</a>.</p>
3815 - <h3><?php esc_html_e('Simple Text Responses', 'chatbot'); ?></h3>
3816 - <p><?php esc_html_e('Create simple text responses easily for your chatbot. The ChatBot will use advanced search algorithm for natural language phrase matching with user input. You can also adjust the Phrase matching accuracy for better user experience.', 'chatbot'); ?></p>
3817 - <h3><?php esc_html_e('Setting Updates', 'chatbot'); ?></h3>
3818 - <p><?php esc_html_e('After making changes in the language center or settings, please type reset and hit enter in the ChatBot to start testing from the beginning or open a new Incognito window (Ctrl+Shit+N in chrome).', 'chatbot'); ?></p>
3819 - <h3><?php esc_html_e('Note', 'chatbot'); ?></h3>
3820 - <p><?php esc_html_e('You could use &lt;br&gt; tag in Language Center & Dialogflow Responses for line break.', 'chatbot'); ?></p>
3215 + <h3 class="qcld-wpbot-main-tabs-title"><?php esc_html_e('Tips', 'wpbot'); ?></h3>
3216 + <h3><?php esc_html_e('Tutorial', 'wpbot'); ?></h3>
3217 + <p><?php esc_html_e('You will find some helpful video tutorials and the ChatBot workflow on this', 'wpbot'); ?> <a href="https://www.wpbot.pro/chatbot-workflow/" target="_blank">page</a>.</p>
3218 + <h3><?php esc_html_e('Simple Text Responses', 'wpbot'); ?></h3>
3219 + <p><?php esc_html_e('Create simple text responses easily for your chatbot. The ChatBot will use advanced search algorithm for natural language phrase matching with user input. You can also adjust the Phrase matching accuracy for better user experience.', 'wpbot'); ?></p>
3220 + <h3><?php esc_html_e('Setting Updates', 'wpbot'); ?></h3>
3221 + <p><?php esc_html_e('After making changes in the language center or settings, please type reset and hit enter in the ChatBot to start testing from the beginning or open a new Incognito window (Ctrl+Shit+N in chrome).', 'wpbot'); ?></p>
3222 + <h3><?php esc_html_e('Note', 'wpbot'); ?></h3>
3223 + <p><?php esc_html_e('You could use &lt;br&gt; tag in Language Center & Dialogflow Responses for line break.', 'wpbot'); ?></p>
3821 3224 </div>
3822 3225 </div>
3823 -
3226 + <div class="content form-container qcbot_help_secion">
3227 + <h3><?php esc_html_e('Problem: I changed language and/or some settings but do not see the changes.', 'wpbot'); ?></h3>
3228 + <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.', 'wpbot'); ?></p>
3229 + </div>
3230 + <div class="content form-container qcbot_help_secion">
3231 + <h3><?php esc_html_e('Problem: I cannot connect to the DialogFlow', 'wpbot'); ?></h3>
3232 + <p><?php esc_html_e('To Debug: 1. Make sure that you have created the Google Project and the Service account as an Owner', 'wpbot'); ?><br>
3233 + <?php esc_html_e('2. Make sure that you have connected to the correct Dialogflow agent', 'wpbot'); ?><br>
3234 + <?php esc_html_e('3. Follow the steps in this tutorial correctly:', 'wpbot'); ?> <a href="https://www.wpbot.pro/dialogflow-integration" target="_blank">https://www.wpbot.pro/dialogflow-integration</a><br>
3235 + <?php esc_html_e(' 4. Make sure that the Google Client Package is Installed on Your Website.<br>
3236 + 5. For DialogFlow agent region, try choosing any region other than the EU region which has known issues.<br>
3237 + 6. Make sure to download and import the sample DialogFlow agent to your agent<br>
3238 + 7. Test the ChatBot in the browser Incognito mode', 'wpbot'); ?>
3239 + </p>
3240 + </div>
3241 + <div class="content form-container qcbot_help_secion" >
3242 + <h3><?php esc_html_e('Problem: I am not getting emails from the ChatBot', 'wpbot'); ?></h3>
3243 + <p>
3244 + <?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.', 'wpbot'); ?>
3245 + </p>
3246 + </div>
3247 + <div class="content form-container qcbot_help_secion" >
3248 + <h3><?php esc_html_e('Problem: Simple text responses are not working or getting an error', 'wpbot'); ?></h3>
3249 + <p>
3250 + <?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.', 'wpbot'); ?>
3251 + </p>
3252 + </div>
3253 + <div class="content form-container qcbot_help_secion">
3254 + <h3><?php esc_html_e('Problem: I changed language or some other settings but do not see them when testing', 'wpbot'); ?></h3>
3255 + <p>
3256 + <?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.', 'wpbot'); ?>
3257 + </p>
3258 + </div>
3259 + <div class="content form-container qcbot_help_secion">
3260 + <h3><?php esc_html_e('Problem: The ChatBot is NOT working in the front end.', 'wpbot'); ?></h3>
3261 + <p>
3262 + <?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.', 'wpbot'); ?> <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.', 'wpbot'); ?><br>
3263 + <?php esc_html_e(' Also go to Simple Text Responses and press the Re-Index button.', 'wpbot'); ?></br>
3264 + <?php esc_html_e(' After that try purging any cache and test the chatbot in Incognito mode', 'wpbot'); ?><br>
3265 + <?php esc_html_e(' Please contact us if you need [further help]', 'wpbot'); ?>(<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.', 'wpbot'); ?>
3266 + </p>
3267 + </div>
3268 + <div class="content form-container qcbot_help_secion">
3269 + <h3><?php esc_html_e('Problem: The ChatBot is stuck on typing or loading', 'wpbot'); ?></h3>
3270 + <p>
3271 + <?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.', 'wpbot'); ?><br>
3272 + <?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.', 'wpbot'); ?><br>
3273 + <?php esc_html_e('Also go to Simple Text Responses and press the Re-Index button.', 'wpbot'); ?></br>
3274 + <?php esc_html_e('After that remember to test in a browser Incognito mode to avoid cache and cookies.', 'wpbot'); ?>
3275 + </p>
3276 + </div>
3277 + <div class="content form-container qcbot_help_secion">
3278 + <h3><?php esc_html_e('Problem: How do I add new conversations to the ChatBot?', 'wpbot'); ?></h3>
3279 + <p><?php esc_html_e('Please check the plugin`s Help Section for details on this', 'wpbot'); ?></p>
3280 + </div>
3281 + <div class="content form-container qcbot_help_secion" >
3282 + <h3><?php esc_html_e('Problem: How do I add Line Breaks?', 'wpbot'); ?></h3>
3283 + <p><?php esc_html_e('Please use the &lt;br&gt; tag for line breaks.', 'wpbot'); ?></p>
3284 + </div>
3285 + <div class="content form-container qcbot_help_secion">
3286 + <h3><?php esc_html_e('Problem: Are HTML tags supported?', 'wpbot'); ?> </h3>
3287 + <p><?php esc_html_e('Yes, common HTML tags link link href, strong, br etc. are supported.', 'wpbot'); ?></p>
3288 + </div>
3289 + <div class="content form-container qcbot_help_secion">
3290 + <h3><?php esc_html_e('Problem: I want to add images, GIFs, Videos', 'wpbot'); ?></h3>
3291 + <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.', 'wpbot'); ?></p>
3292 + </div>
3293 + <div class="content form-container qcbot_help_secion">
3294 + <h3><?php esc_html_e('How to disable Predefined Intent?', 'wpbot'); ?></h3>
3295 + <p><?php esc_html_e('You can disable predefined intents FAQ, eMail, Call me from WPBot Lite > Settings page`s Start Menu Section.', 'wpbot'); ?></p>
3296 + </div>
3297 + </div>
3298 + </div>
3299 + </div>
3300 +</div>
3824 3301
3825 3302
3826 3303
3827 -
3828 -
3829 -
3830 - <div class="panel panel-default">
3831 - <div class="panel-heading" role="tab" id="faqone">
3832 - <h4 class="panel-title">
3833 - <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>
3834 - </h4>
3835 - </div>
3836 - <div id="faqcollapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqone">
3837 - <div class="panel-body">
3838 - <?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'); ?>
3839 - </div>
3840 - </div>
3841 - </div>
3842 -
3843 -
3844 -
3845 -
3846 - <div class="panel panel-default">
3847 - <div class="panel-heading" role="tab" id="faqtwo">
3848 - <h4 class="panel-title">
3849 - <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>
3850 - </h4>
3851 - </div>
3852 - <div id="faqcollapsetwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqtwo">
3853 - <div class="panel-body">
3854 - <?php echo esc_html_e('To Debug: ', 'chatbot'); ?><br>
3855 - <?php echo esc_html_e(' 1. Make sure that you have created the Google Project and the Service account as an Owner', 'chatbot'); ?><br>
3856 - <?php echo esc_html_e('2. Make sure that you have connected to the correct Dialogflow agent', 'chatbot'); ?><br>
3857 - <?php echo esc_html_e('3. Follow the steps in this tutorial correctly: https://www.wpbot.pro/dialogflow-integration', 'chatbot'); ?><br>
3858 - <?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'); ?>
3859 - </div>
3860 - </div>
3861 - </div>
3862 -
3863 -
3864 - <div class="panel panel-default">
3865 - <div class="panel-heading" role="tab" id="faqthree">
3866 - <h4 class="panel-title">
3867 - <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
3868 -', 'chatbot'); ?> </a>
3869 - </h4>
3870 - </div>
3871 - <div id="faqcollapsethree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqthree">
3872 - <div class="panel-body">
3873 - <?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'); ?>
3874 - </div>
3875 - </div>
3876 - </div>
3877 -
3878 - <div class="panel panel-default">
3879 - <div class="panel-heading" role="tab" id="faqfour">
3880 - <h4 class="panel-title">
3881 - <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
3882 -', 'chatbot'); ?> </a>
3883 - </h4>
3884 - </div>
3885 - <div id="faqcollapsefour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqfour">
3886 - <div class="panel-body">
3887 - <?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'); ?>
3888 - </div>
3889 - </div>
3890 - </div>
3891 -
3892 -
3893 - <div class="panel panel-default">
3894 - <div class="panel-heading" role="tab" id="faqfive">
3895 - <h4 class="panel-title">
3896 - <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>
3897 - </h4>
3898 - </div>
3899 - <div id="faqcollapsefive" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqfive">
3900 - <div class="panel-body">
3901 - <?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'); ?>
3902 - </div>
3903 - </div>
3904 - </div>
3905 -
3906 -
3907 -
3908 - <div class="panel panel-default">
3909 - <div class="panel-heading" role="tab" id="faqsix">
3910 - <h4 class="panel-title">
3911 - <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>
3912 - </h4>
3913 - </div>
3914 - <div id="faqcollapsesix" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqsix">
3915 - <div class="panel-body">
3916 - <?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>
3917 - <?php echo esc_html_e('Also go to Simple Text Responses and press the Re-Index button.', 'chatbot'); ?><br>
3918 - <?php echo esc_html_e(' After that try purging any cache and test the chatbot in Incognito mode', 'chatbot'); ?><br>
3919 - <?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'); ?>
3920 - </div>
3921 - </div>
3922 - </div>
3923 -
3924 -
3925 - <div class="panel panel-default">
3926 - <div class="panel-heading" role="tab" id="faqseven">
3927 - <h4 class="panel-title">
3928 - <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>
3929 - </h4>
3930 - </div>
3931 - <div id="faqcollapseseven" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqseven">
3932 - <div class="panel-body">
3933 - <?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>
3934 - <?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>
3935 - <?php echo esc_html_e('Also go to Simple Text Responses and press the Re-Index button.', 'chatbot'); ?><br>
3936 - <?php echo esc_html_e('After that remember to test in a browser Incognito mode to avoid cache and cookies.', 'chatbot'); ?>
3937 - </div>
3938 - </div>
3939 - </div>
3940 -
3941 - <div class="panel panel-default">
3942 - <div class="panel-heading" role="tab" id="faqeight">
3943 - <h4 class="panel-title">
3944 - <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>
3945 - </h4>
3946 - </div>
3947 - <div id="faqcollapseeight" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqeight">
3948 - <div class="panel-body">
3949 - <?php echo esc_html_e('Please check the plugin`s Help Section for details on this', 'chatbot'); ?>
3950 - </div>
3951 - </div>
3952 - </div>
3953 -
3954 - <div class="panel panel-default">
3955 - <div class="panel-heading" role="tab" id="faqnine">
3956 - <h4 class="panel-title">
3957 - <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>
3958 - </h4>
3959 - </div>
3960 - <div id="faqcollapsenine" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqnine">
3961 - <div class="panel-body">
3962 - <?php echo esc_html_e('Please use the <br> tag for line breaks.', 'chatbot'); ?>
3963 - </div>
3964 - </div>
3965 - </div>
3966 -
3967 - <div class="panel panel-default">
3968 - <div class="panel-heading" role="tab" id="faqten">
3969 - <h4 class="panel-title">
3970 - <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>
3971 - </h4>
3972 - </div>
3973 - <div id="faqcollapseten" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqten">
3974 - <div class="panel-body">
3975 - <?php echo esc_html_e('Yes, common HTML tags link link href, strong, br etc. are supported.', 'chatbot'); ?>
3976 - </div>
3977 - </div>
3978 - </div>
3979 -
3980 - <div class="panel panel-default">
3981 - <div class="panel-heading" role="tab" id="faqeleven">
3982 - <h4 class="panel-title">
3983 - <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>
3984 - </h4>
3985 - </div>
3986 - <div id="faqcollapseeleven" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqeleven">
3987 - <div class="panel-body">
3988 - <?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'); ?>
3989 - </div>
3990 - </div>
3991 - </div>
3992 -
3993 -
3994 - <div class="panel panel-default">
3995 - <div class="panel-heading" role="tab" id="faqtwelve">
3996 - <h4 class="panel-title">
3997 - <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>
3998 - </h4>
3999 - </div>
4000 - <div id="faqcollapsetwelve" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqtwelve">
4001 - <div class="panel-body">
4002 - <?php echo esc_html_e('You can disable predefined intents FAQ, eMail, Call me from WPBot Lite > Settings page`s Start Menu Section.', 'chatbot'); ?>
4003 - </div>
4004 - </div>
4005 - </div>
4006 -
4007 -
3304 + <script type="text/javascript">
3305 + jQuery(document).ready(function($){
3306 + var url=document.URL;
3307 + var arr=url.split('#');
3308 + var tab_tar = '.'+arr[1];
3309 + setTimeout(function(){
3310 + jQuery(tab_tar).trigger('click');
3311 + }, 500);
4008 3312
4009 - </div>
4010 - </div>
4011 - </div>
4012 -</div>
4013 -<script type="text/javascript">
4014 - jQuery(document).ready(function($){
4015 - var url=document.URL;
4016 - var arr=url.split('#');
4017 - var tab_tar = '.'+arr[1];
4018 - setTimeout(function(){
4019 - jQuery(tab_tar).trigger('click');
4020 - }, 500);
4021 - jQuery('.wppt_nav_container .nav-tab').on('click', function(e){
4022 - e.preventDefault();
4023 - var section_id = jQuery(this).attr('href');
4024 - jQuery('.wppt_nav_container .nav-tab').removeClass('nav-tab-active');
4025 - jQuery(this).addClass('nav-tab-active');
4026 - jQuery('.wppt-settings-section').hide();
4027 - jQuery('.wppt-settings-section').each(function(){
4028 - jQuery(section_id).show();
3313 + jQuery('.wppt_nav_container .nav-tab').on('click', function(e){
3314 + e.preventDefault();
3315 + var section_id = jQuery(this).attr('href');
3316 + jQuery('.wppt_nav_container .nav-tab').removeClass('nav-tab-active');
3317 + jQuery(this).addClass('nav-tab-active');
3318 + jQuery('.wppt-settings-section').hide();
3319 + jQuery('.wppt-settings-section').each(function(){
3320 + jQuery(section_id).show();
3321 + });
4029 3322 });
4030 - });
4031 - })
4032 -</script>
3323 + })
3324 + </script>
4033 3325 <?php
4034 3326 }
4035 -}
4036 3327
4037 3328 add_action('init', 'qc_wp_latest_update_check');
4038 -if( !function_exists('qc_wp_latest_update_check') ){
4039 3329 function qc_wp_latest_update_check(){
4040 3330 global $wpdb;
4041 3331 if (current_user_can( 'manage_options' )) {
4042 - if (isset($_POST['str_nonce'])) {
4043 - $sanitized_nonce = sanitize_text_field(wp_unslash($_POST['str_nonce']));
4044 - if (wp_verify_nonce($sanitized_nonce, 'str-nonce')) {
3332 + if (isset($_POST['str_nonce']) && wp_verify_nonce($_POST['str_nonce'],'str-nonce') ) {
4045 3333
4046 3334 if(!get_option('qc_wp_ludate_ck')){
4047 3335 update_option('qlcd_wp_chatbot_support_phone', 'Leave your number. We will call you back!');
4048 3336 update_option('qlcd_wp_chatbot_support_email', 'Send us Email');
@@ -4094,10 +3382,10 @@
4094 3382
4095 3383 if(!get_option('qlcd_wp_chatbot_did_you_mean')) {
4096 3384 update_option('qlcd_wp_chatbot_did_you_mean', maybe_serialize(array('Did you mean?')));
4097 3385 }
4098 -
4099 - $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
3386 +
3387 + $sqlqry = $wpdb->get_results($wpdb->prepare("select * from $table1")); //DB Call OK, No Caching OK
4100 3388 if(empty($sqlqry)){
4101 3389
4102 3390 $query = 'What Can WPBot do for you?';
4103 3391 $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!';
@@ -4103,9 +3391,9 @@
4103 3391 $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!';
4104 3392
4105 3393 $data = array('query' => $query, 'keyword' => '', 'response'=> $response, 'intent'=> '');
4106 3394 $format = array('%s','%s', '%s', '%s');
4107 - $wpdb->insert($table1,$data,$format); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, PluginCheck.Security.DirectDB.UnescapedDBParameter
3395 + $wpdb->insert($table1,$data,$format); //DB Call OK, No Caching OK
4108 3396 }
4109 3397
4110 3398 update_option('qc_wpb_simple_response_db_upgrade_free2', 'done');
4111 3399
@@ -4132,14 +3420,15 @@
4132 3420
4133 3421 if(isset($_POST['qc_bot_str_query']) && $_POST['qc_bot_str_query']!='' && !class_exists('Qcld_str_pro')){
4134 3422
4135 3423
4136 - if ( ! isset( $_POST['str_nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['str_nonce'] ) ), 'str-nonce' ) ) {
4137 - die( esc_html__( 'Security check failed', 'chatbot' ) );
3424 + $nonce = sanitize_text_field($_POST['str_nonce']);
3425 + if ( ! wp_verify_nonce( $nonce, 'str-nonce' ) ) {
3426 + die( esc_html__( 'Security check failed', 'textdomain' ) );
4138 3427 }
4139 - $query = sanitize_text_field(wp_unslash($_POST['qc_bot_str_query']));
4140 - $keyword = sanitize_text_field(wp_unslash($_POST['qc_bot_str_keyword']));
4141 - $intent = sanitize_text_field(wp_unslash($_POST['qc_bot_str_intent']));
3428 + $query = wp_unslash(sanitize_text_field($_POST['qc_bot_str_query']));
3429 + $keyword = wp_unslash(sanitize_text_field($_POST['qc_bot_str_keyword']));
3430 + $intent = wp_unslash(sanitize_text_field($_POST['qc_bot_str_intent']));
4142 3431
4143 3432 $category = '';
4144 3433
4145 3434 $response = wp_kses(wp_unslash($_POST['qc_bot_str_response']), 'post');
@@ -4147,23 +3436,23 @@
4147 3436 $table = $wpdb->prefix.'wpbot_response';
4148 3437 $data = array('query' => $query, 'keyword' => $keyword, 'response'=> $response, 'intent'=> $intent, 'category'=> $category);
4149 3438 $format = array('%s','%s', '%s', '%s', '%s');
4150 3439
4151 - if(isset($_POST['qc_bot_str_id']) && wp_unslash($_POST['qc_bot_str_id'])!=''){
4152 - $id = sanitize_text_field(wp_unslash($_POST['qc_bot_str_id']));
3440 + if(isset($_POST['qc_bot_str_id']) && $_POST['qc_bot_str_id']!=''){
3441 + $id = sanitize_text_field($_POST['qc_bot_str_id']);
4153 3442 $where = array('id'=>$id);
4154 3443 $whereformat = array('%d');
4155 - $wpdb->update( $table, $data, $where, $format, $whereformat ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
3444 + $wpdb->update( $table, $data, $where, $format, $whereformat ); //DB Call OK, No Caching OK
4156 3445 }else{
4157 - $wpdb->insert($table,$data,$format); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery
3446 + $wpdb->insert($table,$data,$format); //DB Call OK, No Caching OK
4158 3447 }
4159 3448
4160 - qcld_mysql_remove_existing_indexes();
3449 + qc_mysql_remove_existing_indexes();
4161 3450
4162 3451 // phpcs:ignore
4163 3452 $wpdb->query("ALTER TABLE $table ADD FULLTEXT(`query`, `keyword`, `response`)");
4164 3453
4165 - wp_safe_redirect(admin_url('admin.php?page=simple-text-response'));exit;
3454 + wp_redirect(admin_url('admin.php?page=simple-text-response'));exit;
4166 3455
4167 3456 }
4168 3457 $table = $wpdb->prefix.'wpbot_response';
4169 3458
@@ -4168,9 +3457,9 @@
4168 3457 $table = $wpdb->prefix.'wpbot_response';
4169 3458
4170 3459 if(isset($_POST['qc-re-index'])){
4171 3460
4172 - qcld_mysql_remove_existing_indexes();
3461 + qc_mysql_remove_existing_indexes();
4173 3462
4174 3463 // phpcs:ignore
4175 3464 $wpdb->query("ALTER TABLE $table ADD FULLTEXT(`query`, `keyword`)");
4176 3465
@@ -4176,71 +3465,50 @@
4176 3465
4177 3466 add_action('admin_notices', 'general_admin_notice_str' );
4178 3467
4179 3468 }
4180 - if(isset($_POST['qc_bot_str_weight']) && wp_unslash($_POST['qc_bot_str_weight'])!=''){
4181 - $weight = sanitize_text_field(wp_unslash($_POST['qc_bot_str_weight']));
3469 + if(isset($_POST['qc_bot_str_weight']) && $_POST['qc_bot_str_weight']!=''){
3470 + $weight = sanitize_text_field($_POST['qc_bot_str_weight']);
4182 3471 update_option('qc_bot_str_weight', $weight);
4183 3472 }
4184 - if(isset($_POST['qc_bot_str_remove_stopwords']) && wp_unslash($_POST['qc_bot_str_remove_stopwords'])!=''){
3473 + if(isset($_POST['qc_bot_str_remove_stopwords']) && $_POST['qc_bot_str_remove_stopwords']!=''){
4185 3474
4186 - $stopwords = sanitize_text_field(wp_unslash($_POST['qc_bot_str_remove_stopwords']));
3475 + $stopwords = sanitize_text_field($_POST['qc_bot_str_remove_stopwords']);
4187 3476 update_option('qc_bot_str_remove_stopwords', '1');
4188 3477 }
4189 - if ( isset($_POST['qc_bot_str_allow_author_editor']) && wp_unslash($_POST['qc_bot_str_allow_author_editor']) != '' ) {
4190 - $qc_bot_str_allow_author_editor = sanitize_text_field(wp_unslash($_POST['qc_bot_str_allow_author_editor']));
4191 - update_option( 'qc_bot_str_allow_author_editor', $qc_bot_str_allow_author_editor );
4192 - } else {
4193 - delete_option( 'qc_bot_str_allow_author_editor' );
4194 - }
4195 3478 if(isset($_POST['qc_bot_str_fields']) && !empty($_POST['qc_bot_str_fields'])){
4196 3479 $table = $wpdb->prefix.'wpbot_response';
4197 - $fields = rest_sanitize_array(wp_unslash($_POST['qc_bot_str_fields']));
4198 -
4199 - $allowed_fields = array('query', 'keyword', 'response');
4200 - $valid_fields = array();
4201 - if(is_array($fields)){
4202 - foreach($fields as $field){
4203 - if(in_array($field, $allowed_fields)){
4204 - $valid_fields[] = $field;
4205 - }
4206 - }
4207 - }
4208 - $fields = $valid_fields;
4209 -
3480 + $fields = rest_sanitize_array($_POST['qc_bot_str_fields']);
4210 3481 update_option('qc_bot_str_fields', $fields);
4211 - qcld_mysql_remove_existing_indexes();
3482 + qc_mysql_remove_existing_indexes();
4212 3483
4213 3484 if($fields && !empty($fields)){
4214 - $safe_fields = array_map(function($f) { return '`' . $f . '`'; }, $fields);
3485 +
4215 3486 // phpcs:ignore
4216 - $wpdb->query("ALTER TABLE $table ADD FULLTEXT(".implode(', ', $safe_fields).")");
3487 + $wpdb->query("ALTER TABLE $table ADD FULLTEXT(".implode(', ', $fields).")");
4217 3488
4218 3489 }
4219 3490 }
4220 3491
4221 3492 if(!get_option('wpbot_preloading_time')) {
4222 - update_option('wpbot_preloading_time', '800');
3493 + update_option('wpbot_preloading_time', '0.5');
4223 3494 }
4224 3495 }
4225 3496 }
4226 3497 }
3498 +
3499 +function general_admin_notice_str(){
3500 + if ( isset($_GET['page']) && $_GET['page'] == 'simple-text-response' ) {
3501 + echo '<div class="notice notice-success is-dismissible">
3502 + <p>Re-Indexing has been completed!</p>
3503 + </div>';
3504 + }
4227 3505 }
4228 -if( !function_exists('general_admin_notice_str') ){
4229 - function general_admin_notice_str(){
4230 - if ( isset($_GET['page']) && $_GET['page'] == 'simple-text-response' ) {
4231 - echo '<div class="notice notice-success is-dismissible">
4232 - <p>Re-Indexing has been completed!</p>
4233 - </div>';
4234 - }
4235 - }
4236 -}
4237 -}
4238 -if( !function_exists('qcld_wpbot_simple_response_intent') ){
4239 - function qcld_wpbot_simple_response_intent(){
3506 +if( !function_exists('qc_wpbot_simple_response_intent') ){
3507 + function qc_wpbot_simple_response_intent(){
4240 3508 global $wpdb;
4241 3509 $table = $wpdb->prefix.'wpbot_response';
4242 - $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
3510 + $results = $wpdb->get_results("SELECT `intent` FROM `$table` WHERE 1 and `intent` !=''"); //DB Call OK, No Caching OK
4243 3511 $response = array();
4244 3512 if(!empty($results)){
4245 3513 foreach($results as $result){
4246 3514 $response[] = $result->intent;
@@ -4248,14 +3516,14 @@
4248 3516 }
4249 3517 return $response;
4250 3518 }
4251 3519 }
4252 -if( !function_exists('qcld_mysql_remove_existing_indexes') ){
4253 - function qcld_mysql_remove_existing_indexes(){
3520 +if( !function_exists('qc_mysql_remove_existing_indexes') ){
3521 + function qc_mysql_remove_existing_indexes(){
4254 3522 global $wpdb;
4255 3523 $table = $wpdb->prefix.'wpbot_response';
4256 3524
4257 - $results = $wpdb->get_results("SHOW INDEX FROM {$table}"); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter
3525 + $results = $wpdb->get_results("SHOW INDEX FROM $table"); //DB Call OK, No Caching OK
4258 3526 $indexes = array();
4259 3527 foreach($results as $result){
4260 3528
4261 3529
@@ -4272,15 +3540,17 @@
4272 3540 }
4273 3541 }
4274 3542
4275 3543 add_action( 'activated_plugin', 'qc_wpbotfree_activation_redirect' );
4276 -if( !function_exists('qc_wpbotfree_activation_redirect') ){
4277 - function qc_wpbotfree_activation_redirect( $plugin ){
4278 - $screen = get_current_screen();
4279 - if( ( isset( $screen->base ) && $screen->base == 'plugins' ) && $plugin == plugin_basename( __FILE__ ) ) {
4280 - if( $plugin == plugin_basename( __FILE__ ) ) {
4281 - // phpcs:ignore
4282 - exit( wp_redirect( esc_url( admin_url('admin.php?page=wpbot') ) ) );
4283 - }
3544 +function qc_wpbotfree_activation_redirect( $plugin ){
3545 + $screen = get_current_screen();
3546 + if( ( isset( $screen->base ) && $screen->base == 'plugins' ) && $plugin == plugin_basename( __FILE__ ) ) {
3547 + if( $plugin == plugin_basename( __FILE__ ) ) {
3548 + // phpcs:ignore
3549 + exit( wp_redirect( esc_url( admin_url('admin.php?page=wpbot') ) ) );
4284 3550 }
4285 3551 }
4286 -}
3552 +}
3553 +
3554 +
3555 +
3556 +