PluginProbe
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services / 5.2.6
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services v5.2.6
8.8.0 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 All 536 releases
← All changes | qcld-wpwbot.php +1082 -2272 8.7.05.2.6 View file →
@@ -1,127 +1,59 @@
1 1 <?php
2 2 /**
3 - * Plugin Name: AI ChatBot - WPBot
4 - * Plugin URI: https://www.wpbot.pro/
5 - * Description: ChatBot is a native WordPress ChatBot plugin to provide live chat support and lead generation
6 - * Donate link: https://www.wpbot.pro/
7 - * Version: 8.7.0
3 + * Plugin Name: ChatBot
4 + * Plugin URI: https://wordpress.org/plugins/chatbot/
5 + * Description: ChatBot is a native WordPress ChatBot plugin to provide quick support and email functionality.
6 + * Donate link: https://www.quantumcloud.com
7 + * Version: 5.2.6
8 8 * @author QuantumCloud
9 - * Author: ChatBot for WordPress - WPBot
10 - * Author URI: https://www.wpbot.pro/
9 + * Author: QuantumCloud
10 + * Author URI: https://www.quantumcloud.com/
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.5
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 -
24 -// Abort execution if Pro version is active to prevent conflicts
25 -if ( ! function_exists( 'is_plugin_active' ) ) {
26 - require_once ABSPATH . 'wp-admin/includes/plugin.php';
27 -}
28 -
29 -$active_plugins = (array) get_option( 'active_plugins', array() );
30 -if ( is_multisite() ) {
31 - $active_plugins = array_merge( $active_plugins, array_keys( (array) get_site_option( 'active_sitewide_plugins', array() ) ) );
32 -}
33 -
34 -$current_plugin = plugin_basename( __FILE__ );
35 -
36 -foreach ( $active_plugins as $plugin ) {
37 - if ( $plugin !== $current_plugin && basename( $plugin ) === 'qcld-wpwbot.php' ) {
38 - return;
39 - }
40 -}
41 -
42 -// Also abort if we are currently activating the Pro plugin
43 -if ( isset($_REQUEST['action']) ) {
44 - if ( $_REQUEST['action'] == 'activate' && isset($_REQUEST['plugin']) && ( ( strpos($_REQUEST['plugin'], 'wpbot-pro-master') !== false ) || ( strpos($_REQUEST['plugin'], 'wpbot-pro-professional') !== false ) || ( strpos($_REQUEST['plugin'], 'wpbot-pro-professional') !== false ) || ( strpos($_REQUEST['plugin'], 'wpbot-pro-starter') !== false ) ) ) {
45 - return;
46 - }
47 - if ( $_REQUEST['action'] == 'activate-selected' && isset($_POST['checked']) && ( in_array('wpbot-pro-master/qcld-wpwbot.php', $_POST['checked']) || in_array('wpbot-pro-professional/qcld-wpwbot.php', $_POST['checked']) || in_array('wpbot-pro-starter/qcld-wpwbot.php', $_POST['checked']) ) ) {
48 - return;
49 - }
50 -}
51 -
52 -if ( ! defined( 'QCLD_wpCHATBOT_VERSION' ) ) {
53 - define('QCLD_wpCHATBOT_VERSION', '8.7.0');
54 -}
55 -if ( ! defined( 'QCLD_wpCHATBOT_REQUIRED_wpCOMMERCE_VERSION' ) ) {
56 - define('QCLD_wpCHATBOT_REQUIRED_wpCOMMERCE_VERSION', 2.2);
57 -}
58 -if ( ! defined( 'QCLD_wpCHATBOT_PLUGIN_DIR_PATH' ) ) {
59 - define('QCLD_wpCHATBOT_PLUGIN_DIR_PATH', plugin_dir_path(__FILE__));
60 -}
61 -if ( ! defined( 'QCLD_wpCHATBOT_PLUGIN_URL' ) ) {
62 - define('QCLD_wpCHATBOT_PLUGIN_URL', plugin_dir_url(__FILE__));
63 -}
64 -if ( ! defined( 'QCLD_wpCHATBOT_IMG_URL' ) ) {
65 - define('QCLD_wpCHATBOT_IMG_URL', QCLD_wpCHATBOT_PLUGIN_URL . "images/");
66 -}
67 -if ( ! defined( 'QCLD_wpCHATBOT_IMG_ABSOLUTE_PATH' ) ) {
68 - define('QCLD_wpCHATBOT_IMG_ABSOLUTE_PATH', plugin_dir_path(__FILE__) . "images");
69 -}
70 -if ( ! defined( 'QCLD_wpCHATBOT_INDEX_TABLE' ) ) {
71 - define('QCLD_wpCHATBOT_INDEX_TABLE', 'wpwbot_index');
72 -}
73 -
74 -
75 -
20 +if (!defined('ABSPATH')) exit; // Exit if accessed directly
21 +define('QCLD_wpCHATBOT_VERSION', '5.2.6');
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');
76 28 //define('QCLD_wpCHATBOT_CACHE_TABLE', 'wpwbot_cache');
77 29
78 -if ( ! defined( 'QCLD_wpCHATBOT_GC_DIRNAME' ) ) {
79 - $gcdirpath = __DIR__.'/../../wpbot-dfv2-client';
80 - define('QCLD_wpCHATBOT_GC_DIRNAME', $gcdirpath);
81 -}
82 -if ( ! defined( 'QCLD_wpCHATBOT_GC_ROOT' ) ) {
83 - $wpcontentpath = __DIR__.'/../../';
84 - define('QCLD_wpCHATBOT_GC_ROOT', $wpcontentpath);
85 -}
30 +$gcdirpath = __DIR__.'/../../wpbot-dfv2-client';
31 +define('QCLD_wpCHATBOT_GC_DIRNAME', $gcdirpath);
32 +$wpcontentpath = __DIR__.'/../../';
33 +define('QCLD_wpCHATBOT_GC_ROOT', $wpcontentpath);
86 34
87 35 require_once("qcld-wpwbot-search.php");
88 -require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/class-qcld-bot-rag.php");
89 -require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/integration/openai/qcld-bot-openai.php");
90 -require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/integration/openrouter/qcld-bot-openrouter.php");
91 -require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/integration/gemini/qcld-bot-gemini.php");
92 -require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/integration/grok/qcld-bot-grok.php");
93 -require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."class-qc-free-plugin-upgrade-notice.php");
36 +require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/openai/qcld-bot-openai.php");
37 +require_once("class-qc-free-plugin-upgrade-notice.php");
94 38 require_once("class-plugin-deactivate-feedback.php");
95 39 require_once("qc-support-promo-page/class-qc-support-promo-page.php");
96 40 require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."/functions.php");
97 41 require_once('qcld_df_api.php');
98 42 require_once('includes/class-wpbot-gc-download.php');
99 -require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/class-common-function.php");
100 43 require_once('includes/class-response-list.php');
101 44 require_once('qc-rating-feature/qc-rating-class.php');
102 -// if ( is_admin() ) {
103 -// require_once( QCLD_wpCHATBOT_PLUGIN_DIR_PATH . '/inc/parsedown.php' );
104 -// require_once( QCLD_wpCHATBOT_PLUGIN_DIR_PATH . '/inc/qcld-floating-openai-style-filter.php' );
105 -// require_once( QCLD_wpCHATBOT_PLUGIN_DIR_PATH . '/inc/qcld_openai_floating_content.php' );
106 -// }
107 45
108 -// Built-in Chat Sessions & Analytics module.
109 -// Defers to the Pro addon automatically when it's active.
110 -require_once( QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/chat-sessions/wpbot-chat-sessions.php' );
111 46
112 47 /**
113 48 * Main Class.
114 49 */
115 -
116 -class qcld_wb_Chatbot_free
50 +class qcld_wb_Chatbot
117 51 {
118 52 private $id = 'wpbot';
119 53 private static $instance;
120 54 public $mysql_version = '';
121 55 public $promotion;
122 - public $response_list;
123 -
124 56 /**
125 57 * Get Instance creates a singleton class that's cached to stop duplicate instances
126 58 */
127 59 public static function qcld_wb_chatbot_get_instance()
@@ -136,9 +68,9 @@
136 68 * Construct empty on purpose
137 69 */
138 70 private function __construct()
139 71 {
140 - $this->promotion = QCLD_wpCHATBOT_IMG_URL . "/NY-26-wpbot.jpg";
72 + $this->promotion = QCLD_wpCHATBOT_IMG_URL . "/eid-24.gif";
141 73 }
142 74 /**
143 75 * Init behaves like, and replaces, construct
144 76 */
@@ -154,16 +86,13 @@
154 86 if ((!empty($_GET["page"])) && ($_GET["page"] == "wpbot")) {
155 87 add_action('admin_init', array($this, 'qcld_wb_chatbot_save_options'));
156 88
157 89 }
90 + // if( ( !empty($_GET['page']) &&$_GET["page"] == "wpbot") || ( !empty($_GET['page']) && $_GET['page'] == 'wpbot_openAi') || ( !empty($_GET['page']) && $_GET['page'] == 'simple-text-response') ){
91 + // add_action( 'admin_notices', array( $this, 'promotion_notice' ) );
92 + // }
93 + if (is_admin() && !empty($_GET["page"]) && ($_GET["page"] == "wpbot") || (!empty($_GET['page']) && $_GET['page']=='wpbot_help_page')
158 94
159 - 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'] == 'wpbot_ai_actions') || ( !empty($_GET['page']) && $_GET['page'] == 'simple-text-response') ){
160 - // add_action( 'admin_notices', array( $this, 'promotion_notice' ) );
161 -
162 - }
163 -
164 - if (is_admin() && !empty($_GET["page"]) && ($_GET["page"] == "wpbot") || (!empty($_GET['page']) && $_GET['page']=='wpbot_help_page')
165 - || ( !empty($_GET['page']) && $_GET['page'] == 'wpbot_ai_actions')
166 95 || (!empty($_GET['page']) && $_GET['page']=='wpbot_openAi')
167 96
168 97 || (!empty($_GET['page']) && $_GET['page']=='wpbot-panel') || ( !empty($_GET['page']) && $_GET["page"] == "wbcs-botsessions-page") ) {
169 98 add_action('admin_enqueue_scripts', array($this, 'qcld_wb_chatbot_admin_scripts'));
@@ -230,9 +159,9 @@
230 159
231 160 public function mysql_version_notice(){
232 161 $class="notice notice-error is-dismissible qc-notice-error";
233 162 $message = "Your server's MySQL version is **".$this->mysql_version."**. MySQL version 5.6+ is required for Simple Text Responses to work. Please contact your hosting support to upgrade the MySQL to the latest version.";
234 - printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );
163 + printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), $message );
235 164 }
236 165
237 166 /**
238 167 * Add a submenu item to the wpCommerce menu
@@ -239,34 +168,27 @@
239 168 */
240 169 public function qcld_wb_chatbot_admin_menu()
241 170 {
242 171 /* add_submenu_page('wpcommerce',
243 - __('wpwBot Pro', 'chatbot'),
244 - __('wpwBot Pro', 'chatbot'),
172 + __('wpwBot Pro', 'wpchatbot'),
173 + __('wpwBot Pro', 'wpchatbot'),
245 174 'manage_wpcommerce',
246 175 $this->id,
247 176 array($this, 'qcld_wb_chatbot_admin_page'));*/
248 - if( get_option( 'qc_bot_str_allow_author_editor' ) == 1 ){
249 - $capability = 'publish_posts';
250 - }else{
251 - $capability = 'manage_options';
252 - }
253 - add_menu_page( esc_html('WPBot - ChatBot'), esc_html('WPBot - ChatBot'), 'manage_options','wpbot-panel', array($this, 'qcld_wb_chatbot_admin_page'),'dashicons-format-status', 6 );
177 +
178 + add_menu_page( esc_html('WPBot Lite'), esc_html('WPBot Lite'), 'manage_options','wpbot-panel', array($this, 'qcld_wb_chatbot_admin_page'),'dashicons-format-status', 6 );
254 179
255 - add_submenu_page( 'wpbot-panel', esc_html('General Settings'), esc_html('General Settings'), 'manage_options','wpbot', array($this, 'qcld_wb_chatbot_admin_page_settings') );
256 - add_submenu_page( 'wpbot-panel', esc_html('AI Settings'), esc_html('AI Settings'), 'manage_options','wpbot_openAi', 'wpbot_openAi_setting_func' );
257 - add_submenu_page( 'wpbot-panel', esc_html('AI Actions'), esc_html('AI Actions'), 'manage_options','wpbot_ai_actions', 'wpbot_Ai_actions_func' );
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') );
259 - add_action( "load-$hook", [ $this, 'screen_option' ] );
180 + add_submenu_page( 'wpbot-panel', esc_html('Settings'), esc_html('Settings'), 'manage_options','wpbot', array($this, 'qcld_wb_chatbot_admin_page_settings') );
181 +
182 + add_submenu_page( 'wpbot-panel', esc_html('OpenAI Settings'), esc_html('OpenAI Settings'), 'manage_options','wpbot_openAi', 'wpbot_openAi_setting_func' );
260 183
261 - add_submenu_page( 'wpbot-panel', esc_html('User Data'), esc_html('User Data'), 'manage_options','email-subscription', array($this, 'qcld_wb_chatbot_admin_page1') );
184 + $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') );
262 185
186 + add_action( "load-$hook", [ $this, 'screen_option' ] );
263 187
264 -
265 -
266 - // add_submenu_page( 'wpbot-panel', esc_html('Conversational Form '), esc_html('Conversational Form'), 'manage_options','wpbots', [$this, 'qcld_wb_chatbot_admin_conversational_settings'] );
188 +
267 189
268 - 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' );
190 + add_submenu_page( 'wpbot-panel', esc_html('Support'), esc_html('Support'), 'manage_options','wpbot_support_page', 'qcpromo_support_page_callback_func' );
269 191
270 192 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' );
271 193
272 194
@@ -272,9 +194,9 @@
272 194
273 195 }
274 196
275 197 function screen_option(){
276 - if( isset($_POST['wp_screen_options']) && !empty($_POST['wp_screen_options'])){
198 + if( !empty($_POST['wp_screen_options'])){
277 199 $per_page_str = (int)$_POST['wp_screen_options']["value"];
278 200
279 201 }else{
280 202 $per_page_str = 20;
@@ -284,9 +206,10 @@
284 206 'label' => 'Response',
285 207 'default' => $per_page_str,
286 208 'option' => 'responses_per_page'
287 209 ];
288 -
210 + add_screen_option( $option, $args );
211 +
289 212 $this->response_list = new Response_list();
290 213 }
291 214
292 215 public function qcld_wb_chatbot_admin_str(){
@@ -304,9 +227,9 @@
304 227 {
305 228 global $wpcommerce, $wp_scripts;
306 229 $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
307 230
308 - if (((!empty($_GET["page"])) && ($_GET["page"] == "wpbot")) || ($hook == "widgets.php") || $_GET['page']=='wpbot_help_page' || $_GET['page']=='wpbot_openAi' || $_GET['page']=='simple-text-response'
231 + if (((!empty($_GET["page"])) && ($_GET["page"] == "wpbot")) || ($hook == "widgets.php") || $_GET['page']=='wpbot_help_page' || $_GET['page']=='wpbot_openAi'
309 232 || $_GET['page']=='wpbot-panel' || $_GET["page"] == "wbcs-botsessions-page" ) {
310 233
311 234 wp_enqueue_script('jquery');
312 235 //wp_enqueue_style('wpcommerce_admin_styles', $wpcommerce->plugin_url() . '/assets/css/admin.css');
@@ -312,8 +235,11 @@
312 235 //wp_enqueue_style('wpcommerce_admin_styles', $wpcommerce->plugin_url() . '/assets/css/admin.css');
313 236
314 237 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');
315 238 wp_enqueue_style('qlcd-wp-chatbot-admin-style');
239 +
240 + 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');
241 + wp_enqueue_style('qlcd-wp-chatbot-font-awesome');
316 242 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');
317 243 wp_enqueue_style('qlcd-wp-chatbot-tabs-style');
318 244 wp_register_style('jquery.fontpicker.min.css', QCLD_wpCHATBOT_PLUGIN_URL . 'css/fontpicker.min.css', '', QCLD_wpCHATBOT_VERSION, 'screen');
319 245 wp_enqueue_style('jquery.fontpicker.min.css');
@@ -332,9 +258,9 @@
332 258 wp_enqueue_script( 'wp-color-picker');
333 259 wp_enqueue_script( 'jquery-ui-sortable');
334 260 wp_register_script('qcld-wp-fontpicker', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/fontpicker.js', basename(__FILE__)), array(), true);
335 261 wp_enqueue_script('qcld-wp-fontpicker');
336 - wp_register_script('qcld-wp-chatbot-cbpFWTabs', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/cbpFWTabs.js', basename(__FILE__)), array(), QCLD_wpCHATBOT_VERSION, true);
262 + wp_register_script('qcld-wp-chatbot-cbpFWTabs', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/cbpFWTabs.js', basename(__FILE__)), array(), true);
337 263 wp_enqueue_script('qcld-wp-chatbot-cbpFWTabs');
338 264 wp_register_script('qcld-wp-chatbot-modernizr-custom', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/modernizr.custom.js', basename(__FILE__)), array(), true);
339 265 wp_enqueue_script('qcld-wp-chatbot-modernizr-custom');
340 266 wp_register_script('qcld-wp-chatbot-bootstrap-js', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/bootstrap.js', basename(__FILE__)), array('jquery'), true);
@@ -353,29 +279,28 @@
353 279 wp_register_script('qcld-wp-chatbot-timepicker-js', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/jquery.timepicker.js', basename(__FILE__)), array('jquery'), true);
354 280 wp_enqueue_script('qcld-wp-chatbot-timepicker-js');
355 281 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');
356 282 wp_enqueue_style('qcld-wp-chatbot-timepicker-css');
357 - wp_register_script('qcld-wp-chatbot-sweetalrt', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/sweetalrt.js', basename(__FILE__)), array(), true);
358 - wp_enqueue_script('qcld-wp-chatbot-sweetalrt');
359 - 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'), QCLD_wpCHATBOT_VERSION, true);
283 +
284 + 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);
285 +
360 286 wp_enqueue_script('qcld-wp-chatbot-admin-js');
361 - wp_localize_script('qcld-wp-chatbot-admin-js', 'qcld_gemini_admin_data',
287 + wp_localize_script('qcld-wp-chatbot-admin-js', 'ajax_object',
362 288 array('ajax_url' => admin_url('admin-ajax.php'),'ajax_nonce' => wp_create_nonce('wp_chatbot'),'image_path' => QCLD_wpCHATBOT_IMG_URL));
363 289 // WordPress Media library
364 290 wp_enqueue_media();
365 291
292 +
366 293
367 -
368 294 }
369 -
370 295 }
371 296
372 297
373 - public function qcld_get_formbuilder_forms(){
298 + public function qc_get_formbuilder_forms(){
374 299 global $wpdb;
375 300 $forms = array();
376 301 if(class_exists('Qcformbuilder_Forms_Admin')){
377 - $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
302 + $results = $wpdb->get_results("SELECT * FROM ". $wpdb->prefix."wfb_forms where 1 and type='primary'");
378 303 if(!empty($results)){
379 304 foreach($results as $result){
380 305 $form = maybe_unserialize($result->config);
381 306 $forms[] = trim($form['name']);
@@ -387,15 +312,12 @@
387 312 }else{
388 313 return array();
389 314 }
390 315 }
391 - public function qcld_wb_chatbot_admin_page1() {
392 - require_once QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/admin/templates/email_subscription.php';
393 - }
394 - public function qcld_wpbot_simple_response_intent(){
316 + function qc_wpbot_simple_response_intent(){
395 317 global $wpdb;
396 318 $table = $wpdb->prefix.'wpbot_response';
397 - $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
319 + $results = $wpdb->get_results("SELECT `intent` FROM `$table` WHERE 1 and `intent` !=''");
398 320 $response = array();
399 321 if(!empty($results)){
400 322 foreach($results as $result){
401 323 $response[] = $result->intent;
@@ -402,15 +324,13 @@
402 324 }
403 325 }
404 326 return $response;
405 327 }
406 - public function qcld_get_formbuilder_form_commands(){
328 + function qc_get_formbuilder_form_commands(){
407 329 global $wpdb;
408 330 $command = array();
409 331 if(class_exists('Qcformbuilder_Forms_Admin')){
410 - $primary = 'primary';
411 - $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
412 -
332 + $results = $wpdb->get_results("SELECT * FROM ". $wpdb->prefix."wfb_forms where 1 and type='primary'");
413 333 if(!empty($results)){
414 334 foreach($results as $result){
415 335 $form = maybe_unserialize($result->config);
416 336
@@ -428,28 +348,27 @@
428 348 }
429 349 }
430 350 public function promotion_notice(){
431 351 $screen = get_current_screen();
432 - // if( isset($screen->base) && (( $screen->base == 'wpbot-lite_page_wpbot') || ( $screen->base == 'toplevel_page_wpbot-panel"'))){
352 + // if( isset($screen->base) && (( $screen->base == 'wpbot-lite_page_wpbot') || ( $screen->base == 'toplevel_page_wpbot-panel"'))){
433 353 ?>
434 - <div id="promotion-wpchatbot" data-dismiss-type="qcbot-feedback-notice" class="notice is-dismissible qcbot-feedback" style="background: #120976 !important">
354 + <div id="promotion-wpchatbot" data-dismiss-type="qcbot-feedback-notice" class="notice is-dismissible qcbot-feedback" style="background: #000">
435 355 <div class="">
436 356
437 357 <div class="qc-review-text" >
438 - <a href="<?php echo esc_url('https://www.wpbot.pro/pricing/'); ?>" target="_blank">
439 - <img src="<?php echo esc_url($this->promotion); ?>" alt="promotion" style="position: flex !important;"></a>
358 + <a href="https://www.wpbot.pro/pricing/" target="_blank">
359 + <img src="<?php echo esc_url($this->promotion); ?>" alt=""></a>
440 360 </div>
441 - </div>
361 + </div>
442 362 </div>
443 363 <?php
444 - // }
364 + // }
445 365 }
446 - public function qcld_get_formbuilder_form_ids(){
366 + public function qc_get_formbuilder_form_ids(){
447 367 global $wpdb;
448 368 $forms = array();
449 369 if(class_exists('Qcformbuilder_Forms_Admin')){
450 - $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
451 -
370 + $results = $wpdb->get_results("SELECT * FROM ". $wpdb->prefix."wfb_forms where 1 and type='primary'");
452 371 if(!empty($results)){
453 372 foreach($results as $result){
454 373 $form = maybe_unserialize($result->config);
455 374 $forms[] = trim($form['ID']);
@@ -482,13 +401,13 @@
482 401 $conversation_form_ids = array();
483 402 $conversation_form_names = array();
484 403
485 404 if(class_exists('Qcformbuilder_Forms_Admin')){
486 - $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
405 + $results = $wpdb->get_results("SELECT * FROM ". $wpdb->prefix."wfb_forms where 1 and type='primary'");
487 406 if(!empty($results)){
488 407
489 408 foreach($results as $result){
490 - $form = maybe_unserialize($result->config);
409 + $form = unserialize($result->config);
491 410 $conversation_form_ids[] = $form['ID'];
492 411 $conversation_form_names[] = $form['name'];
493 412 }
494 413
@@ -510,31 +429,29 @@
510 429 'yes' => str_replace('\\', '',get_option('qlcd_wp_chatbot_yes')),
511 430 'no' => str_replace('\\', '',get_option('qlcd_wp_chatbot_no')),
512 431 'or' => str_replace('\\', '',get_option('qlcd_wp_chatbot_or')),
513 432 'host' => str_replace('\\', '',get_option('qlcd_wp_chatbot_host')),
514 - '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'))),
433 + 'agent' => str_replace('\\', '',get_option('qlcd_wp_chatbot_agent')),
515 434 'agent_image' => get_option('wp_chatbot_agent_image'),
516 - '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'),
517 - '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')),
518 - 'agent_join' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_agent_join'))),
519 - 'welcome' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_welcome'))),
520 - 'welcome_back' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_welcome_back'))),
521 - 'hi_there' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_hi_there'))),
522 - 'hello' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_hello'))),
523 - 'asking_name' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_asking_name'))),
524 - 'i_am' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_i_am'))),
525 - 'name_greeting' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_name_greeting'))),
526 - 'wildcard_msg' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_wildcard_msg'))),
527 - 'empty_filter_msg' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_empty_filter_msg'))),
528 - 'did_you_mean' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_did_you_mean'))),
529 - 'is_typing' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_is_typing'))),
530 - 'send_a_msg' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_send_a_msg'))),
531 -
532 - 'viewed_products' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_viewed_products'))),
533 -
534 - 'shopping_cart' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_shopping_cart'))),
535 - 'cart_updating' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_cart_updating'))),
536 - 'cart_removing' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_cart_removing'))),
435 + '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',
436 + 'shopper_demo_name' => str_replace('\\', '',get_option('qlcd_wp_chatbot_shopper_demo_name')),
437 + 'agent_join' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_agent_join'))),
438 + 'welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_welcome'))),
439 + 'welcome_back' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_welcome_back'))),
440 + 'hi_there' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_hi_there'))),
441 + 'hello' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_hello'))),
442 + 'asking_name' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_name'))),
443 + 'i_am' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_i_am'))),
444 + 'name_greeting' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_name_greeting'))),
445 + 'wildcard_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_msg'))),
446 + 'empty_filter_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_empty_filter_msg'))),
447 + 'did_you_mean' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_did_you_mean'))),
448 + 'is_typing' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_is_typing'))),
449 + 'send_a_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_send_a_msg'))),
450 + 'viewed_products' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_viewed_products'))),
451 + 'shopping_cart' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_shopping_cart'))),
452 + 'cart_updating' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_cart_updating'))),
453 + 'cart_removing' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_cart_removing'))),
537 454 'imgurl' => QCLD_wpCHATBOT_IMG_URL,
538 455 'sys_key_help' => get_option('qlcd_wp_chatbot_sys_key_help'),
539 456 'sys_key_product' => get_option('qlcd_wp_chatbot_sys_key_product'),
540 457 'sys_key_catalog' => get_option('qlcd_wp_chatbot_sys_key_catalog'),
@@ -541,54 +458,54 @@
541 458 'sys_key_order' => get_option('qlcd_wp_chatbot_sys_key_order'),
542 459 'sys_key_support' => get_option('qlcd_wp_chatbot_sys_key_support'),
543 460 'sys_key_reset' => get_option('qlcd_wp_chatbot_sys_key_reset'),
544 461 'sys_key_email' => get_option('qlcd_wp_chatbot_sys_key_email'),
545 - 'help_welcome' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_help_welcome'))),
546 - 'back_to_start' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_back_to_start'))),
547 - 'help_msg' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_help_msg'))),
548 - 'reset' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_reset'))),
549 - 'wildcard_product' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_wildcard_product'))),
550 - 'wildcard_catalog' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_wildcard_catalog'))),
551 - 'featured_products' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_featured_products'))),
552 - 'sale_products' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_sale_products'))),
553 - 'wildcard_order' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_wildcard_order'))),
462 + 'help_welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_help_welcome'))),
463 + 'back_to_start' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_back_to_start'))),
464 + 'help_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_help_msg'))),
465 + 'reset' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_reset'))),
466 + 'wildcard_product' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_product'))),
467 + 'wildcard_catalog' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_catalog'))),
468 + 'featured_products' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_featured_products'))),
469 + 'sale_products' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_sale_products'))),
470 + 'wildcard_order' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_order'))),
554 471 'wildcard_support' => get_option('qlcd_wp_chatbot_wildcard_support'),
555 - 'product_asking' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_product_asking'))),
556 - 'product_suggest' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_product_suggest'))),
557 - 'product_infinite' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_product_infinite'))),
558 - 'product_success' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_product_success'))),
559 - 'product_fail' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_product_fail'))),
560 - 'support_welcome' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_support_welcome'))),
472 + 'product_asking' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_asking'))),
473 + 'product_suggest' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_suggest'))),
474 + 'product_infinite' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_infinite'))),
475 + 'product_success' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_success'))),
476 + 'product_fail' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_fail'))),
477 + 'support_welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_support_welcome'))),
561 478 'support_email' => get_option('qlcd_wp_chatbot_support_email'),
562 - 'support_option_again' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_support_option_again'))),
563 - 'asking_email' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_asking_email'))),
564 - 'asking_msg' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_asking_msg'))),
565 - 'no_result' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_no_result'))),
479 + 'support_option_again' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_support_option_again'))),
480 + 'asking_email' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_email'))),
481 + 'asking_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_msg'))),
482 + 'no_result' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_no_result'))),
566 483 'support_phone' => get_option('qlcd_wp_chatbot_support_phone'),
567 - 'asking_phone' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_asking_phone'))),
568 - 'thank_for_phone' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_thank_for_phone'))),
569 - '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')))),
570 - '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'))),
484 + 'asking_phone' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_phone'))),
485 + 'thank_for_phone' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_thank_for_phone'))),
486 + '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')))),
487 + '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'))),
571 488 'notification_interval' => get_option('qlcd_wp_chatbot_notification_interval'),
572 - 'notifications' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_notifications'))),
573 - 'order_welcome' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_order_welcome'))),
574 - 'order_username_asking' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_order_username_asking'))),
575 - 'order_username_password' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_order_username_password'))),
489 + 'notifications' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_notifications'))),
490 + 'order_welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_welcome'))),
491 + 'order_username_asking' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_username_asking'))),
492 + 'order_username_password' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_username_password'))),
576 493 'order_user' => get_option('qlcd_wp_chatbot_order_user'),
577 494 'order_login' => is_user_logged_in(),
578 495 'is_chat_session_active' => qcld_wpbot_is_active_chat_history(),
579 496 'order_nonce' => wp_create_nonce("wpwbot-order-nonce"),
580 - 'order_email_support' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_order_email_support'))),
497 + 'order_email_support' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_email_support'))),
581 498 'email_fail' => str_replace('\\', '', get_option('qlcd_wp_chatbot_email_fail')),
582 - 'invalid_email' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_invalid_email'))),
499 + 'invalid_email' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_invalid_email'))),
583 500 'stop_words' => str_replace('\\', '', get_option('qlcd_wp_chatbot_stop_words')),
584 501 'currency_symbol' => '',
585 502 'enable_messenger' => get_option('enable_wp_chatbot_messenger'),
586 - 'messenger_label' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_messenger_label'))),
503 + 'messenger_label' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_messenger_label'))),
587 504 'fb_page_id' => get_option('qlcd_wp_chatbot_fb_page_id'),
588 505 'enable_skype' => get_option('enable_wp_chatbot_skype'),
589 506 'enable_whats' => get_option('enable_wp_chatbot_whats'),
590 - 'whats_label' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_whats_label'))),
507 + 'whats_label' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_whats_label'))),
591 508 'whats_num' => get_option('qlcd_wp_chatbot_whats_num'),
592 509 'ret_greet' => get_option('qlcd_wp_chatbot_ret_greet'),
593 510 'enable_exit_intent' => get_option('enable_wp_chatbot_exit_intent'),
594 511 'exit_intent_msg' => str_replace('\\', '', get_option('wp_chatbot_exit_intent_msg')),
@@ -603,9 +520,9 @@
603 520 'auto_open_once' => get_option('wp_chatbot_auto_open_once'),
604 521 'proactive_bg_color' => get_option('wp_chatbot_proactive_bg_color'),
605 522 'disable_feedback' => get_option('disable_wp_chatbot_feedback'),
606 523 'disable_faq' => get_option('disable_wp_chatbot_faq'),
607 - 'feedback_label' => $this->qcld_wb_chatbot_str_replace(maybe_unserialize(get_option('qlcd_wp_chatbot_feedback_label'))),
524 + 'feedback_label' =>$this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_feedback_label'))),
608 525 'enable_meta_title' =>get_option('enable_wp_chatbot_meta_title'),
609 526 'meta_label' =>str_replace('\\', '', get_option('qlcd_wp_chatbot_meta_label')),
610 527 'phone_number' => get_option('qlcd_wp_chatbot_phone'),
611 528 'disable_site_search' => get_option('disable_wp_chatbot_site_search'),
@@ -610,11 +527,9 @@
610 527 'phone_number' => get_option('qlcd_wp_chatbot_phone'),
611 528 'disable_site_search' => get_option('disable_wp_chatbot_site_search'),
612 529 'search_keyword' => get_option('qlcd_wp_chatbot_asking_search_keyword'),
613 530 'ajax_nonce'=> wp_create_nonce('qcsecretbotnonceval123qc'),
614 - 'session_nonce'=> wp_create_nonce('wp_chatbot'),
615 531 'site_search' => get_option('qlcd_wp_site_search'),
616 - 'open_links_newtab' => get_option('open_links_new_window'),
617 532 'call_gen' => get_option('disable_wp_chatbot_call_gen'),
618 533 'call_sup' => get_option('disable_wp_chatbot_call_sup'),
619 534 'enable_ret_sound' => get_option('enable_wp_chatbot_ret_sound'),
620 535 'found_result_message' => get_option('qlcd_wp_chatbot_found_result'),
@@ -621,11 +536,9 @@
621 536 'enable_ret_user_show' => get_option('enable_wp_chatbot_ret_user_show'),
622 537 'enable_inactive_time_show' => get_option('enable_wp_chatbot_inactive_time_show'),
623 538 'ret_inactive_user_once' => get_option('wp_chatbot_inactive_once'),
624 539 'mobile_full_screen' => '1',
625 - 'chatbot_content' => get_option( 'chatbot_content_max_height' ),
626 - 'chatbot_content_responsive' => get_option( 'chatbot_content_max_height_responsive' ),
627 - 'botpreloadingtime' => (get_option('wpbot_preloading_time')?get_option('wpbot_preloading_time'):800),
540 + 'botpreloadingtime' => (get_option('wpbot_preloading_time')?get_option('wpbot_preloading_time'):100),
628 541 'inactive_time' => get_option('wp_chatbot_inactive_time'),
629 542 'checkout_msg' => str_replace('\\', '', get_option('wp_chatbot_checkout_msg')),
630 543 'ai_df_enable' => get_option('enable_wp_chatbot_dailogflow'),
631 544 'ai_df_token' => get_option('qlcd_wp_chatbot_dialogflow_client_token'),
@@ -631,84 +544,49 @@
631 544 'ai_df_token' => get_option('qlcd_wp_chatbot_dialogflow_client_token'),
632 545 'df_defualt_reply' => str_replace('\\', '', get_option('qlcd_wp_chatbot_dialogflow_defualt_reply')),
633 546 'df_agent_lan' => get_option('qlcd_wp_chatbot_dialogflow_agent_language'),
634 547 'openai_enabled' => get_option('ai_enabled'),
635 - 'is_stream_enabled' => ( get_option('is_stream_enabled', '1') == '1' ? '1' : '0' ),
636 - 'qcld_openai_append_content' => get_option('qcld_openai_append_content'),
637 - 'openrouter_enabled' => (get_option('qcld_openrouter_enabled')=='1'? get_option('qcld_openrouter_enabled') : '0'),
638 - 'gemini_enabled' => (get_option('qcld_gemini_enabled')=='1'? get_option('qcld_gemini_enabled') : '0'),
639 - 'grok_enabled' => (get_option('qcld_grok_enabled')=='1'? get_option('qcld_grok_enabled') : '0'),
640 - 'qcld_gemini_prepend_content' => get_option('qcld_gemini_prepend_content'),
641 - 'qcld_gemini_append_content' => get_option('qcld_gemini_append_content'),
642 - 'qcld_openrouter_append_content' => get_option('qcld_openrouter_append_content'),
643 - 'qcld_openrouter_prepend_content' => get_option('qcld_openrouter_prepend_content'),
644 548 'start_menu' => wp_unslash(get_option('qc_wpbot_menu_order')),
645 549 'conversation_form_ids' => $conversation_form_ids,
646 550 'conversation_form_names' => $conversation_form_names,
647 - 'simple_response_intent' => $this->qcld_wpbot_simple_response_intent(),
648 - 'forms' => $this->qcld_get_formbuilder_forms(),
649 - 'form_ids' =>$this->qcld_get_formbuilder_form_ids(),
650 - 'form_commands' => $this->qcld_get_formbuilder_form_commands(),
551 + 'simple_response_intent' => $this->qc_wpbot_simple_response_intent(),
552 + 'forms' => $this->qc_get_formbuilder_forms(),
553 + 'form_ids' =>$this->qc_get_formbuilder_form_ids(),
554 + 'form_commands' => $this->qc_get_formbuilder_form_commands(),
651 555 'df_api_version' => (get_option('wp_chatbot_df_api')==''?'v1':get_option('wp_chatbot_df_api')),
652 556 'v2_client_url'=> esc_url(get_site_url().'/?action=qcld_dfv2_api'),
653 557 'show_menu_after_greetings'=> (get_option('show_menu_after_greetings')!=''?get_option('show_menu_after_greetings'):0),
654 - 'disable_back_to_start'=> (get_option('disable_back_to_start_menu')!=''?get_option('disable_back_to_start_menu'):0),
655 558 'current_user_id' => $user_id,
656 - 'display_name' => esc_html( $display_name ),
657 - 'skip_wp_greetings' => get_option('skip_wp_greetings'),
658 - 'skip_greetings_and_menu' => get_option('skip_wp_greetings_donot_show_menu'),
659 - 'skip_wp_greetings_trigger_intent' => get_option('skip_wp_greetings_trigger_intent'),
660 - 'intent_for_non_logged_in_user' => get_option('qlcd_wp_chatbot_intent_for_non_logged_in_user'),
661 - 'intent_for_logged_in_user' => get_option('qlcd_wp_chatbot_intent_for_logged_in_user'),
662 - 'ask_email_wp_greetings' => get_option('enable_asking_for_email'),
663 - 'skip_chat_reactions_menu' => get_option('skip_chat_reactions_menu'),
664 - 'qlcd_wp_chatbot_like_text' => get_option('qlcd_wp_chatbot_like_text'),
665 - 'qlcd_wp_chatbot_dislike_text' => get_option('qlcd_wp_chatbot_dislike_text'),
666 - 'enable_chat_report_menu' => get_option('enable_chat_report_menu'),
667 - 'qlcd_wp_chatbot_report_text' => get_option('qlcd_wp_chatbot_report_text'),
668 - 'enable_chat_share_menu' => get_option('enable_chat_share_menu'),
669 - 'qlcd_wp_chatbot_share_text' => get_option('qlcd_wp_chatbot_share_text'),
670 - 'icon_video' => get_option('wp_chatbot_icon_video', ''),
671 - 'icon_video_delay' => absint(get_option('wp_chatbot_icon_video_delay', 0)),
672 559
673 560 );
674 - $user_font = get_option('wp_chatbot_user_font') != '' ? get_option('wp_chatbot_user_font') : '';
561 + $user_font = get_option('wp_chat_user_font_family') != '' ? get_option('wp_chat_user_font_family') : '';
675 562 if($user_font != '' ){
676 - $parts = explode(':', $user_font);
677 - // Create an object
678 - $user_font_family = new stdClass();
679 - // Assign values
680 - $user_font_family->fontfamily = $parts[0];
681 - $user_font_family->fontWeight = isset($parts[1]) ? $parts[1] : '400'; // default weight
682 - $user_font_family->fontStyle = 'normal';
563 + $user_font_family = str_replace('\\', '',$user_font);
564 + $user_font_family = json_decode($user_font_family);
565 + $user_font_name = $user_font_family->fontFamily;
566 + $user_font_name = str_replace(' ', '+', $user_font_name);
567 + $user_font_name = str_replace("'","",$user_font_name );
683 568 if(get_option('enable_wp_chatbot_custom_color')==1){
684 - $user_enqueue_font = 'https://fonts.googleapis.com/css2?family='. $user_font_family->fontfamily;
569 + $user_enqueue_font = 'https://fonts.googleapis.com/css2?family='.$user_font_name;
685 570 wp_enqueue_style( 'qcld-chatbot-user-google-fonts', $user_enqueue_font, false );
686 571 wp_enqueue_style( 'qcld-chatbot-user-google-fonts');
687 572 }
688 573 }
689 574
690 - $bot_font = get_option('wp_chatbot_bot_font') != '' ? get_option('wp_chatbot_bot_font') : '';
575 + $bot_font = get_option('wp_chat_bot_font_family') != '' ? get_option('wp_chat_bot_font_family') : '';
691 576 if($bot_font != '' ){
692 - $parts = explode(':', $bot_font);
693 - // Create an object
694 - $bot_font_family = new stdClass();
695 - // Assign values
696 - $bot_font_family->fontFamily = $parts[0];
697 - $bot_font_family->fontWeight = isset($parts[1]) ? $parts[1] : '400'; // default weight
698 - $bot_font_family->fontStyle = 'normal';
699 -
700 -
701 -
577 + $bot_font_family = str_replace('\\', '',$bot_font);
578 + $bot_font_family = json_decode($bot_font_family);
579 + $bot_font_name =$bot_font_family->fontFamily;
580 + $bot_font_name = str_replace(' ', '+', $bot_font_name );
581 + $bot_font_name = str_replace("'","",$bot_font_name );
702 582 if(get_option('enable_wp_chatbot_custom_color')==1){
703 - $bot_enqueue_font = 'https://fonts.googleapis.com/css2?family='.$bot_font_family->fontFamily;
583 + $bot_enqueue_font = 'https://fonts.googleapis.com/css2?family='.$bot_font_name;
704 584 wp_enqueue_style( 'qcld-chatbot-bot-google-fonts', $bot_enqueue_font, false );
705 585 wp_enqueue_style( 'qcld-chatbot-bot-google-fonts');
706 586 }
707 587 }
708 588
709 -
710 -
711 589 wp_enqueue_style( 'dashicons' );
712 590 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);
713 591 wp_enqueue_script('qcld-wp-chatbot-slimscroll-js');
714 592 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);
@@ -717,16 +595,8 @@
717 595 wp_enqueue_script('qcld-wp-chatbot-magnify-popup');
718 596 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);
719 597 wp_enqueue_script('qcld-wp-chatbot-plugin');
720 598
721 - $nonce = wp_create_nonce('wp_chatbot');
722 - // Pass data to JS
723 - wp_localize_script('qcld-wp-chatbot-plugin', 'qcld_chatbot_obj', [
724 - 'ajax_url' => admin_url('admin-ajax.php'),
725 - 'nonce' => $nonce,
726 - 'stream_endpoint' => admin_url('admin-ajax.php?action=qcld_stream_openai'),
727 - ]);
728 -
729 599 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);
730 600 wp_enqueue_script('qcld-wp-chatbot-front-js');
731 601 wp_localize_script('qcld-wp-chatbot-front-js', 'wp_chatbot_obj', $wp_chatbot_obj);
732 602 //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);
@@ -732,37 +602,25 @@
732 602 //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);
733 603 //wp_enqueue_script('qcld-wp-chatbot-frontend');
734 604 //wp_localize_script('qcld-wp-chatbot-frontend', 'wp_chatbot_obj', $wp_chatbot_obj);
735 605 wp_localize_script('qcld-wp-chatbot-frontend', 'wp_chatbot_obj', $wp_chatbot_obj);
736 -
737 - 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' ) ) {
738 - // Return early if critical WordPress functions are not available.
739 - // This indicates the code needs to be hooked into an appropriate action.
740 - return;
741 - }
742 -
743 606 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');
744 607 wp_enqueue_style('qcld-wp-chatbot-common-style');
745 608
746 - $floating_icon_bg_color = get_option('wp_chatbot_floatingiconbg_color');
747 - $floating_icon_bg_color = sanitize_hex_color($floating_icon_bg_color); // ensures it's a valid hex color like #ffffff
609 + if(get_option('wp_chatbot_floatingiconbg_color')!="") {
610 + $custom_colors = ".wp-chatbot-ball{
611 + background: ". get_option('wp_chatbot_floatingiconbg_color')." !important;
612 + }
613 + .wp-chatbot-ball:hover, .wp-chatbot-ball:focus{
614 + background: ".get_option('wp_chatbot_floatingiconbg_color')." !important;
615 + }";
748 616
749 - if ( ! empty($floating_icon_bg_color) ) {
750 - $inline_floating_icon_styles = "
751 - .wp-chatbot-ball {
752 - background: {$floating_icon_bg_color} !important;
753 - }
754 - .wp-chatbot-ball:hover,
755 - .wp-chatbot-ball:focus {
756 - background: {$floating_icon_bg_color} !important;
757 - }";
758 -
759 - wp_add_inline_style( 'qcld-wp-chatbot-common-style', $inline_floating_icon_styles );
617 + wp_add_inline_style( 'qcld-wp-chatbot-common-style', $custom_colors );
760 618 }
761 -
619 +
620 +
762 621 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');
763 622 wp_enqueue_style('qcld-wp-chatbot-magnific-popup');
764 -
765 623 $qcld_wb_chatbot_theme = get_option('qcld_wb_chatbot_theme');
766 624 /* if (file_exists(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . '/templates/' . $qcld_wb_chatbot_theme . '/style.css')) {
767 625 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');
768 626 wp_enqueue_style('qcld-wp-chatbot-style');
@@ -771,256 +629,96 @@
771 629 if (file_exists(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . '/templates/' . $qcld_wb_chatbot_theme . '/shortcode.css')) {
772 630 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');
773 631 wp_enqueue_style('qcld-wp-chatbot-shortcode-style');
774 632 }
775 -
776 - $inline_chat_custom_styles = ''; // Initialize a new variable for general chat custom styles.
777 - if(get_option('enable_wp_chatbot_custom_color')==1){
778 - // Sanitize all color options before using them in CSS to prevent invalid values.
779 - $text_color = sanitize_hex_color( get_option('wp_chatbot_text_color') );
780 - $link_color = sanitize_hex_color( get_option('wp_chatbot_link_color') );
781 - $link_hover_color = sanitize_hex_color( get_option('wp_chatbot_link_hover_color') );
782 - $bot_msg_text_color = sanitize_hex_color( get_option('wp_chatbot_bot_msg_text_color') );
783 - $bot_msg_bg_color = sanitize_hex_color( get_option('wp_chatbot_bot_msg_bg_color') );
784 - $buttons_text_color = sanitize_hex_color( get_option('wp_chatbot_buttons_text_color') );
785 - $buttons_bg_color = sanitize_hex_color( get_option('wp_chatbot_buttons_bg_color') );
786 - $buttons_text_color_hover = sanitize_hex_color( get_option('wp_chatbot_buttons_text_color_hover') );
787 - $buttons_bg_color_hover = sanitize_hex_color( get_option('wp_chatbot_buttons_bg_color_hover') );
788 - $user_msg_text_color = sanitize_hex_color( get_option('wp_chatbot_user_msg_text_color') );
789 - $wp_chatbot_text_color = sanitize_hex_color( get_option('wp_chatbot_text_color') );
790 - $user_msg_bg_color = sanitize_hex_color( get_option('wp_chatbot_user_msg_bg_color') );
791 - $header_background_color = sanitize_hex_color( get_option('wp_chatbot_header_background_color') );
792 - $chatbot_content_max_height = sanitize_text_field( get_option('chatbot_content_max_height') );
793 - $chatbot_content_max_height_responsive = sanitize_text_field( get_option('chatbot_content_max_height_responsive') );
794 -
795 -
796 - $inline_chat_custom_styles .= "
633 + $custom_colors = '';
634 + if(get_option('enable_wp_chatbot_custom_color')==1){
635 + $custom_colors .="
797 636 #wp-chatbot-chat-container, .wp-chatbot-product-description, .wp-chatbot-product-description p,.wp-chatbot-product-quantity label, .wp-chatbot-product-variable label {
798 - color: ". $text_color ." !important;
637 + color: ". get_option('wp_chatbot_text_color')." !important;
799 638 }
800 639 #wp-chatbot-chat-container a {
801 - color: ". $link_color ." !important;
640 + color: ". get_option('wp_chatbot_link_color')." !important;
802 641 }
803 -
804 - #wp-chatbot-chat-container a p{
805 - color: ". $link_color ." !important;
806 - }
807 - #wp-chatbot-chat-container a p span{
808 - color: ". $link_color ." !important;
809 - }
810 642 #wp-chatbot-chat-container a:hover {
811 - color: ". $link_hover_color ." !important;
643 + color: ". get_option('wp_chatbot_link_hover_color')." !important;
812 644 }
813 645
814 646 ul.wp-chatbot-messages-container > li.wp-chatbot-msg .wp-chatbot-paragraph,
815 647 .wp-chatbot-agent-profile .wp-chatbot-bubble {
816 - color: ". $bot_msg_text_color ." !important;
817 - background-color: ". $bot_msg_bg_color ." !important;
648 + color: ". get_option('wp_chatbot_bot_msg_text_color')." !important;
649 + background-color: ". get_option('wp_chatbot_bot_msg_bg_color')." !important;
818 650 word-break: break-word;
819 651 }
820 652 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 {
821 - color: ". $buttons_text_color ." !important;
822 - background-color: ". $buttons_bg_color ." !important;
653 + color: ". get_option('wp_chatbot_buttons_text_color') ." !important;
654 + background-color: ". get_option('wp_chatbot_buttons_bg_color') ." !important;
823 655 background-image: none !important;
824 656 }
825 657
826 658 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 {
827 - color: ". $buttons_text_color_hover ." !important;
828 - background-color: ". $buttons_bg_color_hover ." !important;
659 + color: ". get_option('wp_chatbot_buttons_text_color_hover') ." !important;
660 + background-color: ". get_option('wp_chatbot_buttons_bg_color_hover') ." !important;
829 661 background-image: none !important;
830 662 }
831 663
832 664 li.wp-chat-user-msg .wp-chatbot-paragraph {
833 - color: ". $user_msg_text_color ." !important;
834 - background: ". $user_msg_bg_color ." !important;
835 - }
836 -
837 - ul.wp-chatbot-messages-container li:first-child.wp-chatbot-msg .wp-chatbot-paragraph {
838 - color: ". $wp_chatbot_text_color ." !important;
665 + color: ". get_option('wp_chatbot_user_msg_text_color')." !important;
666 + background-color: ". get_option('wp_chatbot_user_msg_bg_color')." !important;
839 667 }
840 -
841 668 ul.wp-chatbot-messages-container > li.wp-chatbot-msg > .wp-chatbot-paragraph:before,
842 669 .wp-chatbot-bubble:before {
843 - border-right: 10px solid ". $bot_msg_bg_color ." !important;
670 + border-right: 10px solid ". get_option('wp_chatbot_bot_msg_bg_color')." !important;
844 671
845 672 }
846 673 ul.wp-chatbot-messages-container > li.wp-chat-user-msg > .wp-chatbot-paragraph:before {
847 - border-left: 10px solid ". $user_msg_bg_color ." !important;
674 + border-left: 10px solid ". get_option('wp_chatbot_user_msg_bg_color')." !important;
848 675 }
849 676 #wp-chatbot-chat-container .wp-chatbot-header{
850 - background: ". $header_background_color ." !important;
677 + background: ". get_option('wp_chatbot_header_background_color')." !important;
851 678 }
852 - .wp-chatbot-container ul.wp-chatbot-messages-container > li.wp-chatbot-msg .chat-container, .wp-chatbot-container .wp-chatbot-agent-profile .wp-chatbot-bubble {
853 - color: ". $bot_msg_text_color ." !important;
854 - background: ". $bot_msg_bg_color ." !important;
855 - }
856 679 ";
857 - // Apply the accumulated general chat custom styles.
858 - // This ensures these styles are added if the custom color option is enabled.
859 - wp_add_inline_style( 'qcld-wp-chatbot-common-style', $inline_chat_custom_styles );
680 +
860 681 }
861 - $custom_colors ="";
862 - if((get_option('enable_wp_chatbot_custom_color')==1) && $user_font != ''){
682 + if((get_option('enable_wp_chatbot_custom_color')==1) && $user_font != ''){
863 683 $custom_colors .="
864 -
865 -
866 684 #wp-chatbot-messages-container > li.wp-chatbot-msg > .wp-chatbot-paragraph,
867 685 #wp-chatbot-messages-container > li.wp-chatbot-msg > span{
868 686 font-family: ".$bot_font_family->fontFamily.";
869 687 font-weight: ".$bot_font_family->fontWeight.";
870 688 font-style: ".$bot_font_family->fontStyle.";
871 - font-size: ". get_option('wp_chatbot_font_size'). "px;
689 + font-size: ". get_option('wp_chatbot_font_size'). ";
872 690 }
873 -
874 - ul.wp-chatbot-messages-container > li.wp-chatbot-msg .wp-chatbot-paragraph, .wp-chatbot-agent-profile .wp-chatbot-bubble {
875 - font-family: ".$bot_font_family->fontFamily.";
876 - font-weight: ".$bot_font_family->fontWeight.";
877 - font-style: ".$bot_font_family->fontStyle.";
878 - font-size: ". get_option('wp_chatbot_font_size'). "px;
879 - }
880 -
881 - ul#wp-chatbot-messages-container .wp-chatbot-textanimation span {
882 - font-family: ".$bot_font_family->fontFamily.";
883 - font-weight: ".$bot_font_family->fontWeight.";
884 - font-style: ".$bot_font_family->fontStyle.";
885 - font-size: ". get_option('wp_chatbot_font_size'). "px;
886 - }
887 -
888 -
889 -
890 -
891 691 ";
892 692 }
893 - if ( get_option('enable_wp_chatbot_custom_color') == 1 && ! empty($bot_font) ) {
894 -
895 - // Sanitize each CSS-related value
896 - $font_family = isset( $user_font_family->fontfamily ) ? esc_attr( $user_font_family->fontfamily ) : 'inherit';
897 - $font_weight = isset( $user_font_family->fontWeight ) ? esc_attr( $user_font_family->fontWeight ) : 'normal';
898 - $font_style = isset( $user_font_family->fontStyle ) ? esc_attr( $user_font_family->fontStyle ) : 'normal';
899 - $font_size = get_option( 'wp_chatbot_font_size' );
900 - $font_size = esc_attr( trim( $font_size ) );
901 -
902 - // Optional: ensure font size includes units.
903 - if ( ! preg_match( '/(px|em|rem|%)$/', $font_size ) ) {
904 - $font_size .= 'px'; // fallback to px if unit missing.
693 + if((get_option('enable_wp_chatbot_custom_color')==1) && $bot_font != ''){
694 + $custom_colors .="
695 + #wp-chatbot-messages-container > li.wp-chat-user-msg > .wp-chatbot-paragraph{
696 + font-family: ".$user_font_family->fontFamily.";
697 + font-weight: ".$user_font_family->fontWeight.";
698 + font-style: ".$user_font_family->fontStyle.";
699 + font-size: ". get_option('wp_chatbot_font_size'). ";
905 700 }
906 -
907 - $custom_colors .= "
908 - #wp-chatbot-messages-container > li.wp-chat-user-msg > .wp-chatbot-paragraph {
909 - font-family: {$font_family};
910 - font-weight: {$font_weight};
911 - font-style: {$font_style};
912 - font-size: {$font_size};
913 - }
914 - ";
915 -
701 + ";
916 702 }
917 -
703 + wp_add_inline_style( 'qcld-wp-chatbot-common-style', $custom_colors );
918 704 if(get_option('wp_chatbot_custom_css')!=""){
919 705
920 706 wp_add_inline_style( 'qcld-wp-chatbot-common-style', get_option('wp_chatbot_custom_css') );
921 707 }
922 -
923 -
924 -
925 -
926 - if ( ( get_option( 'chatbot_content_max_height' ) != '' ) ) {
927 -
928 - $custom_colors .= ' .slimScrollDiv{
929 - height: calc(' . get_option( 'chatbot_content_max_height' ) . 'vh - 270px) !important;
930 - max-height: calc(' . get_option( 'chatbot_content_max_height' ) . 'vh - 270px) !important;
931 - }';
932 -
933 -
934 - $custom_colors .= 'div#wp-chatbot-board-container{
935 - height: calc(' . get_option( 'chatbot_content_max_height' ) . 'vh - 100px) !important;
936 - max-height: calc(' . get_option( 'chatbot_content_max_height' ) . 'vh - 100px) !important;
937 - }';
938 -
939 - $custom_colors .= '.wp-chatbot-content{
940 - height: calc(' . get_option( 'chatbot_content_max_height' ) . 'vh - 270px) !important;
941 - max-height: calc(' . get_option( 'chatbot_content_max_height' ) . 'vh - 270px) !important;
942 - }';
943 -
944 -
945 -
946 - $custom_colors .= '
947 - @media screen and (max-width: 480px) {
948 - div#wp-chatbot-board-container{
949 - height: calc(' . get_option( 'chatbot_content_max_height_responsive' ) . 'vh - 0px) !important;
950 - max-height: calc(' . get_option( 'chatbot_content_max_height_responsive' ) . 'vh - 0px) !important;
951 - }
952 -
953 - .slimScrollDiv{
954 - height: calc(' . get_option( 'chatbot_content_max_height_responsive' ) . 'vh - 170px) !important;
955 - max-height: calc(' . get_option( 'chatbot_content_max_height_responsive' ) . 'vh - 170px) !important;
956 - }
957 -
958 - .wp-chatbot-content{
959 - height: calc(' . get_option( 'chatbot_content_max_height_responsive' ) . 'vh - 170px) !important;
960 - max-height: calc(' . get_option( 'chatbot_content_max_height_responsive' ) . 'vh - 170px) !important;
961 - }
962 - }
963 - ';
964 -
965 -
966 - }
967 - wp_add_inline_style( 'qcld-wp-chatbot-common-style', $custom_colors );
968 708 }
969 709 public function qcld_wb_chatbot_str_replace($messages=array()){
970 - $allowed_html = array(
971 - 'a' => array(
972 - 'href' => array(),
973 - 'title' => array()
974 - ),
975 - 'div' => array(
976 - 'class' => array()
977 - ),
978 - 'span' => array(
979 - 'class' => array()
980 - ),
981 - 'img' => array(
982 - 'src' => array()
983 - ),
984 - 'h3' => array(),
985 - 'h4' => array(),
986 - 'h5' => array(),
987 - 'h6' => array(),
988 - 'b' => array(),
989 - 'br' => array(),
990 - 'em' => array(),
991 - 'ul' => array(),
992 - 'li' => array(),
993 - 'strong' => array(),
994 - );
995 710 $refined_mesgses=array();
996 711 if(!empty($messages) && is_array($messages)){
997 712 foreach ($messages as $message){
998 - $from = array('&lt;', '&gt;');
999 - $to = array('<', '>');
1000 - if(!is_array($message)){
1001 - $message = str_replace($from, $to, $message);
1002 - $msg = wp_kses( ($message), $allowed_html);
1003 - $refined_msg=str_replace('\\', '', $msg);
1004 - array_push($refined_mesgses,$refined_msg);
1005 - }
713 + $refined_msg=str_replace('\\', '', $message);
714 + array_push($refined_mesgses,$refined_msg);
1006 715 }
1007 716 }else{
1008 - $from = array('&lt;', '&gt;');
1009 - $to = array('<', '>');
1010 -
1011 - $message = str_replace($from, $to, $messages);
1012 - if(!empty($messages )){
1013 - $msg = wp_kses( $messages, $allowed_html);
1014 - }else{
1015 - $msg = '';
1016 - }
1017 - $refined_msg=str_replace('\\', '', $msg);
717 + $refined_msg=str_replace('\\', '', $messages);
1018 718 array_push($refined_mesgses,$refined_msg);
1019 -
1020 719 }
1021 720 return $refined_mesgses;
1022 -
1023 721 }
1024 722 //getting exact agent icon path
1025 723 public function qcld_wb_chatbot_agent_icon(){
1026 724
@@ -1056,18 +754,17 @@
1056 754 public function qcld_wb_chatbot_admin_page_settings()
1057 755 {
1058 756 global $wpcommerce;
1059 757 $action = 'admin.php?page=wpbot';
1060 -
1061 758 require_once("admin_ui.php");
1062 759 }
1063 -
760 +
1064 761 public function qcld_wb_chatbot_dynamic_multi_option($options, $option_name, $option_text)
1065 762 {
1066 763 ?>
1067 764
1068 765 <h4 class="qc-opt-title">
1069 - <?php echo esc_html($option_text); ?>
766 + <?php esc_html_e($option_text, 'wpchatbot'); ?>
1070 767 </h4>
1071 768 <div class="wp-chatbot-lng-items">
1072 769 <?php
1073 770 if (is_array($options) && count($options) > 0) {
@@ -1073,15 +770,15 @@
1073 770 if (is_array($options) && count($options) > 0) {
1074 771 foreach ($options as $key => $value) {
1075 772 ?>
1076 773 <div class="row" class="wp-chatbot-lng-item">
1077 - <div class="col-xs-11">
774 + <div class="col-xs-10">
1078 775 <input type="text"
1079 776 class="form-control qc-opt-dcs-font"
1080 - name="<?php echo esc_attr( $option_name ); ?>[]"
777 + name="<?php echo $option_name; ?>[]"
1081 778 value="<?php echo esc_attr(str_replace('\\', '', $value)); ?>">
1082 779 </div>
1083 - <div class="col-xs-1">
780 + <div class="col-xs-2">
1084 781 <button type="button" class="btn btn-danger btn-sm wp-chatbot-lng-item-remove"> <span class="glyphicon glyphicon-remove"></span> </button>
1085 782 </div>
1086 783 </div>
1087 784 <?php
@@ -1087,22 +784,22 @@
1087 784 <?php
1088 785 }
1089 786 } else { ?>
1090 787 <div class="row" class="wp-chatbot-lng-item">
1091 -<div class="col-xs-11">
788 +<div class="col-xs-10">
1092 789 <input type="text"
1093 790 class="form-control qc-opt-dcs-font"
1094 - name="<?php echo esc_attr( $option_name ); ?>[]"
791 + name="<?php echo $option_name; ?>[]"
1095 792 value="<?php echo esc_attr($option_text); ?>">
1096 793 </div>
1097 -<div class="col-xs-1"> <span class="wp-chatbot-lng-item-remove">
1098 - <?php esc_html_e('X', 'chatbot'); ?>
794 +<div class="col-xs-2"> <span class="wp-chatbot-lng-item-remove">
795 + <?php esc_html_e('X', 'wpchatbot'); ?>
1099 796 </span> </div>
1100 797 </div>
1101 798 <?php } ?>
1102 799 </div>
1103 800 <div class="row">
1104 - <div class="col-sm-1 col-sm-offset-11">
801 + <div class="col-sm-2 col-sm-offset-10">
1105 802 <button type="button" class="btn btn-success btn-sm wp-chatbot-lng-item-add"> <span class="glyphicon glyphicon-plus"></span> </button>
1106 803 </div>
1107 804 </div>
1108 805 <?php
@@ -1110,181 +807,122 @@
1110 807
1111 808 function qcld_wb_chatbot_save_options()
1112 809 {
1113 810 //global $wpcommerce;
1114 - if (isset($_POST['_wpnonce']) && wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['_wpnonce'])), 'wp_chatbot') && current_user_can('manage_options')) {
1115 - // Check if the form is submitted or not.
1116 - $submit = sanitize_text_field(wp_unslash($_POST['submit']));
811 + if (isset($_POST['_wpnonce']) && wp_verify_nonce($_POST['_wpnonce'], 'wp_chatbot')) {
812 + //wp_verify_nonce($_POST['_wpnonce'], 'wp_chatbot');
813 + // Check if the form is submitted or not
814 + $submit = sanitize_text_field($_POST['submit']);
1117 815 if (isset($submit)) {
1118 816 //wpwboticon position settings.
1119 817 if (isset($_POST["wp_chatbot_position_x"])) {
1120 - $wp_chatbot_position_x = intval(sanitize_text_field(wp_unslash($_POST["wp_chatbot_position_x"])));
818 + $wp_chatbot_position_x = intval(sanitize_text_field($_POST["wp_chatbot_position_x"]));
1121 819 update_option('wp_chatbot_position_x', $wp_chatbot_position_x);
1122 820 }
1123 821 if (isset($_POST["wp_chatbot_position_y"])) {
1124 - $wp_chatbot_position_y = intval(sanitize_text_field(wp_unslash($_POST["wp_chatbot_position_y"])));
822 + $wp_chatbot_position_y = intval(sanitize_text_field($_POST["wp_chatbot_position_y"]));
1125 823 update_option('wp_chatbot_position_y', $wp_chatbot_position_y);
1126 824 }
1127 825 //product search options
1128 826 if(isset($_POST['qlcd_wp_chatbot_search_option'])){
1129 - $qlcd_wp_chatbot_search_option = sanitize_text_field(wp_unslash($_POST['qlcd_wp_chatbot_search_option']));
827 + $qlcd_wp_chatbot_search_option = sanitize_text_field($_POST['qlcd_wp_chatbot_search_option']);
1130 828 update_option('qlcd_wp_chatbot_search_option', $qlcd_wp_chatbot_search_option);
1131 829 }
1132 - if(isset( $_POST["disable_floating_button"])){
1133 - $disable_floating_button = sanitize_text_field(wp_unslash($_POST["disable_floating_button"]));
1134 - }else{ $disable_floating_button='';}
1135 - update_option('disable_floating_button', wp_unslash($disable_floating_button));
1136 -
1137 - if(isset( $_POST["wpbot_enable_on_search"])){
1138 - $wpbot_enable_on_search = sanitize_text_field(wp_unslash($_POST["wpbot_enable_on_search"]));
1139 - }else{ $wpbot_enable_on_search='';}
1140 - update_option('wpbot_enable_on_search', wp_unslash($wpbot_enable_on_search));
1141 -
1142 - if(isset( $_POST["skip_wp_greetings_donot_show_menu"])){
1143 - $skip_wp_greetings_donot_show_menu = sanitize_text_field(wp_unslash($_POST["skip_wp_greetings_donot_show_menu"]));
1144 - }else{ $skip_wp_greetings_donot_show_menu='';}
1145 - update_option('skip_wp_greetings_donot_show_menu', wp_unslash($skip_wp_greetings_donot_show_menu));
1146 -
1147 - if(isset( $_POST["skip_wp_greetings"])){
1148 - $skip_wp_greetings = sanitize_text_field(wp_unslash($_POST["skip_wp_greetings"]));
1149 - }else{ $skip_wp_greetings='';}
1150 - update_option('skip_wp_greetings', wp_unslash($skip_wp_greetings));
1151 -
1152 - if( $skip_wp_greetings == '1' || $skip_wp_greetings_donot_show_menu == '1' ){
1153 - $ask_email_wp_greetings = '';
1154 - $enable_asking_for_email = '';
1155 - } else {
1156 - if (isset( $_POST["ask_email_wp_greetings"])) {
1157 - $ask_email_wp_greetings = sanitize_text_field(wp_unslash($_POST["ask_email_wp_greetings"]));
1158 - } else {
1159 - $ask_email_wp_greetings = '';
1160 - }
1161 - if (isset( $_POST["enable_asking_for_email"])) {
1162 - $enable_asking_for_email = sanitize_text_field(wp_unslash($_POST["enable_asking_for_email"]));
1163 - } else {
1164 - $enable_asking_for_email = '';
1165 - }
1166 - }
1167 - update_option('ask_email_wp_greetings', wp_unslash($ask_email_wp_greetings));
1168 - update_option('enable_asking_for_email', wp_unslash($enable_asking_for_email));
830 +
1169 831 //Enable /disable wpwbot
1170 832 if(isset( $_POST["disable_wp_chatbot"])){
1171 - $disable_wp_chatbot = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot"]));
833 + $disable_wp_chatbot = sanitize_text_field($_POST["disable_wp_chatbot"]);
1172 834 }else{ $disable_wp_chatbot='';}
1173 835 update_option('disable_wp_chatbot', wp_unslash($disable_wp_chatbot));
1174 836
1175 837 if(isset( $_POST["qlcd_wp_chatbot_admin_email"])){
1176 - $qlcd_wp_chatbot_admin_email = sanitize_email(wp_unslash($_POST["qlcd_wp_chatbot_admin_email"]));
838 + $qlcd_wp_chatbot_admin_email = sanitize_email($_POST["qlcd_wp_chatbot_admin_email"]);
1177 839 }else{ $qlcd_wp_chatbot_admin_email='';}
1178 840 update_option('qlcd_wp_chatbot_admin_email', wp_unslash($qlcd_wp_chatbot_admin_email));
1179 -
1180 -
1181 - if(isset( $_POST["open_links_new_window"])){
1182 - $open_links_new_window = sanitize_text_field(wp_unslash($_POST["open_links_new_window"]));
1183 - }else{ $open_links_new_window='';}
1184 - update_option('open_links_new_window', wp_unslash($open_links_new_window));
1185 841
1186 842
1187 843 if(isset( $_POST["qlcd_wp_chatbot_from_email"])){
1188 - $qlcd_wp_chatbot_from_email = sanitize_email(wp_unslash($_POST["qlcd_wp_chatbot_from_email"]));
844 + $qlcd_wp_chatbot_from_email = sanitize_email($_POST["qlcd_wp_chatbot_from_email"]);
1189 845 }else{ $qlcd_wp_chatbot_from_email='';}
1190 846 update_option('qlcd_wp_chatbot_from_email', wp_unslash($qlcd_wp_chatbot_from_email));
1191 847
1192 848 if(isset( $_POST["disable_wp_chatbot_on_mobile"])) {
1193 - $disable_wp_chatbot_on_mobile = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_on_mobile"]));
849 + $disable_wp_chatbot_on_mobile = sanitize_text_field($_POST["disable_wp_chatbot_on_mobile"]);
1194 850 }else{ $disable_wp_chatbot_on_mobile='';}
1195 851 update_option('disable_wp_chatbot_on_mobile', wp_unslash($disable_wp_chatbot_on_mobile));
1196 852 if(isset( $_POST["disable_wp_chatbot_product_search"])) {
1197 - $disable_wp_chatbot_product_search = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_product_search"]));
853 + $disable_wp_chatbot_product_search = sanitize_text_field($_POST["disable_wp_chatbot_product_search"]);
1198 854 }else{ $disable_wp_chatbot_product_search='';}
1199 855 update_option('disable_wp_chatbot_product_search', wp_unslash($disable_wp_chatbot_product_search));
1200 856 if(isset( $_POST["disable_wp_chatbot_catalog"])) {
1201 - $disable_wp_chatbot_catalog= sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_catalog"]));
857 + $disable_wp_chatbot_catalog= sanitize_text_field($_POST["disable_wp_chatbot_catalog"]);
1202 858 }else{ $disable_wp_chatbot_catalog='';}
1203 859 update_option('disable_wp_chatbot_catalog', wp_unslash($disable_wp_chatbot_catalog));
1204 860 if(isset( $_POST["disable_wp_chatbot_order_status"])) {
1205 - $disable_wp_chatbot_order_status = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_order_status"]));
861 + $disable_wp_chatbot_order_status = sanitize_text_field($_POST["disable_wp_chatbot_order_status"]);
1206 862 }else{ $disable_wp_chatbot_order_status='';}
1207 863 update_option('disable_wp_chatbot_order_status', wp_unslash($disable_wp_chatbot_order_status));
1208 864 if(isset( $_POST["disable_wp_chatbot_notification"])) {
1209 - $disable_wp_chatbot_notification = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_notification"]));
865 + $disable_wp_chatbot_notification = sanitize_text_field($_POST["disable_wp_chatbot_notification"]);
1210 866 }else{ $disable_wp_chatbot_notification='1';}
1211 867 update_option('disable_wp_chatbot_notification', wp_unslash($disable_wp_chatbot_notification));
1212 868
1213 869 if(isset( $_POST["enable_wp_chatbot_rtl"])) {
1214 - $enable_wp_chatbot_rtl = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_rtl"]));
870 + $enable_wp_chatbot_rtl = sanitize_text_field($_POST["enable_wp_chatbot_rtl"]);
1215 871 }else{ $enable_wp_chatbot_rtl='';}
1216 872 update_option('enable_wp_chatbot_rtl', wp_unslash($enable_wp_chatbot_rtl));
1217 -
1218 - if(isset( $_POST["chatbot_content_max_height"])) {
1219 - $chatbot_content_max_height = sanitize_text_field(wp_unslash($_POST["chatbot_content_max_height"]));
1220 - }else{ $chatbot_content_max_height='';}
1221 - update_option('chatbot_content_max_height', wp_unslash($chatbot_content_max_height));
1222 -
1223 -
1224 - if(isset( $_POST["chatbot_content_max_height_responsive"])) {
1225 - $chatbot_content_max_height_responsive = sanitize_text_field(wp_unslash($_POST["chatbot_content_max_height_responsive"]));
1226 - }else{ $chatbot_content_max_height_responsive='';}
1227 - update_option('chatbot_content_max_height_responsive', wp_unslash($chatbot_content_max_height_responsive));
1228 -
1229 -
873 +
1230 874 if(isset( $_POST["show_menu_after_greetings"])) {
1231 - $show_menu_after_greetings = sanitize_text_field(wp_unslash($_POST["show_menu_after_greetings"]));
875 + $show_menu_after_greetings = sanitize_text_field($_POST["show_menu_after_greetings"]);
1232 876 }else{ $show_menu_after_greetings='';}
1233 877 update_option('show_menu_after_greetings', wp_unslash($show_menu_after_greetings));
1234 -
1235 - if(isset( $_POST["disable_back_to_start_menu"])) {
1236 - $disable_back_to_start_menu = sanitize_text_field(wp_unslash($_POST["disable_back_to_start_menu"]));
1237 - }else{ $disable_back_to_start_menu='';}
1238 - update_option('disable_back_to_start_menu', wp_unslash($disable_back_to_start_menu));
1239 -
1240 878 if(isset( $_POST["enable_chat_session"])) {
1241 - $enable_chat_session = sanitize_text_field(wp_unslash($_POST["enable_chat_session"]));
879 + $enable_chat_session = sanitize_text_field($_POST["enable_chat_session"]);
1242 880 }else{ $enable_chat_session='';}
1243 881 update_option('enable_chat_session', wp_unslash($enable_chat_session));
1244 882
1245 883
1246 884 if(isset( $_POST["enable_wp_chatbot_mobile_full_screen"])) {
1247 - $enable_wp_chatbot_mobile_full_screen = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_mobile_full_screen"]));
885 + $enable_wp_chatbot_mobile_full_screen = sanitize_text_field($_POST["enable_wp_chatbot_mobile_full_screen"]);
1248 886 }else{ $enable_wp_chatbot_mobile_full_screen='';}
1249 887 update_option('enable_wp_chatbot_mobile_full_screen', wp_unslash($enable_wp_chatbot_mobile_full_screen));
1250 888
1251 889 if(isset( $_POST["wpbot_preloading_time"])) {
1252 - $wpbot_preloading_time = sanitize_text_field(wp_unslash($_POST["wpbot_preloading_time"]));
1253 - }else{ $wpbot_preloading_time='800';}
890 + $wpbot_preloading_time = sanitize_text_field($_POST["wpbot_preloading_time"]);
891 + }else{ $wpbot_preloading_time='100';}
1254 892 update_option('wpbot_preloading_time', wp_unslash($wpbot_preloading_time));
1255 893
1256 894 if(isset( $_POST["disable_wp_chatbot_icon_animation"])) {
1257 - $disable_wp_chatbot_icon_animation = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_icon_animation"]));
895 + $disable_wp_chatbot_icon_animation = sanitize_text_field($_POST["disable_wp_chatbot_icon_animation"]);
1258 896 }else{ $disable_wp_chatbot_icon_animation='';}
1259 897 update_option('disable_wp_chatbot_icon_animation', wp_unslash($disable_wp_chatbot_icon_animation));
1260 898 //Enable /disable Cart Item Number
1261 899 if(isset( $_POST["disable_wp_chatbot_cart_item_number"])) {
1262 - $disable_wp_chatbot_cart_item_number = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_cart_item_number"]));
900 + $disable_wp_chatbot_cart_item_number = sanitize_text_field($_POST["disable_wp_chatbot_cart_item_number"]);
1263 901 }else{ $disable_wp_chatbot_cart_item_number='';}
1264 902 update_option('disable_wp_chatbot_cart_item_number', wp_unslash($disable_wp_chatbot_cart_item_number));
1265 903 //Enable /disable featured products button.
1266 904 if(isset( $_POST["disable_wp_chatbot_featured_product"])) {
1267 - $disable_wp_chatbot_featured_product = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_featured_product"]));
905 + $disable_wp_chatbot_featured_product = sanitize_text_field($_POST["disable_wp_chatbot_featured_product"]);
1268 906 }else{ $disable_wp_chatbot_featured_product='';}
1269 907 update_option('disable_wp_chatbot_featured_product', wp_unslash($disable_wp_chatbot_featured_product));
1270 908 //Enable /disable sale products button
1271 909 if(isset( $_POST["disable_wp_chatbot_sale_product"])) {
1272 - $disable_wp_chatbot_sale_product = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_sale_product"]));
910 + $disable_wp_chatbot_sale_product = sanitize_text_field($_POST["disable_wp_chatbot_sale_product"]);
1273 911 }else{ $disable_wp_chatbot_sale_product='';}
1274 912 update_option('disable_wp_chatbot_sale_product', wp_unslash($disable_wp_chatbot_sale_product));
1275 913 //Enable Product details page.
1276 914 if(isset( $_POST["wp_chatbot_open_product_detail"])) {
1277 - $wp_chatbot_open_product_detail = sanitize_text_field(wp_unslash($_POST["wp_chatbot_open_product_detail"]));
915 + $wp_chatbot_open_product_detail = sanitize_text_field($_POST["wp_chatbot_open_product_detail"]);
1278 916 }else{ $wp_chatbot_open_product_detail='';}
1279 917 update_option('wp_chatbot_open_product_detail', wp_unslash($wp_chatbot_open_product_detail));
1280 918 //product order and order by
1281 919 if(isset($_POST['qlcd_wp_chatbot_product_orderby'])){
1282 - $qlcd_wp_chatbot_product_orderby = sanitize_text_field(wp_unslash($_POST['qlcd_wp_chatbot_product_orderby']));
920 + $qlcd_wp_chatbot_product_orderby = sanitize_text_field($_POST['qlcd_wp_chatbot_product_orderby']);
1283 921 update_option('qlcd_wp_chatbot_product_orderby', sanitize_text_field($qlcd_wp_chatbot_product_orderby));
1284 922 }
1285 923 if(isset($_POST['qlcd_wp_chatbot_product_order'])){
1286 - $qlcd_wp_chatbot_product_order = sanitize_text_field(wp_unslash($_POST['qlcd_wp_chatbot_product_order']));
924 + $qlcd_wp_chatbot_product_order = sanitize_text_field($_POST['qlcd_wp_chatbot_product_order']);
1287 925 update_option('qlcd_wp_chatbot_product_order', sanitize_text_field($qlcd_wp_chatbot_product_order));
1288 926 }
1289 927
1290 928
@@ -1289,53 +927,53 @@
1289 927
1290 928
1291 929 //Product per page settings.
1292 930 if (isset($_POST["qlcd_wp_chatbot_ppp"])) {
1293 - $qlcd_wp_chatbot_ppp = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_ppp"]));
931 + $qlcd_wp_chatbot_ppp = sanitize_text_field($_POST["qlcd_wp_chatbot_ppp"]);
1294 932 update_option('qlcd_wp_chatbot_ppp', intval($qlcd_wp_chatbot_ppp));
1295 933 }
1296 934 if(isset( $_POST["wp_chatbot_exclude_stock_out_product"])) {
1297 - $wp_chatbot_exclude_stock_out_product = sanitize_text_field(wp_unslash($_POST['wp_chatbot_exclude_stock_out_product']));
935 + $wp_chatbot_exclude_stock_out_product = sanitize_text_field($_POST['wp_chatbot_exclude_stock_out_product']);
1298 936 }else{ $wp_chatbot_exclude_stock_out_product='';}
1299 937 update_option('wp_chatbot_exclude_stock_out_product', wp_unslash($wp_chatbot_exclude_stock_out_product));
1300 938 if(isset( $_POST["wp_chatbot_show_parent_category"])) {
1301 - $wp_chatbot_show_parent_category = sanitize_text_field(wp_unslash($_POST['wp_chatbot_show_parent_category']));
939 + $wp_chatbot_show_parent_category = sanitize_text_field($_POST['wp_chatbot_show_parent_category']);
1302 940 }else{ $wp_chatbot_show_parent_category='';}
1303 941 update_option('wp_chatbot_show_parent_category', wp_unslash($wp_chatbot_show_parent_category));
1304 942 if(isset( $_POST["wp_chatbot_show_sub_category"])) {
1305 - $wp_chatbot_show_sub_category = sanitize_text_field(wp_unslash($_POST['wp_chatbot_show_sub_category']));
943 + $wp_chatbot_show_sub_category = sanitize_text_field($_POST['wp_chatbot_show_sub_category']);
1306 944 }else{ $wp_chatbot_show_sub_category='';}
1307 945 update_option('wp_chatbot_show_sub_category', wp_unslash($wp_chatbot_show_sub_category));
1308 946 if (isset($_POST["qlcd_wp_chatbot_order_user"])) {
1309 - $qlcd_wp_chatbot_order_user = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_order_user"]));
947 + $qlcd_wp_chatbot_order_user = sanitize_text_field($_POST["qlcd_wp_chatbot_order_user"]);
1310 948 update_option('qlcd_wp_chatbot_order_user', sanitize_text_field($qlcd_wp_chatbot_order_user));
1311 949 }
1312 950
1313 951 if(isset( $_POST["qc_wpbot_menu_order"]) && !empty($_POST["qc_wpbot_menu_order"])) {
1314 - $qc_wpbot_menu_order = wp_kses_post(wp_unslash($_POST["qc_wpbot_menu_order"]));
952 + $qc_wpbot_menu_order = wp_kses_post($_POST["qc_wpbot_menu_order"]);
1315 953 }else{ $qc_wpbot_menu_order='';}
1316 954 update_option('qc_wpbot_menu_order', ($qc_wpbot_menu_order));
1317 955
1318 956 //wpwBot Load control
1319 957 if(isset($_POST["wp_chatbot_show_home_page"])){
1320 - $wp_chatbot_show_home_page = sanitize_key((wp_unslash($_POST["wp_chatbot_show_home_page"])));
958 + $wp_chatbot_show_home_page = sanitize_key(($_POST["wp_chatbot_show_home_page"]));
1321 959 update_option('wp_chatbot_show_home_page', $wp_chatbot_show_home_page);
1322 960 }
1323 961
1324 962
1325 963 if(isset($_POST["wp_chatbot_show_posts"])){
1326 - $wp_chatbot_show_posts = sanitize_key((wp_unslash($_POST["wp_chatbot_show_posts"])));
964 + $wp_chatbot_show_posts = sanitize_key(($_POST["wp_chatbot_show_posts"]));
1327 965 update_option('wp_chatbot_show_posts', $wp_chatbot_show_posts);
1328 966 }
1329 967
1330 968
1331 969 if(isset($_POST["wp_chatbot_show_pages"])){
1332 - $wp_chatbot_show_pages = sanitize_key((wp_unslash($_POST["wp_chatbot_show_pages"])));
970 + $wp_chatbot_show_pages = sanitize_key(($_POST["wp_chatbot_show_pages"]));
1333 971 update_option('wp_chatbot_show_pages', $wp_chatbot_show_pages);
1334 972 }
1335 973
1336 974 if(isset( $_POST["wp_chatbot_show_pages_list"])) {
1337 - $wp_chatbot_show_pages_list = wp_parse_id_list(wp_unslash($_POST["wp_chatbot_show_pages_list"]));
975 + $wp_chatbot_show_pages_list = wp_parse_id_list($_POST["wp_chatbot_show_pages_list"]);
1338 976 update_option('wp_chatbot_show_pages_list', maybe_serialize(sanitize_array($wp_chatbot_show_pages_list)));
1339 977 }else{
1340 978 $wp_chatbot_show_pages_list='';
1341 979 update_option('wp_chatbot_show_pages_list', maybe_serialize(sanitize_array($wp_chatbot_show_pages_list)));
@@ -1340,9 +978,9 @@
1340 978 $wp_chatbot_show_pages_list='';
1341 979 update_option('wp_chatbot_show_pages_list', maybe_serialize(sanitize_array($wp_chatbot_show_pages_list)));
1342 980 }
1343 981 if(isset( $_POST["wp_chatbot_exclude_post_list"])) {
1344 - $wp_chatbot_exclude_post_list = wp_unslash($_POST["wp_chatbot_exclude_post_list"]);
982 + $wp_chatbot_exclude_post_list = $_POST["wp_chatbot_exclude_post_list"];
1345 983 update_option('wp_chatbot_exclude_post_list', maybe_serialize(sanitize_array($wp_chatbot_exclude_post_list)));
1346 984 }else{
1347 985 $wp_chatbot_exclude_post_list='';
1348 986 update_option('wp_chatbot_exclude_post_list', maybe_serialize(sanitize_array($wp_chatbot_exclude_post_list)));
@@ -1348,9 +986,9 @@
1348 986 update_option('wp_chatbot_exclude_post_list', maybe_serialize(sanitize_array($wp_chatbot_exclude_post_list)));
1349 987 }
1350 988
1351 989 if(isset($_POST["wp_chatbot_show_wpcommerce"])){
1352 - $wp_chatbot_show_wpcommerce = sanitize_key((wp_unslash($_POST["wp_chatbot_show_wpcommerce"])));
990 + $wp_chatbot_show_wpcommerce = sanitize_key(($_POST["wp_chatbot_show_wpcommerce"]));
1353 991 update_option('wp_chatbot_show_wpcommerce', $wp_chatbot_show_wpcommerce);
1354 992 }
1355 993
1356 994
@@ -1355,60 +993,45 @@
1355 993
1356 994
1357 995 //Stop Words Settings
1358 996 if (isset($_POST["qlcd_wp_chatbot_stop_words_name"])) {
1359 - $qlcd_wp_chatbot_stop_words_name = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_stop_words_name"]));
997 + $qlcd_wp_chatbot_stop_words_name = sanitize_text_field($_POST["qlcd_wp_chatbot_stop_words_name"]);
1360 998 update_option('qlcd_wp_chatbot_stop_words_name', $qlcd_wp_chatbot_stop_words_name);
1361 999 }
1362 1000 if (isset($_POST["qlcd_wp_chatbot_stop_words"])) {
1363 - $qlcd_wp_chatbot_stop_words = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_stop_words"]));
1001 + $qlcd_wp_chatbot_stop_words = sanitize_text_field($_POST["qlcd_wp_chatbot_stop_words"]);
1364 1002 update_option('qlcd_wp_chatbot_stop_words', $qlcd_wp_chatbot_stop_words);
1365 1003 }
1366 1004 //wpwbot icon settings.
1367 - $wp_chatbot_icon = isset( $_POST['wp_chatbot_icon'] ) ? sanitize_text_field(wp_unslash($_POST['wp_chatbot_icon'])) : 'icon-3.png';
1005 + $wp_chatbot_icon = isset( $_POST['wp_chatbot_icon'] ) ? sanitize_text_field($_POST['wp_chatbot_icon']) : 'icon-3.png';
1368 1006 update_option('wp_chatbot_icon', $wp_chatbot_icon);
1369 1007
1370 - $wp_chatbot_floatingiconbg_color = isset( $_POST['wp_chatbot_floatingiconbg_color'] ) ? sanitize_text_field(wp_unslash($_POST['wp_chatbot_floatingiconbg_color'])) : '#fff';
1008 + $wp_chatbot_floatingiconbg_color = isset( $_POST['wp_chatbot_floatingiconbg_color'] ) ? sanitize_text_field($_POST['wp_chatbot_floatingiconbg_color']) : '#fff';
1371 1009 update_option('wp_chatbot_floatingiconbg_color', $wp_chatbot_floatingiconbg_color);
1372 -
1373 - // Custom icon video / YouTube link
1374 - $wp_chatbot_icon_youtube_url = isset( $_POST['wp_chatbot_icon_youtube_url'] ) ? esc_url_raw( $_POST['wp_chatbot_icon_youtube_url'] ) : '';
1375 - $wp_chatbot_icon_video_upload = isset( $_POST['wp_chatbot_icon_video'] ) ? esc_url_raw( $_POST['wp_chatbot_icon_video'] ) : '';
1376 - // YouTube URL takes priority; fall back to uploaded video
1377 - $wp_chatbot_icon_video = ( $wp_chatbot_icon_youtube_url !== '' ) ? $wp_chatbot_icon_youtube_url : $wp_chatbot_icon_video_upload;
1378 - update_option( 'wp_chatbot_icon_video', $wp_chatbot_icon_video );
1379 - $wp_chatbot_icon_video_delay = isset( $_POST['wp_chatbot_icon_video_delay'] ) ? absint( $_POST['wp_chatbot_icon_video_delay'] ) : 0;
1380 - update_option( 'wp_chatbot_icon_video_delay', $wp_chatbot_icon_video_delay );
1381 1010
1382 1011 // upload custom wpwbot icon path
1383 - $wp_chatbot_custom_icon_path = sanitize_text_field(wp_unslash($_POST['wp_chatbot_custom_icon_path']));
1012 + $wp_chatbot_custom_icon_path = sanitize_text_field($_POST['wp_chatbot_custom_icon_path']);
1384 1013 update_option('wp_chatbot_custom_icon_path', $wp_chatbot_custom_icon_path);
1385 1014 //Agent image
1386 1015 //wpwbot icon settings.
1387 - $wp_chatbot_icon = (isset($_POST['wp_chatbot_agent_image']) ? sanitize_text_field(wp_unslash($_POST['wp_chatbot_agent_image'])) : 'agent-13.png');
1016 + $wp_chatbot_icon = (isset($_POST['wp_chatbot_agent_image']) ? sanitize_text_field($_POST['wp_chatbot_agent_image']) : 'agent-0.png');
1388 1017 update_option('wp_chatbot_agent_image', $wp_chatbot_icon);
1389 1018 // upload custom wpwbot icon
1390 1019 if(isset($_POST['wp_chatbot_custom_agent_path'])){
1391 - $wp_chatbot_custom_agent_path = sanitize_text_field(wp_unslash($_POST['wp_chatbot_custom_agent_path']));
1020 + $wp_chatbot_custom_agent_path = sanitize_text_field($_POST['wp_chatbot_custom_agent_path']);
1392 1021 update_option('wp_chatbot_custom_agent_path', $wp_chatbot_custom_agent_path);
1393 1022 }
1394 1023
1395 1024 //Theming
1396 - $qcld_wb_chatbot_theme = (isset($_POST['qcld_wb_chatbot_theme']) ? sanitize_text_field(wp_unslash($_POST['qcld_wb_chatbot_theme'])) : 'template-00');
1025 + $qcld_wb_chatbot_theme = (isset($_POST['qcld_wb_chatbot_theme']) ? sanitize_text_field($_POST['qcld_wb_chatbot_theme']) : 'template-00');
1397 1026 update_option('qcld_wb_chatbot_theme', $qcld_wb_chatbot_theme);
1398 -
1399 - //Avatar Location
1400 - if(isset($_POST['qcld_chatbot_avatar_location'])) {
1401 - $qcld_chatbot_avatar_location = sanitize_text_field(wp_unslash($_POST['qcld_chatbot_avatar_location']));
1402 - update_option('qcld_chatbot_avatar_location', $qcld_chatbot_avatar_location);
1403 - }
1404 1027 //Theme custom background option
1405 1028 if(isset( $_POST["qcld_wb_chatbot_change_bg"])) {
1406 - $qcld_wb_chatbot_change_bg = sanitize_text_field(wp_unslash($_POST["qcld_wb_chatbot_change_bg"]));
1029 + $qcld_wb_chatbot_change_bg = sanitize_text_field($_POST["qcld_wb_chatbot_change_bg"]);
1407 1030 }else{$qcld_wb_chatbot_change_bg='';}
1408 1031 update_option('qcld_wb_chatbot_change_bg', $qcld_wb_chatbot_change_bg);
1409 1032 if(isset($_POST["qcld_wb_chatbot_board_bg_path"])){
1410 - $qcld_wb_chatbot_board_bg_path = sanitize_text_field(wp_unslash($_POST["qcld_wb_chatbot_board_bg_path"]));
1033 + $qcld_wb_chatbot_board_bg_path = sanitize_text_field($_POST["qcld_wb_chatbot_board_bg_path"]);
1411 1034 update_option('qcld_wb_chatbot_board_bg_path', wp_unslash($qcld_wb_chatbot_board_bg_path));
1412 1035 }
1413 1036
1414 1037
@@ -1415,619 +1038,222 @@
1415 1038
1416 1039 //To override style use custom css.
1417 1040 if(isset($_POST["wp_chatbot_custom_css"])){
1418 1041 $wp_chatbot_custom_css = wp_unslash($_POST["wp_chatbot_custom_css"]);
1419 - update_option('wp_chatbot_custom_css', sanitize_text_field($wp_chatbot_custom_css));
1042 + update_option('wp_chatbot_custom_css', $wp_chatbot_custom_css);
1420 1043 }
1421 1044
1422 - if (isset($_POST["qlcd_wp_chatbot_dialogflow_project_id"])) {
1423 - $qlcd_wp_chatbot_dialogflow_project_id = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_dialogflow_project_id"]));
1424 - } else {
1425 - $qlcd_wp_chatbot_dialogflow_project_id = '';
1426 - }
1427 - update_option('qlcd_wp_chatbot_dialogflow_project_id', $qlcd_wp_chatbot_dialogflow_project_id);
1045 + $qlcd_wp_chatbot_dialogflow_project_id= @$_POST["qlcd_wp_chatbot_dialogflow_project_id"];
1046 + update_option('qlcd_wp_chatbot_dialogflow_project_id', sanitize_text_field($qlcd_wp_chatbot_dialogflow_project_id));
1428 1047
1429 - if (isset($_POST["wp_chatbot_df_api"])) {
1430 - $wp_chatbot_df_api = sanitize_text_field(wp_unslash($_POST["wp_chatbot_df_api"]));
1431 - } else {
1432 - $wp_chatbot_df_api = '';
1433 - }
1434 - update_option('wp_chatbot_df_api', $wp_chatbot_df_api);
1048 + $wp_chatbot_df_api= @$_POST["wp_chatbot_df_api"];
1049 + update_option('wp_chatbot_df_api', sanitize_text_field($wp_chatbot_df_api));
1435 1050
1436 - if (isset($_POST["qlcd_wp_chatbot_dialogflow_project_key"])) {
1437 - $qlcd_wp_chatbot_dialogflow_project_key = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_dialogflow_project_key"]));
1438 - } else {
1439 - $qlcd_wp_chatbot_dialogflow_project_key = '';
1440 - }
1441 - update_option('qlcd_wp_chatbot_dialogflow_project_key', $qlcd_wp_chatbot_dialogflow_project_key);
1051 +
1052 +
1053 + $qlcd_wp_chatbot_dialogflow_project_key= @$_POST["qlcd_wp_chatbot_dialogflow_project_key"];
1054 + update_option('qlcd_wp_chatbot_dialogflow_project_key', wp_unslash($qlcd_wp_chatbot_dialogflow_project_key));
1442 1055
1443 1056 /****Language center settings. ****/
1444 1057 //identity
1445 - if (isset($_POST["qlcd_wp_chatbot_host"])) {
1446 - $qlcd_wp_chatbot_host = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_host"]));
1447 - } else {
1448 - $qlcd_wp_chatbot_host = '';
1449 - }
1450 - update_option('qlcd_wp_chatbot_host', $qlcd_wp_chatbot_host);
1451 -
1452 - if (isset($_POST["qlcd_wp_chatbot_agent"])) {
1453 - $qlcd_wp_chatbot_agent = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_agent"]));
1454 - } else {
1455 - $qlcd_wp_chatbot_agent = '';
1456 - }
1457 - update_option('qlcd_wp_chatbot_agent', $qlcd_wp_chatbot_agent);
1458 -
1459 - if (isset($_POST["qlcd_wp_chatbot_shopper_demo_name"])) {
1460 - $qlcd_wp_chatbot_shopper_demo_name = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_shopper_demo_name"]));
1461 - } else {
1462 - $qlcd_wp_chatbot_shopper_demo_name = '';
1463 - }
1464 - update_option('qlcd_wp_chatbot_shopper_demo_name', $qlcd_wp_chatbot_shopper_demo_name);
1465 -
1466 - if (isset($_POST["qlcd_wp_chatbot_yes"])) {
1467 - $qlcd_wp_chatbot_yes = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_yes"]));
1468 - } else {
1469 - $qlcd_wp_chatbot_yes = '';
1470 - }
1471 - update_option('qlcd_wp_chatbot_yes', $qlcd_wp_chatbot_yes);
1472 -
1473 - if (isset($_POST["qlcd_wp_chatbot_no"])) {
1474 - $qlcd_wp_chatbot_no = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_no"]));
1475 - } else {
1476 - $qlcd_wp_chatbot_no = '';
1477 - }
1478 - update_option('qlcd_wp_chatbot_no', $qlcd_wp_chatbot_no);
1479 -
1480 - if (isset($_POST["qlcd_wp_chatbot_or"])) {
1481 - $qlcd_wp_chatbot_or = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_or"]));
1482 - } else {
1483 - $qlcd_wp_chatbot_or = '';
1484 - }
1485 - update_option('qlcd_wp_chatbot_or', $qlcd_wp_chatbot_or);
1486 -
1487 - if (isset($_POST["qlcd_wp_chatbot_sorry"])) {
1488 - $qlcd_wp_chatbot_sorry = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_sorry"]));
1489 - } else {
1490 - $qlcd_wp_chatbot_sorry = '';
1491 - }
1492 - update_option('qlcd_wp_chatbot_sorry', $qlcd_wp_chatbot_sorry);
1493 -
1494 - if (isset($_POST["skip_chat_reactions_menu"])) {
1495 - $skip_chat_reactions_menu = sanitize_text_field(wp_unslash($_POST["skip_chat_reactions_menu"]));
1496 - } else {
1497 - $skip_chat_reactions_menu = '';
1498 - }
1499 - update_option('skip_chat_reactions_menu', $skip_chat_reactions_menu);
1500 -
1501 - if (isset($_POST["qlcd_wp_chatbot_report_text"])) {
1502 - $qlcd_wp_chatbot_report_text = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_report_text"]));
1503 - } else {
1504 - $qlcd_wp_chatbot_report_text = '';
1505 - }
1506 - update_option('qlcd_wp_chatbot_report_text', $qlcd_wp_chatbot_report_text);
1507 -
1508 - if (isset($_POST["qlcd_wp_chatbot_report_text"])) {
1509 - $qlcd_wp_chatbot_report_text = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_report_text"]));
1510 - } else {
1511 - $qlcd_wp_chatbot_report_text = '';
1512 - }
1513 - update_option('qlcd_wp_chatbot_report_text', $qlcd_wp_chatbot_report_text);
1514 -
1515 - if (isset($_POST["enable_chat_report_menu"])) {
1516 - $enable_chat_report_menu = sanitize_text_field(wp_unslash($_POST["enable_chat_report_menu"]));
1517 - } else {
1518 - $enable_chat_report_menu = '';
1519 - }
1520 - update_option('enable_chat_report_menu', $enable_chat_report_menu);
1521 -
1522 - if (isset($_POST["qlcd_wp_chatbot_like_text"])) {
1523 - $qlcd_wp_chatbot_like_text = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_like_text"]));
1524 - } else {
1525 - $qlcd_wp_chatbot_like_text = '';
1526 - }
1527 - update_option('qlcd_wp_chatbot_like_text', $qlcd_wp_chatbot_like_text);
1528 -
1529 - if (isset($_POST["qlcd_wp_chatbot_dislike_text"])) {
1530 - $qlcd_wp_chatbot_dislike_text = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_dislike_text"]));
1531 - } else {
1532 - $qlcd_wp_chatbot_dislike_text = '';
1533 - }
1534 - update_option('qlcd_wp_chatbot_dislike_text', $qlcd_wp_chatbot_dislike_text);
1535 -
1536 - if (isset($_POST["enable_chat_share_menu"])) {
1537 - $enable_chat_share_menu = sanitize_text_field(wp_unslash($_POST["enable_chat_share_menu"]));
1538 - } else {
1539 - $enable_chat_share_menu = '';
1540 - }
1541 - update_option('enable_chat_share_menu', $enable_chat_share_menu);
1542 -
1543 - if (isset($_POST["qlcd_wp_chatbot_share_text"])) {
1544 - $qlcd_wp_chatbot_share_text = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_share_text"]));
1545 - } else {
1546 - $qlcd_wp_chatbot_share_text = '';
1547 - }
1548 - update_option('qlcd_wp_chatbot_share_text', $qlcd_wp_chatbot_share_text);
1549 -
1550 - if (isset($_POST["qlcd_wp_chatbot_agent_join"])) {
1551 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1552 - $qlcd_wp_chatbot_agent_join = wp_unslash($_POST["qlcd_wp_chatbot_agent_join"]);
1553 - $qlcd_wp_chatbot_agent_join = sanitize_array($qlcd_wp_chatbot_agent_join);
1554 - } else {
1555 - $qlcd_wp_chatbot_agent_join = array();
1556 - }
1557 - update_option('qlcd_wp_chatbot_agent_join', maybe_serialize($qlcd_wp_chatbot_agent_join));
1558 -
1058 + $qlcd_wp_chatbot_host = stripslashes(@$_POST["qlcd_wp_chatbot_host"]);
1059 + update_option('qlcd_wp_chatbot_host', sanitize_text_field($qlcd_wp_chatbot_host));
1060 + $qlcd_wp_chatbot_agent = stripslashes(@$_POST["qlcd_wp_chatbot_agent"]);
1061 + update_option('qlcd_wp_chatbot_agent', sanitize_text_field($qlcd_wp_chatbot_agent));
1062 + $qlcd_wp_chatbot_shopper_demo_name = stripslashes(@$_POST["qlcd_wp_chatbot_shopper_demo_name"]);
1063 + update_option('qlcd_wp_chatbot_shopper_demo_name', sanitize_text_field($qlcd_wp_chatbot_shopper_demo_name));
1064 + $qlcd_wp_chatbot_yes = stripslashes(@$_POST["qlcd_wp_chatbot_yes"]);
1065 + update_option('qlcd_wp_chatbot_yes', sanitize_text_field($qlcd_wp_chatbot_yes));
1066 + $qlcd_wp_chatbot_no = stripslashes(@$_POST["qlcd_wp_chatbot_no"]);
1067 + update_option('qlcd_wp_chatbot_no', sanitize_text_field($qlcd_wp_chatbot_no));
1068 + $qlcd_wp_chatbot_or = stripslashes(@$_POST["qlcd_wp_chatbot_or"]);
1069 + update_option('qlcd_wp_chatbot_or', sanitize_text_field($qlcd_wp_chatbot_or));
1070 + $qlcd_wp_chatbot_sorry = stripslashes(@$_POST["qlcd_wp_chatbot_sorry"]);
1071 + update_option('qlcd_wp_chatbot_sorry', sanitize_text_field($qlcd_wp_chatbot_sorry));
1072 + $qlcd_wp_chatbot_agent_join = (@$_POST["qlcd_wp_chatbot_agent_join"]);
1073 + update_option('qlcd_wp_chatbot_agent_join', maybe_serialize(sanitize_array($qlcd_wp_chatbot_agent_join)));
1559 1074 //Greeting.
1560 - if (isset($_POST["qlcd_wp_chatbot_welcome"])) {
1561 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1562 - $qlcd_wp_chatbot_welcome = wp_unslash($_POST["qlcd_wp_chatbot_welcome"]);
1563 - $qlcd_wp_chatbot_welcome = sanitize_array($qlcd_wp_chatbot_welcome);
1564 - } else {
1565 - $qlcd_wp_chatbot_welcome = array();
1566 - }
1567 - update_option('qlcd_wp_chatbot_welcome', maybe_serialize($qlcd_wp_chatbot_welcome));
1568 -
1569 - if (isset($_POST["qlcd_wp_chatbot_back_to_start"])) {
1570 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1571 - $qlcd_wp_chatbot_back_to_start = wp_unslash($_POST["qlcd_wp_chatbot_back_to_start"]);
1572 - $qlcd_wp_chatbot_back_to_start = sanitize_array($qlcd_wp_chatbot_back_to_start);
1573 - } else {
1574 - $qlcd_wp_chatbot_back_to_start = array();
1575 - }
1576 - update_option('qlcd_wp_chatbot_back_to_start', maybe_serialize($qlcd_wp_chatbot_back_to_start));
1577 -
1578 - if (isset($_POST["qlcd_wp_chatbot_hi_there"])) {
1579 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1580 - $qlcd_wp_chatbot_hi_there = wp_unslash($_POST["qlcd_wp_chatbot_hi_there"]);
1581 - $qlcd_wp_chatbot_hi_there = sanitize_array($qlcd_wp_chatbot_hi_there);
1582 - } else {
1583 - $qlcd_wp_chatbot_hi_there = array();
1584 - }
1585 - update_option('qlcd_wp_chatbot_hi_there', maybe_serialize($qlcd_wp_chatbot_hi_there));
1586 -
1587 - if (isset($_POST["qlcd_wp_chatbot_hello"])) {
1588 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1589 - $qlcd_wp_chatbot_hello = wp_unslash($_POST["qlcd_wp_chatbot_hello"]);
1590 - $qlcd_wp_chatbot_hello = sanitize_array($qlcd_wp_chatbot_hello);
1591 - } else {
1592 - $qlcd_wp_chatbot_hello = array();
1593 - }
1594 - update_option('qlcd_wp_chatbot_hello', maybe_serialize($qlcd_wp_chatbot_hello));
1595 -
1596 - if (isset($_POST["qlcd_wp_chatbot_welcome_back"])) {
1597 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1598 - $qlcd_wp_chatbot_welcome_back = wp_unslash( $_POST["qlcd_wp_chatbot_welcome_back"] );
1599 - $qlcd_wp_chatbot_welcome_back = sanitize_array( $qlcd_wp_chatbot_welcome_back );
1600 - } else {
1601 - $qlcd_wp_chatbot_welcome_back = array();
1602 - }
1603 - update_option('qlcd_wp_chatbot_welcome_back', maybe_serialize($qlcd_wp_chatbot_welcome_back));
1604 -
1605 - if (isset($_POST["qlcd_wp_chatbot_asking_name"])) {
1606 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1607 - $qlcd_wp_chatbot_asking_name = wp_unslash( $_POST["qlcd_wp_chatbot_asking_name"] );
1608 - $qlcd_wp_chatbot_asking_name = sanitize_array( $qlcd_wp_chatbot_asking_name );
1609 - } else {
1610 - $qlcd_wp_chatbot_asking_name = array();
1611 - }
1612 - update_option('qlcd_wp_chatbot_asking_name', maybe_serialize($qlcd_wp_chatbot_asking_name));
1613 -
1614 - if (isset($_POST["qlcd_wp_chatbot_name_greeting"])) {
1615 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1616 - $qlcd_wp_chatbot_name_greeting = wp_unslash( $_POST["qlcd_wp_chatbot_name_greeting"] );
1617 - $qlcd_wp_chatbot_name_greeting = sanitize_array( $qlcd_wp_chatbot_name_greeting );
1618 - } else {
1619 - $qlcd_wp_chatbot_name_greeting = array();
1620 - }
1621 - update_option('qlcd_wp_chatbot_name_greeting', maybe_serialize($qlcd_wp_chatbot_name_greeting));
1622 -
1623 - if (isset($_POST["qlcd_wp_chatbot_i_am"])) {
1624 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1625 - $qlcd_wp_chatbot_i_am = wp_unslash( $_POST["qlcd_wp_chatbot_i_am"] );
1626 - $qlcd_wp_chatbot_i_am = sanitize_array( $qlcd_wp_chatbot_i_am );
1627 - } else {
1628 - $qlcd_wp_chatbot_i_am = array();
1629 - }
1630 - update_option('qlcd_wp_chatbot_i_am', maybe_serialize($qlcd_wp_chatbot_i_am));
1631 -
1632 - if (isset($_POST["qlcd_wp_chatbot_is_typing"])) {
1633 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1634 - $qlcd_wp_chatbot_is_typing = wp_unslash( $_POST["qlcd_wp_chatbot_is_typing"] );
1635 - $qlcd_wp_chatbot_is_typing = sanitize_array( $qlcd_wp_chatbot_is_typing );
1636 - } else {
1637 - $qlcd_wp_chatbot_is_typing = array();
1638 - }
1639 - update_option('qlcd_wp_chatbot_is_typing', maybe_serialize($qlcd_wp_chatbot_is_typing));
1640 -
1641 - if (isset($_POST["qlcd_wp_chatbot_send_a_msg"])) {
1642 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1643 - $qlcd_wp_chatbot_send_a_msg = wp_unslash( $_POST["qlcd_wp_chatbot_send_a_msg"] );
1644 - $qlcd_wp_chatbot_send_a_msg = sanitize_array( $qlcd_wp_chatbot_send_a_msg );
1645 - } else {
1646 - $qlcd_wp_chatbot_send_a_msg = array();
1647 - }
1648 - update_option('qlcd_wp_chatbot_send_a_msg', maybe_serialize($qlcd_wp_chatbot_send_a_msg));
1649 -
1650 - if (isset($_POST["qlcd_wp_chatbot_choose_option"])) {
1651 - // Assuming 'sanitize_array' is a custom function that properly sanitizes each element of the array.
1652 - $qlcd_wp_chatbot_choose_option = wp_unslash( $_POST["qlcd_wp_chatbot_choose_option"] );
1653 - $qlcd_wp_chatbot_choose_option = sanitize_array( $qlcd_wp_chatbot_choose_option );
1654 - } else {
1655 - $qlcd_wp_chatbot_choose_option = array();
1656 - }
1657 - update_option('qlcd_wp_chatbot_choose_option', maybe_serialize($qlcd_wp_chatbot_choose_option));
1658 -
1659 - if (isset($_POST["qlcd_wp_chatbot_viewed_products"])) {
1660 -
1661 - $qlcd_wp_chatbot_viewed_products = wp_unslash( $_POST["qlcd_wp_chatbot_viewed_products"] );
1662 - $qlcd_wp_chatbot_viewed_products = sanitize_array( $qlcd_wp_chatbot_viewed_products );
1663 - } else {
1664 - $qlcd_wp_chatbot_viewed_products = array();
1665 - }
1666 - update_option('qlcd_wp_chatbot_viewed_products', maybe_serialize($qlcd_wp_chatbot_viewed_products));
1667 -
1668 - if(isset($_POST["qlcd_wp_chatbot_shopping_cart"])){
1669 - $qlcd_wp_chatbot_shopping_cart= esc_html((@wp_unslash($_POST["qlcd_wp_chatbot_shopping_cart"])));
1670 - update_option('qlcd_wp_chatbot_shopping_cart', maybe_serialize(sanitize_array($qlcd_wp_chatbot_shopping_cart)));
1671 - }
1672 -
1673 - if(isset($_POST["qlcd_wp_chatbot_add_to_cart"])){
1674 - $qlcd_wp_chatbot_add_to_cart= (@wp_unslash($_POST["qlcd_wp_chatbot_add_to_cart"]));
1675 - update_option('qlcd_wp_chatbot_add_to_cart', maybe_serialize(sanitize_array($qlcd_wp_chatbot_add_to_cart)));
1676 - }
1677 - if(isset($_POST["qlcd_wp_chatbot_cart_link"])){
1678 - $qlcd_wp_chatbot_cart_link= @wp_unslash($_POST["qlcd_wp_chatbot_cart_link"]);
1679 - update_option('qlcd_wp_chatbot_cart_link', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_link)));
1680 - }
1681 - if(isset($_POST["qlcd_wp_chatbot_checkout_link"])){
1682 - $qlcd_wp_chatbot_checkout_link= @wp_unslash($_POST["qlcd_wp_chatbot_checkout_link"]);
1683 - update_option('qlcd_wp_chatbot_checkout_link', maybe_serialize(sanitize_array($qlcd_wp_chatbot_checkout_link)));
1684 - }
1685 - if(isset($_POST["qlcd_wp_chatbot_cart_welcome"])){
1686 - $qlcd_wp_chatbot_cart_welcome= (@wp_unslash($_POST["qlcd_wp_chatbot_cart_welcome"]));
1687 - update_option('qlcd_wp_chatbot_cart_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_welcome)));
1688 - }
1689 - if(isset($_POST["qlcd_wp_chatbot_featured_product_welcome"])){
1690 - $qlcd_wp_chatbot_featured_product_welcome= @wp_unslash($_POST["qlcd_wp_chatbot_featured_product_welcome"]);
1691 - update_option('qlcd_wp_chatbot_featured_product_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_featured_product_welcome)));
1692 - }
1693 -
1694 - if(isset($_POST["qlcd_wp_chatbot_viewed_product_welcome"])){
1695 - $qlcd_wp_chatbot_viewed_product_welcome= @wp_unslash($_POST["qlcd_wp_chatbot_viewed_product_welcome"]);
1696 - update_option('qlcd_wp_chatbot_viewed_product_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_viewed_product_welcome)));
1697 - }
1698 - if(isset($_POST["qlcd_wp_chatbot_latest_product_welcome"])){
1699 - $qlcd_wp_chatbot_latest_product_welcome= @wp_unslash($_POST["qlcd_wp_chatbot_latest_product_welcome"]);
1700 - update_option('qlcd_wp_chatbot_latest_product_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_latest_product_welcome)));
1701 - }
1702 -
1703 - if(isset($_POST["qlcd_wp_chatbot_cart_title"])){
1704 - $qlcd_wp_chatbot_cart_title= @wp_unslash($_POST["qlcd_wp_chatbot_cart_title"]);
1705 - update_option('qlcd_wp_chatbot_cart_title', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_title)));
1706 - }
1707 - if(isset($_POST["qlcd_wp_chatbot_cart_quantity"])){
1708 - $qlcd_wp_chatbot_cart_quantity= @wp_unslash($_POST["qlcd_wp_chatbot_cart_quantity"]);
1709 - update_option('qlcd_wp_chatbot_cart_quantity', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_quantity)));
1710 - }
1711 - if(isset($_POST["qlcd_wp_chatbot_cart_price"])){
1712 - $qlcd_wp_chatbot_cart_price= @wp_unslash($_POST["qlcd_wp_chatbot_cart_price"]);
1713 - update_option('qlcd_wp_chatbot_cart_price', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_price)));
1714 - }
1715 - if(isset($_POST["qlcd_wp_chatbot_no_cart_items"])){
1716 - $qlcd_wp_chatbot_no_cart_items= wp_unslash(@$_POST["qlcd_wp_chatbot_no_cart_items"]);
1717 - update_option('qlcd_wp_chatbot_no_cart_items', maybe_serialize(sanitize_array($qlcd_wp_chatbot_no_cart_items)));
1718 - }
1719 - if(isset($_POST["qlcd_wp_chatbot_cart_updating"])){
1720 - $qlcd_wp_chatbot_cart_updating= @wp_unslash($_POST["qlcd_wp_chatbot_cart_updating"]);
1721 - update_option('qlcd_wp_chatbot_cart_updating', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_updating)));
1722 - }
1723 - if(isset($_POST["qlcd_wp_chatbot_cart_removing"])){
1724 - $qlcd_wp_chatbot_cart_removing= @wp_unslash($_POST["qlcd_wp_chatbot_cart_removing"]);
1725 - update_option('qlcd_wp_chatbot_cart_removing', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_removing)));
1726 - }
1075 + $qlcd_wp_chatbot_welcome = (@$_POST["qlcd_wp_chatbot_welcome"]);
1076 + update_option('qlcd_wp_chatbot_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_welcome)));
1077 + $qlcd_wp_chatbot_back_to_start = (@$_POST["qlcd_wp_chatbot_back_to_start"]);
1078 + update_option('qlcd_wp_chatbot_back_to_start', maybe_serialize(sanitize_array($qlcd_wp_chatbot_back_to_start)));
1079 + $qlcd_wp_chatbot_hi_there = (@$_POST["qlcd_wp_chatbot_hi_there"]);
1080 + update_option('qlcd_wp_chatbot_hi_there', maybe_serialize(sanitize_array($qlcd_wp_chatbot_hi_there)));
1081 + $qlcd_wp_chatbot_hello = (@$_POST["qlcd_wp_chatbot_hello"]);
1082 + update_option('qlcd_wp_chatbot_hello', maybe_serialize(sanitize_array($qlcd_wp_chatbot_hello)));
1083 + $qlcd_wp_chatbot_welcome_back = (@$_POST["qlcd_wp_chatbot_welcome_back"]);
1084 + update_option('qlcd_wp_chatbot_welcome_back', maybe_serialize(sanitize_array($qlcd_wp_chatbot_welcome_back)));
1085 + $qlcd_wp_chatbot_asking_name = (@$_POST["qlcd_wp_chatbot_asking_name"]);
1086 + update_option('qlcd_wp_chatbot_asking_name', maybe_serialize(sanitize_array($qlcd_wp_chatbot_asking_name)));
1087 + $qlcd_wp_chatbot_name_greeting = (@$_POST["qlcd_wp_chatbot_name_greeting"]);
1088 + update_option('qlcd_wp_chatbot_name_greeting', maybe_serialize(sanitize_array($qlcd_wp_chatbot_name_greeting)));
1089 + $qlcd_wp_chatbot_i_am = (@$_POST["qlcd_wp_chatbot_i_am"]);
1090 + update_option('qlcd_wp_chatbot_i_am', maybe_serialize(sanitize_array($qlcd_wp_chatbot_i_am)));
1091 + $qlcd_wp_chatbot_is_typing = (@$_POST["qlcd_wp_chatbot_is_typing"]);
1092 + update_option('qlcd_wp_chatbot_is_typing', maybe_serialize(sanitize_array($qlcd_wp_chatbot_is_typing)));
1093 + $qlcd_wp_chatbot_send_a_msg= (@$_POST["qlcd_wp_chatbot_send_a_msg"]);
1094 + update_option('qlcd_wp_chatbot_send_a_msg', maybe_serialize(sanitize_array($qlcd_wp_chatbot_send_a_msg)));
1095 + $qlcd_wp_chatbot_choose_option= (@$_POST["qlcd_wp_chatbot_choose_option"]);
1096 + update_option('qlcd_wp_chatbot_choose_option', maybe_serialize(sanitize_array($qlcd_wp_chatbot_choose_option)));
1097 + $qlcd_wp_chatbot_viewed_products= (@$_POST["qlcd_wp_chatbot_viewed_products"]);
1098 + update_option('qlcd_wp_chatbot_viewed_products', maybe_serialize(sanitize_array($qlcd_wp_chatbot_viewed_products)));
1099 + $qlcd_wp_chatbot_shopping_cart= (@$_POST["qlcd_wp_chatbot_shopping_cart"]);
1100 + update_option('qlcd_wp_chatbot_shopping_cart', maybe_serialize(sanitize_array($qlcd_wp_chatbot_shopping_cart)));
1101 + $qlcd_wp_chatbot_add_to_cart= (@$_POST["qlcd_wp_chatbot_add_to_cart"]);
1102 + update_option('qlcd_wp_chatbot_add_to_cart', maybe_serialize(sanitize_array($qlcd_wp_chatbot_add_to_cart)));
1103 + $qlcd_wp_chatbot_cart_link= @$_POST["qlcd_wp_chatbot_cart_link"];
1104 + update_option('qlcd_wp_chatbot_cart_link', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_link)));
1105 + $qlcd_wp_chatbot_checkout_link= @$_POST["qlcd_wp_chatbot_checkout_link"];
1106 + update_option('qlcd_wp_chatbot_checkout_link', maybe_serialize(sanitize_array($qlcd_wp_chatbot_checkout_link)));
1107 + $qlcd_wp_chatbot_cart_welcome= (@$_POST["qlcd_wp_chatbot_cart_welcome"]);
1108 + update_option('qlcd_wp_chatbot_cart_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_welcome)));
1109 + $qlcd_wp_chatbot_featured_product_welcome= @$_POST["qlcd_wp_chatbot_featured_product_welcome"];
1110 + update_option('qlcd_wp_chatbot_featured_product_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_featured_product_welcome)));
1111 + $qlcd_wp_chatbot_viewed_product_welcome= @$_POST["qlcd_wp_chatbot_viewed_product_welcome"];
1112 + update_option('qlcd_wp_chatbot_viewed_product_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_viewed_product_welcome)));
1113 + $qlcd_wp_chatbot_latest_product_welcome= @$_POST["qlcd_wp_chatbot_latest_product_welcome"];
1114 + update_option('qlcd_wp_chatbot_latest_product_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_latest_product_welcome)));
1115 + $qlcd_wp_chatbot_cart_title= @$_POST["qlcd_wp_chatbot_cart_title"];
1116 + update_option('qlcd_wp_chatbot_cart_title', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_title)));
1117 + $qlcd_wp_chatbot_cart_quantity= @$_POST["qlcd_wp_chatbot_cart_quantity"];
1118 + update_option('qlcd_wp_chatbot_cart_quantity', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_quantity)));
1119 + $qlcd_wp_chatbot_cart_price= @$_POST["qlcd_wp_chatbot_cart_price"];
1120 + update_option('qlcd_wp_chatbot_cart_price', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_price)));
1121 + $qlcd_wp_chatbot_no_cart_items= @$_POST["qlcd_wp_chatbot_no_cart_items"];
1122 + update_option('qlcd_wp_chatbot_no_cart_items', maybe_serialize(sanitize_array($qlcd_wp_chatbot_no_cart_items)));
1123 + $qlcd_wp_chatbot_cart_updating= @$_POST["qlcd_wp_chatbot_cart_updating"];
1124 + update_option('qlcd_wp_chatbot_cart_updating', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_updating)));
1125 + $qlcd_wp_chatbot_cart_removing= @$_POST["qlcd_wp_chatbot_cart_removing"];
1126 + update_option('qlcd_wp_chatbot_cart_removing', maybe_serialize(sanitize_array($qlcd_wp_chatbot_cart_removing)));
1727 1127 //wpwBot wildcard settings
1728 - if (isset($_POST["qlcd_wp_chatbot_wildcard_msg"])) {
1729 - $qlcd_wp_chatbot_wildcard_msg = wp_unslash( $_POST["qlcd_wp_chatbot_wildcard_msg"] );
1730 - $qlcd_wp_chatbot_wildcard_msg = sanitize_array( $qlcd_wp_chatbot_wildcard_msg );
1731 -
1732 - update_option('qlcd_wp_chatbot_wildcard_msg', maybe_serialize($qlcd_wp_chatbot_wildcard_msg));
1733 - } else {
1734 - update_option('qlcd_wp_chatbot_wildcard_msg', maybe_serialize(array()));
1735 - }
1128 + $qlcd_wp_chatbot_wildcard_msg = @$_POST["qlcd_wp_chatbot_wildcard_msg"];
1129 + update_option('qlcd_wp_chatbot_wildcard_msg', maybe_serialize(sanitize_array($qlcd_wp_chatbot_wildcard_msg)));
1736 1130 //empty filter message repeat.
1737 - if (isset($_POST["qlcd_wp_chatbot_empty_filter_msg"])) {
1738 - $qlcd_wp_chatbot_empty_filter_msg = wp_unslash( $_POST["qlcd_wp_chatbot_empty_filter_msg"] );
1739 - $qlcd_wp_chatbot_empty_filter_msg = sanitize_array( $qlcd_wp_chatbot_empty_filter_msg );
1740 -
1741 - update_option('qlcd_wp_chatbot_empty_filter_msg', maybe_serialize($qlcd_wp_chatbot_empty_filter_msg));
1742 - } else {
1743 - update_option('qlcd_wp_chatbot_empty_filter_msg', maybe_serialize(array()));
1744 - }
1131 + $qlcd_wp_chatbot_empty_filter_msg = @$_POST["qlcd_wp_chatbot_empty_filter_msg"];
1132 + update_option('qlcd_wp_chatbot_empty_filter_msg', maybe_serialize(sanitize_array($qlcd_wp_chatbot_empty_filter_msg)));
1745 1133
1746 - if (isset($_POST["qlcd_wp_chatbot_did_you_mean"])) {
1747 - $qlcd_wp_chatbot_did_you_mean = wp_unslash( $_POST["qlcd_wp_chatbot_did_you_mean"] );
1748 - $qlcd_wp_chatbot_did_you_mean = sanitize_array( $qlcd_wp_chatbot_did_you_mean );
1749 - update_option('qlcd_wp_chatbot_did_you_mean', maybe_serialize($qlcd_wp_chatbot_did_you_mean));
1750 - } else {
1751 - update_option('qlcd_wp_chatbot_did_you_mean', maybe_serialize(array()));
1752 - }
1134 + $qlcd_wp_chatbot_did_you_mean = @$_POST["qlcd_wp_chatbot_did_you_mean"];
1135 + update_option('qlcd_wp_chatbot_did_you_mean', maybe_serialize(sanitize_array($qlcd_wp_chatbot_did_you_mean)));
1753 1136 //help welcome and message
1754 - if (isset($_POST["qlcd_wp_chatbot_help_welcome"])) {
1755 - $qlcd_wp_chatbot_help_welcome = wp_unslash( $_POST["qlcd_wp_chatbot_help_welcome"] );
1756 - $qlcd_wp_chatbot_help_welcome = sanitize_array( $qlcd_wp_chatbot_help_welcome );
1757 - update_option('qlcd_wp_chatbot_help_welcome', maybe_serialize($qlcd_wp_chatbot_help_welcome));
1758 - } else {
1759 - update_option('qlcd_wp_chatbot_help_welcome', maybe_serialize(array()));
1760 - }
1761 - if (isset($_POST["qlcd_wp_chatbot_help_msg"])) {
1762 - $qlcd_wp_chatbot_help_msg = wp_unslash( $_POST["qlcd_wp_chatbot_help_msg"] );
1763 - $qlcd_wp_chatbot_help_msg = sanitize_array( $qlcd_wp_chatbot_help_msg );
1764 - update_option('qlcd_wp_chatbot_help_msg', maybe_serialize($qlcd_wp_chatbot_help_msg));
1765 - } else {
1766 - update_option('qlcd_wp_chatbot_help_msg', maybe_serialize(array()));
1767 - }
1137 + $qlcd_wp_chatbot_help_welcome = @$_POST["qlcd_wp_chatbot_help_welcome"];
1138 + update_option('qlcd_wp_chatbot_help_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_help_welcome)));
1139 + $qlcd_wp_chatbot_help_msg = @$_POST["qlcd_wp_chatbot_help_msg"];
1140 + update_option('qlcd_wp_chatbot_help_msg', maybe_serialize(sanitize_array($qlcd_wp_chatbot_help_msg)));
1768 1141 //To clear Conversation history.
1769 - if (isset($_POST["qlcd_wp_chatbot_reset"])) {
1770 - $qlcd_wp_chatbot_reset = wp_unslash( $_POST["qlcd_wp_chatbot_reset"] );
1771 - $qlcd_wp_chatbot_reset = sanitize_array( $qlcd_wp_chatbot_reset );
1772 - update_option('qlcd_wp_chatbot_reset', maybe_serialize($qlcd_wp_chatbot_reset));
1773 - } else {
1774 - update_option('qlcd_wp_chatbot_reset', maybe_serialize(array()));
1775 - }
1142 + $qlcd_wp_chatbot_reset = @$_POST["qlcd_wp_chatbot_reset"];
1143 + update_option('qlcd_wp_chatbot_reset', maybe_serialize(sanitize_array($qlcd_wp_chatbot_reset)));
1776 1144 //systems keyword.
1777 - if (isset($_POST["qlcd_wp_chatbot_sys_key_help"])) {
1778 - $qlcd_wp_chatbot_sys_key_help = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_sys_key_help"]));
1779 - update_option('qlcd_wp_chatbot_sys_key_help', $qlcd_wp_chatbot_sys_key_help);
1780 - } else {
1781 - update_option('qlcd_wp_chatbot_sys_key_help', '');
1782 - }
1783 - if(isset($_POST["qlcd_wp_chatbot_sys_key_product"])){
1784 - $qlcd_wp_chatbot_sys_key_product = esc_html((@wp_unslash($_POST["qlcd_wp_chatbot_sys_key_product"])));
1785 - update_option('qlcd_wp_chatbot_sys_key_product', sanitize_text_field($qlcd_wp_chatbot_sys_key_product));
1786 - }
1787 - if(isset($_POST["qlcd_wp_chatbot_sys_key_catalog"])){
1788 - $qlcd_wp_chatbot_sys_key_catalog = (@wp_unslash($_POST["qlcd_wp_chatbot_sys_key_catalog"]));
1789 - update_option('qlcd_wp_chatbot_sys_key_catalog', sanitize_text_field($qlcd_wp_chatbot_sys_key_catalog));
1790 - }
1791 - if(isset($_POST["qlcd_wp_chatbot_sys_key_order"])){
1792 - $qlcd_wp_chatbot_sys_key_order = (@wp_unslash($_POST["qlcd_wp_chatbot_sys_key_order"]));
1793 - update_option('qlcd_wp_chatbot_sys_key_order', sanitize_text_field($qlcd_wp_chatbot_sys_key_order));
1794 - }
1795 - if (isset($_POST["qlcd_wp_chatbot_sys_key_support"])) {
1796 - $qlcd_wp_chatbot_sys_key_support = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_sys_key_support"]));
1797 - update_option('qlcd_wp_chatbot_sys_key_support', $qlcd_wp_chatbot_sys_key_support);
1798 - } else {
1799 - update_option('qlcd_wp_chatbot_sys_key_support', '');
1800 - }
1801 - if (isset($_POST["qlcd_wp_chatbot_sys_key_reset"])) {
1802 - $qlcd_wp_chatbot_sys_key_reset = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_sys_key_reset"]));
1803 - update_option('qlcd_wp_chatbot_sys_key_reset', $qlcd_wp_chatbot_sys_key_reset);
1804 - } else {
1805 - update_option('qlcd_wp_chatbot_sys_key_reset', '');
1806 - }
1807 - if (isset($_POST["qlcd_wp_chatbot_sys_key_email"])) {
1808 - $qlcd_wp_chatbot_sys_key_email = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_sys_key_email"]));
1809 - update_option('qlcd_wp_chatbot_sys_key_email', $qlcd_wp_chatbot_sys_key_email);
1810 - } else {
1811 - update_option('qlcd_wp_chatbot_sys_key_email', '');
1812 - }
1813 - if(isset($_POST["qlcd_wp_chatbot_wildcard_product"])){
1814 - $qlcd_wp_chatbot_wildcard_product = (@wp_unslash($_POST["qlcd_wp_chatbot_wildcard_product"]));
1815 - update_option('qlcd_wp_chatbot_wildcard_product', maybe_serialize(sanitize_array($qlcd_wp_chatbot_wildcard_product)));
1816 - }
1817 - if(isset($_POST["qlcd_wp_chatbot_wildcard_catalog"])){
1818 - $qlcd_wp_chatbot_wildcard_catalog = (@wp_unslash($_POST["qlcd_wp_chatbot_wildcard_catalog"]));
1819 - update_option('qlcd_wp_chatbot_wildcard_catalog', maybe_serialize(sanitize_array($qlcd_wp_chatbot_wildcard_catalog)));
1820 - }
1821 - if(isset($_POST["qlcd_wp_chatbot_featured_products"])){
1822 - $qlcd_wp_chatbot_featured_products = (@wp_unslash($_POST["qlcd_wp_chatbot_featured_products"]));
1823 - update_option('qlcd_wp_chatbot_featured_products', maybe_serialize(sanitize_array($qlcd_wp_chatbot_featured_products)));
1824 - }
1825 - if(isset($_POST["qlcd_wp_chatbot_sale_products"])){
1826 - $qlcd_wp_chatbot_sale_products = (@wp_unslash($_POST["qlcd_wp_chatbot_sale_products"]));
1827 - update_option('qlcd_wp_chatbot_sale_products', maybe_serialize(sanitize_array($qlcd_wp_chatbot_sale_products)));
1828 - }
1829 -
1830 - if (isset($_POST["qlcd_wp_chatbot_wildcard_support"])) {
1831 - $qlcd_wp_chatbot_wildcard_support = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_wildcard_support"]));
1832 - update_option('qlcd_wp_chatbot_wildcard_support', $qlcd_wp_chatbot_wildcard_support);
1833 - } else {
1834 - update_option('qlcd_wp_chatbot_wildcard_support', '');
1835 - }
1145 + $qlcd_wp_chatbot_sys_key_help = stripslashes(@$_POST["qlcd_wp_chatbot_sys_key_help"]);
1146 + update_option('qlcd_wp_chatbot_sys_key_help', sanitize_text_field($qlcd_wp_chatbot_sys_key_help));
1147 + $qlcd_wp_chatbot_sys_key_product = (@$_POST["qlcd_wp_chatbot_sys_key_product"]);
1148 + update_option('qlcd_wp_chatbot_sys_key_product', sanitize_text_field($qlcd_wp_chatbot_sys_key_product));
1149 + $qlcd_wp_chatbot_sys_key_catalog = (@$_POST["qlcd_wp_chatbot_sys_key_catalog"]);
1150 + update_option('qlcd_wp_chatbot_sys_key_catalog', sanitize_text_field($qlcd_wp_chatbot_sys_key_catalog));
1151 + $qlcd_wp_chatbot_sys_key_order = (@$_POST["qlcd_wp_chatbot_sys_key_order"]);
1152 + update_option('qlcd_wp_chatbot_sys_key_order', sanitize_text_field($qlcd_wp_chatbot_sys_key_order));
1153 + $qlcd_wp_chatbot_sys_key_support = stripslashes(@$_POST["qlcd_wp_chatbot_sys_key_support"]);
1154 + update_option('qlcd_wp_chatbot_sys_key_support', sanitize_text_field($qlcd_wp_chatbot_sys_key_support));
1155 + $qlcd_wp_chatbot_sys_key_reset = stripslashes(@$_POST["qlcd_wp_chatbot_sys_key_reset"]);
1156 + update_option('qlcd_wp_chatbot_sys_key_reset', sanitize_text_field($qlcd_wp_chatbot_sys_key_reset));
1157 + $qlcd_wp_chatbot_sys_key_email = stripslashes( @$_POST["qlcd_wp_chatbot_sys_key_email"]);
1158 + update_option('qlcd_wp_chatbot_sys_key_email', sanitize_text_field($qlcd_wp_chatbot_sys_key_email));
1159 + $qlcd_wp_chatbot_wildcard_product = (@$_POST["qlcd_wp_chatbot_wildcard_product"]);
1160 + update_option('qlcd_wp_chatbot_wildcard_product', maybe_serialize(sanitize_array($qlcd_wp_chatbot_wildcard_product)));
1161 + $qlcd_wp_chatbot_wildcard_catalog = (@$_POST["qlcd_wp_chatbot_wildcard_catalog"]);
1162 + update_option('qlcd_wp_chatbot_wildcard_catalog', maybe_serialize(sanitize_array($qlcd_wp_chatbot_wildcard_catalog)));
1163 + $qlcd_wp_chatbot_featured_products = (@$_POST["qlcd_wp_chatbot_featured_products"]);
1164 + update_option('qlcd_wp_chatbot_featured_products', maybe_serialize(sanitize_array($qlcd_wp_chatbot_featured_products)));
1165 + $qlcd_wp_chatbot_sale_products = (@$_POST["qlcd_wp_chatbot_sale_products"]);
1166 + update_option('qlcd_wp_chatbot_sale_products', maybe_serialize(sanitize_array($qlcd_wp_chatbot_sale_products)));
1167 + $qlcd_wp_chatbot_wildcard_support = stripslashes(@$_POST["qlcd_wp_chatbot_wildcard_support"]);
1168 + update_option('qlcd_wp_chatbot_wildcard_support', sanitize_text_field($qlcd_wp_chatbot_wildcard_support));
1169 + $qlcd_wp_chatbot_messenger_label = (@$_POST["qlcd_wp_chatbot_messenger_label"]);
1836 1170
1837 - if (isset($_POST["qlcd_wp_chatbot_wildcard_site_search"])) {
1838 - $qlcd_wp_chatbot_wildcard_site_search = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_wildcard_site_search"]));
1839 - update_option('qlcd_wp_chatbot_wildcard_site_search', $qlcd_wp_chatbot_wildcard_site_search);
1840 - } else {
1841 - update_option('qlcd_wp_chatbot_wildcard_site_search', '');
1842 - }
1171 + $qlcd_wp_chatbot_wildcard_site_search = stripslashes(@$_POST["qlcd_wp_chatbot_wildcard_site_search"]);
1172 + update_option('qlcd_wp_chatbot_wildcard_site_search', sanitize_text_field($qlcd_wp_chatbot_wildcard_site_search));
1843 1173
1844 - if(isset($_POST["qlcd_wp_chatbot_messenger_label"])){
1845 - $qlcd_wp_chatbot_messenger_label = (@wp_unslash($_POST["qlcd_wp_chatbot_messenger_label"]));
1846 - update_option('qlcd_wp_chatbot_messenger_label', maybe_serialize(sanitize_array($qlcd_wp_chatbot_messenger_label)));
1847 - }
1174 + update_option('qlcd_wp_chatbot_messenger_label', maybe_serialize(sanitize_array($qlcd_wp_chatbot_messenger_label)));
1848 1175 //Products search .
1849 1176 if (isset($_POST["qlcd_wp_chatbot_product_success"])) {
1850 - // Unslash the input first, then sanitize deeply as text, assuming it's an array of texts or a single text.
1851 - $unslashed_data = wp_unslash($_POST["qlcd_wp_chatbot_product_success"]);
1852 - $qlcd_wp_chatbot_product_success = map_deep($unslashed_data, 'sanitize_text_field');
1853 - update_option('qlcd_wp_chatbot_product_success', maybe_serialize($qlcd_wp_chatbot_product_success));
1177 + $qlcd_wp_chatbot_product_success = stripslashes(@$_POST["qlcd_wp_chatbot_product_success"]);
1178 + update_option('qlcd_wp_chatbot_product_success', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_success)));
1854 1179 }
1855 1180 if (isset($_POST["qlcd_wp_chatbot_product_fail"])) {
1856 - $qlcd_wp_chatbot_product_fail = @wp_unslash($_POST["qlcd_wp_chatbot_product_fail"]);
1181 + $qlcd_wp_chatbot_product_fail = @$_POST["qlcd_wp_chatbot_product_fail"];
1857 1182 update_option('qlcd_wp_chatbot_product_fail', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_fail)));
1858 1183 }
1859 - if(isset($_POST["qlcd_wp_chatbot_product_asking"])){
1860 - $qlcd_wp_chatbot_product_asking = @wp_unslash($_POST["qlcd_wp_chatbot_product_asking"]);
1861 - update_option('qlcd_wp_chatbot_product_asking', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_asking)));
1862 - }
1863 - if(isset($_POST["qlcd_wp_chatbot_product_suggest"])){
1864 - $qlcd_wp_chatbot_product_suggest = @wp_unslash($_POST["qlcd_wp_chatbot_product_suggest"]);
1865 - update_option('qlcd_wp_chatbot_product_suggest', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_suggest)));
1866 - }
1867 - if(isset($_POST["qlcd_wp_chatbot_product_infinite"])){
1868 - $qlcd_wp_chatbot_product_infinite = @wp_unslash($_POST["qlcd_wp_chatbot_product_infinite"]);
1869 - update_option('qlcd_wp_chatbot_product_infinite', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_infinite)));
1870 - }
1871 - if(isset($_POST["qlcd_wp_chatbot_load_more"])){
1872 - $qlcd_wp_chatbot_load_more = @wp_unslash($_POST["qlcd_wp_chatbot_load_more"]);
1873 - update_option('qlcd_wp_chatbot_load_more', maybe_serialize(sanitize_array($qlcd_wp_chatbot_load_more)));
1874 - }
1184 + $qlcd_wp_chatbot_product_asking = @$_POST["qlcd_wp_chatbot_product_asking"];
1185 + update_option('qlcd_wp_chatbot_product_asking', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_asking)));
1186 + $qlcd_wp_chatbot_product_suggest = @$_POST["qlcd_wp_chatbot_product_suggest"];
1187 + update_option('qlcd_wp_chatbot_product_suggest', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_suggest)));
1188 + $qlcd_wp_chatbot_product_infinite = @$_POST["qlcd_wp_chatbot_product_infinite"];
1189 + update_option('qlcd_wp_chatbot_product_infinite', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_infinite)));
1190 + $qlcd_wp_chatbot_load_more = @$_POST["qlcd_wp_chatbot_load_more"];
1191 + update_option('qlcd_wp_chatbot_load_more', maybe_serialize(sanitize_array($qlcd_wp_chatbot_load_more)));
1875 1192 //Order
1876 - if(isset($_POST["qlcd_wp_chatbot_wildcard_order"])){
1877 - $qlcd_wp_chatbot_wildcard_order = @wp_unslash($_POST["qlcd_wp_chatbot_wildcard_order"]);
1878 - update_option('qlcd_wp_chatbot_wildcard_order', maybe_serialize(sanitize_array($qlcd_wp_chatbot_wildcard_order)));
1879 - }
1880 - if(isset($_POST["qlcd_wp_chatbot_order_welcome"])){
1881 - $qlcd_wp_chatbot_order_welcome = @wp_unslash($_POST["qlcd_wp_chatbot_order_welcome"]);
1882 - update_option('qlcd_wp_chatbot_order_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_welcome)));
1883 - }
1884 - if(isset($_POST["qlcd_wp_chatbot_order_username_asking"])){
1885 - $qlcd_wp_chatbot_order_username_asking = @wp_unslash($_POST["qlcd_wp_chatbot_order_username_asking"]);
1886 - update_option('qlcd_wp_chatbot_order_username_asking', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_username_asking)));
1887 - }
1888 - if(isset($_POST["qlcd_wp_chatbot_order_username_not_exist"])){
1889 - $qlcd_wp_chatbot_order_username_not_exist = @wp_unslash($_POST["qlcd_wp_chatbot_order_username_not_exist"]);
1890 - update_option('qlcd_wp_chatbot_order_username_not_exist', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_username_not_exist)));
1891 - }
1892 - if (isset($_POST["qlcd_wp_chatbot_order_username_thanks"])) {
1893 - // Unslash the input first, then sanitize deeply as text, assuming it's an array of texts or a single text.
1894 - $unslashed_data = wp_unslash($_POST["qlcd_wp_chatbot_order_username_thanks"]);
1895 - $qlcd_wp_chatbot_order_username_thanks = map_deep($unslashed_data, 'sanitize_text_field');
1896 - update_option('qlcd_wp_chatbot_order_username_thanks', maybe_serialize($qlcd_wp_chatbot_order_username_thanks));
1897 - }
1898 - if(isset($_POST["qlcd_wp_chatbot_order_username_password"])){
1899 - $qlcd_wp_chatbot_order_username_password = @wp_unslash($_POST["qlcd_wp_chatbot_order_username_password"]);
1900 - update_option('qlcd_wp_chatbot_order_username_password', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_username_password)));
1901 - }
1902 - if(isset($_POST["qlcd_wp_chatbot_order_password_incorrect"])){
1903 - $qlcd_wp_chatbot_order_password_incorrect= @wp_unslash($_POST["qlcd_wp_chatbot_order_password_incorrect"]);
1904 - update_option('qlcd_wp_chatbot_order_password_incorrect', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_password_incorrect)));
1905 - }
1906 - if(isset($_POST["qlcd_wp_chatbot_order_not_found"])){
1907 - $qlcd_wp_chatbot_order_not_found= @wp_unslash($_POST["qlcd_wp_chatbot_order_not_found"]);
1908 - update_option('qlcd_wp_chatbot_order_not_found', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_not_found)));
1909 - }
1910 - if(isset($_POST["qlcd_wp_chatbot_order_found"])){
1911 - $qlcd_wp_chatbot_order_found= @wp_unslash($_POST["qlcd_wp_chatbot_order_found"]);
1912 - update_option('qlcd_wp_chatbot_order_found', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_found)));
1913 - }
1914 - if(isset( $_POST["qlcd_wp_chatbot_order_email_support"])){
1915 - $qlcd_wp_chatbot_order_email_support= @wp_unslash($_POST["qlcd_wp_chatbot_order_email_support"]);
1916 - update_option('qlcd_wp_chatbot_order_email_support', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_email_support)));
1917 - }
1193 + $qlcd_wp_chatbot_wildcard_order = @$_POST["qlcd_wp_chatbot_wildcard_order"];
1194 + update_option('qlcd_wp_chatbot_wildcard_order', maybe_serialize(sanitize_array($qlcd_wp_chatbot_wildcard_order)));
1195 + $qlcd_wp_chatbot_order_welcome = @$_POST["qlcd_wp_chatbot_order_welcome"];
1196 + update_option('qlcd_wp_chatbot_order_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_welcome)));
1197 + $qlcd_wp_chatbot_order_username_asking = @$_POST["qlcd_wp_chatbot_order_username_asking"];
1198 + update_option('qlcd_wp_chatbot_order_username_asking', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_username_asking)));
1199 + $qlcd_wp_chatbot_order_username_not_exist = @$_POST["qlcd_wp_chatbot_order_username_not_exist"];
1200 + update_option('qlcd_wp_chatbot_order_username_not_exist', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_username_not_exist)));
1201 + $qlcd_wp_chatbot_order_username_thanks = @$_POST["qlcd_wp_chatbot_order_username_thanks"];
1202 + update_option('qlcd_wp_chatbot_order_username_thanks', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_username_thanks)));
1203 + $qlcd_wp_chatbot_order_username_password = @$_POST["qlcd_wp_chatbot_order_username_password"];
1204 + update_option('qlcd_wp_chatbot_order_username_password', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_username_password)));
1205 + $qlcd_wp_chatbot_order_password_incorrect= @$_POST["qlcd_wp_chatbot_order_password_incorrect"];
1206 + update_option('qlcd_wp_chatbot_order_password_incorrect', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_password_incorrect)));
1207 + $qlcd_wp_chatbot_order_not_found= @$_POST["qlcd_wp_chatbot_order_not_found"];
1208 + update_option('qlcd_wp_chatbot_order_not_found', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_not_found)));
1209 + $qlcd_wp_chatbot_order_found= @$_POST["qlcd_wp_chatbot_order_found"];
1210 + update_option('qlcd_wp_chatbot_order_found', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_found)));
1211 + $qlcd_wp_chatbot_order_email_support= @$_POST["qlcd_wp_chatbot_order_email_support"];
1212 + update_option('qlcd_wp_chatbot_order_email_support', maybe_serialize(sanitize_array($qlcd_wp_chatbot_order_email_support)));
1918 1213 //Support
1919 - if (isset($_POST["qlcd_wp_chatbot_support_welcome"])) {
1920 - $qlcd_wp_chatbot_support_welcome = wp_unslash($_POST["qlcd_wp_chatbot_support_welcome"]);
1921 - $qlcd_wp_chatbot_support_welcome = sanitize_array($qlcd_wp_chatbot_support_welcome);
1922 - update_option('qlcd_wp_chatbot_support_welcome', maybe_serialize($qlcd_wp_chatbot_support_welcome));
1923 - }
1924 - if (isset($_POST["qlcd_wp_chatbot_support_email"])) {
1925 - $qlcd_wp_chatbot_support_email = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_support_email"]));
1926 - update_option('qlcd_wp_chatbot_support_email', $qlcd_wp_chatbot_support_email);
1927 - }
1928 - if (isset($_POST["qlcd_wp_chatbot_asking_email"])) {
1929 - $qlcd_wp_chatbot_asking_email = wp_unslash($_POST["qlcd_wp_chatbot_asking_email"]);
1930 - $qlcd_wp_chatbot_asking_email = sanitize_array($qlcd_wp_chatbot_asking_email);
1931 - update_option('qlcd_wp_chatbot_asking_email', maybe_serialize($qlcd_wp_chatbot_asking_email));
1932 - }
1933 - if (isset($_POST["qlcd_wp_chatbot_asking_msg"])) {
1934 - $qlcd_wp_chatbot_asking_msg = wp_unslash($_POST["qlcd_wp_chatbot_asking_msg"]);
1935 - $qlcd_wp_chatbot_asking_msg = sanitize_array($qlcd_wp_chatbot_asking_msg);
1936 - update_option('qlcd_wp_chatbot_asking_msg', maybe_serialize($qlcd_wp_chatbot_asking_msg));
1937 - }
1214 + $qlcd_wp_chatbot_support_welcome = @$_POST["qlcd_wp_chatbot_support_welcome"];
1215 + update_option('qlcd_wp_chatbot_support_welcome', maybe_serialize(sanitize_array($qlcd_wp_chatbot_support_welcome)));
1216 + $qlcd_wp_chatbot_support_email = @$_POST["qlcd_wp_chatbot_support_email"];
1217 + update_option('qlcd_wp_chatbot_support_email', sanitize_text_field($qlcd_wp_chatbot_support_email));
1218 + $qlcd_wp_chatbot_asking_email = @$_POST["qlcd_wp_chatbot_asking_email"];
1219 + update_option('qlcd_wp_chatbot_asking_email', maybe_serialize(sanitize_array($qlcd_wp_chatbot_asking_email)));
1220 + $qlcd_wp_chatbot_asking_msg = @$_POST["qlcd_wp_chatbot_asking_msg"];
1221 + update_option('qlcd_wp_chatbot_asking_msg', maybe_serialize(sanitize_array($qlcd_wp_chatbot_asking_msg)));
1938 1222
1939 - if(isset($_POST["qlcd_wp_chatbot_no_result"])){
1940 - $qlcd_wp_chatbot_no_result = @wp_unslash($_POST["qlcd_wp_chatbot_no_result"]);
1941 - update_option('qlcd_wp_chatbot_no_result', maybe_serialize(sanitize_array($qlcd_wp_chatbot_no_result)));
1942 - }
1223 + $qlcd_wp_chatbot_no_result = @$_POST["qlcd_wp_chatbot_no_result"];
1224 + update_option('qlcd_wp_chatbot_no_result', maybe_serialize(sanitize_array($qlcd_wp_chatbot_no_result)));
1943 1225
1944 - if (isset($_POST["qlcd_wp_chatbot_support_option_again"])) {
1945 - $qlcd_wp_chatbot_support_option_again = wp_unslash($_POST["qlcd_wp_chatbot_support_option_again"]);
1946 - update_option('qlcd_wp_chatbot_support_option_again', maybe_serialize(sanitize_array($qlcd_wp_chatbot_support_option_again)));
1947 - } else {
1948 - update_option('qlcd_wp_chatbot_support_option_again', maybe_serialize(array()));
1949 - }
1950 -
1951 - if (isset($_POST["qlcd_wp_chatbot_invalid_email"])) {
1952 - $qlcd_wp_chatbot_invalid_email = wp_unslash($_POST["qlcd_wp_chatbot_invalid_email"]);
1953 - update_option('qlcd_wp_chatbot_invalid_email', maybe_serialize(sanitize_array($qlcd_wp_chatbot_invalid_email)));
1954 - } else {
1955 - update_option('qlcd_wp_chatbot_invalid_email', maybe_serialize(array()));
1956 - }
1957 -
1958 - if (isset($_POST["qlcd_wp_chatbot_support_phone"])) {
1959 - $qlcd_wp_chatbot_support_phone = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_support_phone"]));
1960 - update_option('qlcd_wp_chatbot_support_phone', $qlcd_wp_chatbot_support_phone);
1961 - } else {
1962 - update_option('qlcd_wp_chatbot_support_phone', '');
1963 - }
1226 + $qlcd_wp_chatbot_support_option_again = @$_POST["qlcd_wp_chatbot_support_option_again"];
1227 + update_option('qlcd_wp_chatbot_support_option_again', maybe_serialize(sanitize_array($qlcd_wp_chatbot_support_option_again)));
1228 + $qlcd_wp_chatbot_invalid_email = @$_POST["qlcd_wp_chatbot_invalid_email"];
1229 + update_option('qlcd_wp_chatbot_invalid_email', maybe_serialize(sanitize_array($qlcd_wp_chatbot_invalid_email)));
1230 + $qlcd_wp_chatbot_support_phone= @$_POST["qlcd_wp_chatbot_support_phone"];
1964 1231
1965 - if (isset($_POST["qlcd_wp_chatbot_asking_phone"])) {
1966 - $qlcd_wp_chatbot_asking_phone = wp_unslash($_POST["qlcd_wp_chatbot_asking_phone"]);
1967 - update_option('qlcd_wp_chatbot_asking_phone', maybe_serialize(sanitize_array($qlcd_wp_chatbot_asking_phone)));
1968 - } else {
1969 - update_option('qlcd_wp_chatbot_asking_phone', maybe_serialize(array()));
1970 - }
1971 -
1972 - if (isset($_POST["qlcd_wp_chatbot_thank_for_phone"])) {
1973 - $qlcd_wp_chatbot_thank_for_phone = wp_unslash($_POST["qlcd_wp_chatbot_thank_for_phone"]);
1974 - update_option('qlcd_wp_chatbot_thank_for_phone', maybe_serialize(sanitize_array($qlcd_wp_chatbot_thank_for_phone)));
1975 - } else {
1976 - update_option('qlcd_wp_chatbot_thank_for_phone', maybe_serialize(array()));
1977 - }
1978 -
1979 - if (isset($_POST["qlcd_wp_chatbot_admin_email"])) {
1980 - $qlcd_wp_chatbot_admin_email = sanitize_email(wp_unslash($_POST["qlcd_wp_chatbot_admin_email"]));
1981 - } else {
1982 - $qlcd_wp_chatbot_admin_email = '';
1983 - }
1232 + update_option('qlcd_wp_chatbot_support_phone', sanitize_text_field($qlcd_wp_chatbot_support_phone));
1233 + $qlcd_wp_chatbot_asking_phone= @$_POST["qlcd_wp_chatbot_asking_phone"];
1234 + update_option('qlcd_wp_chatbot_asking_phone', maybe_serialize(sanitize_array($qlcd_wp_chatbot_asking_phone)));
1235 + $qlcd_wp_chatbot_thank_for_phone= @$_POST["qlcd_wp_chatbot_thank_for_phone"];
1236 + update_option('qlcd_wp_chatbot_thank_for_phone', maybe_serialize(sanitize_array($qlcd_wp_chatbot_thank_for_phone)));
1237 + $qlcd_wp_chatbot_admin_email = sanitize_email(@$_POST["qlcd_wp_chatbot_admin_email"]);
1984 1238
1985 1239 update_option('qlcd_wp_chatbot_admin_email', $qlcd_wp_chatbot_admin_email);
1986 1240
1987 - // Sanitize early for qlcd_wp_chatbot_email_sub
1988 - $qlcd_wp_chatbot_email_sub = '';
1989 - if (isset($_POST["qlcd_wp_chatbot_email_sub"])) {
1990 - $qlcd_wp_chatbot_email_sub = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_email_sub"]));
1991 - }
1241 + $qlcd_wp_chatbot_email_sub = sanitize_email(@$_POST["qlcd_wp_chatbot_email_sub"]);
1992 1242 update_option('qlcd_wp_chatbot_email_sub', $qlcd_wp_chatbot_email_sub);
1993 1243
1994 - // Sanitize early for qlcd_wp_site_search, only update if set
1995 - if (isset($_POST["qlcd_wp_site_search"])) {
1996 - $qlcd_wp_site_search = sanitize_text_field(wp_unslash($_POST["qlcd_wp_site_search"]));
1997 - update_option('qlcd_wp_site_search', $qlcd_wp_site_search);
1998 - }
1244 + $qlcd_wp_site_search = @$_POST["qlcd_wp_site_search"];
1245 + update_option('qlcd_wp_site_search', sanitize_text_field($qlcd_wp_site_search));
1999 1246
2000 - // Sanitize early for qlcd_wp_chatbot_email_sent
2001 - $qlcd_wp_chatbot_email_sent = '';
2002 - if (isset($_POST["qlcd_wp_chatbot_email_sent"])) {
2003 - $qlcd_wp_chatbot_email_sent = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_email_sent"]));
2004 - }
2005 - update_option('qlcd_wp_chatbot_email_sent', $qlcd_wp_chatbot_email_sent);
2006 -
2007 - // Sanitize early for qlcd_wp_chatbot_email_fail
2008 - $qlcd_wp_chatbot_email_fail = '';
2009 - if (isset($_POST["qlcd_wp_chatbot_email_fail"])) {
2010 - $qlcd_wp_chatbot_email_fail = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_email_fail"]));
2011 - }
2012 - update_option('qlcd_wp_chatbot_email_fail', $qlcd_wp_chatbot_email_fail);
2013 -
2014 - // Sanitize early for qlcd_wp_chatbot_relevant_post_link_openai
2015 - $qlcd_wp_chatbot_relevant_post_link_openai = '';
2016 - if (isset($_POST["qlcd_wp_chatbot_relevant_post_link_openai"])) {
2017 - $qlcd_wp_chatbot_relevant_post_link_openai = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_relevant_post_link_openai"]));
2018 - }
2019 - update_option('qlcd_wp_chatbot_relevant_post_link_openai', $qlcd_wp_chatbot_relevant_post_link_openai);
1247 + $qlcd_wp_chatbot_email_sent = @$_POST["qlcd_wp_chatbot_email_sent"];
1248 + update_option('qlcd_wp_chatbot_email_sent', stripslashes(sanitize_text_field($qlcd_wp_chatbot_email_sent)));
1249 + $qlcd_wp_chatbot_email_fail = @$_POST["qlcd_wp_chatbot_email_fail"];
1250 + update_option('qlcd_wp_chatbot_email_fail', stripslashes(sanitize_text_field($qlcd_wp_chatbot_email_fail)));
2020 1251 //Notifications messages building.
2021 - if (isset($_POST["qlcd_wp_chatbot_notification_interval"])) {
2022 - $qlcd_wp_chatbot_notification_interval = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_notification_interval"]));
2023 - update_option('qlcd_wp_chatbot_notification_interval', $qlcd_wp_chatbot_notification_interval);
2024 - }
2025 -
2026 - if(isset($_POST["qlcd_wp_chatbot_notifications"])){
2027 - $qlcd_wp_chatbot_notifications = @wp_unslash($_POST["qlcd_wp_chatbot_notifications"]);
2028 - update_option('qlcd_wp_chatbot_notifications', maybe_serialize(sanitize_array($qlcd_wp_chatbot_notifications)));
2029 - }
1252 + $qlcd_wp_chatbot_notification_interval = @$_POST["qlcd_wp_chatbot_notification_interval"];
1253 + update_option('qlcd_wp_chatbot_notification_interval', stripslashes(sanitize_text_field($qlcd_wp_chatbot_notification_interval)));
1254 + $qlcd_wp_chatbot_notifications = @$_POST["qlcd_wp_chatbot_notifications"];
1255 + update_option('qlcd_wp_chatbot_notifications', maybe_serialize(sanitize_array($qlcd_wp_chatbot_notifications)));
2030 1256 //Support building part.
2031 1257
2032 1258 $allowed_html = array(
2033 1259 'a' => array(
@@ -2037,410 +1263,310 @@
2037 1263 'br' => array(),
2038 1264 'em' => array(),
2039 1265 'strong' => array(),
2040 1266 );
2041 - $support_query = @wp_unslash($_POST["support_query"]);
1267 + $support_query = @$_POST["support_query"];
2042 1268 $clean_support_query = [];
2043 - if(!empty($support_query)){
2044 - foreach($support_query as $key => $val) {
2045 -
2046 - $clean_support_query[wp_kses($key,$allowed_html)] = wp_kses($val,$allowed_html);
2047 - }
1269 + foreach($support_query as $key => $val) {
1270 +
1271 + $clean_support_query[wp_kses($key,$allowed_html)] = wp_kses($val,$allowed_html);
2048 1272 }
2049 1273 update_option('support_query', (maybe_serialize($clean_support_query)));
2050 - $support_ans = @wp_unslash($_POST["support_ans"]);
1274 + $support_ans = @$_POST["support_ans"];
2051 1275 $clean_support_ans = [];
2052 - if(!empty($support_query)){
2053 - foreach($support_ans as $key => $val) {
2054 - $clean_support_ans[wp_kses($key,$allowed_html)] = wp_kses($val,$allowed_html);
2055 - }
1276 + foreach($support_ans as $key => $val) {
1277 + $clean_support_ans[wp_kses($key,$allowed_html)] = wp_kses($val,$allowed_html);
2056 1278 }
2057 1279 update_option('support_ans', (maybe_serialize($clean_support_ans)));
2058 1280 //Create Mobile app pages.
2059 1281 if(isset( $_POST["wp_chatbot_app_pages"])) {
2060 - $wp_chatbot_app_pages = wp_unslash($_POST["wp_chatbot_app_pages"]);
1282 + $wp_chatbot_app_pages = $_POST["wp_chatbot_app_pages"];
2061 1283 }else{ $wp_chatbot_app_pages='';}
2062 1284 update_option('wp_chatbot_app_pages', wp_unslash($wp_chatbot_app_pages));
2063 1285 //Messenger Options
2064 1286 if(isset( $_POST["enable_wp_chatbot_messenger"])) {
2065 - $enable_wp_chatbot_messenger = wp_unslash($_POST["enable_wp_chatbot_messenger"]);
1287 + $enable_wp_chatbot_messenger = $_POST["enable_wp_chatbot_messenger"];
2066 1288 }else{ $enable_wp_chatbot_messenger='';}
2067 1289 update_option('enable_wp_chatbot_messenger', wp_unslash($enable_wp_chatbot_messenger));
2068 1290 if(isset( $_POST["enable_wp_chatbot_messenger_floating_icon"])) {
2069 - $enable_wp_chatbot_messenger_floating_icon = wp_unslash($_POST["enable_wp_chatbot_messenger_floating_icon"]);
1291 + $enable_wp_chatbot_messenger_floating_icon = $_POST["enable_wp_chatbot_messenger_floating_icon"];
2070 1292 }else{ $enable_wp_chatbot_messenger_floating_icon='';}
2071 1293 update_option('enable_wp_chatbot_messenger_floating_icon', wp_unslash($enable_wp_chatbot_messenger_floating_icon));
2072 - if(isset($_POST["qlcd_wp_chatbot_fb_app_id"])){
2073 - $qlcd_wp_chatbot_fb_app_id = @wp_unslash($_POST["qlcd_wp_chatbot_fb_app_id"]);
2074 - update_option('qlcd_wp_chatbot_fb_app_id', sanitize_text_field($qlcd_wp_chatbot_fb_app_id));
2075 - }
2076 - if(isset($_POST["qlcd_wp_chatbot_fb_page_id"])){
2077 - $qlcd_wp_chatbot_fb_page_id = @wp_unslash($_POST["qlcd_wp_chatbot_fb_page_id"]);
2078 - update_option('qlcd_wp_chatbot_fb_page_id', sanitize_text_field($qlcd_wp_chatbot_fb_page_id));
2079 - }
2080 - if(isset($_POST["qlcd_wp_chatbot_fb_color"])){
2081 - $qlcd_wp_chatbot_fb_color= @wp_unslash($_POST["qlcd_wp_chatbot_fb_color"]);
2082 - update_option('qlcd_wp_chatbot_fb_color', wp_unslash($qlcd_wp_chatbot_fb_color));
2083 - }
2084 - if(isset($_POST["qlcd_wp_chatbot_fb_in_msg"])){
2085 - $qlcd_wp_chatbot_fb_in_msg = @wp_unslash($_POST["qlcd_wp_chatbot_fb_in_msg"]);
2086 - update_option('qlcd_wp_chatbot_fb_in_msg', stripslashes(sanitize_text_field($qlcd_wp_chatbot_fb_in_msg)));
2087 - }
2088 - if(isset($_POST["qlcd_wp_chatbot_fb_out_msg"])){
2089 - $qlcd_wp_chatbot_fb_out_msg = @wp_unslash($_POST["qlcd_wp_chatbot_fb_out_msg"]);
2090 - update_option('qlcd_wp_chatbot_fb_out_msg', stripslashes(sanitize_text_field($qlcd_wp_chatbot_fb_out_msg)));
2091 - }
1294 + $qlcd_wp_chatbot_fb_app_id = @$_POST["qlcd_wp_chatbot_fb_app_id"];
1295 + update_option('qlcd_wp_chatbot_fb_app_id', sanitize_text_field($qlcd_wp_chatbot_fb_app_id));
1296 + $qlcd_wp_chatbot_fb_page_id = @$_POST["qlcd_wp_chatbot_fb_page_id"];
1297 + update_option('qlcd_wp_chatbot_fb_page_id', sanitize_text_field($qlcd_wp_chatbot_fb_page_id));
1298 + $qlcd_wp_chatbot_fb_color= @$_POST["qlcd_wp_chatbot_fb_color"];
1299 + update_option('qlcd_wp_chatbot_fb_color', wp_unslash($qlcd_wp_chatbot_fb_color));
1300 + $qlcd_wp_chatbot_fb_in_msg = @$_POST["qlcd_wp_chatbot_fb_in_msg"];
1301 + update_option('qlcd_wp_chatbot_fb_in_msg', stripslashes(sanitize_text_field($qlcd_wp_chatbot_fb_in_msg)));
1302 + $qlcd_wp_chatbot_fb_out_msg = @$_POST["qlcd_wp_chatbot_fb_out_msg"];
1303 + update_option('qlcd_wp_chatbot_fb_out_msg', stripslashes(sanitize_text_field($qlcd_wp_chatbot_fb_out_msg)));
2092 1304 //Skype option
2093 1305 if(isset( $_POST["enable_wp_chatbot_skype_floating_icon"])) {
2094 - $enable_wp_chatbot_skype_floating_icon = wp_unslash($_POST["enable_wp_chatbot_skype_floating_icon"]);
1306 + $enable_wp_chatbot_skype_floating_icon = $_POST["enable_wp_chatbot_skype_floating_icon"];
2095 1307 }else{ $enable_wp_chatbot_skype_floating_icon='';}
2096 1308 update_option('enable_wp_chatbot_skype_floating_icon', sanitize_text_field($enable_wp_chatbot_skype_floating_icon));
2097 1309 if(isset( $_POST["enable_wp_chatbot_skype_id"])) {
2098 - $enable_wp_chatbot_skype_id = wp_unslash($_POST["enable_wp_chatbot_skype_id"]);
1310 + $enable_wp_chatbot_skype_id = $_POST["enable_wp_chatbot_skype_id"];
2099 1311 }else{ $enable_wp_chatbot_skype_id='';}
2100 1312 update_option('enable_wp_chatbot_skype_id', sanitize_text_field($enable_wp_chatbot_skype_id));
2101 1313 //WhatsApp
2102 1314 if(isset( $_POST["enable_wp_chatbot_whats"])) {
2103 - $enable_wp_chatbot_whats= wp_unslash($_POST["enable_wp_chatbot_whats"]);
1315 + $enable_wp_chatbot_whats= $_POST["enable_wp_chatbot_whats"];
2104 1316 }else{ $enable_wp_chatbot_whats='';}
2105 1317 update_option('enable_wp_chatbot_whats', sanitize_text_field($enable_wp_chatbot_whats));
2106 - if(isset($_POST["qlcd_wp_chatbot_whats_label"])){
2107 - $qlcd_wp_chatbot_whats_label = @wp_unslash($_POST["qlcd_wp_chatbot_whats_label"]);
2108 - update_option('qlcd_wp_chatbot_whats_label', maybe_serialize(sanitize_array($qlcd_wp_chatbot_whats_label)));
2109 - }
1318 + $qlcd_wp_chatbot_whats_label = @$_POST["qlcd_wp_chatbot_whats_label"];
1319 + update_option('qlcd_wp_chatbot_whats_label', maybe_serialize(sanitize_array($qlcd_wp_chatbot_whats_label)));
2110 1320 if(isset( $_POST["enable_wp_chatbot_floating_whats"])) {
2111 - $enable_wp_chatbot_floating_whats= wp_unslash($_POST["enable_wp_chatbot_floating_whats"]);
1321 + $enable_wp_chatbot_floating_whats= $_POST["enable_wp_chatbot_floating_whats"];
2112 1322 }else{ $enable_wp_chatbot_floating_whats='';}
2113 1323 update_option('enable_wp_chatbot_floating_whats', sanitize_text_field($enable_wp_chatbot_floating_whats));
2114 - if(isset($_POST["qlcd_wp_chatbot_whats_num"])){
2115 - $qlcd_wp_chatbot_whats_num = @wp_unslash($_POST["qlcd_wp_chatbot_whats_num"]);
2116 - update_option('qlcd_wp_chatbot_whats_num', sanitize_text_field($qlcd_wp_chatbot_whats_num));
2117 - }
1324 + $qlcd_wp_chatbot_whats_num = @$_POST["qlcd_wp_chatbot_whats_num"];
1325 + update_option('qlcd_wp_chatbot_whats_num', sanitize_text_field($qlcd_wp_chatbot_whats_num));
2118 1326 //Viber
2119 1327 if(isset( $_POST["enable_wp_chatbot_floating_viber"])) {
2120 - $enable_wp_chatbot_floating_viber = wp_unslash($_POST["enable_wp_chatbot_floating_viber"]);
1328 + $enable_wp_chatbot_floating_viber = $_POST["enable_wp_chatbot_floating_viber"];
2121 1329 }else{ $enable_wp_chatbot_floating_viber='';}
2122 1330 update_option('enable_wp_chatbot_floating_viber', sanitize_text_field($enable_wp_chatbot_floating_viber));
2123 - if(isset($_POST["qlcd_wp_chatbot_viber_acc"])){
2124 - $qlcd_wp_chatbot_viber_acc = @wp_unslash($_POST["qlcd_wp_chatbot_viber_acc"]);
2125 - update_option('qlcd_wp_chatbot_viber_acc', sanitize_text_field($qlcd_wp_chatbot_viber_acc));
2126 - }
1331 + $qlcd_wp_chatbot_viber_acc = @$_POST["qlcd_wp_chatbot_viber_acc"];
1332 + update_option('qlcd_wp_chatbot_viber_acc', sanitize_text_field($qlcd_wp_chatbot_viber_acc));
2127 1333 //Others integration
2128 1334 if(isset( $_POST["enable_wp_chatbot_floating_phone"])) {
2129 - $enable_wp_chatbot_floating_phone = wp_unslash($_POST["enable_wp_chatbot_floating_phone"]);
1335 + $enable_wp_chatbot_floating_phone = $_POST["enable_wp_chatbot_floating_phone"];
2130 1336 }else{ $enable_wp_chatbot_floating_phone='';}
2131 1337 update_option('enable_wp_chatbot_floating_phone', sanitize_text_field($enable_wp_chatbot_floating_phone));
2132 - if(isset($_POST["qlcd_wp_chatbot_phone"])){
2133 - $qlcd_wp_chatbot_phone = @wp_unslash($_POST["qlcd_wp_chatbot_phone"]);
2134 - update_option('qlcd_wp_chatbot_phone', sanitize_text_field($qlcd_wp_chatbot_phone));
2135 - }
1338 + $qlcd_wp_chatbot_phone = @$_POST["qlcd_wp_chatbot_phone"];
1339 + update_option('qlcd_wp_chatbot_phone', sanitize_text_field($qlcd_wp_chatbot_phone));
2136 1340
2137 1341 if(isset( $_POST["enable_wp_chatbot_floating_link"])) {
2138 - $enable_wp_chatbot_floating_link = wp_unslash($_POST["enable_wp_chatbot_floating_link"]);
1342 + $enable_wp_chatbot_floating_link = $_POST["enable_wp_chatbot_floating_link"];
2139 1343 }else{ $enable_wp_chatbot_floating_link='';}
2140 1344 update_option('enable_wp_chatbot_floating_link', sanitize_text_field($enable_wp_chatbot_floating_link));
2141 - if(isset($_POST["qlcd_wp_chatbot_weblink"])){
2142 - $qlcd_wp_chatbot_weblink = @wp_unslash($_POST["qlcd_wp_chatbot_weblink"]);
2143 - update_option('qlcd_wp_chatbot_weblink', sanitize_text_field($qlcd_wp_chatbot_weblink));
2144 - }
1345 + $qlcd_wp_chatbot_weblink = @$_POST["qlcd_wp_chatbot_weblink"];
1346 + update_option('qlcd_wp_chatbot_weblink', sanitize_text_field($qlcd_wp_chatbot_weblink));
2145 1347
2146 1348 //Re Targetting.
2147 - if(isset($_POST["qlcd_wp_chatbot_ret_greet"])){
2148 - $qlcd_wp_chatbot_ret_greet = @wp_unslash($_POST["qlcd_wp_chatbot_ret_greet"]);
2149 - update_option('qlcd_wp_chatbot_ret_greet', sanitize_text_field($qlcd_wp_chatbot_ret_greet));
2150 - }
1349 + $qlcd_wp_chatbot_ret_greet = @$_POST["qlcd_wp_chatbot_ret_greet"];
1350 + update_option('qlcd_wp_chatbot_ret_greet', sanitize_text_field($qlcd_wp_chatbot_ret_greet));
2151 1351
2152 1352 if(isset( $_POST["enable_wp_chatbot_exit_intent"])) {
2153 - $enable_wp_chatbot_exit_intent = wp_unslash($_POST["enable_wp_chatbot_exit_intent"]);
1353 + $enable_wp_chatbot_exit_intent = $_POST["enable_wp_chatbot_exit_intent"];
2154 1354 }else{ $enable_wp_chatbot_exit_intent='';}
2155 1355 update_option('enable_wp_chatbot_exit_intent', sanitize_text_field($enable_wp_chatbot_exit_intent));
2156 1356
2157 - if(isset($_POST["wp_chatbot_exit_intent_msg"])){
2158 - $wp_chatbot_exit_intent_msg = @wp_unslash($_POST["wp_chatbot_exit_intent_msg"]);
2159 - update_option('wp_chatbot_exit_intent_msg', wp_unslash($wp_chatbot_exit_intent_msg));
2160 - }
1357 + $wp_chatbot_exit_intent_msg = @$_POST["wp_chatbot_exit_intent_msg"];
1358 + update_option('wp_chatbot_exit_intent_msg', wp_unslash($wp_chatbot_exit_intent_msg));
2161 1359
2162 1360 if(isset( $_POST["wp_chatbot_exit_intent_once"])) {
2163 - $wp_chatbot_exit_intent_once = wp_unslash($_POST["wp_chatbot_exit_intent_once"]);
1361 + $wp_chatbot_exit_intent_once = $_POST["wp_chatbot_exit_intent_once"];
2164 1362 }else{ $wp_chatbot_exit_intent_once='';}
2165 1363 update_option('wp_chatbot_exit_intent_once', sanitize_text_field($wp_chatbot_exit_intent_once));
2166 1364
2167 1365 if(isset( $_POST["enable_wp_chatbot_scroll_open"])) {
2168 - $enable_wp_chatbot_scroll_open = wp_unslash($_POST["enable_wp_chatbot_scroll_open"]);
1366 + $enable_wp_chatbot_scroll_open = $_POST["enable_wp_chatbot_scroll_open"];
2169 1367 }else{ $enable_wp_chatbot_scroll_open='';}
2170 1368 update_option('enable_wp_chatbot_scroll_open', sanitize_text_field($enable_wp_chatbot_scroll_open));
2171 1369
2172 - if(isset($_POST["wp_chatbot_scroll_open_msg"])){
2173 - $wp_chatbot_scroll_open_msg= @wp_unslash($_POST["wp_chatbot_scroll_open_msg"]);
2174 - update_option('wp_chatbot_scroll_open_msg', wp_unslash($wp_chatbot_scroll_open_msg));
2175 - }
1370 + $wp_chatbot_scroll_open_msg= @$_POST["wp_chatbot_scroll_open_msg"];
1371 + update_option('wp_chatbot_scroll_open_msg', wp_unslash($wp_chatbot_scroll_open_msg));
2176 1372
2177 - if(isset($_POST["wp_chatbot_scroll_percent"])){
2178 - $wp_chatbot_scroll_percent= @wp_unslash($_POST["wp_chatbot_scroll_percent"]);
2179 - update_option('wp_chatbot_scroll_percent', wp_unslash($wp_chatbot_scroll_percent));
2180 - }
1373 + $wp_chatbot_scroll_percent= @$_POST["wp_chatbot_scroll_percent"];
1374 + update_option('wp_chatbot_scroll_percent', wp_unslash($wp_chatbot_scroll_percent));
2181 1375
2182 1376 if(isset( $_POST["wp_chatbot_scroll_once"])) {
2183 - $wp_chatbot_scroll_once = sanitize_text_field(wp_unslash($_POST["wp_chatbot_scroll_once"]));
1377 + $wp_chatbot_scroll_once = sanitize_text_field($_POST["wp_chatbot_scroll_once"]);
2184 1378 }else{ $wp_chatbot_scroll_once='';}
2185 1379 update_option('wp_chatbot_scroll_once', $wp_chatbot_scroll_once);
2186 1380
2187 1381 if(isset( $_POST["enable_wp_chatbot_auto_open"])) {
2188 - $enable_wp_chatbot_auto_open = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_auto_open"]));
1382 + $enable_wp_chatbot_auto_open = sanitize_text_field($_POST["enable_wp_chatbot_auto_open"]);
2189 1383 }else{ $enable_wp_chatbot_auto_open='';}
2190 1384 update_option('enable_wp_chatbot_auto_open', $enable_wp_chatbot_auto_open);
2191 1385
2192 1386 if(isset( $_POST["enable_wp_chatbot_ret_sound"])) {
2193 - $enable_wp_chatbot_ret_sound = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_ret_sound"]));
1387 + $enable_wp_chatbot_ret_sound = sanitize_text_field($_POST["enable_wp_chatbot_ret_sound"]);
2194 1388 }else{ $enable_wp_chatbot_ret_sound='';}
2195 1389 update_option('enable_wp_chatbot_ret_sound', $enable_wp_chatbot_ret_sound);
2196 1390
2197 1391 if(isset( $_POST["enable_wp_chatbot_sound_initial"])) {
2198 - $enable_wp_chatbot_sound_initial = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_sound_initial"]));
1392 + $enable_wp_chatbot_sound_initial = sanitize_text_field($_POST["enable_wp_chatbot_sound_initial"]);
2199 1393 }else{ $enable_wp_chatbot_sound_initial='';}
2200 1394 update_option('enable_wp_chatbot_sound_initial', $enable_wp_chatbot_sound_initial);
2201 1395
2202 1396
2203 - if(isset($_POST["wp_chatbot_auto_open_msg"])){
2204 - $wp_chatbot_auto_open_msg = @wp_unslash($_POST["wp_chatbot_auto_open_msg"]);
2205 - update_option('wp_chatbot_auto_open_msg', wp_unslash($wp_chatbot_auto_open_msg));
2206 - }
1397 + $wp_chatbot_auto_open_msg = @$_POST["wp_chatbot_auto_open_msg"];
1398 + update_option('wp_chatbot_auto_open_msg', wp_unslash($wp_chatbot_auto_open_msg));
2207 1399
2208 - if(isset($_POST["wp_chatbot_auto_open_time"])){
2209 - $wp_chatbot_auto_open_time = @wp_unslash($_POST["wp_chatbot_auto_open_time"]);
2210 - update_option('wp_chatbot_auto_open_time', wp_unslash($wp_chatbot_auto_open_time));
2211 - }
2212 - //to complate checkout.
1400 + $wp_chatbot_auto_open_time = @$_POST["wp_chatbot_auto_open_time"];
1401 + update_option('wp_chatbot_auto_open_time', wp_unslash($wp_chatbot_auto_open_time));
1402 + //to complate checkout
2213 1403 if(isset( $_POST["enable_wp_chatbot_ret_user_show"])) {
2214 - $enable_wp_chatbot_ret_user_show = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_ret_user_show"]));
1404 + $enable_wp_chatbot_ret_user_show = sanitize_text_field($_POST["enable_wp_chatbot_ret_user_show"]);
2215 1405 }else{ $enable_wp_chatbot_ret_user_show='';}
2216 1406 update_option('enable_wp_chatbot_ret_user_show', $enable_wp_chatbot_ret_user_show);
2217 1407
2218 1408 if(isset( $_POST["enable_wp_chatbot_inactive_time_show"])) {
2219 - $enable_wp_chatbot_inactive_time_show = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_inactive_time_show"]));
1409 + $enable_wp_chatbot_inactive_time_show = sanitize_text_field($_POST["enable_wp_chatbot_inactive_time_show"]);
2220 1410 }else{ $enable_wp_chatbot_inactive_time_show='';}
2221 1411 update_option('enable_wp_chatbot_inactive_time_show', $enable_wp_chatbot_inactive_time_show);
2222 1412
2223 - if(isset($_POST["wp_chatbot_inactive_time"])){
2224 - $wp_chatbot_inactive_time = @wp_unslash($_POST["wp_chatbot_inactive_time"]);
2225 - update_option('wp_chatbot_inactive_time', sanitize_text_field($wp_chatbot_inactive_time));
2226 - }
1413 + $wp_chatbot_inactive_time = @$_POST["wp_chatbot_inactive_time"];
1414 + update_option('wp_chatbot_inactive_time', sanitize_text_field($wp_chatbot_inactive_time));
2227 1415
2228 - if(isset($_POST["wp_chatbot_checkout_msg"])){
2229 - $wp_chatbot_checkout_msg = @wp_unslash($_POST["wp_chatbot_checkout_msg"]);
2230 - update_option('wp_chatbot_checkout_msg', wp_unslash($wp_chatbot_checkout_msg));
2231 - }
1416 + $wp_chatbot_checkout_msg = @$_POST["wp_chatbot_checkout_msg"];
1417 + update_option('wp_chatbot_checkout_msg', wp_unslash($wp_chatbot_checkout_msg));
2232 1418
2233 1419 if(isset( $_POST["wp_chatbot_auto_open_once"])) {
2234 - $wp_chatbot_auto_open_once = sanitize_text_field(wp_unslash($_POST["wp_chatbot_auto_open_once"]));
1420 + $wp_chatbot_auto_open_once = sanitize_text_field($_POST["wp_chatbot_auto_open_once"]);
2235 1421 }else{ $wp_chatbot_auto_open_once='';}
2236 1422 update_option('wp_chatbot_auto_open_once', $wp_chatbot_auto_open_once);
2237 1423
2238 1424 if(isset( $_POST["wp_chatbot_inactive_once"])) {
2239 - $wp_chatbot_inactive_once = sanitize_text_field(wp_unslash($_POST["wp_chatbot_inactive_once"]));
1425 + $wp_chatbot_inactive_once = sanitize_text_field($_POST["wp_chatbot_inactive_once"]);
2240 1426 }else{ $wp_chatbot_inactive_once='';}
2241 1427 update_option('wp_chatbot_inactive_once', $wp_chatbot_inactive_once);
2242 1428
2243 1429
2244 - if(isset($_POST["wp_chatbot_proactive_bg_color"])){
2245 - $wp_chatbot_proactive_bg_color = @wp_unslash($_POST["wp_chatbot_proactive_bg_color"]);
2246 - update_option('wp_chatbot_proactive_bg_color', sanitize_text_field($wp_chatbot_proactive_bg_color));
2247 - }
1430 + $wp_chatbot_proactive_bg_color = @$_POST["wp_chatbot_proactive_bg_color"];
1431 + update_option('wp_chatbot_proactive_bg_color', sanitize_text_field($wp_chatbot_proactive_bg_color));
2248 1432
2249 1433 if(isset( $_POST["disable_wp_chatbot_call_gen"])) {
2250 - $disable_wp_chatbot_call_gen = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_call_gen"]));
1434 + $disable_wp_chatbot_call_gen = sanitize_text_field($_POST["disable_wp_chatbot_call_gen"]);
2251 1435 }else{ $disable_wp_chatbot_call_gen='';}
2252 1436 update_option('disable_wp_chatbot_call_gen', $disable_wp_chatbot_call_gen);
2253 1437
2254 1438 if(isset( $_POST["disable_wp_chatbot_site_search"])) {
2255 - $disable_wp_chatbot_site_search = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_site_search"]));
2256 - update_option('enable_wp_chatbot_post_content', '');
1439 + $disable_wp_chatbot_site_search = sanitize_text_field($_POST["disable_wp_chatbot_site_search"]);
2257 1440 }else{ $disable_wp_chatbot_site_search='';}
2258 1441 update_option('disable_wp_chatbot_site_search', $disable_wp_chatbot_site_search);
2259 1442
2260 1443 if(isset( $_POST["enable_wp_chatbot_post_content"])) {
2261 - $enable_wp_chatbot_post_content = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_post_content"]));
2262 -
1444 + $enable_wp_chatbot_post_content = sanitize_text_field($_POST["enable_wp_chatbot_post_content"]);
2263 1445 }else{ $enable_wp_chatbot_post_content='';}
2264 1446 update_option('enable_wp_chatbot_post_content', $enable_wp_chatbot_post_content);
2265 1447
2266 1448 if(isset( $_POST["disable_wp_chatbot_call_sup"])) {
2267 - $disable_wp_chatbot_call_sup = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_call_sup"]));
1449 + $disable_wp_chatbot_call_sup = sanitize_text_field($_POST["disable_wp_chatbot_call_sup"]);
2268 1450 }else{ $disable_wp_chatbot_call_sup='';}
2269 1451 update_option('disable_wp_chatbot_call_sup', $disable_wp_chatbot_call_sup);
2270 1452
2271 1453 if(isset( $_POST["disable_wp_chatbot_feedback"])) {
2272 - $disable_wp_chatbot_feedback = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_feedback"]));
1454 + $disable_wp_chatbot_feedback = sanitize_text_field($_POST["disable_wp_chatbot_feedback"]);
2273 1455 }else{ $disable_wp_chatbot_feedback='';}
2274 1456 update_option('disable_wp_chatbot_feedback', $disable_wp_chatbot_feedback);
2275 1457
2276 1458 if(isset( $_POST["disable_wp_chatbot_faq"])) {
2277 - $disable_wp_chatbot_faq = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_faq"]));
1459 + $disable_wp_chatbot_faq = sanitize_text_field($_POST["disable_wp_chatbot_faq"]);
2278 1460 }else{ $disable_wp_chatbot_faq='';}
2279 1461 update_option('disable_wp_chatbot_faq', $disable_wp_chatbot_faq);
2280 1462
2281 - if(isset($_POST["qlcd_wp_chatbot_feedback_label"])){
2282 - $qlcd_wp_chatbot_feedback_label = (@wp_unslash($_POST["qlcd_wp_chatbot_feedback_label"]));
2283 - update_option('qlcd_wp_chatbot_feedback_label', maybe_serialize(sanitize_array($qlcd_wp_chatbot_feedback_label)));
2284 - }
1463 + $qlcd_wp_chatbot_feedback_label = @$_POST["qlcd_wp_chatbot_feedback_label"];
1464 + update_option('qlcd_wp_chatbot_feedback_label', maybe_serialize(sanitize_array($qlcd_wp_chatbot_feedback_label)));
2285 1465
2286 1466 if(isset( $_POST["enable_wp_chatbot_meta_title"])) {
2287 - $enable_wp_chatbot_meta_title = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_meta_title"]));
1467 + $enable_wp_chatbot_meta_title = sanitize_text_field($_POST["enable_wp_chatbot_meta_title"]);
2288 1468 }else{ $enable_wp_chatbot_meta_title='';}
2289 1469 update_option('enable_wp_chatbot_meta_title', $enable_wp_chatbot_meta_title);
2290 1470
2291 - if(isset($_POST["qlcd_wp_chatbot_meta_label"])){
2292 - $qlcd_wp_chatbot_meta_label = esc_html(@wp_unslash($_POST["qlcd_wp_chatbot_meta_label"]));
2293 - update_option('qlcd_wp_chatbot_meta_label', stripslashes(sanitize_text_field($qlcd_wp_chatbot_meta_label)));
2294 - }
1471 + $qlcd_wp_chatbot_meta_label = @$_POST["qlcd_wp_chatbot_meta_label"];
1472 + update_option('qlcd_wp_chatbot_meta_label', stripslashes(sanitize_text_field($qlcd_wp_chatbot_meta_label)));
2295 1473
2296 - if (isset($_POST["qlcd_wp_chatbot_phone_sent"])) {
2297 - $qlcd_wp_chatbot_phone_sent = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_phone_sent"]));
2298 - update_option('qlcd_wp_chatbot_phone_sent', $qlcd_wp_chatbot_phone_sent);
2299 - }
1474 + $qlcd_wp_chatbot_phone_sent = @$_POST["qlcd_wp_chatbot_phone_sent"];
1475 + update_option('qlcd_wp_chatbot_phone_sent', stripslashes(sanitize_text_field($qlcd_wp_chatbot_phone_sent)));
2300 1476
2301 - if (isset($_POST["qlcd_wp_chatbot_phone_fail"])) {
2302 - $qlcd_wp_chatbot_phone_fail = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_phone_fail"]));
2303 - update_option('qlcd_wp_chatbot_phone_fail', $qlcd_wp_chatbot_phone_fail);
2304 - }
1477 + $qlcd_wp_chatbot_phone_fail = @$_POST["qlcd_wp_chatbot_phone_fail"];
1478 + update_option('qlcd_wp_chatbot_phone_fail', stripslashes(sanitize_text_field($qlcd_wp_chatbot_phone_fail)));
2305 1479
2306 - if (isset($_POST["qlcd_wp_chatbot_asking_search_keyword"])) {
2307 - $qlcd_wp_chatbot_asking_search_keyword = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_asking_search_keyword"]));
2308 - update_option('qlcd_wp_chatbot_asking_search_keyword', $qlcd_wp_chatbot_asking_search_keyword);
2309 - }
2310 1480
2311 - if (isset($_POST["qlcd_wp_chatbot_found_result"])) {
2312 - $qlcd_wp_chatbot_found_result = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_found_result"]));
2313 - update_option('qlcd_wp_chatbot_found_result', $qlcd_wp_chatbot_found_result);
2314 - }
1481 + $qlcd_wp_chatbot_asking_search_keyword = @$_POST["qlcd_wp_chatbot_asking_search_keyword"];
1482 + update_option('qlcd_wp_chatbot_asking_search_keyword', stripslashes(sanitize_text_field($qlcd_wp_chatbot_asking_search_keyword)));
1483 + $qlcd_wp_chatbot_found_result = @$_POST["qlcd_wp_chatbot_found_result"];
1484 + update_option('qlcd_wp_chatbot_found_result', stripslashes(sanitize_text_field($qlcd_wp_chatbot_found_result)));
2315 1485
2316 1486 if(isset( $_POST["enable_wp_chatbot_opening_hour"])) {
2317 - $enable_wp_chatbot_opening_hour = stripslashes(sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_opening_hour"])));
1487 + $enable_wp_chatbot_opening_hour = stripslashes(sanitize_text_field($_POST["enable_wp_chatbot_opening_hour"]));
2318 1488 }else{ $enable_wp_chatbot_opening_hour='';}
2319 - update_option('enable_wp_chatbot_opening_hour', esc_html($enable_wp_chatbot_opening_hour));
1489 + update_option('enable_wp_chatbot_opening_hour', $enable_wp_chatbot_opening_hour);
2320 1490
2321 - if(isset($_POST["wpwbot_hours"])){
2322 - $wpwbot_hours= @wp_unslash($_POST["wpwbot_hours"]);
2323 - update_option('wpwbot_hours', maybe_serialize(sanitize_array($wpwbot_hours)));
2324 - }
1491 + $wpwbot_hours= @$_POST["wpwbot_hours"];
1492 + update_option('wpwbot_hours', maybe_serialize(sanitize_array($wpwbot_hours)));
2325 1493
2326 1494 if(isset( $_POST["enable_wp_chatbot_dailogflow"])) {
2327 - $enable_wp_chatbot_dailogflow = stripslashes(sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_dailogflow"])));
1495 + $enable_wp_chatbot_dailogflow = stripslashes(sanitize_text_field($_POST["enable_wp_chatbot_dailogflow"]));
2328 1496 }else{ $enable_wp_chatbot_dailogflow='';}
2329 1497 update_option('enable_wp_chatbot_dailogflow', $enable_wp_chatbot_dailogflow);
2330 1498
2331 - if(isset($_POST["qlcd_wp_chatbot_dialogflow_client_token"])){
2332 - $qlcd_wp_chatbot_dialogflow_client_token= esc_html(@wp_unslash($_POST["qlcd_wp_chatbot_dialogflow_client_token"]));
2333 - update_option('qlcd_wp_chatbot_dialogflow_client_token', stripslashes(sanitize_text_field($qlcd_wp_chatbot_dialogflow_client_token)));
2334 - }
1499 + $qlcd_wp_chatbot_dialogflow_client_token= @$_POST["qlcd_wp_chatbot_dialogflow_client_token"];
1500 + update_option('qlcd_wp_chatbot_dialogflow_client_token', stripslashes(sanitize_text_field($qlcd_wp_chatbot_dialogflow_client_token)));
2335 1501
2336 - if (isset($_POST["qlcd_wp_chatbot_dialogflow_defualt_reply"])) {
2337 - $qlcd_wp_chatbot_dialogflow_defualt_reply = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_dialogflow_defualt_reply"]));
2338 - update_option('qlcd_wp_chatbot_dialogflow_defualt_reply', $qlcd_wp_chatbot_dialogflow_defualt_reply);
2339 - }
1502 + $qlcd_wp_chatbot_dialogflow_defualt_reply= @$_POST["qlcd_wp_chatbot_dialogflow_defualt_reply"];
1503 + update_option('qlcd_wp_chatbot_dialogflow_defualt_reply', sanitize_text_field($qlcd_wp_chatbot_dialogflow_defualt_reply));
2340 1504
2341 - if (isset($_POST["qlcd_wp_chatbot_dialogflow_agent_language"])) {
2342 - $qlcd_wp_chatbot_dialogflow_agent_language = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_dialogflow_agent_language"]));
2343 - update_option('qlcd_wp_chatbot_dialogflow_agent_language', $qlcd_wp_chatbot_dialogflow_agent_language);
2344 - }
2345 - // style option save.
1505 + $qlcd_wp_chatbot_dialogflow_agent_language= @$_POST["qlcd_wp_chatbot_dialogflow_agent_language"];
1506 + update_option('qlcd_wp_chatbot_dialogflow_agent_language', stripslashes(sanitize_text_field($qlcd_wp_chatbot_dialogflow_agent_language)));
1507 + // style option save
2346 1508 if(isset( $_POST["enable_wp_chatbot_custom_color"])) {
2347 - $enable_wp_chatbot_custom_color = esc_html(wp_unslash($_POST["enable_wp_chatbot_custom_color"]));
1509 + $enable_wp_chatbot_custom_color = $_POST["enable_wp_chatbot_custom_color"];
2348 1510 }else{ $enable_wp_chatbot_custom_color='';}
2349 1511 update_option('enable_wp_chatbot_custom_color', stripslashes(sanitize_text_field($enable_wp_chatbot_custom_color)));
2350 - if (isset($_POST["wp_chatbot_text_color"])) {
2351 - $wp_chatbot_text_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_text_color"]));
2352 - update_option('wp_chatbot_text_color', $wp_chatbot_text_color);
2353 - }
1512 + $wp_chatbot_text_color = @$_POST["wp_chatbot_text_color"];
1513 + update_option('wp_chatbot_text_color', stripslashes(sanitize_text_field($wp_chatbot_text_color)));
2354 1514
2355 - if (isset($_POST["wp_chatbot_floatingiconbg_color"])) {
2356 - $wp_chatbot_floatingiconbg_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_floatingiconbg_color"]));
2357 - update_option('wp_chatbot_floatingiconbg_color', $wp_chatbot_floatingiconbg_color);
2358 - }
1515 + $wp_chatbot_floatingiconbg_color = @$_POST["wp_chatbot_floatingiconbg_color"];
1516 + update_option('wp_chatbot_floatingiconbg_color', stripslashes(sanitize_text_field($wp_chatbot_floatingiconbg_color)));
2359 1517
2360 - if (isset($_POST["wp_chatbot_link_color"])) {
2361 - $wp_chatbot_link_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_link_color"]));
2362 - update_option('wp_chatbot_link_color', $wp_chatbot_link_color);
2363 - }
1518 + $wp_chatbot_link_color = @$_POST["wp_chatbot_link_color"];
1519 + update_option('wp_chatbot_link_color', stripslashes(sanitize_text_field($wp_chatbot_link_color)));
2364 1520
2365 - if (isset($_POST["wp_chatbot_link_hover_color"])) {
2366 - $wp_chatbot_link_hover_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_link_hover_color"]));
2367 - update_option('wp_chatbot_link_hover_color', $wp_chatbot_link_hover_color);
2368 - }
1521 + $wp_chatbot_link_hover_color = @$_POST["wp_chatbot_link_hover_color"];
1522 + update_option('wp_chatbot_link_hover_color', stripslashes(stripslashes(sanitize_text_field($wp_chatbot_link_hover_color))));
2369 1523
2370 - if (isset($_POST["wp_chatbot_bot_msg_bg_color"])) {
2371 - $wp_chatbot_bot_msg_bg_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_bot_msg_bg_color"]));
2372 - update_option('wp_chatbot_bot_msg_bg_color', $wp_chatbot_bot_msg_bg_color);
2373 - }
1524 + $wp_chatbot_bot_msg_bg_color = @$_POST["wp_chatbot_bot_msg_bg_color"];
1525 + update_option('wp_chatbot_bot_msg_bg_color', stripslashes(sanitize_text_field($wp_chatbot_bot_msg_bg_color)));
2374 1526
2375 - if (isset($_POST["wp_chatbot_bot_msg_text_color"])) {
2376 - $wp_chatbot_bot_msg_text_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_bot_msg_text_color"]));
2377 - update_option('wp_chatbot_bot_msg_text_color', $wp_chatbot_bot_msg_text_color);
2378 - }
1527 + $wp_chatbot_bot_msg_text_color = @$_POST["wp_chatbot_bot_msg_text_color"];
1528 + update_option('wp_chatbot_bot_msg_text_color', stripslashes(sanitize_text_field($wp_chatbot_bot_msg_text_color)));
2379 1529
2380 - if (isset($_POST["wp_chatbot_user_msg_bg_color"])) {
2381 - $wp_chatbot_user_msg_bg_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_user_msg_bg_color"]));
2382 - update_option('wp_chatbot_user_msg_bg_color', $wp_chatbot_user_msg_bg_color);
2383 - }
1530 + $wp_chatbot_user_msg_bg_color = @$_POST["wp_chatbot_user_msg_bg_color"];
1531 + update_option('wp_chatbot_user_msg_bg_color', stripslashes(sanitize_text_field($wp_chatbot_user_msg_bg_color)));
2384 1532
2385 - if (isset($_POST["wp_chatbot_user_msg_text_color"])) {
2386 - $wp_chatbot_user_msg_text_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_user_msg_text_color"]));
2387 - update_option('wp_chatbot_user_msg_text_color', $wp_chatbot_user_msg_text_color);
2388 - }
1533 + $wp_chatbot_user_msg_text_color = @$_POST["wp_chatbot_user_msg_text_color"];
1534 + update_option('wp_chatbot_user_msg_text_color', stripslashes(sanitize_text_field($wp_chatbot_user_msg_text_color)));
2389 1535
2390 - if (isset($_POST["wp_chatbot_buttons_bg_color"])) {
2391 - $wp_chatbot_buttons_bg_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_buttons_bg_color"]));
2392 - update_option('wp_chatbot_buttons_bg_color', $wp_chatbot_buttons_bg_color);
2393 - }
2394 1536
2395 - if (isset($_POST["wp_chatbot_buttons_text_color"])) {
2396 - $wp_chatbot_buttons_text_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_buttons_text_color"]));
2397 - update_option('wp_chatbot_buttons_text_color', $wp_chatbot_buttons_text_color);
2398 - }
1537 + $wp_chatbot_buttons_bg_color = @$_POST["wp_chatbot_buttons_bg_color"];
1538 + update_option('wp_chatbot_buttons_bg_color', stripslashes(sanitize_text_field($wp_chatbot_buttons_bg_color)));
2399 1539
2400 - if (isset($_POST["wp_chatbot_buttons_bg_color_hover"])) {
2401 - $wp_chatbot_buttons_bg_color_hover = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_buttons_bg_color_hover"]));
2402 - update_option('wp_chatbot_buttons_bg_color_hover', $wp_chatbot_buttons_bg_color_hover);
2403 - }
1540 + $wp_chatbot_buttons_text_color = @$_POST["wp_chatbot_buttons_text_color"];
1541 + update_option('wp_chatbot_buttons_text_color', stripslashes(sanitize_text_field($wp_chatbot_buttons_text_color)));
2404 1542
2405 - if (isset($_POST["wp_chatbot_buttons_text_color_hover"])) {
2406 - $wp_chatbot_buttons_text_color_hover = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_buttons_text_color_hover"]));
2407 - update_option('wp_chatbot_buttons_text_color_hover', $wp_chatbot_buttons_text_color_hover);
2408 - }
1543 + $wp_chatbot_buttons_bg_color_hover = @$_POST["wp_chatbot_buttons_bg_color_hover"];
1544 + update_option('wp_chatbot_buttons_bg_color_hover', stripslashes(sanitize_text_field($wp_chatbot_buttons_bg_color_hover)));
2409 1545
2410 - if (isset($_POST["wp_chatbot_theme_secondary_color"])) {
2411 - $wp_chatbot_theme_secondary_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_theme_secondary_color"]));
2412 - update_option('wp_chatbot_theme_secondary_color', $wp_chatbot_theme_secondary_color);
2413 - }
2414 - if (isset($_POST["wp_chatbot_header_background_color"])) {
2415 - $wp_chatbot_header_background_color = sanitize_hex_color(wp_unslash($_POST["wp_chatbot_header_background_color"]));
2416 - update_option('wp_chatbot_header_background_color', $wp_chatbot_header_background_color);
2417 - }
1546 + $wp_chatbot_buttons_text_color_hover = @$_POST["wp_chatbot_buttons_text_color_hover"];
1547 + update_option('wp_chatbot_buttons_text_color_hover', stripslashes(sanitize_text_field($wp_chatbot_buttons_text_color_hover)));
2418 1548
2419 - if (isset($_POST["wp_chatbot_font_size"])) {
2420 - $wp_chatbot_font_size = sanitize_text_field(wp_unslash($_POST["wp_chatbot_font_size"]));
2421 - // Additional validation for font size format (e.g., '14px', '1.2em') could be added here if strict adherence to CSS units is required.
2422 - update_option('wp_chatbot_font_size', $wp_chatbot_font_size);
2423 - }
2424 - if (isset($_POST["wp_chat_bot_font_family"])) {
2425 - $wp_chat_bot_font_family = sanitize_text_field(wp_unslash($_POST["wp_chat_bot_font_family"]));
2426 - update_option('wp_chat_bot_font_family', $wp_chat_bot_font_family);
2427 - }
2428 - if (isset($_POST["wp_chat_user_font_family"])) {
2429 - $wp_chat_user_font_family = sanitize_text_field(wp_unslash($_POST["wp_chat_user_font_family"]));
2430 - update_option('wp_chat_user_font_family', $wp_chat_user_font_family);
2431 - }
2432 - if (isset($_POST['wp_chatbot_user_font'])) {
2433 - $wp_chatbot_user_font = sanitize_text_field(wp_unslash($_POST['wp_chatbot_user_font']));
2434 - update_option('wp_chatbot_user_font', $wp_chatbot_user_font);
2435 - }
2436 - if (isset($_POST['wp_chatbot_bot_font'])) {
2437 - $wp_chatbot_bot_font = sanitize_text_field(wp_unslash($_POST['wp_chatbot_bot_font']));
2438 - update_option('wp_chatbot_bot_font', $wp_chatbot_bot_font);
2439 - }
2440 1549
2441 - set_transient( 'qcld_bot_clear_cache', 1, DAY_IN_SECONDS );
1550 + $wp_chatbot_theme_secondary_color = @$_POST["wp_chatbot_theme_secondary_color"];
1551 + update_option('wp_chatbot_theme_secondary_color', stripslashes(sanitize_text_field($wp_chatbot_theme_secondary_color)));
1552 + $wp_chatbot_header_background_color = @$_POST["wp_chatbot_header_background_color"];
1553 + update_option('wp_chatbot_header_background_color', stripslashes(sanitize_text_field($wp_chatbot_header_background_color)));
2442 1554
1555 +
1556 + $wp_chatbot_font_size = @$_POST["wp_chatbot_font_size"];
1557 + update_option('wp_chatbot_font_size', sanitize_text_field($wp_chatbot_font_size));
1558 + $wp_chat_bot_font_family = @$_POST["wp_chat_bot_font_family"];
1559 + update_option('wp_chat_bot_font_family', sanitize_text_field($wp_chat_bot_font_family));
1560 + $wp_chat_user_font_family = @$_POST["wp_chat_user_font_family"];
1561 + update_option('wp_chat_user_font_family', sanitize_text_field($wp_chat_user_font_family));
1562 + $wp_chatbot_user_font = @$_POST['wp_chatbot_user_font'];
1563 + update_option('wp_chatbot_user_font', sanitize_text_field($wp_chatbot_user_font));
1564 + $wp_chatbot_bot_font = @$_POST['wp_chatbot_bot_font'];
1565 + update_option('wp_chatbot_bot_font', sanitize_text_field($wp_chatbot_bot_font));
1566 +
1567 + set_transient( 'bot_clear_cache', 1, DAY_IN_SECONDS );
1568 +
2443 1569 wp_enqueue_script( 'wp_chatbot_bot-front-js', plugins_url(basename(plugin_dir_path(__FILE__))) . '/js/sweetalrt.js', array('jquery'), '', true);
2444 1570 $script = "
2445 1571 console.log('sdaas');
2446 1572 function callsweetalert(){
@@ -2448,13 +1574,13 @@
2448 1574 title: 'Your settings are saved.',
2449 1575 html: '<p style=font-size:14px>Please clear your browser <b>cache</b> and <b>cookies</b> both and reload the front end before testing. Alternatively, you can launch a new browser window in <b>Incognito</b>/Private mode (Ctrl+Shift+N in chrome) to test.</p>',
2450 1576 width: 450,
2451 1577 icon: 'success',
2452 - confirmButtonText: 'Got it',
2453 - confirmButtonWidth: 100,
2454 - confirmButtonClass: 'btn btn-lg',
1578 + confirmButtonText: 'Got it',
1579 + confirmButtonWidth: 100,
1580 + confirmButtonClass: 'btn btn-lg'
2455 1581 }).then((result) => {
2456 - // location.reload();
1582 + location.reload();
2457 1583 })
2458 1584 }
2459 1585 callsweetalert();
2460 1586 ";
@@ -2477,9 +1603,9 @@
2477 1603 <div id="message" class="error">
2478 1604 <p>
2479 1605 <?php
2480 1606 printf(
2481 - '%s WPBot for wpCommerce REQUIRES wpCommerce%s %swpCommerce%s must be active for WPBot to work. Please install & activate wpCommerce.',
1607 + __('%s WPBot for wpCommerce REQUIRES wpCommerce%s %swpCommerce%s must be active for WPBot to work. Please install & activate wpCommerce.', 'wpchatbot'),
2482 1608 '<strong>',
2483 1609 '</strong><br>',
2484 1610 '<a href="http://wordpress.org/extend/plugins/wpcommerce/" target="_blank" >',
2485 1611 '</a>'
@@ -2494,12 +1620,12 @@
2494 1620 <!--<p style="float: right; color: #9A9A9A; font-size: 13px; font-style: italic;">For more information <a href="http://cxthemes.com/plugins/update-notice.html" target="_blank" style="color: inheret;">click here</a></p>-->
2495 1621 <p>
2496 1622 <?php
2497 1623 printf(
2498 - '%WPBot for wpCommerce is inactive%s This version of WpBot requires wpCommerce %s or newer. For more information about our wpCommerce version support %sclick here%s.',
1624 + __('%WPBot for wpCommerce is inactive%s This version of WpBot requires wpCommerce %s or newer. For more information about our wpCommerce version support %sclick here%s.', 'wpchatbot'),
2499 1625 '<strong>',
2500 1626 '</strong><br>',
2501 - esc_html( QCLD_wpCHATBOT_REQUIRED_wpCOMMERCE_VERSION )
1627 + QCLD_wpCHATBOT_REQUIRED_wpCOMMERCE_VERSION
2502 1628 );
2503 1629 ?>
2504 1630 </p>
2505 1631 <div style="clear:both;"></div>
@@ -2512,11 +1638,9 @@
2512 1638 * Admin notice for table reindex
2513 1639 */
2514 1640 public function admin_notice_reindex() { ?>
2515 1641 <div class="updated notice is-dismissible">
2516 - <p><?php
2517 - // translators: %s: A link to the Re-Index Products page.
2518 - 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>
1642 + <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>
2519 1643 </div>
2520 1644 <?php }
2521 1645 }
2522 1646 /**
@@ -2526,9 +1650,9 @@
2526 1650 if (!function_exists('qcld_wb_chatboot_plugin_init')) {
2527 1651 function qcld_wb_chatboot_plugin_init()
2528 1652 {
2529 1653 global $qcld_wb_chatbot;
2530 - $qcld_wb_chatbot = qcld_wb_Chatbot_free::qcld_wb_chatbot_get_instance();
1654 + $qcld_wb_chatbot = qcld_wb_Chatbot::qcld_wb_chatbot_get_instance();
2531 1655 }
2532 1656 }
2533 1657 add_action('plugins_loaded', 'qcld_wb_chatboot_plugin_init');
2534 1658 /*
@@ -2534,9 +1658,8 @@
2534 1658 /*
2535 1659 * Initial Options will be insert as defualt data
2536 1660 */
2537 1661 register_activation_hook(__FILE__, 'qcld_wb_chatboot_defualt_options');
2538 -if( !function_exists('qcld_wb_chatboot_defualt_options') ){
2539 1662 function qcld_wb_chatboot_defualt_options(){
2540 1663
2541 1664 global $wpdb;
2542 1665 $collate = '';
@@ -2582,95 +1705,31 @@
2582 1705 ) $collate AUTO_INCREMENT=1 ENGINE=InnoDB";
2583 1706
2584 1707 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
2585 1708 dbDelta( $sql_sliders_Table1 );
2586 -
2587 -
2588 - //Bot Response Table
2589 - $table_rag_documents = $wpdb->prefix . "rag_documents";
2590 -
2591 - $charset = $wpdb->get_charset_collate();
2592 - 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
2593 - // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange
2594 - $sql_rag_documents = "CREATE TABLE $table_rag_documents (
2595 - id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
2596 - doc_id VARCHAR(100) DEFAULT NULL,
2597 - title VARCHAR(255) NOT NULL,
2598 - content LONGTEXT NOT NULL,
2599 - embedding LONGTEXT NOT NULL,
2600 - source_type VARCHAR(20) DEFAULT 'post',
2601 - source_url VARCHAR(255) DEFAULT NULL,
2602 - file_url TEXT DEFAULT NULL,
2603 - metadata LONGTEXT DEFAULT NULL,
2604 - status VARCHAR(50) DEFAULT 'complete',
2605 - created_at DATETIME DEFAULT CURRENT_TIMESTAMP
2606 - ) $charset;";
2607 - require_once ABSPATH . 'wp-admin/includes/upgrade.php';
2608 - dbDelta($sql_rag_documents);
2609 - // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange
2610 - }
2611 - $table_report = $wpdb->prefix . 'wpbot_chat_report';
2612 -
2613 - 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
2614 - // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange
2615 - $sql_report = "
2616 - CREATE TABLE `$table_report` (
2617 - `id` int(11) NOT NULL AUTO_INCREMENT,
2618 - `user_id` int(11) NOT NULL,
2619 - `conversation_id` int(11) DEFAULT NULL,
2620 - `message` longtext NOT NULL,
2621 - `feedback` varchar(20) DEFAULT NULL,
2622 - `meta_info` text DEFAULT NULL,
2623 - `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
2624 - PRIMARY KEY (`id`)
2625 - ) $charset_collate AUTO_INCREMENT=1;
2626 - ";
2627 -
2628 - require_once ABSPATH . 'wp-admin/includes/upgrade.php';
2629 - dbDelta( $sql_report );
2630 - // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange
2631 - }
2632 1709
2633 - $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
1710 + $sqlqry = $wpdb->get_results("select * from $table1");
2634 1711 if(empty($sqlqry)){
2635 1712
2636 - $query = 'Sample Question ?';
2637 - $response = 'Sample Answer';
1713 + $query = 'What Can WPBot do for you?';
1714 + $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!';
2638 1715
2639 1716 $data = array('query' => $query, 'keyword' => '', 'response'=> $response, 'intent'=> '');
2640 1717 $format = array('%s','%s', '%s', '%s');
2641 - $wpdb->insert($table1,$data,$format); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, PluginCheck.Security.DirectDB.UnescapedDBParameter
1718 + $wpdb->insert($table1,$data,$format);
2642 1719 }
2643 -
2644 - $table = $wpdb->prefix . 'wpbot_subscription';
2645 - if ($wpdb->get_var($wpdb->prepare("SHOW TABLES LIKE %s", $table)) != $table) { // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter
2646 - // phpcs:disable WordPress.DB.DirectDatabaseQuery.SchemaChange
2647 - $sql_sliders_Table = "
2648 - CREATE TABLE IF NOT EXISTS `$table` (
2649 - `id` int(11) NOT NULL AUTO_INCREMENT,
2650 - `name` varchar(256) NOT NULL,
2651 - `email` varchar(256) NOT NULL,
2652 - `phone` varchar(256) NOT NULL,
2653 - `url` text NOT NULL,
2654 - `date` datetime NOT NULL,
2655 - `user_agent` text NOT NULL,
2656 - PRIMARY KEY (`id`)
2657 - ) $collate AUTO_INCREMENT=1 ";
2658 - require_once ABSPATH . 'wp-admin/includes/upgrade.php';
2659 - dbDelta($sql_sliders_Table);
2660 - // phpcs:enable WordPress.DB.DirectDatabaseQuery.SchemaChange
2661 - }
2662 1720
2663 1721 $url = get_site_url();
2664 - $url = wp_parse_url($url);
1722 + $url = parse_url($url);
2665 1723 $domain = $url['host'];
2666 1724 //$admin_email = "admin@" . $domain;
2667 1725 $admin_email = get_option('admin_email');
1726 +
2668 1727 if(!get_option('wp_chatbot_position_x')) {
2669 - update_option('wp_chatbot_position_x', 30);
1728 + update_option('wp_chatbot_position_x', 50);
2670 1729 }
2671 1730 if(!get_option('wp_chatbot_position_y')) {
2672 - update_option('wp_chatbot_position_y', 30);
1731 + update_option('wp_chatbot_position_y', 50);
2673 1732 }
2674 1733 if(!get_option('disable_wp_chatbot')) {
2675 1734 update_option('disable_wp_chatbot', '');
2676 1735 }
@@ -2697,14 +1756,8 @@
2697 1756 }
2698 1757 if(!get_option('show_menu_after_greetings')) {
2699 1758 update_option('show_menu_after_greetings', 1);
2700 1759 }
2701 - if(!get_option('disable_back_to_start_menu')) {
2702 - update_option('disable_back_to_start_menu', '');
2703 - }
2704 - if(!get_option('disable_floating_button')) {
2705 - update_option('disable_floating_button', '');
2706 - }
2707 1760 if(!get_option('enable_chat_session')) {
2708 1761 update_option('enable_chat_session', '');
2709 1762 }
2710 1763
@@ -2711,9 +1764,9 @@
2711 1764 if(!get_option('enable_wp_chatbot_mobile_full_screen')) {
2712 1765 update_option('enable_wp_chatbot_mobile_full_screen', 1);
2713 1766 }
2714 1767 if(!get_option('wpbot_preloading_time')) {
2715 - update_option('wpbot_preloading_time', '800');
1768 + update_option('wpbot_preloading_time', '0.5');
2716 1769 }
2717 1770
2718 1771 if(!get_option('disable_wp_chatbot_notification')) {
2719 1772 update_option('disable_wp_chatbot_notification', '1');
@@ -2751,19 +1804,11 @@
2751 1804 if(!get_option('wp_chatbot_show_home_page')) {
2752 1805 update_option('wp_chatbot_show_home_page', 'on');
2753 1806 }
2754 1807 if(!get_option('qc_wpbot_menu_order')) {
2755 - $site_search_label = get_option('qlcd_wp_chatbot_wildcard_site_search') != '' ? get_option('qlcd_wp_chatbot_wildcard_site_search') : 'Site Search';
2756 - $support_email_label = get_option('qlcd_wp_chatbot_support_email') != '' ? get_option('qlcd_wp_chatbot_support_email') : 'Send us Email.';
2757 - $support_phone_label = get_option('qlcd_wp_chatbot_support_phone') != '' ? get_option('qlcd_wp_chatbot_support_phone') : 'Leave your number. We will call you back!';
2758 - $default_menu = '<span class="qcld-chatbot-wildcard qc_draggable_item qcld-chatbot-site-search" data-wildcart="site_search">' . esc_attr($site_search_label) . '</span>';
2759 - $default_menu .= '<span class="qcld-chatbot-suggest-email qc_draggable_item">' . esc_attr($support_email_label) . '</span>';
2760 - $default_menu .= '<span class="qcld-chatbot-suggest-phone qc_draggable_item">' . esc_attr($support_phone_label) . '</span>';
2761 - update_option('qc_wpbot_menu_order', $default_menu);
1808 + update_option('qc_wpbot_menu_order', '');
2762 1809 }
2763 - if(!get_option('qcld_chatbot_avatar_location')) {
2764 - update_option('qcld_chatbot_avatar_location', 'side');
2765 - }
1810 +
2766 1811 if(!get_option('wp_chatbot_show_posts')) {
2767 1812 update_option('wp_chatbot_show_posts', 'on');
2768 1813 }
2769 1814 if(!get_option('wp_chatbot_show_pages')){
@@ -2961,9 +2006,9 @@
2961 2006 if(!get_option('qlcd_wp_chatbot_help_welcome')) {
2962 2007 update_option('qlcd_wp_chatbot_help_welcome', maybe_serialize(array('Welcome to Help Section.')));
2963 2008 }
2964 2009 if(!get_option('qlcd_wp_chatbot_help_msg')) {
2965 - update_option('qlcd_wp_chatbot_help_msg', maybe_serialize(array('<b>Type and Hit Enter</b><br><ul><li> <b>start</b> to Get back to the main menu. </li><li> <b>faq</b> for FAQ. </li><li> <b>email </b> to send eMail </li><li> <b>reset</b> to restart the chat</li></ul>')));
2010 + update_option('qlcd_wp_chatbot_help_msg', maybe_serialize(array('<h3>Type and Hit Enter</h3> 1. <b>start</b> Get back to the main menu. <br> 2. <b>faq</b> for FAQ. <br> 3. <b>eMail </b> to Send eMail <br> 4. <b>reset</b> To clear chat history and start from the beginning.')));
2966 2011 }
2967 2012 if(!get_option('qlcd_wp_chatbot_reset')) {
2968 2013 update_option('qlcd_wp_chatbot_reset', maybe_serialize(array('Do you want to clear our chat history and start over?')));
2969 2014 }
@@ -2984,9 +2029,9 @@
2984 2029 }
2985 2030 if(!get_option('qlcd_wp_chatbot_wildcard_site_search')) {
2986 2031 update_option('qlcd_wp_chatbot_wildcard_site_search', 'Site Search');
2987 2032 }
2988 - if(!get_option('qlcd_wp_chatbot_messenger_label')) {
2033 + if(!get_option('qlcd_wp_chatbot_messenger_label')) {
2989 2034 update_option('qlcd_wp_chatbot_messenger_label', maybe_serialize(array('Chat with Us on Facebook Messenger')));
2990 2035 }
2991 2036 if(!get_option('qlcd_wp_chatbot_product_success')) {
2992 2037 update_option('qlcd_wp_chatbot_product_success', maybe_serialize(array('Great! We have these products for', 'Found these products for')));
@@ -3080,11 +2125,8 @@
3080 2125 }
3081 2126 if(!get_option('qlcd_wp_chatbot_email_fail')) {
3082 2127 update_option('qlcd_wp_chatbot_email_fail', sanitize_text_field('Sorry! I could not send your mail! Please contact the webmaster.'));
3083 2128 }
3084 - if(!get_option('qlcd_wp_chatbot_relevant_post_link_openai')) {
3085 - update_option('qlcd_wp_chatbot_relevant_post_link_openai', sanitize_text_field('Check the relevant pages for more details and up to date information:'));
3086 - }
3087 2129 if(!get_option('qlcd_wp_chatbot_notification_interval')) {
3088 2130 update_option('qlcd_wp_chatbot_notification_interval', sanitize_text_field(5));
3089 2131 }
3090 2132 if(!get_option('qlcd_wp_chatbot_notifications')) {
@@ -3090,12 +2132,12 @@
3090 2132 if(!get_option('qlcd_wp_chatbot_notifications')) {
3091 2133 update_option('qlcd_wp_chatbot_notifications', maybe_serialize(array('Welcome to WPBot')));
3092 2134 }
3093 2135 if(!get_option('support_query')) {
3094 - update_option('support_query', maybe_serialize(array('Sample Question?')));
2136 + update_option('support_query', maybe_serialize(array('What is WPBot?')));
3095 2137 }
3096 2138 if(!get_option('support_ans')) {
3097 - update_option('support_ans', maybe_serialize(array('Sample Answer')));
2139 + update_option('support_ans', maybe_serialize(array('WPBot is a stand alone Chat Bot with zero configuration or bot training required. This plug and play chatbot also does not require any 3rd party service integration like Facebook. This chat bot helps shoppers find the products they are looking for easily and increase store sales! WPBot is a must have plugin for trending conversational commerce or conversational shopping.')));
3098 2140 }
3099 2141 if(!get_option('qlcd_wp_chatbot_search_option')) {
3100 2142 update_option('qlcd_wp_chatbot_search_option', 'standard');
3101 2143 }
@@ -3141,20 +2183,20 @@
3141 2183 if(!get_option('qlcd_wp_chatbot_whats_label')) {
3142 2184 update_option('qlcd_wp_chatbot_whats_label', maybe_serialize(array('Chat with Us on WhatsApp')));
3143 2185 }
3144 2186 if(!get_option('enable_wp_chatbot_floating_whats')) {
3145 - update_option('enable_wp_chatbot_floating_whats', '');
3146 - }
3147 - if(!get_option('qlcd_wp_chatbot_whats_num')) {
3148 - update_option('qlcd_wp_chatbot_whats_num', '');
3149 - }
2187 + update_option('enable_wp_chatbot_floating_whats', '');
2188 + }
2189 + if(!get_option('qlcd_wp_chatbot_whats_num')) {
2190 + update_option('qlcd_wp_chatbot_whats_num', '');
2191 + }
3150 2192 //Viber
3151 - if(!get_option('enable_wp_chatbot_floating_viber')) {
3152 - update_option('enable_wp_chatbot_floating_viber', '');
3153 - }
3154 - if(!get_option('qlcd_wp_chatbot_viber_acc')) {
3155 - update_option('qlcd_wp_chatbot_viber_acc', '');
3156 - }
2193 + if(!get_option('enable_wp_chatbot_floating_viber')) {
2194 + update_option('enable_wp_chatbot_floating_viber', '');
2195 + }
2196 + if(!get_option('qlcd_wp_chatbot_viber_acc')) {
2197 + update_option('qlcd_wp_chatbot_viber_acc', '');
2198 + }
3157 2199 //Integration others
3158 2200 if(!get_option('enable_wp_chatbot_floating_phone')) {
3159 2201 update_option('enable_wp_chatbot_floating_phone', '');
3160 2202 }
@@ -3282,10 +2324,9 @@
3282 2324 }
3283 2325 if(!get_option('enable_wp_chatbot_opening_hour')) {
3284 2326 update_option('wpwbot_hours', array());
3285 2327 }
3286 - wpbot_free_set_content_height_defaults();
3287 -
2328 +
3288 2329 if(!get_option('enable_wp_chatbot_dailogflow')) {
3289 2330 update_option('enable_wp_chatbot_dailogflow', '');
3290 2331 }
3291 2332 if(!get_option('qlcd_wp_chatbot_dialogflow_client_token')) {
@@ -3306,16 +2347,13 @@
3306 2347 if(!get_option('enable_wp_chatbot_post_content')) {
3307 2348 update_option('enable_wp_chatbot_post_content', '1');
3308 2349 }
3309 2350 if(!get_option('openai_engines')) {
3310 - update_option('openai_engines', 'gpt-4o');
2351 + update_option('openai_engines', 'gpt-3.5-turbo');
3311 2352 }
3312 - // if(!get_option('skip_wp_greetings')) {
3313 - update_option('skip_wp_greetings', '');
3314 - //}
3315 - set_transient( 'qcld_bot_clear_cache', 1, DAY_IN_SECONDS );
2353 +
2354 + set_transient( 'bot_clear_cache', 1, DAY_IN_SECONDS );
3316 2355 }
3317 -}
3318 2356 /*
3319 2357 * Reset Options will be insert as defualt data
3320 2358 */
3321 2359 add_action('wp_ajax_qcld_wb_chatboot_delete_all_options', 'qcld_wb_chatboot_delete_all_options');
@@ -3320,26 +2358,18 @@
3320 2358 */
3321 2359 add_action('wp_ajax_qcld_wb_chatboot_delete_all_options', 'qcld_wb_chatboot_delete_all_options');
3322 2360 //add_action('wp_ajax_nopriv_qcld_wb_chatboot_delete_all_options', 'qcld_wb_chatboot_delete_all_options');
3323 2361 //Jarvis all option will be delete during uninstlling.
3324 -if( !function_exists('qcld_wb_chatboot_delete_all_options') ){
3325 2362 function qcld_wb_chatboot_delete_all_options(){
3326 2363
3327 - if ( ! current_user_can( 'manage_options' ) ) {
3328 - wp_die( 'Unauthorized access' );
2364 + if ( ! wp_verify_nonce( $_POST['wpnonce'], 'wp_chatbot' ) ) {
2365 + die ( 'No cheating');
3329 2366 }
3330 -
3331 - if ( ! isset( $_POST['wpnonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['wpnonce'] ) ), 'wp_chatbot' ) ) {
3332 - wp_die( 'No cheating' );
3333 - }
3334 2367 delete_option('disable_wp_chatbot');
3335 2368 delete_option('disable_wp_chatbot_icon_animation');
3336 2369 delete_option('disable_wp_chatbot_on_mobile');
3337 2370 delete_option('qlcd_wp_chatbot_admin_email');
3338 2371 delete_option('qlcd_wp_chatbot_from_email');
3339 -
3340 - delete_option('disable_back_to_start_menu');
3341 - delete_option('disable_floating_button');
3342 2372
3343 2373 delete_option('disable_wp_chatbot_product_search');
3344 2374 delete_option('disable_wp_chatbot_catalog');
3345 2375 delete_option('disable_wp_chatbot_order_status');
@@ -3417,9 +2447,8 @@
3417 2447 delete_option('qlcd_wp_chatbot_asking_email');
3418 2448 delete_option('qlcd_wp_chatbot_asking_msg');
3419 2449 delete_option('qlcd_wp_chatbot_no_result');
3420 2450 delete_option('qlcd_wp_chatbot_admin_email');
3421 - delete_option('open_links_new_window');
3422 2451 delete_option('qlcd_wp_chatbot_email_sub');
3423 2452 delete_option('qlcd_wp_site_search');
3424 2453 delete_option('qlcd_wp_chatbot_email_sent');
3425 2454 delete_option('qlcd_wp_chatbot_support_phone');
@@ -3454,9 +2483,8 @@
3454 2483 delete_option('qlcd_wp_chatbot_no_cart_items');
3455 2484 delete_option('qlcd_wp_chatbot_cart_updating');
3456 2485 delete_option('qlcd_wp_chatbot_cart_removing');
3457 2486 delete_option('qlcd_wp_chatbot_email_fail');
3458 - delete_option('qlcd_wp_chatbot_relevant_post_link_openai');
3459 2487 delete_option('support_query');
3460 2488 delete_option('support_ans');
3461 2489 delete_option('qlcd_wp_chatbot_notification_interval');
3462 2490 delete_option('qlcd_wp_chatbot_notifications');
@@ -3560,45 +2588,25 @@
3560 2588 delete_option('wp_chat_user_font_family');
3561 2589 delete_option('wp_chat_bot_font_family');
3562 2590 delete_option('wp_chatbot_bot_font');
3563 2591 delete_option('wp_chatbot_user_font');
3564 - delete_option('qcld_chatbot_avatar_location');
3565 - set_transient( 'qcld_bot_clear_cache', 1, DAY_IN_SECONDS );
2592 + set_transient( 'bot_clear_cache', 1, DAY_IN_SECONDS );
3566 2593 qcld_wb_chatboot_defualt_options();
3567 2594 $html='Reset all options to default successfully.';
3568 2595 wp_send_json($html);
3569 2596 }
3570 -}
3571 2597
3572 -if( !function_exists('wpbot_free_set_content_height_defaults') ){
3573 - function wpbot_free_set_content_height_defaults() {
3574 - $chatbot_content_max_height = get_option( 'chatbot_content_max_height', false );
3575 - if ( $chatbot_content_max_height === false || $chatbot_content_max_height === '' ) {
3576 - update_option( 'chatbot_content_max_height', '80' );
3577 - }
3578 -
3579 - $chatbot_content_max_height_responsive = get_option( 'chatbot_content_max_height_responsive', false );
3580 - if ( $chatbot_content_max_height_responsive === false || $chatbot_content_max_height_responsive === '' ) {
3581 - update_option( 'chatbot_content_max_height_responsive', '90' );
3582 - }
3583 - }
3584 -}
3585 -
3586 -if( !function_exists('wpbot_free_qc_upgrade_completed') ){
3587 - function wpbot_free_qc_upgrade_completed( $upgrader_object, $options ) {
3588 - // The path to our plugin's main file
3589 - $our_plugin = plugin_basename( __FILE__ );
3590 - // If an update has taken place and the updated type is plugins and the plugins element exists
3591 - if( $options['action'] == 'update' && $options['type'] == 'plugin' && isset( $options['plugins'] ) ) {
3592 - // Iterate through the plugins being updated and check if ours is there
3593 - foreach( $options['plugins'] as $plugin ) {
3594 - if( $plugin == $our_plugin ) {
3595 - set_transient( 'qcld_bot_clear_cache', 1, DAY_IN_SECONDS );
3596 - wpbot_free_set_content_height_defaults();
3597 - }
2598 +function wpbot_free_qc_upgrade_completed( $upgrader_object, $options ) {
2599 + // The path to our plugin's main file
2600 + $our_plugin = plugin_basename( __FILE__ );
2601 + // If an update has taken place and the updated type is plugins and the plugins element exists
2602 + if( $options['action'] == 'update' && $options['type'] == 'plugin' && isset( $options['plugins'] ) ) {
2603 + // Iterate through the plugins being updated and check if ours is there
2604 + foreach( $options['plugins'] as $plugin ) {
2605 + if( $plugin == $our_plugin ) {
2606 + set_transient( 'bot_clear_cache', 1, DAY_IN_SECONDS );
3598 2607 }
3599 2608 }
3600 - update_option( 'qcld_openai_relevant_post', ['post','page'] );
3601 2609 }
3602 2610 }
3603 2611 add_action( 'upgrader_process_complete', 'wpbot_free_qc_upgrade_completed', 10, 2 );
3604 2612
@@ -3608,25 +2616,16 @@
3608 2616 *
3609 2617 * Open Ai integration
3610 2618 *
3611 2619 */
3612 -if( !function_exists('wpbot_openAi_setting_func') ){
3613 -function wpbot_openAi_setting_func (){
3614 2620
3615 - require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/admin/templates/ai-admin.php");
2621 + function wpbot_openAi_setting_func (){
2622 +
2623 + require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/openai/admin/admin_ui2.php");
3616 2624 // require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."qcld-openai-bot.php");
3617 2625
3618 -}
3619 -}
3620 -if( !function_exists('wpbot_Ai_actions_func') ){
3621 - function wpbot_Ai_actions_func (){
2626 + }
3622 2627
3623 - require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/admin/templates/ai-actions.php");
3624 - // require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."qcld-openai-bot.php");
3625 -
3626 - }
3627 -}
3628 -
3629 2628 /**
3630 2629 *
3631 2630 * Function to load translation files.
3632 2631 *
@@ -3631,16 +2630,15 @@
3631 2630 * Function to load translation files.
3632 2631 *
3633 2632 */
3634 2633
3635 -if( !function_exists('wp_chatbot_lang_init') ){
3636 - function wp_chatbot_lang_init() {
3637 - load_plugin_textdomain( 'chatbot', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
3638 - }
2634 +
2635 +function wp_chatbot_lang_init() {
2636 + load_plugin_textdomain( 'wpchatbot', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
3639 2637 }
3640 2638 add_action( 'plugins_loaded', 'wp_chatbot_lang_init');
3641 2639
3642 -$wpbot_feedback = new Qcld_Wp_Usage_Feedback(
2640 +$wpbot_feedback = new Wp_Usage_Feedback(
3643 2641 __FILE__,
3644 2642 '[email protected]',
3645 2643 false,
3646 2644 true
@@ -3645,566 +2643,420 @@
3645 2643 false,
3646 2644 true
3647 2645
3648 2646 );
3649 -if( !function_exists('wpbot_help_page_callback_func') ){
2647 +
3650 2648 function wpbot_help_page_callback_func(){
3651 2649 ?>
2650 +<div class="wrap swpm-admin-menu-wrap">
2651 + <!-- <div class="<?php // esc_attr_e( 'cxsc-settings-blocks-notic', 'wpbot' ); ?>" style="<?php // echo esc_attr('background: #2271B1'); ?>">
2652 + <p class="<?php // esc_attr_e( 'd-ib', 'wpbot' ); ?> "><?php // esc_html_e('New horizontal/wide template is now available. Select from Icons and Themes', 'wpbot'); ?>
2653 + </div> -->
2654 + <h2 class="nav-tab-wrapper sld_nav_container wppt_nav_container">
2655 + <a class="nav-tab sld_click_handle" href="#general_int"><?php echo esc_html('Getting Started'); ?></a>
2656 + <a class="nav-tab sld_click_handle nav-tab-active" href="#general_wp_nutshell"><?php echo esc_html('WPBot – In a Nutshell'); ?></a>
2657 + <a class="nav-tab sld_click_handle" id="general_debuggings" href="#general_debugging"><?php echo esc_html('Troubleshooting & FAQ'); ?></a>
3652 2658
3653 -
3654 -
3655 -<div class="wrap qcld-main-wrapper">
3656 -<div class="qcld-wp-chatbot-wrap-header">
3657 -
3658 - <div class="qcld-wp-chatbot-wrap-header-logo"><a href="#" class="qcld-wp-chatbot-wrap-site__logo"><img src="<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/chatbot.png' ); ?>" alt="Dialogflow CX"> WPBot Control Panel </a>
3659 - <p><strong>Core Version:</strong> v<?php echo esc_html( QCLD_wpCHATBOT_VERSION ); ?></p>
3660 - </div>
3661 - <ul class="qcld-wp-chatbot-wrap-version-wrapper">
3662 - <li>
3663 - <a class="wpchatbot-Upgrade" href="https://www.wpbot.pro/" target="_blank">Upgrade To Pro</a>
3664 -
3665 - </li>
3666 - </ul>
3667 -</div>
3668 - <div class="qcld-wrap swpm-admin-menu-wrap">
3669 - <div class="nav-tab-wrapper sld_nav_container wppt_nav_container qcld_help_wppt_nav_container">
3670 - <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>
3671 - <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>
3672 - <a class="nav-tab sld_click_handle" id="general_debuggings" href="#general_debugging"><span class="wpwbot-admin-tab-icon "> <i class="fa fa-question-circle-o"></i> </span><?php echo esc_html('Troubleshooting & FAQ'); ?></a>
3673 - </div>
3674 - <div class="content_qcbot_help_secion">
3675 - <div class=" wppt-settings-section" id="general_wp_nutshell" style="display:none;">
3676 - <div class="content form-container qcbot_help_secion" style="">
3677 - <!-- new Section -->
3678 - <h3 class="qcld-wpbot-main-tabs-title"><?php echo esc_html__('WPBot – In a Nutshell', 'chatbot'); ?></h3>
3679 - <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>
3680 - <div class="panel panel-default">
3681 - <div class="panel-heading" role="tab" id="IntentheadingOne">
3682 - <h4 class="panel-title">
3683 - <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>
3684 - </h4>
3685 - </div>
3686 - <div id="IntentcollapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="IntentheadingOne">
3687 - <div class="panel-body">
3688 - <?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>
3689 - <?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>
3690 - <?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>
3691 - <?php echo esc_html_e('Please check this article for', 'chatbot'); ?> <span class="wppt_nav_container qcld-plan-tab-text">
3692 - <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'); ?>
3693 - </div>
3694 - </div>
3695 - </div>
3696 - <div class="panel panel-default">
3697 - <div class="panel-heading" role="tab" id="headingSix">
3698 - <h4 class="panel-title">
3699 - <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseSix" aria-expanded="false" aria-controls="collapseSix"> <?php esc_html_e('Action Start Menu', 'chatbot'); ?> </a>
3700 - </h4>
3701 - </div>
3702 - <div id="collapseSix" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingSix">
3703 - <div class="panel-body">
3704 - <?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 Action 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->Action Start Menu you can drag Available Menu Items (Intents) to the Active Menu Items area.', 'chatbot'); ?></br></br>
3705 - <?php echo esc_html_e('Besides the built-in Intents, you can also create custom Intents for your Action 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>
3706 - <?php echo esc_html_e('We recommend enabling', 'chatbot'); ?><b><?php echo esc_html_e(' Show Action Start Menu After Greetings ', 'chatbot'); ?></b><?php echo esc_html_e('from ChatBot Pro->Settings->General settings.', 'chatbot'); ?>
3707 - </div>
3708 - </div>
3709 - </div>
3710 - <div class="panel panel-default">
3711 - <div class="panel-heading" role="tab" id="headingSeven">
3712 - <h4 class="panel-title">
3713 - <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>
3714 - </h4>
3715 - </div>
3716 - <div id="collapseSeven" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingSeven">
3717 - <div class="panel-body">
3718 - <?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 Action Start Menu.', 'chatbot'); ?></br></br>
3719 - <?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'); ?>
3720 - </div>
3721 - </div>
3722 - </div>
3723 - <div class="panel panel-default">
3724 - <div class="panel-heading" role="tab" id="headingEight">
3725 - <h4 class="panel-title">
3726 - <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>
3727 - </h4>
3728 - </div>
3729 - <div id="collapseEight" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingEight">
3730 - <div class="panel-body">
3731 - <?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'); ?>
3732 - </div>
3733 - </div>
3734 - </div>
3735 - <div class="panel panel-default">
3736 - <div class="panel-heading" role="tab" id="headingtwo">
3737 - <h4 class="panel-title">
3738 - <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>
3739 - </h4>
3740 - </div>
3741 - <div id="collapsetwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingtwo">
3742 - <div class="panel-body">
3743 - <?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'); ?>
3744 - </div>
3745 - </div>
3746 - </div>
3747 - <div class="panel panel-default">
3748 - <div class="panel-heading" role="tab" id="headingThree">
3749 - <h4 class="panel-title">
3750 - <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>
3751 - </h4>
3752 - </div>
3753 - <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
3754 - <div class="panel-body">
3755 - <?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'); ?>
3756 - </div>
3757 - </div>
3758 - </div>
3759 - <div class="panel panel-default">
3760 - <div class="panel-heading" role="tab" id="headingten">
3761 - <h4 class="panel-title">
3762 - <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>
3763 - </h4>
3764 - </div>
3765 - <div id="collapseten" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingten">
3766 - <div class="panel-body">
3767 - <?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'); ?>
3768 - </div>
3769 - </div>
3770 - </div>
3771 - <div class="panel panel-default">
3772 - <div class="panel-heading" role="tab" id="headingFour">
3773 - <h4 class="panel-title">
3774 - <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>
3775 - </h4>
3776 - </div>
3777 - <div id="collapseFour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFour">
3778 - <div class="panel-body">
3779 - <?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'); ?>
3780 - </div>
3781 - </div>
3782 - </div>
3783 - <div class="panel panel-default">
3784 - <div class="panel-heading" role="tab" id="headingFive">
3785 - <h4 class="panel-title">
3786 - <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>
3787 - </h4>
3788 - </div>
3789 - <div id="collapseFive" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFive">
3790 - <div class="panel-body">
3791 - <?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'); ?>
3792 - </div>
3793 - </div>
3794 - </div>
2659 + </h2>
2660 + <div class="container wppt-settings-section" style="margin-right:unset;margin-left:unset; display:block; margin-top:40px" id="general_wp_nutshell">
2661 + <div class="content form-container qcbot_help_secion" style="">
2662 + <!-- new Section -->
2663 +
2664 + <h2 style="margin-top: 10px;color:#fff"><?php echo esc_html__('WPBot – In a Nutshell', 'wpbot'); ?></h2>
2665 +
2666 + <h6 style="color:#fff"><?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'); ?></h6>
2667 + <div class="panel panel-default">
2668 + <div class="panel-heading" role="tab" id="IntentheadingOne">
2669 + <h4 class="panel-title">
2670 + <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>
2671 + </h4>
2672 + </div>
2673 + <div id="IntentcollapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="IntentheadingOne">
2674 + <div class="panel-body">
2675 + <?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>
2676 + <?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>
2677 + <?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>
2678 + <?php echo esc_html_e('Please check this article for'); ?> <h2 class="wppt_nav_container qcld-plan-tab-text">
2679 + <a class="nav-tab qcld-plan-tab-text" href="#general_int"><?php echo esc_html_e('more details'); ?></a> </h2> <?php echo esc_html_e('on how you can create Intents and Responses.'); ?>
2680 + </div>
2681 + </div>
3795 2682 </div>
3796 - </div>
3797 - <div class=" wppt-settings-section" id="general_int">
3798 - <div class="content form-container qcbot_help_secion" style="">
3799 - <!-- new Section -->
3800 - <h3 class="qcld-wpbot-main-tabs-title"><?php echo esc_html__('WPBot Interactions', 'chatbot'); ?></h3>
3801 - <p><?php echo esc_html__('You can use WPBot to both answer user questions and collect information from the users.', 'chatbot'); ?></p>
3802 - <h4><?php echo esc_html__('To create answers to user questions you can use:', 'chatbot'); ?></h4>
3803 - <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>
3804 - <h4> <?php echo esc_html__('To collect information from your users you can use:', 'chatbot'); ?></h4>
3805 - <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>
3806 - <hr>
3807 - <p>
3808 - <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'); ?>
3809 - </b></p>
3810 - <p><b><?php echo esc_html__('To generate direct text responses, you need to use either Simple Text Responses or AI services. ', 'chatbot'); ?>
3811 - </b></p>
3812 - <hr>
3813 - <h4><?php echo esc_html__('You can create user interactions in the following ways:', 'chatbot'); ?></h4>
3814 - <div class="panel panel-default">
3815 - <div class="panel-heading" role="tab" id="headingOne">
3816 - <h4 class="panel-title">
3817 - <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>
3818 - </h4>
3819 - </div>
3820 - <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
3821 - <div class="panel-body">
3822 - <?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'); ?>
2683 + <div class="panel panel-default">
2684 + <div class="panel-heading" role="tab" id="headingSix">
2685 + <h4 class="panel-title">
2686 + <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>
2687 + </h4>
2688 + </div>
2689 + <div id="collapseSix" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingSix">
2690 + <div class="panel-body">
2691 + <?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>
2692 + <?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>
2693 + <?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.'); ?>
2694 + </div>
2695 + </div>
2696 + </div>
2697 + <div class="panel panel-default">
2698 + <div class="panel-heading" role="tab" id="headingSeven">
2699 + <h4 class="panel-title">
2700 + <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>
2701 + </h4>
2702 + </div>
2703 + <div id="collapseSeven" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingSeven">
2704 + <div class="panel-body">
2705 + <?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>
2706 + <?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.'); ?>
2707 + </div>
2708 + </div>
2709 + </div>
2710 + <div class="panel panel-default">
2711 + <div class="panel-heading" role="tab" id="headingEight">
2712 + <h4 class="panel-title">
2713 + <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>
2714 + </h4>
2715 + </div>
2716 + <div id="collapseEight" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingEight">
2717 + <div class="panel-body">
2718 + <?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..'); ?>
2719 + </div>
2720 + </div>
2721 + </div>
2722 + <div class="panel panel-default">
2723 + <div class="panel-heading" role="tab" id="headingtwo">
2724 + <h4 class="panel-title">
2725 + <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>
2726 + </h4>
2727 + </div>
2728 + <div id="collapsetwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingtwo">
2729 + <div class="panel-body">
2730 + <?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.'); ?>
2731 + </div>
2732 + </div>
2733 + </div>
2734 + <div class="panel panel-default">
2735 + <div class="panel-heading" role="tab" id="headingThree">
2736 + <h4 class="panel-title">
2737 + <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>
2738 + </h4>
2739 + </div>
2740 + <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
2741 + <div class="panel-body">
2742 + <?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.'); ?>
2743 + </div>
2744 + </div>
2745 + </div>
2746 + <div class="panel panel-default">
2747 + <div class="panel-heading" role="tab" id="headingten">
2748 + <h4 class="panel-title">
2749 + <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>
2750 + </h4>
2751 + </div>
2752 + <div id="collapseten" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingten">
2753 + <div class="panel-body">
2754 + <?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.'); ?>
2755 + </div>
2756 + </div>
2757 + </div>
2758 + <div class="panel panel-default">
2759 + <div class="panel-heading" role="tab" id="headingFour">
2760 + <h4 class="panel-title">
2761 + <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>
2762 + </h4>
2763 + </div>
2764 + <div id="collapseFour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFour">
2765 + <div class="panel-body">
2766 + <?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.'); ?>
2767 + </div>
2768 + </div>
2769 + </div>
2770 + <div class="panel panel-default">
2771 + <div class="panel-heading" role="tab" id="headingFive">
2772 + <h4 class="panel-title">
2773 + <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>
2774 + </h4>
2775 + </div>
2776 + <div id="collapseFive" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFive">
2777 + <div class="panel-body">
2778 + <?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.'); ?>
2779 + </div>
2780 + </div>
2781 + </div>
2782 + </div>
2783 + </div>
2784 +
2785 + <div class="container wppt-settings-section" style="margin-right:unset;margin-left:unset;margin-top:40px;display:none" id="general_int">
2786 + <div class="content form-container qcbot_help_secion" style="">
2787 + <!-- new Section -->
2788 +
2789 + <h2 style="margin-top: 10px;color:#fff"><?php echo esc_html__('WPBot Interactions', 'wpbot'); ?></h2>
2790 + <p style="color: #fff !important;"><?php echo esc_html__('You can use WPBot to both answer user questions and collect information from the users.', 'wpbot'); ?></br>
2791 + <?php echo esc_html__('To create answers to user questions you can use:', 'wpbot'); ?></br>
2792 + <?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'); ?></br>
2793 + <?php echo esc_html__('To collect information from your users you can use:', 'wpbot'); ?></br>
2794 + <?php echo esc_html__('Conversational forms(built-in), Mail us(built-in), Call me back(built-in), Collect feedback(built-in) features', 'wpbot'); ?></p>
2795 + <h6 style="color:#fff"><?php echo esc_html__('You can create user interactions in the following ways:', 'wpbot'); ?></h6>
2796 + <div class="panel panel-default">
2797 + <div class="panel-heading" role="tab" id="headingOne">
2798 + <h4 class="panel-title">
2799 + <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>
2800 + </h4>
2801 + </div>
2802 + <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
2803 + <div class="panel-body">
2804 + <?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'); ?>
2805 +
3823 2806 <div class="section-container">
3824 - <div class="wpb_column vc_column_container vc_col-sm-6">
3825 - <div class="vc_column-inner ">
3826 - <div class="wpb_wrapper">
3827 - <div class="to-icon-box left txt-left">
3828 - <div class="to-icon-txt fa-4x-txt ">
3829 - <h3>
3830 - <span>// </span><?php esc_html_e('Simple Text Responses', 'chatbot'); ?>
3831 - </h3>
3832 - <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>
3833 - </div>
2807 + <div class="wpb_column vc_column_container vc_col-sm-6">
2808 + <div class="vc_column-inner ">
2809 + <div class="wpb_wrapper">
2810 + <div class="to-icon-box left txt-left">
2811 + <div class="to-icon-txt fa-4x-txt ">
2812 + <h3>
2813 + <span>// </span><?php esc_html_e('Simple Text Responses', 'wpbot'); ?>
2814 + </h3>
2815 + <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>
2816 + </div>
2817 + </div>
2818 + <div class="to-icon-box left txt-left">
2819 + <div class="to-icon-txt fa-4x-txt ">
2820 + <h3>
2821 + <span>// </span><?php esc_html_e('Send eMail, Call Me Back &amp; Feedback Collection', 'wpbot'); ?>
2822 + </h3>
2823 + <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>
2824 + </div>
2825 + </div>
2826 + <div class="to-icon-box left txt-left">
2827 + <div class="to-icon-txt fa-4x-txt ">
2828 + <h3>
2829 + <span>// </span><?php esc_html_e('Advanced Site Search', 'wpbot'); ?> <span class="qc_wpbot_pro">PRO</span>
2830 + </h3>
2831 + <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>
2832 + </div>
2833 + </div>
3834 2834 </div>
3835 - <div class="to-icon-box left txt-left">
3836 - <div class="to-icon-txt fa-4x-txt ">
3837 - <h3>
3838 - <span>// </span><?php esc_html_e('Send eMail, Call Me Back &amp; Feedback Collection', 'chatbot'); ?>
3839 - </h3>
3840 - <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 Action Start Menu.', 'chatbot'); ?></p>
3841 - </div>
2835 + </div>
2836 + </div>
2837 + <div class="wpb_column vc_column_container vc_col-sm-6">
2838 + <div class="vc_column-inner ">
2839 + <div class="wpb_wrapper">
2840 + <div class="to-icon-box left txt-left">
2841 + <div class="to-icon-txt fa-4x-txt ">
2842 + <h3>
2843 + <span>// </span><?php esc_html_e('Frequently Asked Questions', 'wpbot'); ?>
2844 + </h3>
2845 + <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>
2846 + </div>
2847 + </div>
2848 + <div class="to-icon-box left txt-left">
2849 + <div class="to-icon-txt fa-4x-txt ">
2850 + <h3>
2851 + <span>// </span>Ask for name, email, phone number etc.
2852 + </h3>
2853 + <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>
2854 + </div>
2855 + </div>
2856 + <div class="to-icon-box left txt-left">
2857 + <div class="to-icon-txt fa-4x-txt ">
2858 + <h3>
2859 + <span>// </span><?php esc_html_e('Newsletter Subscription', 'wpbot'); ?> <span class="qc_wpbot_pro">PRO</span>
2860 + </h3>
2861 + <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>
2862 + </div>
2863 + </div>
3842 2864 </div>
3843 - <div class="to-icon-box left txt-left">
3844 - <div class="to-icon-txt fa-4x-txt ">
3845 - <h3>
3846 - <span>// </span><?php esc_html_e('Advanced Site Search', 'chatbot'); ?> <span class="qc_wpbot_pro">PRO</span>
3847 - </h3>
3848 - <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>
3849 - </div>
3850 - </div>
3851 - </div>
3852 - </div>
3853 - </div>
3854 - <div class="wpb_column vc_column_container vc_col-sm-6">
3855 - <div class="vc_column-inner ">
3856 - <div class="wpb_wrapper">
3857 - <div class="to-icon-box left txt-left">
3858 - <div class="to-icon-txt fa-4x-txt ">
3859 - <h3>
3860 - <span>// </span><?php esc_html_e('Frequently Asked Questions', 'chatbot'); ?>
3861 - </h3>
3862 - <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>
3863 - </div>
3864 - </div>
3865 - <div class="to-icon-box left txt-left">
3866 - <div class="to-icon-txt fa-4x-txt ">
3867 - <h3>
3868 - <span>// </span>Ask for name, email, phone number etc.
3869 - </h3>
3870 - <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>
3871 - </div>
3872 - </div>
3873 - <div class="to-icon-box left txt-left">
3874 - <div class="to-icon-txt fa-4x-txt ">
3875 - <h3>
3876 - <span>// </span><?php esc_html_e('Newsletter Subscription', 'chatbot'); ?> <span class="qc_wpbot_pro">PRO</span>
3877 - </h3>
3878 - <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>
3879 - </div>
3880 - </div>
3881 - </div>
3882 - </div>
3883 - </div>
2865 + </div>
2866 + </div>
3884 2867 </div>
3885 - </div>
3886 - </div>
3887 - </div>
3888 - <div class="panel panel-default">
3889 - <div class="panel-heading" role="tab" id="headingTwo">
3890 - <h4 class="panel-title">
3891 - <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>
3892 - </h4>
3893 - </div>
3894 - <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
3895 - <div class="panel-body">
3896 - <p><?php esc_html_e('Extend the Action 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>
3897 - <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>.
3898 - </p>
3899 - <h4><?php esc_html_e('Conversational Form Builder Free or Pro version works with the WPBot Free or Pro versions.', 'chatbot'); ?></h4>
3900 - <a class="FormBuilder" href="https://wordpress.org/plugins/conversational-forms/" target="_blank"><?php esc_html_e('Download Free Version', 'chatbot'); ?></a>
3901 - <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>
3902 - <h4><?php esc_html_e('What Can You Do with it?', 'chatbot'); ?></h4>
3903 - <p><?php esc_html_e('Conversation Forms allows you to create a wide variety of forms, that might include:', 'chatbot'); ?></p>
3904 - <ul>
3905 - <li><?php esc_html_e('Create menu or button driven conversations', 'chatbot'); ?></li>
3906 - <li><?php esc_html_e('Conditional <strong>Menu Driven Conversations', 'chatbot'); ?></strong>
3907 - <span class="qc_wpbot_pro" style="font-size: 9px;"><?php esc_html_e('PRO', 'chatbot'); ?></span>
3908 - </li>
3909 - <li><?php esc_html_e('Standard Contact Forms', 'chatbot'); ?></li>
3910 - <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>
3911 - </li>
3912 - <li>Job <strong><?php esc_html_e('Application Forms', 'chatbot'); ?></strong>
3913 - </li>
3914 - <li>
3915 - <strong><?php esc_html_e('Lead Capture', 'chatbot'); ?></strong> <?php esc_html_e('Forms', 'chatbot'); ?>
3916 - </li>
3917 - <li><?php esc_html_e('Various types of', 'chatbot'); ?> <strong><?php esc_html_e('Calculators', 'chatbot'); ?></strong>
3918 - <span class="qc_wpbot_pro" style="font-size: 9px;"><?php esc_html_e('PRO', 'chatbot'); ?></span>
3919 - </li>
3920 - <li><?php esc_html_e('Feedback', 'chatbot'); ?> <strong>Survey</strong><?php esc_html_e(' Forms etc.', 'chatbot'); ?> </li>
3921 - </ul>
3922 - </div>
3923 - </div>
3924 - </div>
3925 - <div class="panel panel-default">
3926 - <div class="panel-heading" role="tab" id="AIheadingThree">
3927 - <h4 class="panel-title">
3928 - <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>
3929 - </h4>
3930 - </div>
3931 - <div id="AIcollapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="AIheadingThree">
3932 - <div class="panel-body">
2868 + </div>
2869 + </div>
2870 + </div>
2871 + <div class="panel panel-default">
2872 + <div class="panel-heading" role="tab" id="headingTwo">
2873 + <h4 class="panel-title">
2874 + <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>
2875 + </h4>
2876 + </div>
2877 + <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
2878 + <div class="panel-body">
2879 + <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>
2880 + <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>.
2881 + </p>
2882 + <h4><?php esc_html_e('Conversational Form Builder Free or Pro version works with the WPBot Free or Pro versions.', 'wpbot'); ?></h4>
2883 + <a class="FormBuilder" href="https://wordpress.org/plugins/conversational-forms/" target="_blank"><?php esc_html_e('Download Free Version', 'wpbot'); ?></a>
2884 + <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>
2885 + <h4><?php esc_html_e('What Can You Do with it?', 'wpbot'); ?></h4>
2886 + <p><?php esc_html_e('Conversation Forms allows you to create a wide variety of forms, that might include:', 'wpbot'); ?></p>
2887 + <ul>
2888 + <li><?php esc_html_e('Create menu or button driven conversations', 'wpbot'); ?></li>
2889 + <li><?php esc_html_e('Conditional <strong>Menu Driven Conversations', 'wpbot'); ?></strong>
2890 + <span class="qc_wpbot_pro" style="font-size: 9px;"><?php esc_html_e('PRO', 'wpbot'); ?></span>
2891 + </li>
2892 + <li><?php esc_html_e('Standard Contact Forms', 'wpbot'); ?></li>
2893 + <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>
2894 + </li>
2895 + <li>Job <strong><?php esc_html_e('Application Forms', 'wpbot'); ?></strong>
2896 + </li>
2897 + <li>
2898 + <strong><?php esc_html_e('Lead Capture', 'wpbot'); ?></strong> <?php esc_html_e('Forms', 'wpbot'); ?>
2899 + </li>
2900 + <li><?php esc_html_e('Various types of', 'wpbot'); ?> <strong><?php esc_html_e('Calculators', 'wpbot'); ?></strong>
2901 + <span class="qc_wpbot_pro" style="font-size: 9px;"><?php esc_html_e('PRO', 'wpbot'); ?></span>
2902 + </li>
2903 + <li><?php esc_html_e('Feedback', 'wpbot'); ?> <strong>Survey</strong><?php esc_html_e(' Forms etc.', 'wpbot'); ?> </li>
2904 + </ul>
2905 + </div>
2906 + </div>
2907 + </div>
2908 + <div class="panel panel-default">
2909 + <div class="panel-heading" role="tab" id="AIheadingThree">
2910 + <h4 class="panel-title">
2911 + <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>
2912 + </h4>
2913 + </div>
2914 + <div id="AIcollapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="AIheadingThree">
2915 + <div class="panel-body">
3933 2916 <div class="section-container">
3934 - <div class="wpb_column vc_column_container vc_col-sm-6">
3935 - <div class="wpb_wrapper">
3936 - <h3><?php esc_html_e('DialogFlow Essential', 'chatbot'); ?></h3>
3937 - <?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'); ?>
3938 - <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>
3939 - </p>
3940 - <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>
3941 - </p>
3942 - <h3><?php esc_html_e('OpenAI', 'chatbot'); ?></h3>
3943 - <?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'); ?>
3944 - </div>
3945 - </div>
3946 - <div class="wpb_column vc_column_container vc_col-sm-6">
3947 - <div class="wpb_wrapper">
3948 - <h3><?php esc_html_e('DialogFlow CX', 'chatbot'); ?> <span class="qc_wpbot_pro">PRO</span>
3949 - </h3>
3950 - <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>
3951 - <ul>
2917 + <div class="wpb_column vc_column_container vc_col-sm-6">
2918 + <div class="wpb_wrapper">
2919 + <h2 style="font-size: 20px;"><?php esc_html_e('DialogFlow Essential', 'wpbot'); ?></h2> <?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 <strong>automatically</strong> 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'); ?> <p></p>
2920 + <p style="text-align: left;"><?php esc_html_e('In addition you can also Enable ', 'wpbot'); ?><strong><?php esc_html_e('Advanced Chained Question and Answers</strong> 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', 'wpbot'); ?></span>
2921 + </p>
2922 + <p style="text-align: left;"><?php esc_html_e('WPBot also supports Rich responses using Facebook Messenger integration. This allows you to display Image,', 'wpbot'); ?> <strong>Cards</strong><?php esc_html_e(', Quick Text Reply or Custom PayLoad inside the ChatBot window. You can also insert an ', 'wpbot'); ?><strong><?php esc_html_e('image', 'wpbot'); ?></strong><?php esc_html_e(' or', 'wpbot'); ?> <strong><?php esc_html_e('youtube video', 'wpbot'); ?></strong><?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>
2923 + </p>
2924 + <h2 style="font-size: 20px;"><?php esc_html_e('OpenAI', 'wpbot'); ?></h2><?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'); ?>
2925 + </div>
2926 + </div>
2927 + <div class="wpb_column vc_column_container vc_col-sm-6">
2928 + <div class="wpb_wrapper">
2929 + <h2 style="font-size: 20px;"><?php esc_html_e('DialogFlow CX', 'wpbot'); ?> <span class="qc_wpbot_pro">PRO</span>
2930 + </h2>
2931 + <p><?php esc_html_e('WPBot supports', 'wpbot'); ?> <strong><?php esc_html_e('visual workflow builder', 'wpbot'); ?></strong><?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'); ?> <strong><?php esc_html_e('workflow', 'wpbot'); ?></strong>. </p>
2932 + <ul>
3952 2933 <li>
3953 - <?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'); ?>
2934 + <strong><?php esc_html_e('Console visualization', 'wpbot'); ?></strong><?php esc_html_e(': A new', 'wpbot'); ?> <strong><?php esc_html_e('visual builder', 'wpbot'); ?></strong> <?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'); ?>
3954 2935 </li>
3955 2936 <li>
3956 - <?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'); ?>
2937 + <strong><?php esc_html_e('Intuitive and powerful conversation control', 'wpbot'); ?></strong>: <?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'); ?>
3957 2938 </li>
3958 2939 <li>
3959 - <?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'); ?>
2940 + <strong><?php esc_html_e('Flows for agent partitions', 'wpbot'); ?></strong>: <?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'); ?>
3960 2941 </li>
3961 - <img style="width:100%" src="<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/dialogflow-cx-1024x676.jpg' );?>" alt="Dialogflow CX">
3962 - </ul>
3963 - </div>
3964 - </div>
2942 + <img style="width:100%" src="<?php echo QCLD_wpCHATBOT_IMG_URL . '/dialogflow-cx-1024x676.jpg';?>" alt="Dialogflow CX">
2943 + </ul>
2944 + </div>
2945 + </div>
3965 2946 </div>
3966 - </div>
3967 - </div>
3968 - </div>
2947 + </div>
2948 + </div>
3969 2949 </div>
3970 - </div>
3971 - <div class=" wppt-settings-section" id="general_debugging" style="display:none;">
3972 - <div class="content form-container qcbot_help_secion" >
3973 - <div class="" >
3974 - <h3 class="qcld-wpbot-main-tabs-title"><?php esc_html_e('Tips', 'chatbot'); ?></h3>
3975 - <h3><?php esc_html_e('Tutorial', 'chatbot'); ?></h3>
3976 - <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>
3977 - <h3><?php esc_html_e('Simple Text Responses', 'chatbot'); ?></h3>
3978 - <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>
3979 - <h3><?php esc_html_e('Setting Updates', 'chatbot'); ?></h3>
3980 - <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>
3981 - <h3><?php esc_html_e('Note', 'chatbot'); ?></h3>
3982 - <p><?php esc_html_e('You could use &lt;br&gt; tag in Language Center & Dialogflow Responses for line break.', 'chatbot'); ?></p>
3983 - </div>
3984 - </div>
3985 -
3986 -
3987 -
3988 -
3989 -
3990 -
3991 -
3992 - <div class="panel panel-default">
3993 - <div class="panel-heading" role="tab" id="faqone">
3994 - <h4 class="panel-title">
3995 - <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>
3996 - </h4>
3997 - </div>
3998 - <div id="faqcollapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqone">
3999 - <div class="panel-body">
4000 - <?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'); ?>
4001 - </div>
4002 - </div>
4003 - </div>
4004 -
4005 -
4006 -
4007 -
4008 - <div class="panel panel-default">
4009 - <div class="panel-heading" role="tab" id="faqtwo">
4010 - <h4 class="panel-title">
4011 - <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>
4012 - </h4>
4013 - </div>
4014 - <div id="faqcollapsetwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqtwo">
4015 - <div class="panel-body">
4016 - <?php echo esc_html_e('To Debug: ', 'chatbot'); ?><br>
4017 - <?php echo esc_html_e(' 1. Make sure that you have created the Google Project and the Service account as an Owner', 'chatbot'); ?><br>
4018 - <?php echo esc_html_e('2. Make sure that you have connected to the correct Dialogflow agent', 'chatbot'); ?><br>
4019 - <?php echo esc_html_e('3. Follow the steps in this tutorial correctly: https://www.wpbot.pro/dialogflow-integration', 'chatbot'); ?><br>
4020 - <?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'); ?>
4021 - </div>
4022 - </div>
4023 - </div>
4024 -
4025 -
4026 - <div class="panel panel-default">
4027 - <div class="panel-heading" role="tab" id="faqthree">
4028 - <h4 class="panel-title">
4029 - <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
4030 -', 'chatbot'); ?> </a>
4031 - </h4>
4032 - </div>
4033 - <div id="faqcollapsethree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqthree">
4034 - <div class="panel-body">
4035 - <?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'); ?>
4036 - </div>
4037 - </div>
4038 - </div>
4039 -
4040 - <div class="panel panel-default">
4041 - <div class="panel-heading" role="tab" id="faqfour">
4042 - <h4 class="panel-title">
4043 - <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
4044 -', 'chatbot'); ?> </a>
4045 - </h4>
4046 - </div>
4047 - <div id="faqcollapsefour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqfour">
4048 - <div class="panel-body">
4049 - <?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'); ?>
4050 - </div>
4051 - </div>
4052 - </div>
4053 -
4054 -
4055 - <div class="panel panel-default">
4056 - <div class="panel-heading" role="tab" id="faqfive">
4057 - <h4 class="panel-title">
4058 - <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>
4059 - </h4>
4060 - </div>
4061 - <div id="faqcollapsefive" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqfive">
4062 - <div class="panel-body">
4063 - <?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'); ?>
4064 - </div>
4065 - </div>
4066 - </div>
4067 -
4068 -
4069 -
4070 - <div class="panel panel-default">
4071 - <div class="panel-heading" role="tab" id="faqsix">
4072 - <h4 class="panel-title">
4073 - <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>
4074 - </h4>
4075 - </div>
4076 - <div id="faqcollapsesix" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqsix">
4077 - <div class="panel-body">
4078 - <?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>
4079 - <?php echo esc_html_e('Also go to Simple Text Responses and press the Re-Index button.', 'chatbot'); ?><br>
4080 - <?php echo esc_html_e(' After that try purging any cache and test the chatbot in Incognito mode', 'chatbot'); ?><br>
4081 - <?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'); ?>
4082 - </div>
4083 - </div>
4084 - </div>
4085 -
4086 -
4087 - <div class="panel panel-default">
4088 - <div class="panel-heading" role="tab" id="faqseven">
4089 - <h4 class="panel-title">
4090 - <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>
4091 - </h4>
4092 - </div>
4093 - <div id="faqcollapseseven" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqseven">
4094 - <div class="panel-body">
4095 - <?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>
4096 - <?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>
4097 - <?php echo esc_html_e('Also go to Simple Text Responses and press the Re-Index button.', 'chatbot'); ?><br>
4098 - <?php echo esc_html_e('After that remember to test in a browser Incognito mode to avoid cache and cookies.', 'chatbot'); ?>
4099 - </div>
4100 - </div>
4101 - </div>
4102 -
4103 - <div class="panel panel-default">
4104 - <div class="panel-heading" role="tab" id="faqeight">
4105 - <h4 class="panel-title">
4106 - <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>
4107 - </h4>
4108 - </div>
4109 - <div id="faqcollapseeight" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqeight">
4110 - <div class="panel-body">
4111 - <?php echo esc_html_e('Please check the plugin`s Help Section for details on this', 'chatbot'); ?>
4112 - </div>
4113 - </div>
4114 - </div>
4115 -
4116 - <div class="panel panel-default">
4117 - <div class="panel-heading" role="tab" id="faqnine">
4118 - <h4 class="panel-title">
4119 - <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>
4120 - </h4>
4121 - </div>
4122 - <div id="faqcollapsenine" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqnine">
4123 - <div class="panel-body">
4124 - <?php echo esc_html_e('Please use the <br> tag for line breaks.', 'chatbot'); ?>
4125 - </div>
4126 - </div>
4127 - </div>
4128 -
4129 - <div class="panel panel-default">
4130 - <div class="panel-heading" role="tab" id="faqten">
4131 - <h4 class="panel-title">
4132 - <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>
4133 - </h4>
4134 - </div>
4135 - <div id="faqcollapseten" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqten">
4136 - <div class="panel-body">
4137 - <?php echo esc_html_e('Yes, common HTML tags link link href, strong, br etc. are supported.', 'chatbot'); ?>
4138 - </div>
4139 - </div>
4140 - </div>
4141 -
4142 - <div class="panel panel-default">
4143 - <div class="panel-heading" role="tab" id="faqeleven">
4144 - <h4 class="panel-title">
4145 - <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>
4146 - </h4>
4147 - </div>
4148 - <div id="faqcollapseeleven" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqeleven">
4149 - <div class="panel-body">
4150 - <?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'); ?>
4151 - </div>
4152 - </div>
4153 - </div>
4154 -
4155 -
4156 - <div class="panel panel-default">
4157 - <div class="panel-heading" role="tab" id="faqtwelve">
4158 - <h4 class="panel-title">
4159 - <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>
4160 - </h4>
4161 - </div>
4162 - <div id="faqcollapsetwelve" class="panel-collapse collapse" role="tabpanel" aria-labelledby="faqtwelve">
4163 - <div class="panel-body">
4164 - <?php echo esc_html_e('You can disable predefined intents FAQ, eMail, Call me from WPBot Lite > Settings page`s Action Start Menu Section.', 'chatbot'); ?>
4165 - </div>
4166 - </div>
4167 - </div>
4168 -
4169 -
4170 -
4171 - </div>
4172 - </div>
4173 - </div>
2950 + </div>
2951 + </div>
2952 +
2953 + <div class="container wppt-settings-section" style="margin-right:unset;margin-left:unset;display:none" id="general_debugging">
2954 + <div class="content form-container qcbot_help_secion" style="margin-right:unset;margin-left:unset; margin-top:40px" >
2955 + <div class="" style="color:#fff">
2956 + <h2 style="font-size:28px;margin-top: 10px;"><?php esc_html_e('Tips', 'wpbot'); ?></h2>
2957 + <h2 style="font-size:20px;margin-top: 10px;"><?php esc_html_e('Tutorial', 'wpbot'); ?></h2>
2958 + <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>
2959 + <h2 style="font-size:20px"><?php esc_html_e('Simple Text Responses', 'wpbot'); ?></h2>
2960 + <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>
2961 + <h2 style="font-size:20px"><?php esc_html_e('Setting Updates', 'wpbot'); ?></h2>
2962 + <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>
2963 + <h2 style="font-size:20px"><?php esc_html_e('Note', 'wpbot'); ?></h2>
2964 + <p><?php esc_html_e('You could use &lt;br&gt; tag in Language Center & Dialogflow Responses for line break.', 'wpbot'); ?></p>
2965 + </div>
2966 + </div>
2967 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;margin-top:0px">
2968 + <h2 style="font-size:20px"><?php esc_html_e('Problem: I changed language and/or some settings but do not see the changes.', 'wpbot'); ?></h2>
2969 + <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>
2970 + </div>
2971 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2972 + <h2 style="font-size:20px"><?php esc_html_e('Problem: I cannot connect to the DialogFlow', 'wpbot'); ?></h2>
2973 + <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>
2974 + <?php esc_html_e('2. Make sure that you have connected to the correct Dialogflow agent', 'wpbot'); ?><br>
2975 + <?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>
2976 + <?php esc_html_e(' 4. Make sure that the Google Client Package is Installed on Your Website.<br>
2977 + 5. For DialogFlow agent region, try choosing any region other than the EU region which has known issues.<br>
2978 + 6. Make sure to download and import the sample DialogFlow agent to your agent<br>
2979 + 7. Test the ChatBot in the browser Incognito mode', 'wpbot'); ?></p>
2980 + </div>
2981 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2982 + <h2 style="font-size:20px"><?php esc_html_e('Problem: I am not getting emails from the ChatBot', 'wpbot'); ?></h2>
2983 + <p><?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'); ?></p>
2984 + </div>
2985 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2986 + <h2 style="font-size:20px"><?php esc_html_e('Problem: Simple text responses are not working or getting an error', 'wpbot'); ?></h2>
2987 + <p><?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'); ?></p>
2988 + </div>
2989 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2990 + <h2 style="font-size:20px"><?php esc_html_e('Problem: I changed language or some other settings but do not see them when testing', 'wpbot'); ?></h2>
2991 + <p><?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'); ?></p>
2992 + </div>
2993 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2994 + <h2 style="font-size:20px"><?php esc_html_e('Problem: The ChatBot is NOT working in the front end.', 'wpbot'); ?></h2>
2995 + <p><?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>
2996 + <?php esc_html_e(' Also go to Simple Text Responses and press the Re-Index button.', 'wpbot'); ?></br>
2997 + <?php esc_html_e(' After that try purging any cache and test the chatbot in Incognito mode', 'wpbot'); ?><br>
2998 + <?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'); ?> </p>
2999 + </div>
3000 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
3001 + <h2 style="font-size:20px"><?php esc_html_e('Problem: The ChatBot is stuck on typing or loading', 'wpbot'); ?></h2>
3002 + <p><?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>
3003 + <?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>
3004 + <?php esc_html_e('Also go to Simple Text Responses and press the Re-Index button.', 'wpbot'); ?></br>
3005 + <?php esc_html_e('After that remember to test in a browser Incognito mode to avoid cache and cookies.', 'wpbot'); ?> </p>
3006 + </div>
3007 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
3008 + <h2 style="font-size:20px"><?php esc_html_e('Problem: How do I add new conversations to the ChatBot?', 'wpbot'); ?></h2>
3009 + <p><?php esc_html_e('Please check the plugin`s Help Section for details on this', 'wpbot'); ?></p>
3010 + </div>
3011 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
3012 + <h2 style="font-size:20px"><?php esc_html_e('Problem: How do I add Line Breaks?', 'wpbot'); ?></h2>
3013 + <p><?php esc_html_e('Please use the &lt;br&gt; tag for line breaks.', 'wpbot'); ?></p>
3014 + </div>
3015 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
3016 + <h2 style="font-size:20px"><?php esc_html_e('Problem: Are HTML tags supported?', 'wpbot'); ?> </h2>
3017 + <p><?php esc_html_e('Yes, common HTML tags link link href, strong, br etc. are supported.', 'wpbot'); ?></p>
3018 + </div>
3019 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
3020 + <h2 style="font-size:20px"><?php esc_html_e('Problem: I want to add images, GIFs, Videos', 'wpbot'); ?></h2>
3021 + <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>
3022 + </div>
3023 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
3024 + <h2 style="font-size:20px"><?php esc_html_e('How to disable Predefined Intent?', 'wpbot'); ?></h2>
3025 + <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>
3026 + </div>
3027 + </div>
4174 3028 </div>
3029 +</div>
4175 3030 <script type="text/javascript">
4176 - jQuery(document).ready(function($){
4177 - var url=document.URL;
4178 - var arr=url.split('#');
4179 - var tab_tar = '.'+arr[1];
4180 - setTimeout(function(){
4181 - jQuery(tab_tar).trigger('click');
4182 - }, 500);
4183 - jQuery('.wppt_nav_container .nav-tab').on('click', function(e){
4184 - e.preventDefault();
4185 - var section_id = jQuery(this).attr('href');
4186 - jQuery('.wppt_nav_container .nav-tab').removeClass('nav-tab-active');
4187 - jQuery(this).addClass('nav-tab-active');
4188 - jQuery('.wppt-settings-section').hide();
4189 - jQuery('.wppt-settings-section').each(function(){
4190 - jQuery(section_id).show();
3031 + jQuery(document).ready(function($){
3032 + var url=document.URL;
3033 + var arr=url.split('#');
3034 + var tab_tar = '.'+arr[1];
3035 + setTimeout(function(){
3036 + jQuery(tab_tar).trigger('click');
3037 + }, 500);
3038 +
3039 + jQuery('.wppt_nav_container .nav-tab').on('click', function(e){
3040 + e.preventDefault();
3041 + var section_id = jQuery(this).attr('href');
3042 + jQuery('.wppt_nav_container .nav-tab').removeClass('nav-tab-active');
3043 + jQuery(this).addClass('nav-tab-active');
3044 + jQuery('.wppt-settings-section').hide();
3045 + jQuery('.wppt-settings-section').each(function(){
3046 + jQuery(section_id).show();
3047 + });
4191 3048 });
4192 - });
4193 - })
4194 -</script>
3049 + })
3050 + </script>
4195 3051 <?php
4196 3052 }
4197 -}
4198 3053
4199 3054 add_action('init', 'qc_wp_latest_update_check');
4200 -if( !function_exists('qc_wp_latest_update_check') ){
4201 3055 function qc_wp_latest_update_check(){
4202 3056 global $wpdb;
4203 3057 if (current_user_can( 'manage_options' )) {
4204 - if (isset($_POST['str_nonce'])) {
4205 - $sanitized_nonce = sanitize_text_field(wp_unslash($_POST['str_nonce']));
4206 - if (wp_verify_nonce($sanitized_nonce, 'str-nonce')) {
3058 + if (isset($_POST['str_nonce']) && wp_verify_nonce($_POST['str_nonce'],'str-nonce') ) {
4207 3059
4208 3060 if(!get_option('qc_wp_ludate_ck')){
4209 3061 update_option('qlcd_wp_chatbot_support_phone', 'Leave your number. We will call you back!');
4210 3062 update_option('qlcd_wp_chatbot_support_email', 'Send us Email');
@@ -4256,18 +3108,18 @@
4256 3108
4257 3109 if(!get_option('qlcd_wp_chatbot_did_you_mean')) {
4258 3110 update_option('qlcd_wp_chatbot_did_you_mean', maybe_serialize(array('Did you mean?')));
4259 3111 }
4260 -
4261 - $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
3112 +
3113 + $sqlqry = $wpdb->get_results("select * from $table1");
4262 3114 if(empty($sqlqry)){
4263 3115
4264 - $query = 'Sample Question?';
4265 - $response = 'Sample Answer';
3116 + $query = 'What Can WPBot do for you?';
3117 + $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!';
4266 3118
4267 3119 $data = array('query' => $query, 'keyword' => '', 'response'=> $response, 'intent'=> '');
4268 3120 $format = array('%s','%s', '%s', '%s');
4269 - $wpdb->insert($table1,$data,$format); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, PluginCheck.Security.DirectDB.UnescapedDBParameter
3121 + $wpdb->insert($table1,$data,$format);
4270 3122 }
4271 3123
4272 3124 update_option('qc_wpb_simple_response_db_upgrade_free2', 'done');
4273 3125
@@ -4273,23 +3125,16 @@
4273 3125
4274 3126 }
4275 3127
4276 3128 if(!get_option('qc_wp_db_engine_update_free')){
4277 -
4278 3129 $table1 = $wpdb->prefix.'wpbot_response';
4279 -
4280 - // phpcs:ignore
4281 3130 $wpdb->query("ALTER TABLE $table1 ENGINE = InnoDB");
4282 3131
4283 3132 update_option('qc_wp_db_engine_update_free', 'done');
4284 3133 }
4285 3134 if(!get_option('qc_wp_db_engine_update_free_unassign')){
4286 -
4287 3135 $table1 = $wpdb->prefix.'wpbot_response';
4288 -
4289 - // phpcs:ignore
4290 3136 $wpdb->query("ALTER TABLE $table1 CHANGE `id` `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT;");
4291 -
4292 3137 update_option('qc_wp_db_engine_update_free_unassign', 'done');
4293 3138 }
4294 3139
4295 3140 if(isset($_POST['qc_bot_str_query']) && $_POST['qc_bot_str_query']!='' && !class_exists('Qcld_str_pro')){
@@ -4294,14 +3139,15 @@
4294 3139
4295 3140 if(isset($_POST['qc_bot_str_query']) && $_POST['qc_bot_str_query']!='' && !class_exists('Qcld_str_pro')){
4296 3141
4297 3142
4298 - if ( ! isset( $_POST['str_nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['str_nonce'] ) ), 'str-nonce' ) ) {
4299 - die( esc_html__( 'Security check failed', 'chatbot' ) );
3143 + $nonce = sanitize_text_field($_POST['str_nonce']);
3144 + if ( ! wp_verify_nonce( $nonce, 'str-nonce' ) ) {
3145 + die( __( 'Security check failed', 'textdomain' ) );
4300 3146 }
4301 - $query = sanitize_text_field(wp_unslash($_POST['qc_bot_str_query']));
4302 - $keyword = sanitize_text_field(wp_unslash($_POST['qc_bot_str_keyword']));
4303 - $intent = sanitize_text_field(wp_unslash($_POST['qc_bot_str_intent']));
3147 + $query = wp_unslash(sanitize_text_field($_POST['qc_bot_str_query']));
3148 + $keyword = wp_unslash(sanitize_text_field($_POST['qc_bot_str_keyword']));
3149 + $intent = wp_unslash(sanitize_text_field($_POST['qc_bot_str_intent']));
4304 3150
4305 3151 $category = '';
4306 3152
4307 3153 $response = wp_kses(wp_unslash($_POST['qc_bot_str_response']), 'post');
@@ -4309,140 +3155,104 @@
4309 3155 $table = $wpdb->prefix.'wpbot_response';
4310 3156 $data = array('query' => $query, 'keyword' => $keyword, 'response'=> $response, 'intent'=> $intent, 'category'=> $category);
4311 3157 $format = array('%s','%s', '%s', '%s', '%s');
4312 3158
4313 - if(isset($_POST['qc_bot_str_id']) && wp_unslash($_POST['qc_bot_str_id'])!=''){
4314 - $id = sanitize_text_field(wp_unslash($_POST['qc_bot_str_id']));
3159 + if(isset($_POST['qc_bot_str_id']) && $_POST['qc_bot_str_id']!=''){
3160 + $id = sanitize_text_field($_POST['qc_bot_str_id']);
4315 3161 $where = array('id'=>$id);
4316 3162 $whereformat = array('%d');
4317 - $wpdb->update( $table, $data, $where, $format, $whereformat ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
3163 + $wpdb->update( $table, $data, $where, $format, $whereformat );
4318 3164 }else{
4319 - $wpdb->insert($table,$data,$format); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery
3165 + $wpdb->insert($table,$data,$format);
4320 3166 }
4321 3167
4322 - qcld_mysql_remove_existing_indexes();
4323 -
4324 - // phpcs:ignore
3168 + qc_mysql_remove_existing_indexes();
4325 3169 $wpdb->query("ALTER TABLE $table ADD FULLTEXT(`query`, `keyword`, `response`)");
4326 3170
4327 - wp_safe_redirect(admin_url('admin.php?page=simple-text-response'));exit;
3171 + wp_redirect(admin_url('admin.php?page=simple-text-response'));exit;
4328 3172
4329 3173 }
4330 3174 $table = $wpdb->prefix.'wpbot_response';
4331 3175
4332 3176 if(isset($_POST['qc-re-index'])){
4333 -
4334 - qcld_mysql_remove_existing_indexes();
4335 -
4336 - // phpcs:ignore
3177 + qc_mysql_remove_existing_indexes();
4337 3178 $wpdb->query("ALTER TABLE $table ADD FULLTEXT(`query`, `keyword`)");
4338 -
4339 3179 add_action('admin_notices', 'general_admin_notice_str' );
4340 -
4341 3180 }
4342 - if(isset($_POST['qc_bot_str_weight']) && wp_unslash($_POST['qc_bot_str_weight'])!=''){
4343 - $weight = sanitize_text_field(wp_unslash($_POST['qc_bot_str_weight']));
3181 + if(isset($_POST['qc_bot_str_weight']) && $_POST['qc_bot_str_weight']!=''){
3182 + $weight = sanitize_text_field($_POST['qc_bot_str_weight']);
4344 3183 update_option('qc_bot_str_weight', $weight);
4345 3184 }
4346 - if(isset($_POST['qc_bot_str_remove_stopwords']) && wp_unslash($_POST['qc_bot_str_remove_stopwords'])!=''){
3185 + if(isset($_POST['qc_bot_str_remove_stopwords']) && $_POST['qc_bot_str_remove_stopwords']!=''){
4347 3186
4348 - $stopwords = sanitize_text_field(wp_unslash($_POST['qc_bot_str_remove_stopwords']));
3187 + $stopwords = sanitize_text_field($_POST['qc_bot_str_remove_stopwords']);
4349 3188 update_option('qc_bot_str_remove_stopwords', '1');
4350 3189 }
4351 - if ( isset($_POST['qc_bot_str_allow_author_editor']) && wp_unslash($_POST['qc_bot_str_allow_author_editor']) != '' ) {
4352 - $qc_bot_str_allow_author_editor = sanitize_text_field(wp_unslash($_POST['qc_bot_str_allow_author_editor']));
4353 - update_option( 'qc_bot_str_allow_author_editor', $qc_bot_str_allow_author_editor );
4354 - } else {
4355 - delete_option( 'qc_bot_str_allow_author_editor' );
4356 - }
4357 3190 if(isset($_POST['qc_bot_str_fields']) && !empty($_POST['qc_bot_str_fields'])){
4358 3191 $table = $wpdb->prefix.'wpbot_response';
4359 - $fields = rest_sanitize_array(wp_unslash($_POST['qc_bot_str_fields']));
4360 -
4361 - $allowed_fields = array('query', 'keyword', 'response');
4362 - $valid_fields = array();
4363 - if(is_array($fields)){
4364 - foreach($fields as $field){
4365 - if(in_array($field, $allowed_fields)){
4366 - $valid_fields[] = $field;
4367 - }
4368 - }
4369 - }
4370 - $fields = $valid_fields;
4371 -
3192 + $fields = rest_sanitize_array($_POST['qc_bot_str_fields']);
4372 3193 update_option('qc_bot_str_fields', $fields);
4373 - qcld_mysql_remove_existing_indexes();
3194 + qc_mysql_remove_existing_indexes();
4374 3195
4375 3196 if($fields && !empty($fields)){
4376 - $safe_fields = array_map(function($f) { return '`' . $f . '`'; }, $fields);
4377 - // phpcs:ignore
4378 - $wpdb->query("ALTER TABLE $table ADD FULLTEXT(".implode(', ', $safe_fields).")");
4379 -
3197 + $wpdb->query("ALTER TABLE $table ADD FULLTEXT(".implode(', ', $fields).")");
4380 3198 }
4381 3199 }
4382 3200
4383 3201 if(!get_option('wpbot_preloading_time')) {
4384 - update_option('wpbot_preloading_time', '800');
3202 + update_option('wpbot_preloading_time', '0.5');
4385 3203 }
4386 3204 }
4387 3205 }
4388 3206 }
3207 +
3208 +function general_admin_notice_str(){
3209 + if ( isset($_GET['page']) && $_GET['page'] == 'simple-text-response' ) {
3210 + echo '<div class="notice notice-success is-dismissible">
3211 + <p>Re-Indexing has been completed!</p>
3212 + </div>';
3213 + }
4389 3214 }
4390 -if( !function_exists('general_admin_notice_str') ){
4391 - function general_admin_notice_str(){
4392 - if ( isset($_GET['page']) && $_GET['page'] == 'simple-text-response' ) {
4393 - echo '<div class="notice notice-success is-dismissible">
4394 - <p>Re-Indexing has been completed!</p>
4395 - </div>';
4396 - }
4397 - }
3215 +
3216 +function qc_wpbot_simple_response_intent(){
3217 + global $wpdb;
3218 + $table = $wpdb->prefix.'wpbot_response';
3219 + $results = $wpdb->get_results("SELECT `intent` FROM `$table` WHERE 1 and `intent` !=''");
3220 + $response = array();
3221 + if(!empty($results)){
3222 + foreach($results as $result){
3223 + $response[] = $result->intent;
3224 + }
3225 + }
3226 + return $response;
4398 3227 }
4399 -}
4400 -if( !function_exists('qcld_wpbot_simple_response_intent') ){
4401 - function qcld_wpbot_simple_response_intent(){
4402 - global $wpdb;
4403 - $table = $wpdb->prefix.'wpbot_response';
4404 - $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
4405 - $response = array();
4406 - if(!empty($results)){
4407 - foreach($results as $result){
4408 - $response[] = $result->intent;
4409 - }
4410 - }
4411 - return $response;
4412 - }
4413 -}
4414 -if( !function_exists('qcld_mysql_remove_existing_indexes') ){
4415 - function qcld_mysql_remove_existing_indexes(){
4416 - global $wpdb;
4417 - $table = $wpdb->prefix.'wpbot_response';
4418 -
4419 - $results = $wpdb->get_results("SHOW INDEX FROM {$table}"); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter
4420 - $indexes = array();
4421 - foreach($results as $result){
4422 -
4423 -
4424 -
4425 - if("PRIMARY" != $result->Key_name && !in_array($result->Key_name, $indexes)){
4426 3228
4427 - // phpcs:ignore
4428 - $wpdb->query("ALTER TABLE $table DROP INDEX `".$result->Key_name."`;");
4429 -
4430 - $indexes[] = $result->Key_name;
4431 - }
4432 -
4433 - }
4434 - }
3229 +function qc_mysql_remove_existing_indexes(){
3230 + global $wpdb;
3231 + $table = $wpdb->prefix.'wpbot_response';
3232 +
3233 + $results = $wpdb->get_results("SHOW INDEX FROM $table");
3234 + $indexes = array();
3235 + foreach($results as $result){
3236 +
3237 +
3238 +
3239 + if("PRIMARY" != $result->Key_name && !in_array($result->Key_name, $indexes)){
3240 + $wpdb->query("ALTER TABLE $table DROP INDEX `".$result->Key_name
3241 +."`;");
3242 + $indexes[] = $result->Key_name;
3243 + }
3244 +
3245 + }
4435 3246 }
4436 3247
4437 3248 add_action( 'activated_plugin', 'qc_wpbotfree_activation_redirect' );
4438 -if( !function_exists('qc_wpbotfree_activation_redirect') ){
4439 - function qc_wpbotfree_activation_redirect( $plugin ){
4440 - $screen = get_current_screen();
4441 - if( ( isset( $screen->base ) && $screen->base == 'plugins' ) && $plugin == plugin_basename( __FILE__ ) ) {
4442 - if( $plugin == plugin_basename( __FILE__ ) ) {
4443 - // phpcs:ignore
4444 - exit( wp_redirect( esc_url( admin_url('admin.php?page=wpbot') ) ) );
4445 - }
4446 - }
4447 - }
3249 +function qc_wpbotfree_activation_redirect( $plugin ){
3250 +
3251 + if( $plugin == plugin_basename( __FILE__ ) ) {
3252 + exit( wp_redirect( admin_url('admin.php?page=wpbot_help_page') ) );
3253 + }
4448 3254 }
3255 +
3256 +
3257 +
3258 +