PluginProbe
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services / 4.5.2
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services v4.5.2
8.7.9 8.7.8 8.7.7 8.7.6 8.7.5 8.7.4 8.7.3 8.7.2 8.7.1 8.7.0 8.6.9 8.6.8 8.6.7 8.6.6 8.6.5 8.6.4 8.6.2 8.6.1 8.6.0 8.5.9 8.5.8 8.5.7 8.5.6 8.5.5 8.5.4 All 535 releases
← All changes | qcld-wpwbot.php +1054 -2335 8.7.04.5.2 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: 4.5.2
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.2
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', '4.5.2');
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 . "/sale-wpbot.jpg";
141 73 }
142 74 /**
143 75 * Init behaves like, and replaces, construct
144 76 */
@@ -152,27 +84,20 @@
152 84 add_action('admin_menu', array($this, 'qcld_wb_chatbot_admin_menu'));
153 85
154 86 if ((!empty($_GET["page"])) && ($_GET["page"] == "wpbot")) {
155 87 add_action('admin_init', array($this, 'qcld_wb_chatbot_save_options'));
156 -
157 88 }
89 + if (is_admin() && !empty($_GET["page"]) && ($_GET["page"] == "wpbot") || (!empty($_GET['page']) && $_GET['page']=='wpbot_help_page')
158 90
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 91 || (!empty($_GET['page']) && $_GET['page']=='wpbot_openAi')
167 92
168 93 || (!empty($_GET['page']) && $_GET['page']=='wpbot-panel') || ( !empty($_GET['page']) && $_GET["page"] == "wbcs-botsessions-page") ) {
169 94 add_action('admin_enqueue_scripts', array($this, 'qcld_wb_chatbot_admin_scripts'));
170 95 if( get_option('wp_chatbot_index_count')<=0 && get_option('qlcd_wp_chatbot_search_option')=='advanced'){
171 -
172 96 add_action( 'admin_notices', array( $this, 'admin_notice_reindex' ) );
173 97 }
174 98 }
99 + // add_action( 'admin_notices', array( $this, 'promotion_notice' ) );
175 100 //loading frontend scripts
176 101 add_action('wp', array($this, 'qcld_wpchatbot_init_fnc'));
177 102 add_action('init', array($this, 'qcld_wpchatbot_init2_fnc'));
178 103
@@ -230,9 +155,9 @@
230 155
231 156 public function mysql_version_notice(){
232 157 $class="notice notice-error is-dismissible qc-notice-error";
233 158 $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 ) );
159 + printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), $message );
235 160 }
236 161
237 162 /**
238 163 * Add a submenu item to the wpCommerce menu
@@ -239,34 +164,27 @@
239 164 */
240 165 public function qcld_wb_chatbot_admin_menu()
241 166 {
242 167 /* add_submenu_page('wpcommerce',
243 - __('wpwBot Pro', 'chatbot'),
244 - __('wpwBot Pro', 'chatbot'),
168 + __('wpwBot Pro', 'wpchatbot'),
169 + __('wpwBot Pro', 'wpchatbot'),
245 170 'manage_wpcommerce',
246 171 $this->id,
247 172 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 );
173 +
174 + 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 175
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' ] );
176 + add_submenu_page( 'wpbot-panel', esc_html('Settings'), esc_html('Settings'), 'manage_options','wpbot', array($this, 'qcld_wb_chatbot_admin_page_settings') );
177 +
178 + add_submenu_page( 'wpbot-panel', esc_html('OpenAI Settings'), esc_html('OpenAI Settings'), 'manage_options','wpbot_openAi', 'wpbot_openAi_setting_func' );
260 179
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') );
180 + $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 181
182 + add_action( "load-$hook", [ $this, 'screen_option' ] );
263 183
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'] );
184 +
267 185
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' );
186 + add_submenu_page( 'wpbot-panel', esc_html('Support'), esc_html('Support'), 'manage_options','wpbot_support_page', 'qcpromo_support_page_callback_func' );
269 187
270 188 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 189
272 190
@@ -272,9 +190,9 @@
272 190
273 191 }
274 192
275 193 function screen_option(){
276 - if( isset($_POST['wp_screen_options']) && !empty($_POST['wp_screen_options'])){
194 + if( !empty($_POST['wp_screen_options'])){
277 195 $per_page_str = (int)$_POST['wp_screen_options']["value"];
278 196
279 197 }else{
280 198 $per_page_str = 20;
@@ -284,9 +202,10 @@
284 202 'label' => 'Response',
285 203 'default' => $per_page_str,
286 204 'option' => 'responses_per_page'
287 205 ];
288 -
206 + add_screen_option( $option, $args );
207 +
289 208 $this->response_list = new Response_list();
290 209 }
291 210
292 211 public function qcld_wb_chatbot_admin_str(){
@@ -304,9 +223,9 @@
304 223 {
305 224 global $wpcommerce, $wp_scripts;
306 225 $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
307 226
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'
227 + if (((!empty($_GET["page"])) && ($_GET["page"] == "wpbot")) || ($hook == "widgets.php") || $_GET['page']=='wpbot_help_page' || $_GET['page']=='wpbot_openAi'
309 228 || $_GET['page']=='wpbot-panel' || $_GET["page"] == "wbcs-botsessions-page" ) {
310 229
311 230 wp_enqueue_script('jquery');
312 231 //wp_enqueue_style('wpcommerce_admin_styles', $wpcommerce->plugin_url() . '/assets/css/admin.css');
@@ -312,8 +231,11 @@
312 231 //wp_enqueue_style('wpcommerce_admin_styles', $wpcommerce->plugin_url() . '/assets/css/admin.css');
313 232
314 233 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 234 wp_enqueue_style('qlcd-wp-chatbot-admin-style');
235 +
236 + 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');
237 + wp_enqueue_style('qlcd-wp-chatbot-font-awesome');
316 238 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 239 wp_enqueue_style('qlcd-wp-chatbot-tabs-style');
318 240 wp_register_style('jquery.fontpicker.min.css', QCLD_wpCHATBOT_PLUGIN_URL . 'css/fontpicker.min.css', '', QCLD_wpCHATBOT_VERSION, 'screen');
319 241 wp_enqueue_style('jquery.fontpicker.min.css');
@@ -332,9 +254,9 @@
332 254 wp_enqueue_script( 'wp-color-picker');
333 255 wp_enqueue_script( 'jquery-ui-sortable');
334 256 wp_register_script('qcld-wp-fontpicker', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/fontpicker.js', basename(__FILE__)), array(), true);
335 257 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);
258 + wp_register_script('qcld-wp-chatbot-cbpFWTabs', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/cbpFWTabs.js', basename(__FILE__)), array(), true);
337 259 wp_enqueue_script('qcld-wp-chatbot-cbpFWTabs');
338 260 wp_register_script('qcld-wp-chatbot-modernizr-custom', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/modernizr.custom.js', basename(__FILE__)), array(), true);
339 261 wp_enqueue_script('qcld-wp-chatbot-modernizr-custom');
340 262 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 +275,28 @@
353 275 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 276 wp_enqueue_script('qcld-wp-chatbot-timepicker-js');
355 277 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 278 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);
279 +
280 + 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);
281 +
360 282 wp_enqueue_script('qcld-wp-chatbot-admin-js');
361 - wp_localize_script('qcld-wp-chatbot-admin-js', 'qcld_gemini_admin_data',
283 + wp_localize_script('qcld-wp-chatbot-admin-js', 'ajax_object',
362 284 array('ajax_url' => admin_url('admin-ajax.php'),'ajax_nonce' => wp_create_nonce('wp_chatbot'),'image_path' => QCLD_wpCHATBOT_IMG_URL));
363 285 // WordPress Media library
364 286 wp_enqueue_media();
365 287
288 +
366 289
367 -
368 290 }
369 -
370 291 }
371 292
372 293
373 - public function qcld_get_formbuilder_forms(){
294 + public function qc_get_formbuilder_forms(){
374 295 global $wpdb;
375 296 $forms = array();
376 297 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
298 + $results = $wpdb->get_results("SELECT * FROM ". $wpdb->prefix."wfb_forms where 1 and type='primary'");
378 299 if(!empty($results)){
379 300 foreach($results as $result){
380 301 $form = maybe_unserialize($result->config);
381 302 $forms[] = trim($form['name']);
@@ -387,15 +308,12 @@
387 308 }else{
388 309 return array();
389 310 }
390 311 }
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(){
312 + function qc_wpbot_simple_response_intent(){
395 313 global $wpdb;
396 314 $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
315 + $results = $wpdb->get_results("SELECT `intent` FROM `$table` WHERE 1 and `intent` !=''");
398 316 $response = array();
399 317 if(!empty($results)){
400 318 foreach($results as $result){
401 319 $response[] = $result->intent;
@@ -402,15 +320,13 @@
402 320 }
403 321 }
404 322 return $response;
405 323 }
406 - public function qcld_get_formbuilder_form_commands(){
324 + function qc_get_formbuilder_form_commands(){
407 325 global $wpdb;
408 326 $command = array();
409 327 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 -
328 + $results = $wpdb->get_results("SELECT * FROM ". $wpdb->prefix."wfb_forms where 1 and type='primary'");
413 329 if(!empty($results)){
414 330 foreach($results as $result){
415 331 $form = maybe_unserialize($result->config);
416 332
@@ -428,28 +344,27 @@
428 344 }
429 345 }
430 346 public function promotion_notice(){
431 347 $screen = get_current_screen();
432 - // if( isset($screen->base) && (( $screen->base == 'wpbot-lite_page_wpbot') || ( $screen->base == 'toplevel_page_wpbot-panel"'))){
348 + if( isset($screen->base) && (( $screen->base == 'wpbot-lite_page_wpbot') || ( $screen->base == 'toplevel_page_wpbot-panel"'))){
433 349 ?>
434 - <div id="promotion-wpchatbot" data-dismiss-type="qcbot-feedback-notice" class="notice is-dismissible qcbot-feedback" style="background: #120976 !important">
350 + <div id="promotion-wpchatbot" data-dismiss-type="qcbot-feedback-notice" class="notice is-dismissible qcbot-feedback" style="background: #000">
435 351 <div class="">
436 352
437 353 <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>
354 + <a href="https://www.wpbot.pro/pricing/" target="_blank">
355 + <img src="<?php echo esc_url($this->promotion); ?>" alt=""></a>
440 356 </div>
441 - </div>
357 + </div>
442 358 </div>
443 359 <?php
444 - // }
360 + }
445 361 }
446 - public function qcld_get_formbuilder_form_ids(){
362 + public function qc_get_formbuilder_form_ids(){
447 363 global $wpdb;
448 364 $forms = array();
449 365 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 -
366 + $results = $wpdb->get_results("SELECT * FROM ". $wpdb->prefix."wfb_forms where 1 and type='primary'");
452 367 if(!empty($results)){
453 368 foreach($results as $result){
454 369 $form = maybe_unserialize($result->config);
455 370 $forms[] = trim($form['ID']);
@@ -482,13 +397,13 @@
482 397 $conversation_form_ids = array();
483 398 $conversation_form_names = array();
484 399
485 400 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
401 + $results = $wpdb->get_results("SELECT * FROM ". $wpdb->prefix."wfb_forms where 1 and type='primary'");
487 402 if(!empty($results)){
488 403
489 404 foreach($results as $result){
490 - $form = maybe_unserialize($result->config);
405 + $form = unserialize($result->config);
491 406 $conversation_form_ids[] = $form['ID'];
492 407 $conversation_form_names[] = $form['name'];
493 408 }
494 409
@@ -493,8 +408,9 @@
493 408 }
494 409
495 410 }
496 411 }
412 +
497 413 $wp_chatbot_obj = array(
498 414 'wp_chatbot_position_x' => get_option('wp_chatbot_position_x'),
499 415 'wp_chatbot_position_y' => get_option('wp_chatbot_position_y'),
500 416 'disable_icon_animation' => get_option('disable_wp_chatbot_icon_animation'),
@@ -510,31 +426,29 @@
510 426 'yes' => str_replace('\\', '',get_option('qlcd_wp_chatbot_yes')),
511 427 'no' => str_replace('\\', '',get_option('qlcd_wp_chatbot_no')),
512 428 'or' => str_replace('\\', '',get_option('qlcd_wp_chatbot_or')),
513 429 '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'))),
430 + 'agent' => str_replace('\\', '',get_option('qlcd_wp_chatbot_agent')),
515 431 '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'))),
432 + 'agent_image_path' => $this->qcld_wb_chatbot_agent_icon(),
433 + 'shopper_demo_name' => str_replace('\\', '',get_option('qlcd_wp_chatbot_shopper_demo_name')),
434 + 'agent_join' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_agent_join'))),
435 + 'welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_welcome'))),
436 + 'welcome_back' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_welcome_back'))),
437 + 'hi_there' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_hi_there'))),
438 + 'hello' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_hello'))),
439 + 'asking_name' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_name'))),
440 + 'i_am' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_i_am'))),
441 + 'name_greeting' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_name_greeting'))),
442 + 'wildcard_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_msg'))),
443 + 'empty_filter_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_empty_filter_msg'))),
444 + 'did_you_mean' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_did_you_mean'))),
445 + 'is_typing' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_is_typing'))),
446 + 'send_a_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_send_a_msg'))),
447 + 'viewed_products' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_viewed_products'))),
448 + 'shopping_cart' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_shopping_cart'))),
449 + 'cart_updating' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_cart_updating'))),
450 + 'cart_removing' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_cart_removing'))),
537 451 'imgurl' => QCLD_wpCHATBOT_IMG_URL,
538 452 'sys_key_help' => get_option('qlcd_wp_chatbot_sys_key_help'),
539 453 'sys_key_product' => get_option('qlcd_wp_chatbot_sys_key_product'),
540 454 'sys_key_catalog' => get_option('qlcd_wp_chatbot_sys_key_catalog'),
@@ -541,54 +455,54 @@
541 455 'sys_key_order' => get_option('qlcd_wp_chatbot_sys_key_order'),
542 456 'sys_key_support' => get_option('qlcd_wp_chatbot_sys_key_support'),
543 457 'sys_key_reset' => get_option('qlcd_wp_chatbot_sys_key_reset'),
544 458 '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'))),
459 + 'help_welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_help_welcome'))),
460 + 'back_to_start' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_back_to_start'))),
461 + 'help_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_help_msg'))),
462 + 'reset' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_reset'))),
463 + 'wildcard_product' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_product'))),
464 + 'wildcard_catalog' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_catalog'))),
465 + 'featured_products' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_featured_products'))),
466 + 'sale_products' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_sale_products'))),
467 + 'wildcard_order' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_order'))),
554 468 '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'))),
469 + 'product_asking' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_asking'))),
470 + 'product_suggest' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_suggest'))),
471 + 'product_infinite' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_infinite'))),
472 + 'product_success' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_success'))),
473 + 'product_fail' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_fail'))),
474 + 'support_welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_support_welcome'))),
561 475 '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'))),
476 + 'support_option_again' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_support_option_again'))),
477 + 'asking_email' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_email'))),
478 + 'asking_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_msg'))),
479 + 'no_result' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_no_result'))),
566 480 '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'))),
481 + 'asking_phone' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_phone'))),
482 + 'thank_for_phone' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_thank_for_phone'))),
483 + 'support_query' =>$this->qcld_wb_chatbot_str_replace(unserialize( get_option('support_query'))),
484 + 'support_ans' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('support_ans'))),
571 485 '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'))),
486 + 'notifications' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_notifications'))),
487 + 'order_welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_welcome'))),
488 + 'order_username_asking' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_username_asking'))),
489 + 'order_username_password' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_username_password'))),
576 490 'order_user' => get_option('qlcd_wp_chatbot_order_user'),
577 491 'order_login' => is_user_logged_in(),
578 492 'is_chat_session_active' => qcld_wpbot_is_active_chat_history(),
579 493 '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'))),
494 + 'order_email_support' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_email_support'))),
581 495 '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'))),
496 + 'invalid_email' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_invalid_email'))),
583 497 'stop_words' => str_replace('\\', '', get_option('qlcd_wp_chatbot_stop_words')),
584 498 'currency_symbol' => '',
585 499 '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'))),
500 + 'messenger_label' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_messenger_label'))),
587 501 'fb_page_id' => get_option('qlcd_wp_chatbot_fb_page_id'),
588 502 'enable_skype' => get_option('enable_wp_chatbot_skype'),
589 503 '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'))),
504 + 'whats_label' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_whats_label'))),
591 505 'whats_num' => get_option('qlcd_wp_chatbot_whats_num'),
592 506 'ret_greet' => get_option('qlcd_wp_chatbot_ret_greet'),
593 507 'enable_exit_intent' => get_option('enable_wp_chatbot_exit_intent'),
594 508 'exit_intent_msg' => str_replace('\\', '', get_option('wp_chatbot_exit_intent_msg')),
@@ -603,29 +517,23 @@
603 517 'auto_open_once' => get_option('wp_chatbot_auto_open_once'),
604 518 'proactive_bg_color' => get_option('wp_chatbot_proactive_bg_color'),
605 519 'disable_feedback' => get_option('disable_wp_chatbot_feedback'),
606 520 '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'))),
521 + 'feedback_label' =>$this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_feedback_label'))),
608 522 'enable_meta_title' =>get_option('enable_wp_chatbot_meta_title'),
609 523 'meta_label' =>str_replace('\\', '', get_option('qlcd_wp_chatbot_meta_label')),
610 524 'phone_number' => get_option('qlcd_wp_chatbot_phone'),
611 525 'disable_site_search' => get_option('disable_wp_chatbot_site_search'),
612 - 'search_keyword' => get_option('qlcd_wp_chatbot_asking_search_keyword'),
613 526 'ajax_nonce'=> wp_create_nonce('qcsecretbotnonceval123qc'),
614 - 'session_nonce'=> wp_create_nonce('wp_chatbot'),
615 527 'site_search' => get_option('qlcd_wp_site_search'),
616 - 'open_links_newtab' => get_option('open_links_new_window'),
617 528 'call_gen' => get_option('disable_wp_chatbot_call_gen'),
618 529 'call_sup' => get_option('disable_wp_chatbot_call_sup'),
619 530 'enable_ret_sound' => get_option('enable_wp_chatbot_ret_sound'),
620 - 'found_result_message' => get_option('qlcd_wp_chatbot_found_result'),
621 531 'enable_ret_user_show' => get_option('enable_wp_chatbot_ret_user_show'),
622 532 'enable_inactive_time_show' => get_option('enable_wp_chatbot_inactive_time_show'),
623 533 'ret_inactive_user_once' => get_option('wp_chatbot_inactive_once'),
624 - '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),
534 + 'mobile_full_screen' => get_option('enable_wp_chatbot_mobile_full_screen'),
535 + 'botpreloadingtime' => (get_option('wpbot_preloading_time')?get_option('wpbot_preloading_time'):100),
628 536 'inactive_time' => get_option('wp_chatbot_inactive_time'),
629 537 'checkout_msg' => str_replace('\\', '', get_option('wp_chatbot_checkout_msg')),
630 538 'ai_df_enable' => get_option('enable_wp_chatbot_dailogflow'),
631 539 'ai_df_token' => get_option('qlcd_wp_chatbot_dialogflow_client_token'),
@@ -631,84 +539,49 @@
631 539 'ai_df_token' => get_option('qlcd_wp_chatbot_dialogflow_client_token'),
632 540 'df_defualt_reply' => str_replace('\\', '', get_option('qlcd_wp_chatbot_dialogflow_defualt_reply')),
633 541 'df_agent_lan' => get_option('qlcd_wp_chatbot_dialogflow_agent_language'),
634 542 '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 543 'start_menu' => wp_unslash(get_option('qc_wpbot_menu_order')),
645 544 'conversation_form_ids' => $conversation_form_ids,
646 545 '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(),
546 + 'simple_response_intent' => $this->qc_wpbot_simple_response_intent(),
547 + 'forms' => $this->qc_get_formbuilder_forms(),
548 + 'form_ids' =>$this->qc_get_formbuilder_form_ids(),
549 + 'form_commands' => $this->qc_get_formbuilder_form_commands(),
651 550 'df_api_version' => (get_option('wp_chatbot_df_api')==''?'v1':get_option('wp_chatbot_df_api')),
652 551 'v2_client_url'=> esc_url(get_site_url().'/?action=qcld_dfv2_api'),
653 552 '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 553 '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 554
673 555 );
674 - $user_font = get_option('wp_chatbot_user_font') != '' ? get_option('wp_chatbot_user_font') : '';
556 + $user_font = get_option('wp_chat_user_font_family') != '' ? get_option('wp_chat_user_font_family') : '';
675 557 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';
558 + $user_font_family = str_replace('\\', '',$user_font);
559 + $user_font_family = json_decode($user_font_family);
560 + $user_font_name = $user_font_family->fontFamily;
561 + $user_font_name = str_replace(' ', '+', $user_font_name);
562 + $user_font_name = str_replace("'","",$user_font_name );
683 563 if(get_option('enable_wp_chatbot_custom_color')==1){
684 - $user_enqueue_font = 'https://fonts.googleapis.com/css2?family='. $user_font_family->fontfamily;
564 + $user_enqueue_font = 'https://fonts.googleapis.com/css2?family='.$user_font_name;
685 565 wp_enqueue_style( 'qcld-chatbot-user-google-fonts', $user_enqueue_font, false );
686 566 wp_enqueue_style( 'qcld-chatbot-user-google-fonts');
687 567 }
688 568 }
689 569
690 - $bot_font = get_option('wp_chatbot_bot_font') != '' ? get_option('wp_chatbot_bot_font') : '';
570 + $bot_font = get_option('wp_chat_bot_font_family') != '' ? get_option('wp_chat_bot_font_family') : '';
691 571 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 -
572 + $bot_font_family = str_replace('\\', '',$bot_font);
573 + $bot_font_family = json_decode($bot_font_family);
574 + $bot_font_name =$bot_font_family->fontFamily;
575 + $bot_font_name = str_replace(' ', '+', $bot_font_name );
576 + $bot_font_name = str_replace("'","",$bot_font_name );
702 577 if(get_option('enable_wp_chatbot_custom_color')==1){
703 - $bot_enqueue_font = 'https://fonts.googleapis.com/css2?family='.$bot_font_family->fontFamily;
578 + $bot_enqueue_font = 'https://fonts.googleapis.com/css2?family='.$bot_font_name;
704 579 wp_enqueue_style( 'qcld-chatbot-bot-google-fonts', $bot_enqueue_font, false );
705 580 wp_enqueue_style( 'qcld-chatbot-bot-google-fonts');
706 581 }
707 582 }
708 583
709 -
710 -
711 584 wp_enqueue_style( 'dashicons' );
712 585 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 586 wp_enqueue_script('qcld-wp-chatbot-slimscroll-js');
714 587 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 +590,8 @@
717 590 wp_enqueue_script('qcld-wp-chatbot-magnify-popup');
718 591 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 592 wp_enqueue_script('qcld-wp-chatbot-plugin');
720 593
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 594 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 595 wp_enqueue_script('qcld-wp-chatbot-front-js');
731 596 wp_localize_script('qcld-wp-chatbot-front-js', 'wp_chatbot_obj', $wp_chatbot_obj);
732 597 //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 +597,25 @@
732 597 //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 598 //wp_enqueue_script('qcld-wp-chatbot-frontend');
734 599 //wp_localize_script('qcld-wp-chatbot-frontend', 'wp_chatbot_obj', $wp_chatbot_obj);
735 600 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 601 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 602 wp_enqueue_style('qcld-wp-chatbot-common-style');
745 603
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
604 + if(get_option('wp_chatbot_floatingiconbg_color')!="") {
605 + $custom_colors = ".wp-chatbot-ball{
606 + background: ". get_option('wp_chatbot_floatingiconbg_color')." !important;
607 + }
608 + .wp-chatbot-ball:hover, .wp-chatbot-ball:focus{
609 + background: ".get_option('wp_chatbot_floatingiconbg_color')." !important;
610 + }";
748 611
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 );
612 + wp_add_inline_style( 'qcld-wp-chatbot-common-style', $custom_colors );
760 613 }
761 -
614 +
615 +
762 616 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 617 wp_enqueue_style('qcld-wp-chatbot-magnific-popup');
764 -
765 618 $qcld_wb_chatbot_theme = get_option('qcld_wb_chatbot_theme');
766 619 /* if (file_exists(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . '/templates/' . $qcld_wb_chatbot_theme . '/style.css')) {
767 620 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 621 wp_enqueue_style('qcld-wp-chatbot-style');
@@ -771,256 +624,93 @@
771 624 if (file_exists(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . '/templates/' . $qcld_wb_chatbot_theme . '/shortcode.css')) {
772 625 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 626 wp_enqueue_style('qcld-wp-chatbot-shortcode-style');
774 627 }
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 .= "
628 + $custom_colors = '';
629 + if(get_option('enable_wp_chatbot_custom_color')==1){
630 + $custom_colors .="
797 631 #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;
632 + color: ". get_option('wp_chatbot_text_color')." !important;
799 633 }
800 634 #wp-chatbot-chat-container a {
801 - color: ". $link_color ." !important;
635 + color: ". get_option('wp_chatbot_link_color')." !important;
802 636 }
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 637 #wp-chatbot-chat-container a:hover {
811 - color: ". $link_hover_color ." !important;
638 + color: ". get_option('wp_chatbot_link_hover_color')." !important;
812 639 }
813 640
814 641 ul.wp-chatbot-messages-container > li.wp-chatbot-msg .wp-chatbot-paragraph,
815 642 .wp-chatbot-agent-profile .wp-chatbot-bubble {
816 - color: ". $bot_msg_text_color ." !important;
817 - background-color: ". $bot_msg_bg_color ." !important;
643 + color: ". get_option('wp_chatbot_bot_msg_text_color')." !important;
644 + background-color: ". get_option('wp_chatbot_bot_msg_bg_color')." !important;
818 645 word-break: break-word;
819 646 }
820 647 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;
648 + color: ". get_option('wp_chatbot_buttons_text_color') ." !important;
649 + background-color: ". get_option('wp_chatbot_buttons_bg_color') ." !important;
823 650 background-image: none !important;
824 651 }
825 652
826 653 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;
654 + color: ". get_option('wp_chatbot_buttons_text_color_hover') ." !important;
655 + background-color: ". get_option('wp_chatbot_buttons_bg_color_hover') ." !important;
829 656 background-image: none !important;
830 657 }
831 658
832 659 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;
660 + color: ". get_option('wp_chatbot_user_msg_text_color')." !important;
661 + background-color: ". get_option('wp_chatbot_user_msg_bg_color')." !important;
839 662 }
840 -
841 663 ul.wp-chatbot-messages-container > li.wp-chatbot-msg > .wp-chatbot-paragraph:before,
842 664 .wp-chatbot-bubble:before {
843 - border-right: 10px solid ". $bot_msg_bg_color ." !important;
665 + border-right: 10px solid ". get_option('wp_chatbot_bot_msg_bg_color')." !important;
844 666
845 667 }
846 668 ul.wp-chatbot-messages-container > li.wp-chat-user-msg > .wp-chatbot-paragraph:before {
847 - border-left: 10px solid ". $user_msg_bg_color ." !important;
669 + border-left: 10px solid ". get_option('wp_chatbot_user_msg_bg_color')." !important;
848 670 }
849 671 #wp-chatbot-chat-container .wp-chatbot-header{
850 - background: ". $header_background_color ." !important;
672 + background: ". get_option('wp_chatbot_header_background_color')." !important;
851 673 }
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 674 ";
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 );
675 +
860 676 }
861 - $custom_colors ="";
862 - if((get_option('enable_wp_chatbot_custom_color')==1) && $user_font != ''){
677 + if((get_option('enable_wp_chatbot_custom_color')==1) && $user_font != ''){
863 678 $custom_colors .="
864 -
865 -
866 679 #wp-chatbot-messages-container > li.wp-chatbot-msg > .wp-chatbot-paragraph,
867 680 #wp-chatbot-messages-container > li.wp-chatbot-msg > span{
868 681 font-family: ".$bot_font_family->fontFamily.";
869 682 font-weight: ".$bot_font_family->fontWeight.";
870 683 font-style: ".$bot_font_family->fontStyle.";
871 - font-size: ". get_option('wp_chatbot_font_size'). "px;
684 + font-size: ". get_option('wp_chatbot_font_size'). ";
872 685 }
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 686 ";
892 687 }
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.
688 + if((get_option('enable_wp_chatbot_custom_color')==1) && $bot_font != ''){
689 + $custom_colors .="
690 + #wp-chatbot-messages-container > li.wp-chat-user-msg > .wp-chatbot-paragraph{
691 + font-family: ".$user_font_family->fontFamily.";
692 + font-weight: ".$user_font_family->fontWeight.";
693 + font-style: ".$user_font_family->fontStyle.";
694 + font-size: ". get_option('wp_chatbot_font_size'). ";
905 695 }
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 -
696 + ";
916 697 }
917 -
698 + wp_add_inline_style( 'qcld-wp-chatbot-common-style', $custom_colors );
918 699 if(get_option('wp_chatbot_custom_css')!=""){
919 700
920 - wp_add_inline_style( 'qcld-wp-chatbot-common-style', get_option('wp_chatbot_custom_css') );
701 + wp_add_inline_style( 'qlcd-wp-chatbot-admin-style', get_option('wp_chatbot_custom_css') );
921 702 }
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 703 }
969 704 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 705 $refined_mesgses=array();
996 - if(!empty($messages) && is_array($messages)){
706 + if(!empty($messages)){
997 707 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 - }
708 + $refined_msg=str_replace('\\', '', $message);
709 + array_push($refined_mesgses,$refined_msg);
1006 710 }
1007 - }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);
1018 - array_push($refined_mesgses,$refined_msg);
1019 -
1020 711 }
1021 712 return $refined_mesgses;
1022 -
1023 713 }
1024 714 //getting exact agent icon path
1025 715 public function qcld_wb_chatbot_agent_icon(){
1026 716
@@ -1056,18 +746,17 @@
1056 746 public function qcld_wb_chatbot_admin_page_settings()
1057 747 {
1058 748 global $wpcommerce;
1059 749 $action = 'admin.php?page=wpbot';
1060 -
1061 750 require_once("admin_ui.php");
1062 751 }
1063 -
1064 - public function qcld_wb_chatbot_dynamic_multi_option($options, $option_name, $option_text)
752 +
753 + public function qcld_wb_chatbot_dynamic_multi_option($options = array(), $option_name = "", $option_text = "")
1065 754 {
1066 755 ?>
1067 756
1068 757 <h4 class="qc-opt-title">
1069 - <?php echo esc_html($option_text); ?>
758 + <?php esc_html_e($option_text, 'wpchatbot'); ?>
1070 759 </h4>
1071 760 <div class="wp-chatbot-lng-items">
1072 761 <?php
1073 762 if (is_array($options) && count($options) > 0) {
@@ -1073,15 +762,15 @@
1073 762 if (is_array($options) && count($options) > 0) {
1074 763 foreach ($options as $key => $value) {
1075 764 ?>
1076 765 <div class="row" class="wp-chatbot-lng-item">
1077 - <div class="col-xs-11">
766 + <div class="col-xs-10">
1078 767 <input type="text"
1079 768 class="form-control qc-opt-dcs-font"
1080 - name="<?php echo esc_attr( $option_name ); ?>[]"
1081 - value="<?php echo esc_attr(str_replace('\\', '', $value)); ?>">
769 + name="<?php echo $option_name; ?>[]"
770 + value="<?php echo str_replace('\\', '', $value); ?>">
1082 771 </div>
1083 - <div class="col-xs-1">
772 + <div class="col-xs-2">
1084 773 <button type="button" class="btn btn-danger btn-sm wp-chatbot-lng-item-remove"> <span class="glyphicon glyphicon-remove"></span> </button>
1085 774 </div>
1086 775 </div>
1087 776 <?php
@@ -1087,22 +776,22 @@
1087 776 <?php
1088 777 }
1089 778 } else { ?>
1090 779 <div class="row" class="wp-chatbot-lng-item">
1091 -<div class="col-xs-11">
780 +<div class="col-xs-10">
1092 781 <input type="text"
1093 782 class="form-control qc-opt-dcs-font"
1094 - name="<?php echo esc_attr( $option_name ); ?>[]"
1095 - value="<?php echo esc_attr($option_text); ?>">
783 + name="<?php echo $option_name; ?>[]"
784 + value="<?php echo $option_text; ?>">
1096 785 </div>
1097 -<div class="col-xs-1"> <span class="wp-chatbot-lng-item-remove">
1098 - <?php esc_html_e('X', 'chatbot'); ?>
786 +<div class="col-xs-2"> <span class="wp-chatbot-lng-item-remove">
787 + <?php esc_html_e('X', 'wpchatbot'); ?>
1099 788 </span> </div>
1100 789 </div>
1101 790 <?php } ?>
1102 791 </div>
1103 792 <div class="row">
1104 - <div class="col-sm-1 col-sm-offset-11">
793 + <div class="col-sm-2 col-sm-offset-10">
1105 794 <button type="button" class="btn btn-success btn-sm wp-chatbot-lng-item-add"> <span class="glyphicon glyphicon-plus"></span> </button>
1106 795 </div>
1107 796 </div>
1108 797 <?php
@@ -1110,181 +799,122 @@
1110 799
1111 800 function qcld_wb_chatbot_save_options()
1112 801 {
1113 802 //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']));
803 + if (isset($_POST['_wpnonce']) && wp_verify_nonce($_POST['_wpnonce'], 'wp_chatbot')) {
804 + //wp_verify_nonce($_POST['_wpnonce'], 'wp_chatbot');
805 + // Check if the form is submitted or not
806 + $submit = sanitize_text_field($_POST['submit']);
1117 807 if (isset($submit)) {
1118 808 //wpwboticon position settings.
1119 809 if (isset($_POST["wp_chatbot_position_x"])) {
1120 - $wp_chatbot_position_x = intval(sanitize_text_field(wp_unslash($_POST["wp_chatbot_position_x"])));
810 + $wp_chatbot_position_x = intval(sanitize_text_field($_POST["wp_chatbot_position_x"]));
1121 811 update_option('wp_chatbot_position_x', $wp_chatbot_position_x);
1122 812 }
1123 813 if (isset($_POST["wp_chatbot_position_y"])) {
1124 - $wp_chatbot_position_y = intval(sanitize_text_field(wp_unslash($_POST["wp_chatbot_position_y"])));
814 + $wp_chatbot_position_y = intval(sanitize_text_field($_POST["wp_chatbot_position_y"]));
1125 815 update_option('wp_chatbot_position_y', $wp_chatbot_position_y);
1126 816 }
1127 817 //product search options
1128 818 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']));
819 + $qlcd_wp_chatbot_search_option = sanitize_text_field($_POST['qlcd_wp_chatbot_search_option']);
1130 820 update_option('qlcd_wp_chatbot_search_option', $qlcd_wp_chatbot_search_option);
1131 821 }
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));
822 +
1169 823 //Enable /disable wpwbot
1170 824 if(isset( $_POST["disable_wp_chatbot"])){
1171 - $disable_wp_chatbot = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot"]));
825 + $disable_wp_chatbot = sanitize_text_field($_POST["disable_wp_chatbot"]);
1172 826 }else{ $disable_wp_chatbot='';}
1173 827 update_option('disable_wp_chatbot', wp_unslash($disable_wp_chatbot));
1174 828
1175 829 if(isset( $_POST["qlcd_wp_chatbot_admin_email"])){
1176 - $qlcd_wp_chatbot_admin_email = sanitize_email(wp_unslash($_POST["qlcd_wp_chatbot_admin_email"]));
830 + $qlcd_wp_chatbot_admin_email = sanitize_email($_POST["qlcd_wp_chatbot_admin_email"]);
1177 831 }else{ $qlcd_wp_chatbot_admin_email='';}
1178 832 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 833
1186 834
1187 835 if(isset( $_POST["qlcd_wp_chatbot_from_email"])){
1188 - $qlcd_wp_chatbot_from_email = sanitize_email(wp_unslash($_POST["qlcd_wp_chatbot_from_email"]));
836 + $qlcd_wp_chatbot_from_email = sanitize_email($_POST["qlcd_wp_chatbot_from_email"]);
1189 837 }else{ $qlcd_wp_chatbot_from_email='';}
1190 838 update_option('qlcd_wp_chatbot_from_email', wp_unslash($qlcd_wp_chatbot_from_email));
1191 839
1192 840 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"]));
841 + $disable_wp_chatbot_on_mobile = sanitize_text_field($_POST["disable_wp_chatbot_on_mobile"]);
1194 842 }else{ $disable_wp_chatbot_on_mobile='';}
1195 843 update_option('disable_wp_chatbot_on_mobile', wp_unslash($disable_wp_chatbot_on_mobile));
1196 844 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"]));
845 + $disable_wp_chatbot_product_search = sanitize_text_field($_POST["disable_wp_chatbot_product_search"]);
1198 846 }else{ $disable_wp_chatbot_product_search='';}
1199 847 update_option('disable_wp_chatbot_product_search', wp_unslash($disable_wp_chatbot_product_search));
1200 848 if(isset( $_POST["disable_wp_chatbot_catalog"])) {
1201 - $disable_wp_chatbot_catalog= sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_catalog"]));
849 + $disable_wp_chatbot_catalog= sanitize_text_field($_POST["disable_wp_chatbot_catalog"]);
1202 850 }else{ $disable_wp_chatbot_catalog='';}
1203 851 update_option('disable_wp_chatbot_catalog', wp_unslash($disable_wp_chatbot_catalog));
1204 852 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"]));
853 + $disable_wp_chatbot_order_status = sanitize_text_field($_POST["disable_wp_chatbot_order_status"]);
1206 854 }else{ $disable_wp_chatbot_order_status='';}
1207 855 update_option('disable_wp_chatbot_order_status', wp_unslash($disable_wp_chatbot_order_status));
1208 856 if(isset( $_POST["disable_wp_chatbot_notification"])) {
1209 - $disable_wp_chatbot_notification = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_notification"]));
857 + $disable_wp_chatbot_notification = sanitize_text_field($_POST["disable_wp_chatbot_notification"]);
1210 858 }else{ $disable_wp_chatbot_notification='1';}
1211 859 update_option('disable_wp_chatbot_notification', wp_unslash($disable_wp_chatbot_notification));
1212 860
1213 861 if(isset( $_POST["enable_wp_chatbot_rtl"])) {
1214 - $enable_wp_chatbot_rtl = sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_rtl"]));
862 + $enable_wp_chatbot_rtl = sanitize_text_field($_POST["enable_wp_chatbot_rtl"]);
1215 863 }else{ $enable_wp_chatbot_rtl='';}
1216 864 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 -
865 +
1230 866 if(isset( $_POST["show_menu_after_greetings"])) {
1231 - $show_menu_after_greetings = sanitize_text_field(wp_unslash($_POST["show_menu_after_greetings"]));
867 + $show_menu_after_greetings = sanitize_text_field($_POST["show_menu_after_greetings"]);
1232 868 }else{ $show_menu_after_greetings='';}
1233 869 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 870 if(isset( $_POST["enable_chat_session"])) {
1241 - $enable_chat_session = sanitize_text_field(wp_unslash($_POST["enable_chat_session"]));
871 + $enable_chat_session = sanitize_text_field($_POST["enable_chat_session"]);
1242 872 }else{ $enable_chat_session='';}
1243 873 update_option('enable_chat_session', wp_unslash($enable_chat_session));
1244 874
1245 875
1246 876 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"]));
877 + $enable_wp_chatbot_mobile_full_screen = sanitize_text_field($_POST["enable_wp_chatbot_mobile_full_screen"]);
1248 878 }else{ $enable_wp_chatbot_mobile_full_screen='';}
1249 879 update_option('enable_wp_chatbot_mobile_full_screen', wp_unslash($enable_wp_chatbot_mobile_full_screen));
1250 880
1251 881 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';}
882 + $wpbot_preloading_time = sanitize_text_field($_POST["wpbot_preloading_time"]);
883 + }else{ $wpbot_preloading_time='100';}
1254 884 update_option('wpbot_preloading_time', wp_unslash($wpbot_preloading_time));
1255 885
1256 886 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"]));
887 + $disable_wp_chatbot_icon_animation = sanitize_text_field($_POST["disable_wp_chatbot_icon_animation"]);
1258 888 }else{ $disable_wp_chatbot_icon_animation='';}
1259 889 update_option('disable_wp_chatbot_icon_animation', wp_unslash($disable_wp_chatbot_icon_animation));
1260 890 //Enable /disable Cart Item Number
1261 891 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"]));
892 + $disable_wp_chatbot_cart_item_number = sanitize_text_field($_POST["disable_wp_chatbot_cart_item_number"]);
1263 893 }else{ $disable_wp_chatbot_cart_item_number='';}
1264 894 update_option('disable_wp_chatbot_cart_item_number', wp_unslash($disable_wp_chatbot_cart_item_number));
1265 895 //Enable /disable featured products button.
1266 896 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"]));
897 + $disable_wp_chatbot_featured_product = sanitize_text_field($_POST["disable_wp_chatbot_featured_product"]);
1268 898 }else{ $disable_wp_chatbot_featured_product='';}
1269 899 update_option('disable_wp_chatbot_featured_product', wp_unslash($disable_wp_chatbot_featured_product));
1270 900 //Enable /disable sale products button
1271 901 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"]));
902 + $disable_wp_chatbot_sale_product = sanitize_text_field($_POST["disable_wp_chatbot_sale_product"]);
1273 903 }else{ $disable_wp_chatbot_sale_product='';}
1274 904 update_option('disable_wp_chatbot_sale_product', wp_unslash($disable_wp_chatbot_sale_product));
1275 905 //Enable Product details page.
1276 906 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"]));
907 + $wp_chatbot_open_product_detail = sanitize_text_field($_POST["wp_chatbot_open_product_detail"]);
1278 908 }else{ $wp_chatbot_open_product_detail='';}
1279 909 update_option('wp_chatbot_open_product_detail', wp_unslash($wp_chatbot_open_product_detail));
1280 910 //product order and order by
1281 911 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']));
912 + $qlcd_wp_chatbot_product_orderby = sanitize_text_field($_POST['qlcd_wp_chatbot_product_orderby']);
1283 913 update_option('qlcd_wp_chatbot_product_orderby', sanitize_text_field($qlcd_wp_chatbot_product_orderby));
1284 914 }
1285 915 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']));
916 + $qlcd_wp_chatbot_product_order = sanitize_text_field($_POST['qlcd_wp_chatbot_product_order']);
1287 917 update_option('qlcd_wp_chatbot_product_order', sanitize_text_field($qlcd_wp_chatbot_product_order));
1288 918 }
1289 919
1290 920
@@ -1289,68 +919,65 @@
1289 919
1290 920
1291 921 //Product per page settings.
1292 922 if (isset($_POST["qlcd_wp_chatbot_ppp"])) {
1293 - $qlcd_wp_chatbot_ppp = sanitize_text_field(wp_unslash($_POST["qlcd_wp_chatbot_ppp"]));
923 + $qlcd_wp_chatbot_ppp = sanitize_text_field($_POST["qlcd_wp_chatbot_ppp"]);
1294 924 update_option('qlcd_wp_chatbot_ppp', intval($qlcd_wp_chatbot_ppp));
1295 925 }
1296 926 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']));
927 + $wp_chatbot_exclude_stock_out_product = sanitize_text_field($_POST['wp_chatbot_exclude_stock_out_product']);
1298 928 }else{ $wp_chatbot_exclude_stock_out_product='';}
1299 929 update_option('wp_chatbot_exclude_stock_out_product', wp_unslash($wp_chatbot_exclude_stock_out_product));
1300 930 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']));
931 + $wp_chatbot_show_parent_category = sanitize_text_field($_POST['wp_chatbot_show_parent_category']);
1302 932 }else{ $wp_chatbot_show_parent_category='';}
1303 933 update_option('wp_chatbot_show_parent_category', wp_unslash($wp_chatbot_show_parent_category));
1304 934 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']));
935 + $wp_chatbot_show_sub_category = sanitize_text_field($_POST['wp_chatbot_show_sub_category']);
1306 936 }else{ $wp_chatbot_show_sub_category='';}
1307 937 update_option('wp_chatbot_show_sub_category', wp_unslash($wp_chatbot_show_sub_category));
1308 938 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"]));
939 + $qlcd_wp_chatbot_order_user = sanitize_text_field($_POST["qlcd_wp_chatbot_order_user"]);
1310 940 update_option('qlcd_wp_chatbot_order_user', sanitize_text_field($qlcd_wp_chatbot_order_user));
1311 941 }
1312 942
1313 943 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"]));
944 + $qc_wpbot_menu_order = wp_kses_post($_POST["qc_wpbot_menu_order"]);
1315 945 }else{ $qc_wpbot_menu_order='';}
1316 946 update_option('qc_wpbot_menu_order', ($qc_wpbot_menu_order));
1317 947
1318 948 //wpwBot Load control
1319 949 if(isset($_POST["wp_chatbot_show_home_page"])){
1320 - $wp_chatbot_show_home_page = sanitize_key((wp_unslash($_POST["wp_chatbot_show_home_page"])));
950 + $wp_chatbot_show_home_page = sanitize_key(($_POST["wp_chatbot_show_home_page"]));
1321 951 update_option('wp_chatbot_show_home_page', $wp_chatbot_show_home_page);
1322 952 }
1323 953
1324 954
1325 955 if(isset($_POST["wp_chatbot_show_posts"])){
1326 - $wp_chatbot_show_posts = sanitize_key((wp_unslash($_POST["wp_chatbot_show_posts"])));
956 + $wp_chatbot_show_posts = sanitize_key(($_POST["wp_chatbot_show_posts"]));
1327 957 update_option('wp_chatbot_show_posts', $wp_chatbot_show_posts);
1328 958 }
1329 959
1330 960
1331 961 if(isset($_POST["wp_chatbot_show_pages"])){
1332 - $wp_chatbot_show_pages = sanitize_key((wp_unslash($_POST["wp_chatbot_show_pages"])));
962 + $wp_chatbot_show_pages = sanitize_key(($_POST["wp_chatbot_show_pages"]));
1333 963 update_option('wp_chatbot_show_pages', $wp_chatbot_show_pages);
1334 964 }
1335 965
1336 966 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"]));
1338 - update_option('wp_chatbot_show_pages_list', maybe_serialize(sanitize_array($wp_chatbot_show_pages_list)));
967 + $wp_chatbot_show_pages_list = wp_parse_id_list($_POST["wp_chatbot_show_pages_list"]);
968 + update_option('wp_chatbot_show_pages_list', maybe_serialize($wp_chatbot_show_pages_list));
1339 969 }else{
1340 970 $wp_chatbot_show_pages_list='';
1341 - update_option('wp_chatbot_show_pages_list', maybe_serialize(sanitize_array($wp_chatbot_show_pages_list)));
971 + update_option('wp_chatbot_show_pages_list', maybe_serialize($wp_chatbot_show_pages_list));
1342 972 }
1343 973 if(isset( $_POST["wp_chatbot_exclude_post_list"])) {
1344 - $wp_chatbot_exclude_post_list = wp_unslash($_POST["wp_chatbot_exclude_post_list"]);
1345 - update_option('wp_chatbot_exclude_post_list', maybe_serialize(sanitize_array($wp_chatbot_exclude_post_list)));
1346 - }else{
1347 - $wp_chatbot_exclude_post_list='';
1348 - update_option('wp_chatbot_exclude_post_list', maybe_serialize(sanitize_array($wp_chatbot_exclude_post_list)));
1349 - }
974 + $wp_chatbot_exclude_post_list = $_POST["wp_chatbot_exclude_post_list"];
975 + }else{ $wp_chatbot_exclude_post_list='';}
976 + update_option('wp_chatbot_exclude_post_list', maybe_serialize($wp_chatbot_exclude_post_list));
1350 977
1351 978 if(isset($_POST["wp_chatbot_show_wpcommerce"])){
1352 - $wp_chatbot_show_wpcommerce = sanitize_key((wp_unslash($_POST["wp_chatbot_show_wpcommerce"])));
979 + $wp_chatbot_show_wpcommerce = sanitize_key(($_POST["wp_chatbot_show_wpcommerce"]));
1353 980 update_option('wp_chatbot_show_wpcommerce', $wp_chatbot_show_wpcommerce);
1354 981 }
1355 982
1356 983
@@ -1355,60 +982,45 @@
1355 982
1356 983
1357 984 //Stop Words Settings
1358 985 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"]));
986 + $qlcd_wp_chatbot_stop_words_name = sanitize_text_field($_POST["qlcd_wp_chatbot_stop_words_name"]);
1360 987 update_option('qlcd_wp_chatbot_stop_words_name', $qlcd_wp_chatbot_stop_words_name);
1361 988 }
1362 989 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"]));
990 + $qlcd_wp_chatbot_stop_words = sanitize_text_field($_POST["qlcd_wp_chatbot_stop_words"]);
1364 991 update_option('qlcd_wp_chatbot_stop_words', $qlcd_wp_chatbot_stop_words);
1365 992 }
1366 993 //wpwbot icon settings.
1367 - $wp_chatbot_icon = isset( $_POST['wp_chatbot_icon'] ) ? sanitize_text_field(wp_unslash($_POST['wp_chatbot_icon'])) : 'icon-3.png';
994 + $wp_chatbot_icon = isset( $_POST['wp_chatbot_icon'] ) ? sanitize_text_field($_POST['wp_chatbot_icon']) : 'icon-3.png';
1368 995 update_option('wp_chatbot_icon', $wp_chatbot_icon);
1369 996
1370 - $wp_chatbot_floatingiconbg_color = isset( $_POST['wp_chatbot_floatingiconbg_color'] ) ? sanitize_text_field(wp_unslash($_POST['wp_chatbot_floatingiconbg_color'])) : '#fff';
997 + $wp_chatbot_floatingiconbg_color = isset( $_POST['wp_chatbot_floatingiconbg_color'] ) ? sanitize_text_field($_POST['wp_chatbot_floatingiconbg_color']) : '#fff';
1371 998 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 999
1382 1000 // upload custom wpwbot icon path
1383 - $wp_chatbot_custom_icon_path = sanitize_text_field(wp_unslash($_POST['wp_chatbot_custom_icon_path']));
1001 + $wp_chatbot_custom_icon_path = sanitize_text_field($_POST['wp_chatbot_custom_icon_path']);
1384 1002 update_option('wp_chatbot_custom_icon_path', $wp_chatbot_custom_icon_path);
1385 1003 //Agent image
1386 1004 //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');
1005 + $wp_chatbot_icon = (isset($_POST['wp_chatbot_agent_image']) ? sanitize_text_field($_POST['wp_chatbot_agent_image']) : 'agent-0.png');
1388 1006 update_option('wp_chatbot_agent_image', $wp_chatbot_icon);
1389 1007 // upload custom wpwbot icon
1390 1008 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']));
1009 + $wp_chatbot_custom_agent_path = sanitize_text_field($_POST['wp_chatbot_custom_agent_path']);
1392 1010 update_option('wp_chatbot_custom_agent_path', $wp_chatbot_custom_agent_path);
1393 1011 }
1394 1012
1395 1013 //Theming
1396 - $qcld_wb_chatbot_theme = (isset($_POST['qcld_wb_chatbot_theme']) ? sanitize_text_field(wp_unslash($_POST['qcld_wb_chatbot_theme'])) : 'template-00');
1014 + $qcld_wb_chatbot_theme = (isset($_POST['qcld_wb_chatbot_theme']) ? sanitize_text_field($_POST['qcld_wb_chatbot_theme']) : 'template-00');
1397 1015 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 1016 //Theme custom background option
1405 1017 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"]));
1018 + $qcld_wb_chatbot_change_bg = sanitize_text_field($_POST["qcld_wb_chatbot_change_bg"]);
1407 1019 }else{$qcld_wb_chatbot_change_bg='';}
1408 1020 update_option('qcld_wb_chatbot_change_bg', $qcld_wb_chatbot_change_bg);
1409 1021 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"]));
1022 + $qcld_wb_chatbot_board_bg_path = sanitize_text_field($_POST["qcld_wb_chatbot_board_bg_path"]);
1411 1023 update_option('qcld_wb_chatbot_board_bg_path', wp_unslash($qcld_wb_chatbot_board_bg_path));
1412 1024 }
1413 1025
1414 1026
@@ -1415,1032 +1027,504 @@
1415 1027
1416 1028 //To override style use custom css.
1417 1029 if(isset($_POST["wp_chatbot_custom_css"])){
1418 1030 $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));
1031 + update_option('wp_chatbot_custom_css', $wp_chatbot_custom_css);
1420 1032 }
1421 1033
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);
1034 + $qlcd_wp_chatbot_dialogflow_project_id= @$_POST["qlcd_wp_chatbot_dialogflow_project_id"];
1035 + update_option('qlcd_wp_chatbot_dialogflow_project_id', sanitize_text_field($qlcd_wp_chatbot_dialogflow_project_id));
1428 1036
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);
1037 + $wp_chatbot_df_api= @$_POST["wp_chatbot_df_api"];
1038 + update_option('wp_chatbot_df_api', sanitize_text_field($wp_chatbot_df_api));
1435 1039
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);
1040 +
1041 +
1042 + $qlcd_wp_chatbot_dialogflow_project_key= @$_POST["qlcd_wp_chatbot_dialogflow_project_key"];
1043 + update_option('qlcd_wp_chatbot_dialogflow_project_key', wp_unslash($qlcd_wp_chatbot_dialogflow_project_key));
1442 1044
1443 1045 /****Language center settings. ****/
1444 1046 //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 - }
1047 + $qlcd_wp_chatbot_host = @$_POST["qlcd_wp_chatbot_host"];
1048 + update_option('qlcd_wp_chatbot_host', sanitize_text_field($qlcd_wp_chatbot_host));
1049 + $qlcd_wp_chatbot_agent = @$_POST["qlcd_wp_chatbot_agent"];
1050 + update_option('qlcd_wp_chatbot_agent', sanitize_text_field($qlcd_wp_chatbot_agent));
1051 + $qlcd_wp_chatbot_shopper_demo_name = @$_POST["qlcd_wp_chatbot_shopper_demo_name"];
1052 + update_option('qlcd_wp_chatbot_shopper_demo_name', sanitize_text_field($qlcd_wp_chatbot_shopper_demo_name));
1053 + $qlcd_wp_chatbot_yes = @$_POST["qlcd_wp_chatbot_yes"];
1054 + update_option('qlcd_wp_chatbot_yes', sanitize_text_field($qlcd_wp_chatbot_yes));
1055 + $qlcd_wp_chatbot_no = @$_POST["qlcd_wp_chatbot_no"];
1056 + update_option('qlcd_wp_chatbot_no', sanitize_text_field($qlcd_wp_chatbot_no));
1057 + $qlcd_wp_chatbot_or = @$_POST["qlcd_wp_chatbot_or"];
1058 + update_option('qlcd_wp_chatbot_or', sanitize_text_field($qlcd_wp_chatbot_or));
1059 + $qlcd_wp_chatbot_sorry = @$_POST["qlcd_wp_chatbot_sorry"];
1060 + update_option('qlcd_wp_chatbot_sorry', sanitize_text_field($qlcd_wp_chatbot_sorry));
1061 + $qlcd_wp_chatbot_agent_join = @$_POST["qlcd_wp_chatbot_agent_join"];
1557 1062 update_option('qlcd_wp_chatbot_agent_join', maybe_serialize($qlcd_wp_chatbot_agent_join));
1558 -
1559 1063 //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 - }
1064 + $qlcd_wp_chatbot_welcome = @$_POST["qlcd_wp_chatbot_welcome"];
1567 1065 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 - }
1066 + $qlcd_wp_chatbot_back_to_start = @$_POST["qlcd_wp_chatbot_back_to_start"];
1576 1067 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 - }
1068 + $qlcd_wp_chatbot_hi_there = @$_POST["qlcd_wp_chatbot_hi_there"];
1585 1069 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 - }
1070 + $qlcd_wp_chatbot_hello = @$_POST["qlcd_wp_chatbot_hello"];
1594 1071 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 - }
1072 + $qlcd_wp_chatbot_welcome_back = @$_POST["qlcd_wp_chatbot_welcome_back"];
1603 1073 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 - }
1074 + $qlcd_wp_chatbot_asking_name = @$_POST["qlcd_wp_chatbot_asking_name"];
1612 1075 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 - }
1076 + $qlcd_wp_chatbot_name_greeting = @$_POST["qlcd_wp_chatbot_name_greeting"];
1621 1077 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 - }
1078 + $qlcd_wp_chatbot_i_am = @$_POST["qlcd_wp_chatbot_i_am"];
1630 1079 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 - }
1080 + $qlcd_wp_chatbot_is_typing = @$_POST["qlcd_wp_chatbot_is_typing"];
1639 1081 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 - }
1082 + $qlcd_wp_chatbot_send_a_msg= @$_POST["qlcd_wp_chatbot_send_a_msg"];
1648 1083 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 - }
1084 + $qlcd_wp_chatbot_choose_option= @$_POST["qlcd_wp_chatbot_choose_option"];
1657 1085 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 - }
1086 + $qlcd_wp_chatbot_viewed_products= @$_POST["qlcd_wp_chatbot_viewed_products"];
1666 1087 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 - }
1088 + $qlcd_wp_chatbot_shopping_cart= @$_POST["qlcd_wp_chatbot_shopping_cart"];
1089 + update_option('qlcd_wp_chatbot_shopping_cart', maybe_serialize($qlcd_wp_chatbot_shopping_cart));
1090 + $qlcd_wp_chatbot_add_to_cart= @$_POST["qlcd_wp_chatbot_add_to_cart"];
1091 + update_option('qlcd_wp_chatbot_add_to_cart', maybe_serialize($qlcd_wp_chatbot_add_to_cart));
1092 + $qlcd_wp_chatbot_cart_link= @$_POST["qlcd_wp_chatbot_cart_link"];
1093 + update_option('qlcd_wp_chatbot_cart_link', maybe_serialize($qlcd_wp_chatbot_cart_link));
1094 + $qlcd_wp_chatbot_checkout_link= @$_POST["qlcd_wp_chatbot_checkout_link"];
1095 + update_option('qlcd_wp_chatbot_checkout_link', maybe_serialize($qlcd_wp_chatbot_checkout_link));
1096 + $qlcd_wp_chatbot_cart_welcome= @$_POST["qlcd_wp_chatbot_cart_welcome"];
1097 + update_option('qlcd_wp_chatbot_cart_welcome', maybe_serialize($qlcd_wp_chatbot_cart_welcome));
1098 + $qlcd_wp_chatbot_featured_product_welcome= @$_POST["qlcd_wp_chatbot_featured_product_welcome"];
1099 + update_option('qlcd_wp_chatbot_featured_product_welcome', maybe_serialize($qlcd_wp_chatbot_featured_product_welcome));
1100 + $qlcd_wp_chatbot_viewed_product_welcome= @$_POST["qlcd_wp_chatbot_viewed_product_welcome"];
1101 + update_option('qlcd_wp_chatbot_viewed_product_welcome', maybe_serialize($qlcd_wp_chatbot_viewed_product_welcome));
1102 + $qlcd_wp_chatbot_latest_product_welcome= @$_POST["qlcd_wp_chatbot_latest_product_welcome"];
1103 + update_option('qlcd_wp_chatbot_latest_product_welcome', maybe_serialize($qlcd_wp_chatbot_latest_product_welcome));
1104 + $qlcd_wp_chatbot_cart_title= @$_POST["qlcd_wp_chatbot_cart_title"];
1105 + update_option('qlcd_wp_chatbot_cart_title', maybe_serialize($qlcd_wp_chatbot_cart_title));
1106 + $qlcd_wp_chatbot_cart_quantity= @$_POST["qlcd_wp_chatbot_cart_quantity"];
1107 + update_option('qlcd_wp_chatbot_cart_quantity', maybe_serialize($qlcd_wp_chatbot_cart_quantity));
1108 + $qlcd_wp_chatbot_cart_price= @$_POST["qlcd_wp_chatbot_cart_price"];
1109 + update_option('qlcd_wp_chatbot_cart_price', maybe_serialize($qlcd_wp_chatbot_cart_price));
1110 + $qlcd_wp_chatbot_no_cart_items= @$_POST["qlcd_wp_chatbot_no_cart_items"];
1111 + update_option('qlcd_wp_chatbot_no_cart_items', maybe_serialize($qlcd_wp_chatbot_no_cart_items));
1112 + $qlcd_wp_chatbot_cart_updating= @$_POST["qlcd_wp_chatbot_cart_updating"];
1113 + update_option('qlcd_wp_chatbot_cart_updating', maybe_serialize($qlcd_wp_chatbot_cart_updating));
1114 + $qlcd_wp_chatbot_cart_removing= @$_POST["qlcd_wp_chatbot_cart_removing"];
1115 + update_option('qlcd_wp_chatbot_cart_removing', maybe_serialize($qlcd_wp_chatbot_cart_removing));
1727 1116 //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 - }
1117 + $qlcd_wp_chatbot_wildcard_msg = @$_POST["qlcd_wp_chatbot_wildcard_msg"];
1118 + update_option('qlcd_wp_chatbot_wildcard_msg', maybe_serialize($qlcd_wp_chatbot_wildcard_msg));
1736 1119 //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 - }
1120 + $qlcd_wp_chatbot_empty_filter_msg = @$_POST["qlcd_wp_chatbot_empty_filter_msg"];
1121 + update_option('qlcd_wp_chatbot_empty_filter_msg', maybe_serialize($qlcd_wp_chatbot_empty_filter_msg));
1745 1122
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 - }
1123 + $qlcd_wp_chatbot_did_you_mean = @$_POST["qlcd_wp_chatbot_did_you_mean"];
1124 + update_option('qlcd_wp_chatbot_did_you_mean', maybe_serialize($qlcd_wp_chatbot_did_you_mean));
1753 1125 //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 - }
1126 + $qlcd_wp_chatbot_help_welcome = @$_POST["qlcd_wp_chatbot_help_welcome"];
1127 + update_option('qlcd_wp_chatbot_help_welcome', maybe_serialize($qlcd_wp_chatbot_help_welcome));
1128 + $qlcd_wp_chatbot_help_msg = @$_POST["qlcd_wp_chatbot_help_msg"];
1129 + update_option('qlcd_wp_chatbot_help_msg', maybe_serialize($qlcd_wp_chatbot_help_msg));
1768 1130 //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 - }
1131 + $qlcd_wp_chatbot_reset = @$_POST["qlcd_wp_chatbot_reset"];
1132 + update_option('qlcd_wp_chatbot_reset', maybe_serialize($qlcd_wp_chatbot_reset));
1776 1133 //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 - }
1836 -
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 - }
1843 -
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 - }
1134 + $qlcd_wp_chatbot_sys_key_help = @$_POST["qlcd_wp_chatbot_sys_key_help"];
1135 + update_option('qlcd_wp_chatbot_sys_key_help', sanitize_text_field($qlcd_wp_chatbot_sys_key_help));
1136 + $qlcd_wp_chatbot_sys_key_product = @$_POST["qlcd_wp_chatbot_sys_key_product"];
1137 + update_option('qlcd_wp_chatbot_sys_key_product', sanitize_text_field($qlcd_wp_chatbot_sys_key_product));
1138 + $qlcd_wp_chatbot_sys_key_catalog = @$_POST["qlcd_wp_chatbot_sys_key_catalog"];
1139 + update_option('qlcd_wp_chatbot_sys_key_catalog', sanitize_text_field($qlcd_wp_chatbot_sys_key_catalog));
1140 + $qlcd_wp_chatbot_sys_key_order = @$_POST["qlcd_wp_chatbot_sys_key_order"];
1141 + update_option('qlcd_wp_chatbot_sys_key_order', sanitize_text_field($qlcd_wp_chatbot_sys_key_order));
1142 + $qlcd_wp_chatbot_sys_key_support = @$_POST["qlcd_wp_chatbot_sys_key_support"];
1143 + update_option('qlcd_wp_chatbot_sys_key_support', sanitize_text_field($qlcd_wp_chatbot_sys_key_support));
1144 + $qlcd_wp_chatbot_sys_key_reset = @$_POST["qlcd_wp_chatbot_sys_key_reset"];
1145 + update_option('qlcd_wp_chatbot_sys_key_reset', sanitize_text_field($qlcd_wp_chatbot_sys_key_reset));
1146 + $qlcd_wp_chatbot_sys_key_email = @$_POST["qlcd_wp_chatbot_sys_key_email"];
1147 + update_option('qlcd_wp_chatbot_sys_key_email', sanitize_text_field($qlcd_wp_chatbot_sys_key_email));
1148 + $qlcd_wp_chatbot_wildcard_product = @$_POST["qlcd_wp_chatbot_wildcard_product"];
1149 + update_option('qlcd_wp_chatbot_wildcard_product', maybe_serialize($qlcd_wp_chatbot_wildcard_product));
1150 + $qlcd_wp_chatbot_wildcard_catalog = @$_POST["qlcd_wp_chatbot_wildcard_catalog"];
1151 + update_option('qlcd_wp_chatbot_wildcard_catalog', maybe_serialize($qlcd_wp_chatbot_wildcard_catalog));
1152 + $qlcd_wp_chatbot_featured_products = @$_POST["qlcd_wp_chatbot_featured_products"];
1153 + update_option('qlcd_wp_chatbot_featured_products', maybe_serialize($qlcd_wp_chatbot_featured_products));
1154 + $qlcd_wp_chatbot_sale_products = @$_POST["qlcd_wp_chatbot_sale_products"];
1155 + update_option('qlcd_wp_chatbot_sale_products', maybe_serialize($qlcd_wp_chatbot_sale_products));
1156 + $qlcd_wp_chatbot_wildcard_support = @$_POST["qlcd_wp_chatbot_wildcard_support"];
1157 + update_option('qlcd_wp_chatbot_wildcard_support', sanitize_text_field($qlcd_wp_chatbot_wildcard_support));
1158 + $qlcd_wp_chatbot_messenger_label = @$_POST["qlcd_wp_chatbot_messenger_label"];
1159 + update_option('qlcd_wp_chatbot_messenger_label', maybe_serialize($qlcd_wp_chatbot_messenger_label));
1848 1160 //Products search .
1849 1161 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');
1162 + $qlcd_wp_chatbot_product_success = @$_POST["qlcd_wp_chatbot_product_success"];
1853 1163 update_option('qlcd_wp_chatbot_product_success', maybe_serialize($qlcd_wp_chatbot_product_success));
1854 1164 }
1855 1165 if (isset($_POST["qlcd_wp_chatbot_product_fail"])) {
1856 - $qlcd_wp_chatbot_product_fail = @wp_unslash($_POST["qlcd_wp_chatbot_product_fail"]);
1857 - update_option('qlcd_wp_chatbot_product_fail', maybe_serialize(sanitize_array($qlcd_wp_chatbot_product_fail)));
1166 + $qlcd_wp_chatbot_product_fail = @$_POST["qlcd_wp_chatbot_product_fail"];
1167 + update_option('qlcd_wp_chatbot_product_fail', maybe_serialize($qlcd_wp_chatbot_product_fail));
1858 1168 }
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 - }
1169 + $qlcd_wp_chatbot_product_asking = @$_POST["qlcd_wp_chatbot_product_asking"];
1170 + update_option('qlcd_wp_chatbot_product_asking', maybe_serialize($qlcd_wp_chatbot_product_asking));
1171 + $qlcd_wp_chatbot_product_suggest = @$_POST["qlcd_wp_chatbot_product_suggest"];
1172 + update_option('qlcd_wp_chatbot_product_suggest', maybe_serialize($qlcd_wp_chatbot_product_suggest));
1173 + $qlcd_wp_chatbot_product_infinite = @$_POST["qlcd_wp_chatbot_product_infinite"];
1174 + update_option('qlcd_wp_chatbot_product_infinite', maybe_serialize($qlcd_wp_chatbot_product_infinite));
1175 + $qlcd_wp_chatbot_load_more = @$_POST["qlcd_wp_chatbot_load_more"];
1176 + update_option('qlcd_wp_chatbot_load_more', maybe_serialize($qlcd_wp_chatbot_load_more));
1875 1177 //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 - }
1178 + $qlcd_wp_chatbot_wildcard_order = @$_POST["qlcd_wp_chatbot_wildcard_order"];
1179 + update_option('qlcd_wp_chatbot_wildcard_order', maybe_serialize($qlcd_wp_chatbot_wildcard_order));
1180 + $qlcd_wp_chatbot_order_welcome = @$_POST["qlcd_wp_chatbot_order_welcome"];
1181 + update_option('qlcd_wp_chatbot_order_welcome', maybe_serialize($qlcd_wp_chatbot_order_welcome));
1182 + $qlcd_wp_chatbot_order_username_asking = @$_POST["qlcd_wp_chatbot_order_username_asking"];
1183 + update_option('qlcd_wp_chatbot_order_username_asking', maybe_serialize($qlcd_wp_chatbot_order_username_asking));
1184 + $qlcd_wp_chatbot_order_username_not_exist = @$_POST["qlcd_wp_chatbot_order_username_not_exist"];
1185 + update_option('qlcd_wp_chatbot_order_username_not_exist', maybe_serialize($qlcd_wp_chatbot_order_username_not_exist));
1186 + $qlcd_wp_chatbot_order_username_thanks = @$_POST["qlcd_wp_chatbot_order_username_thanks"];
1187 + update_option('qlcd_wp_chatbot_order_username_thanks', maybe_serialize($qlcd_wp_chatbot_order_username_thanks));
1188 + $qlcd_wp_chatbot_order_username_password = @$_POST["qlcd_wp_chatbot_order_username_password"];
1189 + update_option('qlcd_wp_chatbot_order_username_password', maybe_serialize($qlcd_wp_chatbot_order_username_password));
1190 + $qlcd_wp_chatbot_order_password_incorrect= @$_POST["qlcd_wp_chatbot_order_password_incorrect"];
1191 + update_option('qlcd_wp_chatbot_order_password_incorrect', maybe_serialize($qlcd_wp_chatbot_order_password_incorrect));
1192 + $qlcd_wp_chatbot_order_not_found= @$_POST["qlcd_wp_chatbot_order_not_found"];
1193 + update_option('qlcd_wp_chatbot_order_not_found', maybe_serialize($qlcd_wp_chatbot_order_not_found));
1194 + $qlcd_wp_chatbot_order_found= @$_POST["qlcd_wp_chatbot_order_found"];
1195 + update_option('qlcd_wp_chatbot_order_found', maybe_serialize($qlcd_wp_chatbot_order_found));
1196 + $qlcd_wp_chatbot_order_email_support= @$_POST["qlcd_wp_chatbot_order_email_support"];
1197 + update_option('qlcd_wp_chatbot_order_email_support', maybe_serialize($qlcd_wp_chatbot_order_email_support));
1918 1198 //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 - }
1199 + $qlcd_wp_chatbot_support_welcome = @$_POST["qlcd_wp_chatbot_support_welcome"];
1200 + update_option('qlcd_wp_chatbot_support_welcome', maybe_serialize($qlcd_wp_chatbot_support_welcome));
1201 + $qlcd_wp_chatbot_support_email = @$_POST["qlcd_wp_chatbot_support_email"];
1202 + update_option('qlcd_wp_chatbot_support_email', sanitize_text_field($qlcd_wp_chatbot_support_email));
1203 + $qlcd_wp_chatbot_asking_email = @$_POST["qlcd_wp_chatbot_asking_email"];
1204 + update_option('qlcd_wp_chatbot_asking_email', maybe_serialize($qlcd_wp_chatbot_asking_email));
1205 + $qlcd_wp_chatbot_asking_msg = @$_POST["qlcd_wp_chatbot_asking_msg"];
1206 + update_option('qlcd_wp_chatbot_asking_msg', maybe_serialize($qlcd_wp_chatbot_asking_msg));
1938 1207
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 - }
1208 + $qlcd_wp_chatbot_no_result = @$_POST["qlcd_wp_chatbot_no_result"];
1209 + update_option('qlcd_wp_chatbot_no_result', maybe_serialize($qlcd_wp_chatbot_no_result));
1943 1210
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 - }
1211 + $qlcd_wp_chatbot_support_option_again = @$_POST["qlcd_wp_chatbot_support_option_again"];
1212 + update_option('qlcd_wp_chatbot_support_option_again', maybe_serialize($qlcd_wp_chatbot_support_option_again));
1213 + $qlcd_wp_chatbot_invalid_email = @$_POST["qlcd_wp_chatbot_invalid_email"];
1214 + update_option('qlcd_wp_chatbot_invalid_email', maybe_serialize($qlcd_wp_chatbot_invalid_email));
1215 + $qlcd_wp_chatbot_support_phone= @$_POST["qlcd_wp_chatbot_support_phone"];
1964 1216
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 - }
1217 + update_option('qlcd_wp_chatbot_support_phone', sanitize_text_field($qlcd_wp_chatbot_support_phone));
1218 + $qlcd_wp_chatbot_asking_phone= @$_POST["qlcd_wp_chatbot_asking_phone"];
1219 + update_option('qlcd_wp_chatbot_asking_phone', maybe_serialize($qlcd_wp_chatbot_asking_phone));
1220 + $qlcd_wp_chatbot_thank_for_phone= @$_POST["qlcd_wp_chatbot_thank_for_phone"];
1221 + update_option('qlcd_wp_chatbot_thank_for_phone', maybe_serialize($qlcd_wp_chatbot_thank_for_phone));
1222 + $qlcd_wp_chatbot_admin_email = sanitize_email(@$_POST["qlcd_wp_chatbot_admin_email"]);
1984 1223
1985 1224 update_option('qlcd_wp_chatbot_admin_email', $qlcd_wp_chatbot_admin_email);
1986 1225
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 - }
1226 + $qlcd_wp_chatbot_email_sub = sanitize_email(@$_POST["qlcd_wp_chatbot_email_sub"]);
1992 1227 update_option('qlcd_wp_chatbot_email_sub', $qlcd_wp_chatbot_email_sub);
1993 1228
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 - }
1229 + $qlcd_wp_site_search = @$_POST["qlcd_wp_site_search"];
1230 + update_option('qlcd_wp_site_search', sanitize_text_field($qlcd_wp_site_search));
1999 1231
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);
1232 + $qlcd_wp_chatbot_email_sent = @$_POST["qlcd_wp_chatbot_email_sent"];
1233 + update_option('qlcd_wp_chatbot_email_sent', sanitize_text_field($qlcd_wp_chatbot_email_sent));
1234 + $qlcd_wp_chatbot_email_fail = @$_POST["qlcd_wp_chatbot_email_fail"];
1235 + update_option('qlcd_wp_chatbot_email_fail', sanitize_text_field($qlcd_wp_chatbot_email_fail));
2020 1236 //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 - }
1237 + $qlcd_wp_chatbot_notification_interval = @$_POST["qlcd_wp_chatbot_notification_interval"];
1238 + update_option('qlcd_wp_chatbot_notification_interval', sanitize_text_field($qlcd_wp_chatbot_notification_interval));
1239 + $qlcd_wp_chatbot_notifications = @$_POST["qlcd_wp_chatbot_notifications"];
1240 + update_option('qlcd_wp_chatbot_notifications', maybe_serialize($qlcd_wp_chatbot_notifications));
2030 1241 //Support building part.
2031 -
2032 - $allowed_html = array(
2033 - 'a' => array(
2034 - 'href' => array(),
2035 - 'title' => array()
2036 - ),
2037 - 'br' => array(),
2038 - 'em' => array(),
2039 - 'strong' => array(),
2040 - );
2041 - $support_query = @wp_unslash($_POST["support_query"]);
2042 - $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 - }
2048 - }
2049 - update_option('support_query', (maybe_serialize($clean_support_query)));
2050 - $support_ans = @wp_unslash($_POST["support_ans"]);
2051 - $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 - }
2056 - }
2057 - update_option('support_ans', (maybe_serialize($clean_support_ans)));
1242 + $support_query = @$_POST["support_query"];
1243 + update_option('support_query', maybe_serialize($support_query));
1244 + $support_ans = @$_POST["support_ans"];
1245 + update_option('support_ans', maybe_serialize($support_ans));
2058 1246 //Create Mobile app pages.
2059 1247 if(isset( $_POST["wp_chatbot_app_pages"])) {
2060 - $wp_chatbot_app_pages = wp_unslash($_POST["wp_chatbot_app_pages"]);
1248 + $wp_chatbot_app_pages = $_POST["wp_chatbot_app_pages"];
2061 1249 }else{ $wp_chatbot_app_pages='';}
2062 1250 update_option('wp_chatbot_app_pages', wp_unslash($wp_chatbot_app_pages));
2063 1251 //Messenger Options
2064 1252 if(isset( $_POST["enable_wp_chatbot_messenger"])) {
2065 - $enable_wp_chatbot_messenger = wp_unslash($_POST["enable_wp_chatbot_messenger"]);
1253 + $enable_wp_chatbot_messenger = $_POST["enable_wp_chatbot_messenger"];
2066 1254 }else{ $enable_wp_chatbot_messenger='';}
2067 1255 update_option('enable_wp_chatbot_messenger', wp_unslash($enable_wp_chatbot_messenger));
2068 1256 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"]);
1257 + $enable_wp_chatbot_messenger_floating_icon = $_POST["enable_wp_chatbot_messenger_floating_icon"];
2070 1258 }else{ $enable_wp_chatbot_messenger_floating_icon='';}
2071 1259 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 - }
1260 + $qlcd_wp_chatbot_fb_app_id = @$_POST["qlcd_wp_chatbot_fb_app_id"];
1261 + update_option('qlcd_wp_chatbot_fb_app_id', sanitize_text_field($qlcd_wp_chatbot_fb_app_id));
1262 + $qlcd_wp_chatbot_fb_page_id = @$_POST["qlcd_wp_chatbot_fb_page_id"];
1263 + update_option('qlcd_wp_chatbot_fb_page_id', sanitize_text_field($qlcd_wp_chatbot_fb_page_id));
1264 + $qlcd_wp_chatbot_fb_color= @$_POST["qlcd_wp_chatbot_fb_color"];
1265 + update_option('qlcd_wp_chatbot_fb_color', wp_unslash($qlcd_wp_chatbot_fb_color));
1266 + $qlcd_wp_chatbot_fb_in_msg = @$_POST["qlcd_wp_chatbot_fb_in_msg"];
1267 + update_option('qlcd_wp_chatbot_fb_in_msg', sanitize_text_field($qlcd_wp_chatbot_fb_in_msg));
1268 + $qlcd_wp_chatbot_fb_out_msg = @$_POST["qlcd_wp_chatbot_fb_out_msg"];
1269 + update_option('qlcd_wp_chatbot_fb_out_msg', sanitize_text_field($qlcd_wp_chatbot_fb_out_msg));
2092 1270 //Skype option
2093 1271 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"]);
1272 + $enable_wp_chatbot_skype_floating_icon = $_POST["enable_wp_chatbot_skype_floating_icon"];
2095 1273 }else{ $enable_wp_chatbot_skype_floating_icon='';}
2096 1274 update_option('enable_wp_chatbot_skype_floating_icon', sanitize_text_field($enable_wp_chatbot_skype_floating_icon));
2097 1275 if(isset( $_POST["enable_wp_chatbot_skype_id"])) {
2098 - $enable_wp_chatbot_skype_id = wp_unslash($_POST["enable_wp_chatbot_skype_id"]);
1276 + $enable_wp_chatbot_skype_id = $_POST["enable_wp_chatbot_skype_id"];
2099 1277 }else{ $enable_wp_chatbot_skype_id='';}
2100 1278 update_option('enable_wp_chatbot_skype_id', sanitize_text_field($enable_wp_chatbot_skype_id));
2101 1279 //WhatsApp
2102 1280 if(isset( $_POST["enable_wp_chatbot_whats"])) {
2103 - $enable_wp_chatbot_whats= wp_unslash($_POST["enable_wp_chatbot_whats"]);
1281 + $enable_wp_chatbot_whats= $_POST["enable_wp_chatbot_whats"];
2104 1282 }else{ $enable_wp_chatbot_whats='';}
2105 1283 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 - }
1284 + $qlcd_wp_chatbot_whats_label = @$_POST["qlcd_wp_chatbot_whats_label"];
1285 + update_option('qlcd_wp_chatbot_whats_label', maybe_serialize($qlcd_wp_chatbot_whats_label));
2110 1286 if(isset( $_POST["enable_wp_chatbot_floating_whats"])) {
2111 - $enable_wp_chatbot_floating_whats= wp_unslash($_POST["enable_wp_chatbot_floating_whats"]);
1287 + $enable_wp_chatbot_floating_whats= $_POST["enable_wp_chatbot_floating_whats"];
2112 1288 }else{ $enable_wp_chatbot_floating_whats='';}
2113 1289 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 - }
1290 + $qlcd_wp_chatbot_whats_num = @$_POST["qlcd_wp_chatbot_whats_num"];
1291 + update_option('qlcd_wp_chatbot_whats_num', sanitize_text_field($qlcd_wp_chatbot_whats_num));
2118 1292 //Viber
2119 1293 if(isset( $_POST["enable_wp_chatbot_floating_viber"])) {
2120 - $enable_wp_chatbot_floating_viber = wp_unslash($_POST["enable_wp_chatbot_floating_viber"]);
1294 + $enable_wp_chatbot_floating_viber = $_POST["enable_wp_chatbot_floating_viber"];
2121 1295 }else{ $enable_wp_chatbot_floating_viber='';}
2122 1296 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 - }
1297 + $qlcd_wp_chatbot_viber_acc = @$_POST["qlcd_wp_chatbot_viber_acc"];
1298 + update_option('qlcd_wp_chatbot_viber_acc', sanitize_text_field($qlcd_wp_chatbot_viber_acc));
2127 1299 //Others integration
2128 1300 if(isset( $_POST["enable_wp_chatbot_floating_phone"])) {
2129 - $enable_wp_chatbot_floating_phone = wp_unslash($_POST["enable_wp_chatbot_floating_phone"]);
1301 + $enable_wp_chatbot_floating_phone = $_POST["enable_wp_chatbot_floating_phone"];
2130 1302 }else{ $enable_wp_chatbot_floating_phone='';}
2131 1303 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 - }
1304 + $qlcd_wp_chatbot_phone = @$_POST["qlcd_wp_chatbot_phone"];
1305 + update_option('qlcd_wp_chatbot_phone', sanitize_text_field($qlcd_wp_chatbot_phone));
2136 1306
2137 1307 if(isset( $_POST["enable_wp_chatbot_floating_link"])) {
2138 - $enable_wp_chatbot_floating_link = wp_unslash($_POST["enable_wp_chatbot_floating_link"]);
1308 + $enable_wp_chatbot_floating_link = $_POST["enable_wp_chatbot_floating_link"];
2139 1309 }else{ $enable_wp_chatbot_floating_link='';}
2140 1310 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 - }
1311 + $qlcd_wp_chatbot_weblink = @$_POST["qlcd_wp_chatbot_weblink"];
1312 + update_option('qlcd_wp_chatbot_weblink', sanitize_text_field($qlcd_wp_chatbot_weblink));
2145 1313
2146 1314 //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 - }
1315 + $qlcd_wp_chatbot_ret_greet = @$_POST["qlcd_wp_chatbot_ret_greet"];
1316 + update_option('qlcd_wp_chatbot_ret_greet', sanitize_text_field($qlcd_wp_chatbot_ret_greet));
2151 1317
2152 1318 if(isset( $_POST["enable_wp_chatbot_exit_intent"])) {
2153 - $enable_wp_chatbot_exit_intent = wp_unslash($_POST["enable_wp_chatbot_exit_intent"]);
1319 + $enable_wp_chatbot_exit_intent = $_POST["enable_wp_chatbot_exit_intent"];
2154 1320 }else{ $enable_wp_chatbot_exit_intent='';}
2155 1321 update_option('enable_wp_chatbot_exit_intent', sanitize_text_field($enable_wp_chatbot_exit_intent));
2156 1322
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 - }
1323 + $wp_chatbot_exit_intent_msg = @$_POST["wp_chatbot_exit_intent_msg"];
1324 + update_option('wp_chatbot_exit_intent_msg', wp_unslash($wp_chatbot_exit_intent_msg));
2161 1325
2162 1326 if(isset( $_POST["wp_chatbot_exit_intent_once"])) {
2163 - $wp_chatbot_exit_intent_once = wp_unslash($_POST["wp_chatbot_exit_intent_once"]);
1327 + $wp_chatbot_exit_intent_once = $_POST["wp_chatbot_exit_intent_once"];
2164 1328 }else{ $wp_chatbot_exit_intent_once='';}
2165 1329 update_option('wp_chatbot_exit_intent_once', sanitize_text_field($wp_chatbot_exit_intent_once));
2166 1330
2167 1331 if(isset( $_POST["enable_wp_chatbot_scroll_open"])) {
2168 - $enable_wp_chatbot_scroll_open = wp_unslash($_POST["enable_wp_chatbot_scroll_open"]);
1332 + $enable_wp_chatbot_scroll_open = $_POST["enable_wp_chatbot_scroll_open"];
2169 1333 }else{ $enable_wp_chatbot_scroll_open='';}
2170 1334 update_option('enable_wp_chatbot_scroll_open', sanitize_text_field($enable_wp_chatbot_scroll_open));
2171 1335
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 - }
1336 + $wp_chatbot_scroll_open_msg= @$_POST["wp_chatbot_scroll_open_msg"];
1337 + update_option('wp_chatbot_scroll_open_msg', wp_unslash($wp_chatbot_scroll_open_msg));
2176 1338
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 - }
1339 + $wp_chatbot_scroll_percent= @$_POST["wp_chatbot_scroll_percent"];
1340 + update_option('wp_chatbot_scroll_percent', wp_unslash($wp_chatbot_scroll_percent));
2181 1341
2182 1342 if(isset( $_POST["wp_chatbot_scroll_once"])) {
2183 - $wp_chatbot_scroll_once = sanitize_text_field(wp_unslash($_POST["wp_chatbot_scroll_once"]));
1343 + $wp_chatbot_scroll_once = sanitize_text_field($_POST["wp_chatbot_scroll_once"]);
2184 1344 }else{ $wp_chatbot_scroll_once='';}
2185 1345 update_option('wp_chatbot_scroll_once', $wp_chatbot_scroll_once);
2186 1346
2187 1347 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"]));
1348 + $enable_wp_chatbot_auto_open = sanitize_text_field($_POST["enable_wp_chatbot_auto_open"]);
2189 1349 }else{ $enable_wp_chatbot_auto_open='';}
2190 1350 update_option('enable_wp_chatbot_auto_open', $enable_wp_chatbot_auto_open);
2191 1351
2192 1352 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"]));
1353 + $enable_wp_chatbot_ret_sound = sanitize_text_field($_POST["enable_wp_chatbot_ret_sound"]);
2194 1354 }else{ $enable_wp_chatbot_ret_sound='';}
2195 1355 update_option('enable_wp_chatbot_ret_sound', $enable_wp_chatbot_ret_sound);
2196 1356
2197 1357 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"]));
1358 + $enable_wp_chatbot_sound_initial = sanitize_text_field($_POST["enable_wp_chatbot_sound_initial"]);
2199 1359 }else{ $enable_wp_chatbot_sound_initial='';}
2200 1360 update_option('enable_wp_chatbot_sound_initial', $enable_wp_chatbot_sound_initial);
2201 1361
2202 1362
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 - }
1363 + $wp_chatbot_auto_open_msg = @$_POST["wp_chatbot_auto_open_msg"];
1364 + update_option('wp_chatbot_auto_open_msg', wp_unslash($wp_chatbot_auto_open_msg));
2207 1365
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.
1366 + $wp_chatbot_auto_open_time = @$_POST["wp_chatbot_auto_open_time"];
1367 + update_option('wp_chatbot_auto_open_time', wp_unslash($wp_chatbot_auto_open_time));
1368 + //to complate checkout
2213 1369 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"]));
1370 + $enable_wp_chatbot_ret_user_show = sanitize_text_field($_POST["enable_wp_chatbot_ret_user_show"]);
2215 1371 }else{ $enable_wp_chatbot_ret_user_show='';}
2216 1372 update_option('enable_wp_chatbot_ret_user_show', $enable_wp_chatbot_ret_user_show);
2217 1373
2218 1374 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"]));
1375 + $enable_wp_chatbot_inactive_time_show = sanitize_text_field($_POST["enable_wp_chatbot_inactive_time_show"]);
2220 1376 }else{ $enable_wp_chatbot_inactive_time_show='';}
2221 1377 update_option('enable_wp_chatbot_inactive_time_show', $enable_wp_chatbot_inactive_time_show);
2222 1378
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 - }
1379 + $wp_chatbot_inactive_time = @$_POST["wp_chatbot_inactive_time"];
1380 + update_option('wp_chatbot_inactive_time', sanitize_text_field($wp_chatbot_inactive_time));
2227 1381
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 - }
1382 + $wp_chatbot_checkout_msg = @$_POST["wp_chatbot_checkout_msg"];
1383 + update_option('wp_chatbot_checkout_msg', wp_unslash($wp_chatbot_checkout_msg));
2232 1384
2233 1385 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"]));
1386 + $wp_chatbot_auto_open_once = sanitize_text_field($_POST["wp_chatbot_auto_open_once"]);
2235 1387 }else{ $wp_chatbot_auto_open_once='';}
2236 1388 update_option('wp_chatbot_auto_open_once', $wp_chatbot_auto_open_once);
2237 1389
2238 1390 if(isset( $_POST["wp_chatbot_inactive_once"])) {
2239 - $wp_chatbot_inactive_once = sanitize_text_field(wp_unslash($_POST["wp_chatbot_inactive_once"]));
1391 + $wp_chatbot_inactive_once = sanitize_text_field($_POST["wp_chatbot_inactive_once"]);
2240 1392 }else{ $wp_chatbot_inactive_once='';}
2241 1393 update_option('wp_chatbot_inactive_once', $wp_chatbot_inactive_once);
2242 1394
2243 1395
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 - }
1396 + $wp_chatbot_proactive_bg_color = @$_POST["wp_chatbot_proactive_bg_color"];
1397 + update_option('wp_chatbot_proactive_bg_color', sanitize_text_field($wp_chatbot_proactive_bg_color));
2248 1398
2249 1399 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"]));
1400 + $disable_wp_chatbot_call_gen = sanitize_text_field($_POST["disable_wp_chatbot_call_gen"]);
2251 1401 }else{ $disable_wp_chatbot_call_gen='';}
2252 1402 update_option('disable_wp_chatbot_call_gen', $disable_wp_chatbot_call_gen);
2253 1403
2254 1404 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', '');
1405 + $disable_wp_chatbot_site_search = sanitize_text_field($_POST["disable_wp_chatbot_site_search"]);
2257 1406 }else{ $disable_wp_chatbot_site_search='';}
2258 1407 update_option('disable_wp_chatbot_site_search', $disable_wp_chatbot_site_search);
2259 1408
2260 - 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 -
2263 - }else{ $enable_wp_chatbot_post_content='';}
2264 - update_option('enable_wp_chatbot_post_content', $enable_wp_chatbot_post_content);
2265 -
2266 1409 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"]));
1410 + $disable_wp_chatbot_call_sup = sanitize_text_field($_POST["disable_wp_chatbot_call_sup"]);
2268 1411 }else{ $disable_wp_chatbot_call_sup='';}
2269 1412 update_option('disable_wp_chatbot_call_sup', $disable_wp_chatbot_call_sup);
2270 1413
2271 1414 if(isset( $_POST["disable_wp_chatbot_feedback"])) {
2272 - $disable_wp_chatbot_feedback = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_feedback"]));
1415 + $disable_wp_chatbot_feedback = sanitize_text_field($_POST["disable_wp_chatbot_feedback"]);
2273 1416 }else{ $disable_wp_chatbot_feedback='';}
2274 1417 update_option('disable_wp_chatbot_feedback', $disable_wp_chatbot_feedback);
2275 1418
2276 1419 if(isset( $_POST["disable_wp_chatbot_faq"])) {
2277 - $disable_wp_chatbot_faq = sanitize_text_field(wp_unslash($_POST["disable_wp_chatbot_faq"]));
1420 + $disable_wp_chatbot_faq = sanitize_text_field($_POST["disable_wp_chatbot_faq"]);
2278 1421 }else{ $disable_wp_chatbot_faq='';}
2279 1422 update_option('disable_wp_chatbot_faq', $disable_wp_chatbot_faq);
2280 1423
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 - }
1424 + $qlcd_wp_chatbot_feedback_label = @$_POST["qlcd_wp_chatbot_feedback_label"];
1425 + update_option('qlcd_wp_chatbot_feedback_label', maybe_serialize($qlcd_wp_chatbot_feedback_label));
2285 1426
2286 1427 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"]));
1428 + $enable_wp_chatbot_meta_title = sanitize_text_field($_POST["enable_wp_chatbot_meta_title"]);
2288 1429 }else{ $enable_wp_chatbot_meta_title='';}
2289 1430 update_option('enable_wp_chatbot_meta_title', $enable_wp_chatbot_meta_title);
2290 1431
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 - }
1432 + $qlcd_wp_chatbot_meta_label = @$_POST["qlcd_wp_chatbot_meta_label"];
1433 + update_option('qlcd_wp_chatbot_meta_label', sanitize_text_field($qlcd_wp_chatbot_meta_label));
2295 1434
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 - }
1435 + $qlcd_wp_chatbot_phone_sent = @$_POST["qlcd_wp_chatbot_phone_sent"];
1436 + update_option('qlcd_wp_chatbot_phone_sent', sanitize_text_field($qlcd_wp_chatbot_phone_sent));
2300 1437
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 - }
1438 + $qlcd_wp_chatbot_phone_fail = @$_POST["qlcd_wp_chatbot_phone_fail"];
1439 + update_option('qlcd_wp_chatbot_phone_fail', sanitize_text_field($qlcd_wp_chatbot_phone_fail));
2305 1440
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 -
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 - }
2315 -
2316 1441 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"])));
1442 + $enable_wp_chatbot_opening_hour = sanitize_text_field($_POST["enable_wp_chatbot_opening_hour"]);
2318 1443 }else{ $enable_wp_chatbot_opening_hour='';}
2319 - update_option('enable_wp_chatbot_opening_hour', esc_html($enable_wp_chatbot_opening_hour));
1444 + update_option('enable_wp_chatbot_opening_hour', $enable_wp_chatbot_opening_hour);
2320 1445
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 - }
1446 + $wpwbot_hours= @$_POST["wpwbot_hours"];
1447 + update_option('wpwbot_hours', maybe_serialize($wpwbot_hours));
2325 1448
2326 1449 if(isset( $_POST["enable_wp_chatbot_dailogflow"])) {
2327 - $enable_wp_chatbot_dailogflow = stripslashes(sanitize_text_field(wp_unslash($_POST["enable_wp_chatbot_dailogflow"])));
1450 + $enable_wp_chatbot_dailogflow = sanitize_text_field($_POST["enable_wp_chatbot_dailogflow"]);
2328 1451 }else{ $enable_wp_chatbot_dailogflow='';}
2329 1452 update_option('enable_wp_chatbot_dailogflow', $enable_wp_chatbot_dailogflow);
2330 1453
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 - }
1454 + $qlcd_wp_chatbot_dialogflow_client_token= @$_POST["qlcd_wp_chatbot_dialogflow_client_token"];
1455 + update_option('qlcd_wp_chatbot_dialogflow_client_token', sanitize_text_field($qlcd_wp_chatbot_dialogflow_client_token));
2335 1456
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 - }
1457 + $qlcd_wp_chatbot_dialogflow_defualt_reply= @$_POST["qlcd_wp_chatbot_dialogflow_defualt_reply"];
1458 + update_option('qlcd_wp_chatbot_dialogflow_defualt_reply', sanitize_text_field($qlcd_wp_chatbot_dialogflow_defualt_reply));
2340 1459
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.
1460 + $qlcd_wp_chatbot_dialogflow_agent_language= @$_POST["qlcd_wp_chatbot_dialogflow_agent_language"];
1461 + update_option('qlcd_wp_chatbot_dialogflow_agent_language', sanitize_text_field($qlcd_wp_chatbot_dialogflow_agent_language));
1462 + // style option save
2346 1463 if(isset( $_POST["enable_wp_chatbot_custom_color"])) {
2347 - $enable_wp_chatbot_custom_color = esc_html(wp_unslash($_POST["enable_wp_chatbot_custom_color"]));
1464 + $enable_wp_chatbot_custom_color = $_POST["enable_wp_chatbot_custom_color"];
2348 1465 }else{ $enable_wp_chatbot_custom_color='';}
2349 - 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 - }
1466 + update_option('enable_wp_chatbot_custom_color', sanitize_text_field($enable_wp_chatbot_custom_color));
1467 + $wp_chatbot_text_color = @$_POST["wp_chatbot_text_color"];
1468 + update_option('wp_chatbot_text_color', sanitize_text_field($wp_chatbot_text_color));
2354 1469
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 - }
1470 + $wp_chatbot_floatingiconbg_color = @$_POST["wp_chatbot_floatingiconbg_color"];
1471 + update_option('wp_chatbot_floatingiconbg_color', sanitize_text_field($wp_chatbot_floatingiconbg_color));
2359 1472
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 - }
1473 + $wp_chatbot_link_color = @$_POST["wp_chatbot_link_color"];
1474 + update_option('wp_chatbot_link_color', sanitize_text_field($wp_chatbot_link_color));
2364 1475
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 - }
1476 + $wp_chatbot_link_hover_color = @$_POST["wp_chatbot_link_hover_color"];
1477 + update_option('wp_chatbot_link_hover_color', sanitize_text_field($wp_chatbot_link_hover_color));
2369 1478
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 - }
1479 + $wp_chatbot_bot_msg_bg_color = @$_POST["wp_chatbot_bot_msg_bg_color"];
1480 + update_option('wp_chatbot_bot_msg_bg_color', sanitize_text_field($wp_chatbot_bot_msg_bg_color));
2374 1481
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 - }
1482 + $wp_chatbot_bot_msg_text_color = @$_POST["wp_chatbot_bot_msg_text_color"];
1483 + update_option('wp_chatbot_bot_msg_text_color', sanitize_text_field($wp_chatbot_bot_msg_text_color));
2379 1484
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 - }
1485 + $wp_chatbot_user_msg_bg_color = @$_POST["wp_chatbot_user_msg_bg_color"];
1486 + update_option('wp_chatbot_user_msg_bg_color', sanitize_text_field($wp_chatbot_user_msg_bg_color));
2384 1487
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 - }
1488 + $wp_chatbot_user_msg_text_color = @$_POST["wp_chatbot_user_msg_text_color"];
1489 + update_option('wp_chatbot_user_msg_text_color', sanitize_text_field($wp_chatbot_user_msg_text_color));
2389 1490
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 1491
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 - }
1492 + $wp_chatbot_buttons_bg_color = @$_POST["wp_chatbot_buttons_bg_color"];
1493 + update_option('wp_chatbot_buttons_bg_color', sanitize_text_field($wp_chatbot_buttons_bg_color));
2399 1494
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 - }
1495 + $wp_chatbot_buttons_text_color = @$_POST["wp_chatbot_buttons_text_color"];
1496 + update_option('wp_chatbot_buttons_text_color', sanitize_text_field($wp_chatbot_buttons_text_color));
2404 1497
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 - }
1498 + $wp_chatbot_buttons_bg_color_hover = @$_POST["wp_chatbot_buttons_bg_color_hover"];
1499 + update_option('wp_chatbot_buttons_bg_color_hover', sanitize_text_field($wp_chatbot_buttons_bg_color_hover));
2409 1500
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 - }
1501 + $wp_chatbot_buttons_text_color_hover = @$_POST["wp_chatbot_buttons_text_color_hover"];
1502 + update_option('wp_chatbot_buttons_text_color_hover', sanitize_text_field($wp_chatbot_buttons_text_color_hover));
2418 1503
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 1504
2441 - set_transient( 'qcld_bot_clear_cache', 1, DAY_IN_SECONDS );
1505 + $wp_chatbot_theme_secondary_color = @$_POST["wp_chatbot_theme_secondary_color"];
1506 + update_option('wp_chatbot_theme_secondary_color', sanitize_text_field($wp_chatbot_theme_secondary_color));
1507 + $wp_chatbot_header_background_color = @$_POST["wp_chatbot_header_background_color"];
1508 + update_option('wp_chatbot_header_background_color', sanitize_text_field($wp_chatbot_header_background_color));
1509 +
1510 + $wp_chatbot_theme_primary_color = @$_POST["wp_chatbot_theme_primary_color"];
1511 + update_option('wp_chatbot_theme_primary_color', sanitize_text_field($wp_chatbot_theme_primary_color));
2442 1512
1513 +
1514 + $wp_chatbot_font_size = @$_POST["wp_chatbot_font_size"];
1515 + update_option('wp_chatbot_font_size', sanitize_text_field($wp_chatbot_font_size));
1516 + $wp_chat_bot_font_family = @$_POST["wp_chat_bot_font_family"];
1517 + update_option('wp_chat_bot_font_family', sanitize_text_field($wp_chat_bot_font_family));
1518 + $wp_chat_user_font_family = @$_POST["wp_chat_user_font_family"];
1519 + update_option('wp_chat_user_font_family', sanitize_text_field($wp_chat_user_font_family));
1520 + $wp_chatbot_user_font = @$_POST['wp_chatbot_user_font'];
1521 + update_option('wp_chatbot_user_font', sanitize_text_field($wp_chatbot_user_font));
1522 + $wp_chatbot_bot_font = @$_POST['wp_chatbot_bot_font'];
1523 + update_option('wp_chatbot_bot_font', sanitize_text_field($wp_chatbot_bot_font));
1524 +
1525 + set_transient( 'bot_clear_cache', 1, DAY_IN_SECONDS );
1526 +
2443 1527 wp_enqueue_script( 'wp_chatbot_bot-front-js', plugins_url(basename(plugin_dir_path(__FILE__))) . '/js/sweetalrt.js', array('jquery'), '', true);
2444 1528 $script = "
2445 1529 console.log('sdaas');
2446 1530 function callsweetalert(){
@@ -2448,13 +1532,13 @@
2448 1532 title: 'Your settings are saved.',
2449 1533 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 1534 width: 450,
2451 1535 icon: 'success',
2452 - confirmButtonText: 'Got it',
2453 - confirmButtonWidth: 100,
2454 - confirmButtonClass: 'btn btn-lg',
1536 + confirmButtonText: 'Got it',
1537 + confirmButtonWidth: 100,
1538 + confirmButtonClass: 'btn btn-lg'
2455 1539 }).then((result) => {
2456 - // location.reload();
1540 + location.reload();
2457 1541 })
2458 1542 }
2459 1543 callsweetalert();
2460 1544 ";
@@ -2477,9 +1561,9 @@
2477 1561 <div id="message" class="error">
2478 1562 <p>
2479 1563 <?php
2480 1564 printf(
2481 - '%s WPBot for wpCommerce REQUIRES wpCommerce%s %swpCommerce%s must be active for WPBot to work. Please install & activate wpCommerce.',
1565 + __('%s WPBot for wpCommerce REQUIRES wpCommerce%s %swpCommerce%s must be active for WPBot to work. Please install & activate wpCommerce.', 'wpchatbot'),
2482 1566 '<strong>',
2483 1567 '</strong><br>',
2484 1568 '<a href="http://wordpress.org/extend/plugins/wpcommerce/" target="_blank" >',
2485 1569 '</a>'
@@ -2494,12 +1578,12 @@
2494 1578 <!--<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 1579 <p>
2496 1580 <?php
2497 1581 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.',
1582 + __('%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 1583 '<strong>',
2500 1584 '</strong><br>',
2501 - esc_html( QCLD_wpCHATBOT_REQUIRED_wpCOMMERCE_VERSION )
1585 + QCLD_wpCHATBOT_REQUIRED_wpCOMMERCE_VERSION
2502 1586 );
2503 1587 ?>
2504 1588 </p>
2505 1589 <div style="clear:both;"></div>
@@ -2512,11 +1596,9 @@
2512 1596 * Admin notice for table reindex
2513 1597 */
2514 1598 public function admin_notice_reindex() { ?>
2515 1599 <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>
1600 + <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 1601 </div>
2520 1602 <?php }
2521 1603 }
2522 1604 /**
@@ -2526,9 +1608,9 @@
2526 1608 if (!function_exists('qcld_wb_chatboot_plugin_init')) {
2527 1609 function qcld_wb_chatboot_plugin_init()
2528 1610 {
2529 1611 global $qcld_wb_chatbot;
2530 - $qcld_wb_chatbot = qcld_wb_Chatbot_free::qcld_wb_chatbot_get_instance();
1612 + $qcld_wb_chatbot = qcld_wb_Chatbot::qcld_wb_chatbot_get_instance();
2531 1613 }
2532 1614 }
2533 1615 add_action('plugins_loaded', 'qcld_wb_chatboot_plugin_init');
2534 1616 /*
@@ -2534,9 +1616,8 @@
2534 1616 /*
2535 1617 * Initial Options will be insert as defualt data
2536 1618 */
2537 1619 register_activation_hook(__FILE__, 'qcld_wb_chatboot_defualt_options');
2538 -if( !function_exists('qcld_wb_chatboot_defualt_options') ){
2539 1620 function qcld_wb_chatboot_defualt_options(){
2540 1621
2541 1622 global $wpdb;
2542 1623 $collate = '';
@@ -2582,95 +1663,31 @@
2582 1663 ) $collate AUTO_INCREMENT=1 ENGINE=InnoDB";
2583 1664
2584 1665 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
2585 1666 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 1667
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
1668 + $sqlqry = $wpdb->get_results("select * from $table1");
2634 1669 if(empty($sqlqry)){
2635 1670
2636 - $query = 'Sample Question ?';
2637 - $response = 'Sample Answer';
1671 + $query = 'What Can WPBot do for you?';
1672 + $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 1673
2639 1674 $data = array('query' => $query, 'keyword' => '', 'response'=> $response, 'intent'=> '');
2640 1675 $format = array('%s','%s', '%s', '%s');
2641 - $wpdb->insert($table1,$data,$format); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, PluginCheck.Security.DirectDB.UnescapedDBParameter
1676 + $wpdb->insert($table1,$data,$format);
2642 1677 }
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 1678
2663 1679 $url = get_site_url();
2664 - $url = wp_parse_url($url);
1680 + $url = parse_url($url);
2665 1681 $domain = $url['host'];
2666 1682 //$admin_email = "admin@" . $domain;
2667 1683 $admin_email = get_option('admin_email');
1684 +
2668 1685 if(!get_option('wp_chatbot_position_x')) {
2669 - update_option('wp_chatbot_position_x', 30);
1686 + update_option('wp_chatbot_position_x', 50);
2670 1687 }
2671 1688 if(!get_option('wp_chatbot_position_y')) {
2672 - update_option('wp_chatbot_position_y', 30);
1689 + update_option('wp_chatbot_position_y', 50);
2673 1690 }
2674 1691 if(!get_option('disable_wp_chatbot')) {
2675 1692 update_option('disable_wp_chatbot', '');
2676 1693 }
@@ -2695,16 +1712,10 @@
2695 1712 if(!get_option('enable_wp_chatbot_rtl')) {
2696 1713 update_option('enable_wp_chatbot_rtl', '');
2697 1714 }
2698 1715 if(!get_option('show_menu_after_greetings')) {
2699 - update_option('show_menu_after_greetings', 1);
1716 + update_option('show_menu_after_greetings', '');
2700 1717 }
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 1718 if(!get_option('enable_chat_session')) {
2708 1719 update_option('enable_chat_session', '');
2709 1720 }
2710 1721
@@ -2711,9 +1722,9 @@
2711 1722 if(!get_option('enable_wp_chatbot_mobile_full_screen')) {
2712 1723 update_option('enable_wp_chatbot_mobile_full_screen', 1);
2713 1724 }
2714 1725 if(!get_option('wpbot_preloading_time')) {
2715 - update_option('wpbot_preloading_time', '800');
1726 + update_option('wpbot_preloading_time', '0.5');
2716 1727 }
2717 1728
2718 1729 if(!get_option('disable_wp_chatbot_notification')) {
2719 1730 update_option('disable_wp_chatbot_notification', '1');
@@ -2751,19 +1762,11 @@
2751 1762 if(!get_option('wp_chatbot_show_home_page')) {
2752 1763 update_option('wp_chatbot_show_home_page', 'on');
2753 1764 }
2754 1765 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);
1766 + update_option('qc_wpbot_menu_order', '');
2762 1767 }
2763 - if(!get_option('qcld_chatbot_avatar_location')) {
2764 - update_option('qcld_chatbot_avatar_location', 'side');
2765 - }
1768 +
2766 1769 if(!get_option('wp_chatbot_show_posts')) {
2767 1770 update_option('wp_chatbot_show_posts', 'on');
2768 1771 }
2769 1772 if(!get_option('wp_chatbot_show_pages')){
@@ -2813,30 +1816,30 @@
2813 1816 if(!get_option('wp_chatbot_custom_css')) {
2814 1817 update_option('wp_chatbot_custom_css', '');
2815 1818 }
2816 1819 if(!get_option('qlcd_wp_chatbot_host')) {
2817 - update_option('qlcd_wp_chatbot_host', stripslashes(sanitize_text_field('Our Website')));
1820 + update_option('qlcd_wp_chatbot_host', sanitize_text_field('Our Website'));
2818 1821 }
2819 1822 if(!get_option('qlcd_wp_chatbot_agent')) {
2820 - update_option('qlcd_wp_chatbot_agent', stripslashes(sanitize_text_field('Carrie')));
1823 + update_option('qlcd_wp_chatbot_agent', sanitize_text_field('Carrie'));
2821 1824 }
2822 1825 if(!get_option('qlcd_wp_chatbot_host')) {
2823 - update_option('qlcd_wp_chatbot_host', stripslashes(sanitize_text_field('Our Website')));
1826 + update_option('qlcd_wp_chatbot_host', sanitize_text_field('Our Website'));
2824 1827 }
2825 1828 if(!get_option('qlcd_wp_chatbot_shopper_demo_name')) {
2826 - update_option('qlcd_wp_chatbot_shopper_demo_name', stripslashes(sanitize_text_field('Amigo')));
1829 + update_option('qlcd_wp_chatbot_shopper_demo_name', sanitize_text_field('Amigo'));
2827 1830 }
2828 1831 if(!get_option('qlcd_wp_chatbot_yes')) {
2829 - update_option('qlcd_wp_chatbot_yes', stripslashes(sanitize_text_field('YES')));
1832 + update_option('qlcd_wp_chatbot_yes', sanitize_text_field('YES'));
2830 1833 }
2831 1834 if(!get_option('qlcd_wp_chatbot_no')) {
2832 - update_option('qlcd_wp_chatbot_no', stripslashes(sanitize_text_field('NO')));
1835 + update_option('qlcd_wp_chatbot_no', sanitize_text_field('NO'));
2833 1836 }
2834 1837 if(!get_option('qlcd_wp_chatbot_or')) {
2835 - update_option('qlcd_wp_chatbot_or', stripslashes(sanitize_text_field('OR')));
1838 + update_option('qlcd_wp_chatbot_or', sanitize_text_field('OR'));
2836 1839 }
2837 1840 if(!get_option('qlcd_wp_chatbot_sorry')) {
2838 - update_option('qlcd_wp_chatbot_sorry', stripslashes(sanitize_text_field('Sorry')));
1841 + update_option('qlcd_wp_chatbot_sorry', sanitize_text_field('Sorry'));
2839 1842 }
2840 1843
2841 1844 if(!get_option('qlcd_wp_chatbot_dialogflow_project_id')) {
2842 1845 update_option('qlcd_wp_chatbot_dialogflow_project_id', '');
@@ -2961,9 +1964,9 @@
2961 1964 if(!get_option('qlcd_wp_chatbot_help_welcome')) {
2962 1965 update_option('qlcd_wp_chatbot_help_welcome', maybe_serialize(array('Welcome to Help Section.')));
2963 1966 }
2964 1967 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>')));
1968 + 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 1969 }
2967 1970 if(!get_option('qlcd_wp_chatbot_reset')) {
2968 1971 update_option('qlcd_wp_chatbot_reset', maybe_serialize(array('Do you want to clear our chat history and start over?')));
2969 1972 }
@@ -2981,12 +1984,9 @@
2981 1984 }
2982 1985 if(!get_option('qlcd_wp_chatbot_wildcard_support')) {
2983 1986 update_option('qlcd_wp_chatbot_wildcard_support', 'FAQ');
2984 1987 }
2985 - if(!get_option('qlcd_wp_chatbot_wildcard_site_search')) {
2986 - update_option('qlcd_wp_chatbot_wildcard_site_search', 'Site Search');
2987 - }
2988 - if(!get_option('qlcd_wp_chatbot_messenger_label')) {
1988 + if(!get_option('qlcd_wp_chatbot_messenger_label')) {
2989 1989 update_option('qlcd_wp_chatbot_messenger_label', maybe_serialize(array('Chat with Us on Facebook Messenger')));
2990 1990 }
2991 1991 if(!get_option('qlcd_wp_chatbot_product_success')) {
2992 1992 update_option('qlcd_wp_chatbot_product_success', maybe_serialize(array('Great! We have these products for', 'Found these products for')));
@@ -2991,9 +1991,9 @@
2991 1991 if(!get_option('qlcd_wp_chatbot_product_success')) {
2992 1992 update_option('qlcd_wp_chatbot_product_success', maybe_serialize(array('Great! We have these products for', 'Found these products for')));
2993 1993 }
2994 1994 if(!get_option('qlcd_wp_chatbot_product_fail')) {
2995 - update_option('qlcd_wp_chatbot_product_fail', maybe_serialize(array('Sorry, I found nothing')));
1995 + update_option('qlcd_wp_chatbot_product_fail', maybe_serialize(array('Oops! Nothing matches your criteria', 'Sorry, I found nothing')));
2996 1996 }
2997 1997 if(!get_option('qlcd_wp_chatbot_product_asking')) {
2998 1998 update_option('qlcd_wp_chatbot_product_asking', maybe_serialize(array('What are you shopping for?')));
2999 1999 }
@@ -3080,11 +2080,8 @@
3080 2080 }
3081 2081 if(!get_option('qlcd_wp_chatbot_email_fail')) {
3082 2082 update_option('qlcd_wp_chatbot_email_fail', sanitize_text_field('Sorry! I could not send your mail! Please contact the webmaster.'));
3083 2083 }
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 2084 if(!get_option('qlcd_wp_chatbot_notification_interval')) {
3088 2085 update_option('qlcd_wp_chatbot_notification_interval', sanitize_text_field(5));
3089 2086 }
3090 2087 if(!get_option('qlcd_wp_chatbot_notifications')) {
@@ -3090,12 +2087,12 @@
3090 2087 if(!get_option('qlcd_wp_chatbot_notifications')) {
3091 2088 update_option('qlcd_wp_chatbot_notifications', maybe_serialize(array('Welcome to WPBot')));
3092 2089 }
3093 2090 if(!get_option('support_query')) {
3094 - update_option('support_query', maybe_serialize(array('Sample Question?')));
2091 + update_option('support_query', maybe_serialize(array('What is WPBot?')));
3095 2092 }
3096 2093 if(!get_option('support_ans')) {
3097 - update_option('support_ans', maybe_serialize(array('Sample Answer')));
2094 + 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 2095 }
3099 2096 if(!get_option('qlcd_wp_chatbot_search_option')) {
3100 2097 update_option('qlcd_wp_chatbot_search_option', 'standard');
3101 2098 }
@@ -3141,20 +2138,20 @@
3141 2138 if(!get_option('qlcd_wp_chatbot_whats_label')) {
3142 2139 update_option('qlcd_wp_chatbot_whats_label', maybe_serialize(array('Chat with Us on WhatsApp')));
3143 2140 }
3144 2141 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 - }
2142 + update_option('enable_wp_chatbot_floating_whats', '');
2143 + }
2144 + if(!get_option('qlcd_wp_chatbot_whats_num')) {
2145 + update_option('qlcd_wp_chatbot_whats_num', '');
2146 + }
3150 2147 //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 - }
2148 + if(!get_option('enable_wp_chatbot_floating_viber')) {
2149 + update_option('enable_wp_chatbot_floating_viber', '');
2150 + }
2151 + if(!get_option('qlcd_wp_chatbot_viber_acc')) {
2152 + update_option('qlcd_wp_chatbot_viber_acc', '');
2153 + }
3157 2154 //Integration others
3158 2155 if(!get_option('enable_wp_chatbot_floating_phone')) {
3159 2156 update_option('enable_wp_chatbot_floating_phone', '');
3160 2157 }
@@ -3270,14 +2267,8 @@
3270 2267 }
3271 2268 if(!get_option('qlcd_wp_chatbot_phone_fail')) {
3272 2269 update_option('qlcd_wp_chatbot_phone_fail', 'Sorry! I could not collect your phone number!');
3273 2270 }
3274 - if(!get_option('qlcd_wp_chatbot_asking_search_keyword')){
3275 - update_option('qlcd_wp_chatbot_asking_search_keyword', 'Please enter your keyword for searching');
3276 - }
3277 - if(!get_option('qlcd_wp_chatbot_found_result')){
3278 - update_option('qlcd_wp_chatbot_found_result', 'We have found these results');
3279 - }
3280 2271 if(!get_option('enable_wp_chatbot_opening_hour')) {
3281 2272 update_option('enable_wp_chatbot_opening_hour', '');
3282 2273 }
3283 2274 if(!get_option('enable_wp_chatbot_opening_hour')) {
@@ -3282,10 +2273,9 @@
3282 2273 }
3283 2274 if(!get_option('enable_wp_chatbot_opening_hour')) {
3284 2275 update_option('wpwbot_hours', array());
3285 2276 }
3286 - wpbot_free_set_content_height_defaults();
3287 -
2277 +
3288 2278 if(!get_option('enable_wp_chatbot_dailogflow')) {
3289 2279 update_option('enable_wp_chatbot_dailogflow', '');
3290 2280 }
3291 2281 if(!get_option('qlcd_wp_chatbot_dialogflow_client_token')) {
@@ -3302,20 +2292,10 @@
3302 2292 }
3303 2293 if(!get_option('qlcd_wp_chatbot_dialogflow_agent_language')) {
3304 2294 update_option('qlcd_wp_chatbot_dialogflow_agent_language', 'en');
3305 2295 }
3306 - if(!get_option('enable_wp_chatbot_post_content')) {
3307 - update_option('enable_wp_chatbot_post_content', '1');
3308 - }
3309 - if(!get_option('openai_engines')) {
3310 - update_option('openai_engines', 'gpt-4o');
3311 - }
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 );
2296 + set_transient( 'bot_clear_cache', 1, DAY_IN_SECONDS );
3316 2297 }
3317 -}
3318 2298 /*
3319 2299 * Reset Options will be insert as defualt data
3320 2300 */
3321 2301 add_action('wp_ajax_qcld_wb_chatboot_delete_all_options', 'qcld_wb_chatboot_delete_all_options');
@@ -3320,26 +2300,18 @@
3320 2300 */
3321 2301 add_action('wp_ajax_qcld_wb_chatboot_delete_all_options', 'qcld_wb_chatboot_delete_all_options');
3322 2302 //add_action('wp_ajax_nopriv_qcld_wb_chatboot_delete_all_options', 'qcld_wb_chatboot_delete_all_options');
3323 2303 //Jarvis all option will be delete during uninstlling.
3324 -if( !function_exists('qcld_wb_chatboot_delete_all_options') ){
3325 2304 function qcld_wb_chatboot_delete_all_options(){
3326 2305
3327 - if ( ! current_user_can( 'manage_options' ) ) {
3328 - wp_die( 'Unauthorized access' );
2306 + if ( ! wp_verify_nonce( $_POST['wpnonce'], 'wp_chatbot' ) ) {
2307 + die ( 'No cheating');
3329 2308 }
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 2309 delete_option('disable_wp_chatbot');
3335 2310 delete_option('disable_wp_chatbot_icon_animation');
3336 2311 delete_option('disable_wp_chatbot_on_mobile');
3337 2312 delete_option('qlcd_wp_chatbot_admin_email');
3338 2313 delete_option('qlcd_wp_chatbot_from_email');
3339 -
3340 - delete_option('disable_back_to_start_menu');
3341 - delete_option('disable_floating_button');
3342 2314
3343 2315 delete_option('disable_wp_chatbot_product_search');
3344 2316 delete_option('disable_wp_chatbot_catalog');
3345 2317 delete_option('disable_wp_chatbot_order_status');
@@ -3399,9 +2371,8 @@
3399 2371 delete_option('qlcd_wp_chatbot_wildcard_catalog');
3400 2372 delete_option('qlcd_wp_chatbot_featured_products');
3401 2373 delete_option('qlcd_wp_chatbot_sale_products');
3402 2374 delete_option('qlcd_wp_chatbot_wildcard_support');
3403 - delete_option('qlcd_wp_chatbot_wildcard_site_search');
3404 2375 delete_option('qlcd_wp_chatbot_messenger_label');
3405 2376 delete_option('qlcd_wp_chatbot_product_success');
3406 2377 delete_option('qlcd_wp_chatbot_product_fail');
3407 2378 delete_option('qlcd_wp_chatbot_product_asking');
@@ -3417,9 +2388,8 @@
3417 2388 delete_option('qlcd_wp_chatbot_asking_email');
3418 2389 delete_option('qlcd_wp_chatbot_asking_msg');
3419 2390 delete_option('qlcd_wp_chatbot_no_result');
3420 2391 delete_option('qlcd_wp_chatbot_admin_email');
3421 - delete_option('open_links_new_window');
3422 2392 delete_option('qlcd_wp_chatbot_email_sub');
3423 2393 delete_option('qlcd_wp_site_search');
3424 2394 delete_option('qlcd_wp_chatbot_email_sent');
3425 2395 delete_option('qlcd_wp_chatbot_support_phone');
@@ -3454,9 +2424,8 @@
3454 2424 delete_option('qlcd_wp_chatbot_no_cart_items');
3455 2425 delete_option('qlcd_wp_chatbot_cart_updating');
3456 2426 delete_option('qlcd_wp_chatbot_cart_removing');
3457 2427 delete_option('qlcd_wp_chatbot_email_fail');
3458 - delete_option('qlcd_wp_chatbot_relevant_post_link_openai');
3459 2428 delete_option('support_query');
3460 2429 delete_option('support_ans');
3461 2430 delete_option('qlcd_wp_chatbot_notification_interval');
3462 2431 delete_option('qlcd_wp_chatbot_notifications');
@@ -3512,13 +2481,10 @@
3512 2481 delete_option( 'wp_chatbot_inactive_once');
3513 2482 delete_option( 'wp_chatbot_proactive_bg_color');
3514 2483 delete_option( 'qlcd_wp_chatbot_phone_sent');
3515 2484 delete_option( 'qlcd_wp_chatbot_phone_fail');
3516 - delete_option('qlcd_wp_chatbot_asking_search_keyword');
3517 - delete_option('qlcd_wp_chatbot_found_result');
3518 2485 delete_option( 'disable_wp_chatbot_call_gen');
3519 2486 delete_option( 'disable_wp_chatbot_site_search');
3520 - delete_option( 'enable_wp_chatbot_post_content');
3521 2487 delete_option( 'disable_wp_chatbot_call_sup');
3522 2488
3523 2489 delete_option( 'enable_wp_chatbot_ret_user_show');
3524 2490 delete_option( 'enable_wp_chatbot_inactive_time_show');
@@ -3560,45 +2526,25 @@
3560 2526 delete_option('wp_chat_user_font_family');
3561 2527 delete_option('wp_chat_bot_font_family');
3562 2528 delete_option('wp_chatbot_bot_font');
3563 2529 delete_option('wp_chatbot_user_font');
3564 - delete_option('qcld_chatbot_avatar_location');
3565 - set_transient( 'qcld_bot_clear_cache', 1, DAY_IN_SECONDS );
2530 + set_transient( 'bot_clear_cache', 1, DAY_IN_SECONDS );
3566 2531 qcld_wb_chatboot_defualt_options();
3567 2532 $html='Reset all options to default successfully.';
3568 2533 wp_send_json($html);
3569 2534 }
3570 -}
3571 2535
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 - }
2536 +function wpbot_free_qc_upgrade_completed( $upgrader_object, $options ) {
2537 + // The path to our plugin's main file
2538 + $our_plugin = plugin_basename( __FILE__ );
2539 + // If an update has taken place and the updated type is plugins and the plugins element exists
2540 + if( $options['action'] == 'update' && $options['type'] == 'plugin' && isset( $options['plugins'] ) ) {
2541 + // Iterate through the plugins being updated and check if ours is there
2542 + foreach( $options['plugins'] as $plugin ) {
2543 + if( $plugin == $our_plugin ) {
2544 + set_transient( 'bot_clear_cache', 1, DAY_IN_SECONDS );
3598 2545 }
3599 2546 }
3600 - update_option( 'qcld_openai_relevant_post', ['post','page'] );
3601 2547 }
3602 2548 }
3603 2549 add_action( 'upgrader_process_complete', 'wpbot_free_qc_upgrade_completed', 10, 2 );
3604 2550
@@ -3608,25 +2554,16 @@
3608 2554 *
3609 2555 * Open Ai integration
3610 2556 *
3611 2557 */
3612 -if( !function_exists('wpbot_openAi_setting_func') ){
3613 -function wpbot_openAi_setting_func (){
3614 2558
3615 - require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/admin/templates/ai-admin.php");
2559 + function wpbot_openAi_setting_func (){
2560 +
2561 + require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."includes/openai/admin/admin_ui2.php");
3616 2562 // require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."qcld-openai-bot.php");
3617 2563
3618 -}
3619 -}
3620 -if( !function_exists('wpbot_Ai_actions_func') ){
3621 - function wpbot_Ai_actions_func (){
2564 + }
3622 2565
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 2566 /**
3630 2567 *
3631 2568 * Function to load translation files.
3632 2569 *
@@ -3631,16 +2568,15 @@
3631 2568 * Function to load translation files.
3632 2569 *
3633 2570 */
3634 2571
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 - }
2572 +
2573 +function wp_chatbot_lang_init() {
2574 + load_plugin_textdomain( 'wpchatbot', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
3639 2575 }
3640 2576 add_action( 'plugins_loaded', 'wp_chatbot_lang_init');
3641 2577
3642 -$wpbot_feedback = new Qcld_Wp_Usage_Feedback(
2578 +$wpbot_feedback = new Wp_Usage_Feedback(
3643 2579 __FILE__,
3644 2580 'plugins@quantumcloud.com',
3645 2581 false,
3646 2582 true
@@ -3645,572 +2581,403 @@
3645 2581 false,
3646 2582 true
3647 2583
3648 2584 );
3649 -if( !function_exists('wpbot_help_page_callback_func') ){
2585 +
3650 2586 function wpbot_help_page_callback_func(){
3651 2587 ?>
2588 +<div class="wrap swpm-admin-menu-wrap">
2589 + <h2></h2>
2590 + <h2 class="nav-tab-wrapper sld_nav_container wppt_nav_container">
2591 + <a class="nav-tab sld_click_handle nav-tab-active" href="#general_wp_nutshell"><?php echo esc_html('WPBot – In a Nutshell'); ?></a>
2592 + <a class="nav-tab sld_click_handle" href="#general_int"><?php echo esc_html('Getting Started'); ?></a>
2593 + <a class="nav-tab sld_click_handle" id="general_debuggings" href="#general_debugging"><?php echo esc_html('Troubleshooting & FAQ'); ?></a>
3652 2594
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>
2595 + </h2>
2596 + <div class="container wppt-settings-section" style="margin-right:unset;margin-left:unset; display:block; margin-top:40px" id="general_wp_nutshell">
2597 + <div class="content form-container qcbot_help_secion" style="">
2598 + <!-- new Section -->
2599 +
2600 + <h2 style="margin-top: 10px;color:#fff"><?php echo esc_html__('WPBot – In a Nutshell', 'wpbot'); ?></h2>
2601 + <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>
2602 + <div class="panel panel-default">
2603 + <div class="panel-heading" role="tab" id="IntentheadingOne">
2604 + <h4 class="panel-title">
2605 + <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>
2606 + </h4>
2607 + </div>
2608 + <div id="IntentcollapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="IntentheadingOne">
2609 + <div class="panel-body">
2610 + <?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>
2611 + <?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>
2612 + <?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>
2613 + <?php echo esc_html_e('Please check this article for'); ?> <h2 class="wppt_nav_container qcld-plan-tab-text">
2614 + <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.'); ?>
2615 + </div>
2616 + </div>
2617 + </div>
2618 + <div class="panel panel-default">
2619 + <div class="panel-heading" role="tab" id="headingSix">
2620 + <h4 class="panel-title">
2621 + <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>
2622 + </h4>
2623 + </div>
2624 + <div id="collapseSix" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingSix">
2625 + <div class="panel-body">
2626 + <?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>
2627 + <?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>
2628 + <?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.'); ?>
2629 + </div>
2630 + </div>
2631 + </div>
2632 + <div class="panel panel-default">
2633 + <div class="panel-heading" role="tab" id="headingSeven">
2634 + <h4 class="panel-title">
2635 + <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>
2636 + </h4>
2637 + </div>
2638 + <div id="collapseSeven" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingSeven">
2639 + <div class="panel-body">
2640 + <?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>
2641 + <?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.'); ?>
2642 + </div>
2643 + </div>
2644 + </div>
2645 + <div class="panel panel-default">
2646 + <div class="panel-heading" role="tab" id="headingEight">
2647 + <h4 class="panel-title">
2648 + <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>
2649 + </h4>
2650 + </div>
2651 + <div id="collapseEight" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingEight">
2652 + <div class="panel-body">
2653 + <?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..'); ?>
2654 + </div>
2655 + </div>
2656 + </div>
2657 + <div class="panel panel-default">
2658 + <div class="panel-heading" role="tab" id="headingtwo">
2659 + <h4 class="panel-title">
2660 + <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>
2661 + </h4>
2662 + </div>
2663 + <div id="collapsetwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingtwo">
2664 + <div class="panel-body">
2665 + <?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.'); ?>
2666 + </div>
2667 + </div>
2668 + </div>
2669 + <div class="panel panel-default">
2670 + <div class="panel-heading" role="tab" id="headingThree">
2671 + <h4 class="panel-title">
2672 + <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>
2673 + </h4>
2674 + </div>
2675 + <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
2676 + <div class="panel-body">
2677 + <?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.'); ?>
2678 + </div>
2679 + </div>
2680 + </div>
2681 + <div class="panel panel-default">
2682 + <div class="panel-heading" role="tab" id="headingFour">
2683 + <h4 class="panel-title">
2684 + <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>
2685 + </h4>
2686 + </div>
2687 + <div id="collapseFour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFour">
2688 + <div class="panel-body">
2689 + <?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.'); ?>
2690 + </div>
2691 + </div>
2692 + </div>
2693 + <div class="panel panel-default">
2694 + <div class="panel-heading" role="tab" id="headingFive">
2695 + <h4 class="panel-title">
2696 + <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>
2697 + </h4>
2698 + </div>
2699 + <div id="collapseFive" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFive">
2700 + <div class="panel-body">
2701 + <?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.'); ?>
2702 + </div>
2703 + </div>
2704 + </div>
2705 + </div>
2706 + </div>
3660 2707 </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>
3795 - </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'); ?>
2708 + <div class="container wppt-settings-section" style="margin-right:unset;margin-left:unset;margin-top:40px;display:none" id="general_int">
2709 + <div class="content form-container qcbot_help_secion" style="">
2710 + <!-- new Section -->
2711 +
2712 + <h2 style="margin-top: 10px;color:#fff"><?php echo esc_html__('WPBot Interactions', 'wpbot'); ?></h2>
2713 + <h3 style="color:#fff"><?php echo esc_html__('You can create user interactions in the following ways:', 'wpbot'); ?></h3>
2714 + <div class="panel panel-default">
2715 + <div class="panel-heading" role="tab" id="headingOne">
2716 + <h4 class="panel-title">
2717 + <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>
2718 + </h4>
2719 + </div>
2720 + <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
2721 + <div class="panel-body">
2722 + <?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'); ?>
2723 +
3823 2724 <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>
2725 + <div class="wpb_column vc_column_container vc_col-sm-6">
2726 + <div class="vc_column-inner ">
2727 + <div class="wpb_wrapper">
2728 + <div class="to-icon-box left txt-left">
2729 + <div class="to-icon-txt fa-4x-txt ">
2730 + <h3>
2731 + <span>// </span><?php esc_html_e('Simple Text Responses', 'wpbot'); ?>
2732 + </h3>
2733 + <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>
2734 + </div>
2735 + </div>
2736 + <div class="to-icon-box left txt-left">
2737 + <div class="to-icon-txt fa-4x-txt ">
2738 + <h3>
2739 + <span>// </span><?php esc_html_e('Send eMail, Call Me Back &amp; Feedback Collection', 'wpbot'); ?>
2740 + </h3>
2741 + <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>
2742 + </div>
2743 + </div>
2744 + <div class="to-icon-box left txt-left">
2745 + <div class="to-icon-txt fa-4x-txt ">
2746 + <h3>
2747 + <span>// </span><?php esc_html_e('Advanced Site Search', 'wpbot'); ?> <span class="qc_wpbot_pro">PRO</span>
2748 + </h3>
2749 + <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>
2750 + </div>
2751 + </div>
3834 2752 </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>
2753 + </div>
2754 + </div>
2755 + <div class="wpb_column vc_column_container vc_col-sm-6">
2756 + <div class="vc_column-inner ">
2757 + <div class="wpb_wrapper">
2758 + <div class="to-icon-box left txt-left">
2759 + <div class="to-icon-txt fa-4x-txt ">
2760 + <h3>
2761 + <span>// </span><?php esc_html_e('Frequently Asked Questions', 'wpbot'); ?>
2762 + </h3>
2763 + <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>
2764 + </div>
2765 + </div>
2766 + <div class="to-icon-box left txt-left">
2767 + <div class="to-icon-txt fa-4x-txt ">
2768 + <h3>
2769 + <span>// </span>Ask for name, email, phone number etc.
2770 + </h3>
2771 + <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>
2772 + </div>
2773 + </div>
2774 + <div class="to-icon-box left txt-left">
2775 + <div class="to-icon-txt fa-4x-txt ">
2776 + <h3>
2777 + <span>// </span><?php esc_html_e('Newsletter Subscription', 'wpbot'); ?> <span class="qc_wpbot_pro">PRO</span>
2778 + </h3>
2779 + <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>
2780 + </div>
2781 + </div>
3842 2782 </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>
2783 + </div>
2784 + </div>
3884 2785 </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">
2786 + </div>
2787 + </div>
2788 + </div>
2789 + <div class="panel panel-default">
2790 + <div class="panel-heading" role="tab" id="headingTwo">
2791 + <h4 class="panel-title">
2792 + <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>
2793 + </h4>
2794 + </div>
2795 + <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
2796 + <div class="panel-body">
2797 + <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>
2798 + <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>.
2799 + </p>
2800 + <h4><?php esc_html_e('Conversational Form Builder Free or Pro version works with the WPBot Free or Pro versions.', 'wpbot'); ?></h4>
2801 + <a class="FormBuilder" href="https://wordpress.org/plugins/conversational-forms/" target="_blank"><?php esc_html_e('Download Free Version', 'wpbot'); ?></a>
2802 + <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>
2803 + <h4><?php esc_html_e('What Can You Do with it?', 'wpbot'); ?></h4>
2804 + <p><?php esc_html_e('Conversation Forms allows you to create a wide variety of forms, that might include:', 'wpbot'); ?></p>
2805 + <ul>
2806 + <li><?php esc_html_e('Create menu or button driven conversations', 'wpbot'); ?></li>
2807 + <li><?php esc_html_e('Conditional <strong>Menu Driven Conversations', 'wpbot'); ?></strong>
2808 + <span class="qc_wpbot_pro" style="font-size: 9px;"><?php esc_html_e('PRO', 'wpbot'); ?></span>
2809 + </li>
2810 + <li><?php esc_html_e('Standard Contact Forms', 'wpbot'); ?></li>
2811 + <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>
2812 + </li>
2813 + <li>Job <strong><?php esc_html_e('Application Forms', 'wpbot'); ?></strong>
2814 + </li>
2815 + <li>
2816 + <strong><?php esc_html_e('Lead Capture', 'wpbot'); ?></strong> <?php esc_html_e('Forms', 'wpbot'); ?>
2817 + </li>
2818 + <li><?php esc_html_e('Various types of', 'wpbot'); ?> <strong><?php esc_html_e('Calculators', 'wpbot'); ?></strong>
2819 + <span class="qc_wpbot_pro" style="font-size: 9px;"><?php esc_html_e('PRO', 'wpbot'); ?></span>
2820 + </li>
2821 + <li><?php esc_html_e('Feedback', 'wpbot'); ?> <strong>Survey</strong><?php esc_html_e(' Forms etc.', 'wpbot'); ?> </li>
2822 + </ul>
2823 + </div>
2824 + </div>
2825 + </div>
2826 + <div class="panel panel-default">
2827 + <div class="panel-heading" role="tab" id="AIheadingThree">
2828 + <h4 class="panel-title">
2829 + <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>
2830 + </h4>
2831 + </div>
2832 + <div id="AIcollapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="AIheadingThree">
2833 + <div class="panel-body">
3933 2834 <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>
2835 + <div class="wpb_column vc_column_container vc_col-sm-6">
2836 + <div class="wpb_wrapper">
2837 + <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>
2838 + <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>
2839 + </p>
2840 + <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>
2841 + </p>
2842 + <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'); ?>
2843 + </div>
2844 + </div>
2845 + <div class="wpb_column vc_column_container vc_col-sm-6">
2846 + <div class="wpb_wrapper">
2847 + <h2 style="font-size: 20px;"><?php esc_html_e('DialogFlow CX', 'wpbot'); ?> <span class="qc_wpbot_pro">PRO</span>
2848 + </h2>
2849 + <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>
2850 + <ul>
3952 2851 <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'); ?>
2852 + <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 2853 </li>
3955 2854 <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'); ?>
2855 + <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 2856 </li>
3958 2857 <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'); ?>
2858 + <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 2859 </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>
2860 + <img style="width:100%" src="<?php echo QCLD_wpCHATBOT_IMG_URL . '/dialogflow-cx-1024x676.jpg';?>" alt="Dialogflow CX">
2861 + </ul>
2862 + </div>
2863 + </div>
3965 2864 </div>
3966 - </div>
3967 - </div>
3968 - </div>
2865 + </div>
2866 + </div>
3969 2867 </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>
2868 + </div>
2869 + </div>
2870 + <div class="container wppt-settings-section" style="margin-right:unset;margin-left:unset;display:none" id="general_debugging">
2871 + <div class="content form-container qcbot_help_secion" style="margin-right:unset;margin-left:unset; margin-top:40px" >
2872 + <div class="" style="color:#fff">
2873 + <h2 style="font-size:28px;margin-top: 10px;"><?php esc_html_e('Tips', 'wpbot'); ?></h2>
2874 + <h2 style="font-size:20px;margin-top: 10px;"><?php esc_html_e('Tutorial', 'wpbot'); ?></h2>
2875 + <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>
2876 + <h2 style="font-size:20px"><?php esc_html_e('Simple Text Responses', 'wpbot'); ?></h2>
2877 + <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>
2878 + <h2 style="font-size:20px"><?php esc_html_e('Setting Updates', 'wpbot'); ?></h2>
2879 + <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>
2880 + <h2 style="font-size:20px"><?php esc_html_e('Note', 'wpbot'); ?></h2>
2881 + <p><?php esc_html_e('You could use &lt;br&gt; tag in Language Center & Dialogflow Responses for line break.', 'wpbot'); ?></p>
2882 + </div>
2883 + </div>
2884 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;margin-top:0px">
2885 + <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>
2886 + <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>
2887 + </div>
2888 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2889 + <h2 style="font-size:20px"><?php esc_html_e('Problem: I cannot connect to the DialogFlow', 'wpbot'); ?></h2>
2890 + <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>
2891 + <?php esc_html_e('2. Make sure that you have connected to the correct Dialogflow agent', 'wpbot'); ?><br>
2892 + <?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>
2893 + <?php esc_html_e(' 4. Make sure that the Google Client Package is Installed on Your Website.<br>
2894 + 5. For DialogFlow agent region, try choosing any region other than the EU region which has known issues.<br>
2895 + 6. Make sure to download and import the sample DialogFlow agent to your agent<br>
2896 + 7. Test the ChatBot in the browser Incognito mode', 'wpbot'); ?></p>
2897 + </div>
2898 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2899 + <h2 style="font-size:20px"><?php esc_html_e('Problem: I am not getting emails from the ChatBot', 'wpbot'); ?></h2>
2900 + <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>
2901 + </div>
2902 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2903 + <h2 style="font-size:20px"><?php esc_html_e('Problem: Simple text responses are not working or getting an error', 'wpbot'); ?></h2>
2904 + <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>
2905 + </div>
2906 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2907 + <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>
2908 + <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>
2909 + </div>
2910 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2911 + <h2 style="font-size:20px"><?php esc_html_e('Problem: The ChatBot is NOT working in the front end.', 'wpbot'); ?></h2>
2912 + <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>
2913 + <?php esc_html_e(' Also go to Simple Text Responses and press the Re-Index button.', 'wpbot'); ?></br>
2914 + <?php esc_html_e(' After that try purging any cache and test the chatbot in Incognito mode', 'wpbot'); ?><br>
2915 + <?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>
2916 + </div>
2917 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2918 + <h2 style="font-size:20px"><?php esc_html_e('Problem: The ChatBot is stuck on typing or loading', 'wpbot'); ?></h2>
2919 + <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>
2920 + <?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>
2921 + <?php esc_html_e('Also go to Simple Text Responses and press the Re-Index button.', 'wpbot'); ?></br>
2922 + <?php esc_html_e('After that remember to test in a browser Incognito mode to avoid cache and cookies.', 'wpbot'); ?> </p>
2923 + </div>
2924 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2925 + <h2 style="font-size:20px"><?php esc_html_e('Problem: How do I add new conversations to the ChatBot?', 'wpbot'); ?></h2>
2926 + <p><?php esc_html_e('Please check the plugin`s Help Section for details on this', 'wpbot'); ?></p>
2927 + </div>
2928 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2929 + <h2 style="font-size:20px"><?php esc_html_e('Problem: How do I add Line Breaks?', 'wpbot'); ?></h2>
2930 + <p><?php esc_html_e('Please use the &lt;br&gt; tag for line breaks.', 'wpbot'); ?></p>
2931 + </div>
2932 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2933 + <h2 style="font-size:20px"><?php esc_html_e('Problem: Are HTML tags supported?', 'wpbot'); ?> </h2>
2934 + <p><?php esc_html_e('Yes, common HTML tags link link href, strong, br etc. are supported.', 'wpbot'); ?></p>
2935 + </div>
2936 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2937 + <h2 style="font-size:20px"><?php esc_html_e('Problem: I want to add images, GIFs, Videos', 'wpbot'); ?></h2>
2938 + <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>
2939 + </div>
2940 + <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2941 + <h2 style="font-size:20px"><?php esc_html_e('How to disable Predefined Intent?', 'wpbot'); ?></h2>
2942 + <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>
2943 + </div>
2944 + </div>
4174 2945 </div>
4175 2946 <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();
2947 + jQuery(document).ready(function($){
2948 + var url=document.URL;
2949 + var arr=url.split('#');
2950 + var tab_tar = '.'+arr[1];
2951 + setTimeout(function(){
2952 + jQuery(tab_tar).trigger('click');
2953 + }, 500);
2954 +
2955 + jQuery('.wppt_nav_container .nav-tab').on('click', function(e){
2956 + e.preventDefault();
2957 + var section_id = jQuery(this).attr('href');
2958 + jQuery('.wppt_nav_container .nav-tab').removeClass('nav-tab-active');
2959 + jQuery(this).addClass('nav-tab-active');
2960 + jQuery('.wppt-settings-section').hide();
2961 + jQuery('.wppt-settings-section').each(function(){
2962 + jQuery(section_id).show();
2963 + });
4191 2964 });
4192 - });
4193 - })
4194 -</script>
2965 + })
2966 + </script>
4195 2967 <?php
4196 2968 }
4197 -}
4198 2969
4199 2970 add_action('init', 'qc_wp_latest_update_check');
4200 -if( !function_exists('qc_wp_latest_update_check') ){
4201 2971 function qc_wp_latest_update_check(){
4202 2972 global $wpdb;
4203 2973 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')) {
2974 + if (isset($_POST['str_nonce']) && wp_verify_nonce($_POST['str_nonce'],'str-nonce') ) {
4207 2975
4208 2976 if(!get_option('qc_wp_ludate_ck')){
4209 2977 update_option('qlcd_wp_chatbot_support_phone', 'Leave your number. We will call you back!');
4210 2978 update_option('qlcd_wp_chatbot_support_email', 'Send us Email');
4211 2979 update_option('qlcd_wp_chatbot_wildcard_support', 'FAQ');
4212 - update_option('qlcd_wp_chatbot_wildcard_site_search', 'Site Search');
4213 2980 update_option('qc_wp_ludate_ck', 'done');
4214 2981 }
4215 2982
4216 2983 if( ! get_option( 'wpbot-admin-notice-oninstallation' ) ){
@@ -4256,18 +3023,18 @@
4256 3023
4257 3024 if(!get_option('qlcd_wp_chatbot_did_you_mean')) {
4258 3025 update_option('qlcd_wp_chatbot_did_you_mean', maybe_serialize(array('Did you mean?')));
4259 3026 }
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
3027 +
3028 + $sqlqry = $wpdb->get_results("select * from $table1");
4262 3029 if(empty($sqlqry)){
4263 3030
4264 - $query = 'Sample Question?';
4265 - $response = 'Sample Answer';
3031 + $query = 'What Can WPBot do for you?';
3032 + $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 3033
4267 3034 $data = array('query' => $query, 'keyword' => '', 'response'=> $response, 'intent'=> '');
4268 3035 $format = array('%s','%s', '%s', '%s');
4269 - $wpdb->insert($table1,$data,$format); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, PluginCheck.Security.DirectDB.UnescapedDBParameter
3036 + $wpdb->insert($table1,$data,$format);
4270 3037 }
4271 3038
4272 3039 update_option('qc_wpb_simple_response_db_upgrade_free2', 'done');
4273 3040
@@ -4273,36 +3040,25 @@
4273 3040
4274 3041 }
4275 3042
4276 3043 if(!get_option('qc_wp_db_engine_update_free')){
4277 -
4278 3044 $table1 = $wpdb->prefix.'wpbot_response';
4279 -
4280 - // phpcs:ignore
4281 3045 $wpdb->query("ALTER TABLE $table1 ENGINE = InnoDB");
4282 3046
4283 3047 update_option('qc_wp_db_engine_update_free', 'done');
4284 3048 }
4285 3049 if(!get_option('qc_wp_db_engine_update_free_unassign')){
4286 -
4287 3050 $table1 = $wpdb->prefix.'wpbot_response';
4288 -
4289 - // phpcs:ignore
4290 3051 $wpdb->query("ALTER TABLE $table1 CHANGE `id` `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT;");
4291 -
4292 3052 update_option('qc_wp_db_engine_update_free_unassign', 'done');
4293 3053 }
4294 3054
4295 3055 if(isset($_POST['qc_bot_str_query']) && $_POST['qc_bot_str_query']!='' && !class_exists('Qcld_str_pro')){
4296 3056
3057 + $query = wp_unslash(sanitize_text_field($_POST['qc_bot_str_query']));
3058 + $keyword = wp_unslash(sanitize_text_field($_POST['qc_bot_str_keyword']));
3059 + $intent = wp_unslash(sanitize_text_field($_POST['qc_bot_str_intent']));
4297 3060
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' ) );
4300 - }
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']));
4304 -
4305 3061 $category = '';
4306 3062
4307 3063 $response = wp_kses(wp_unslash($_POST['qc_bot_str_response']), 'post');
4308 3064
@@ -4309,140 +3065,103 @@
4309 3065 $table = $wpdb->prefix.'wpbot_response';
4310 3066 $data = array('query' => $query, 'keyword' => $keyword, 'response'=> $response, 'intent'=> $intent, 'category'=> $category);
4311 3067 $format = array('%s','%s', '%s', '%s', '%s');
4312 3068
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']));
3069 + if(isset($_POST['qc_bot_str_id']) && $_POST['qc_bot_str_id']!=''){
3070 + $id = sanitize_text_field($_POST['qc_bot_str_id']);
4315 3071 $where = array('id'=>$id);
4316 3072 $whereformat = array('%d');
4317 - $wpdb->update( $table, $data, $where, $format, $whereformat ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
3073 + $wpdb->update( $table, $data, $where, $format, $whereformat );
4318 3074 }else{
4319 - $wpdb->insert($table,$data,$format); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery
3075 + $wpdb->insert($table,$data,$format);
4320 3076 }
4321 3077
4322 - qcld_mysql_remove_existing_indexes();
4323 -
4324 - // phpcs:ignore
3078 + qc_mysql_remove_existing_indexes();
4325 3079 $wpdb->query("ALTER TABLE $table ADD FULLTEXT(`query`, `keyword`, `response`)");
4326 3080
4327 - wp_safe_redirect(admin_url('admin.php?page=simple-text-response'));exit;
3081 + wp_redirect(admin_url('admin.php?page=simple-text-response'));exit;
4328 3082
4329 3083 }
4330 3084 $table = $wpdb->prefix.'wpbot_response';
4331 -
4332 3085 if(isset($_POST['qc-re-index'])){
4333 -
4334 - qcld_mysql_remove_existing_indexes();
4335 -
4336 - // phpcs:ignore
3086 + qc_mysql_remove_existing_indexes();
4337 3087 $wpdb->query("ALTER TABLE $table ADD FULLTEXT(`query`, `keyword`)");
4338 -
4339 3088 add_action('admin_notices', 'general_admin_notice_str' );
4340 -
4341 3089 }
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']));
3090 + if(isset($_POST['qc_bot_str_weight']) && $_POST['qc_bot_str_weight']!=''){
3091 + $weight = sanitize_text_field($_POST['qc_bot_str_weight']);
4344 3092 update_option('qc_bot_str_weight', $weight);
4345 3093 }
4346 - if(isset($_POST['qc_bot_str_remove_stopwords']) && wp_unslash($_POST['qc_bot_str_remove_stopwords'])!=''){
3094 + if(isset($_POST['qc_bot_str_remove_stopwords']) && $_POST['qc_bot_str_remove_stopwords']!=''){
4347 3095
4348 - $stopwords = sanitize_text_field(wp_unslash($_POST['qc_bot_str_remove_stopwords']));
3096 + $stopwords = sanitize_text_field($_POST['qc_bot_str_remove_stopwords']);
4349 3097 update_option('qc_bot_str_remove_stopwords', '1');
4350 3098 }
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 3099 if(isset($_POST['qc_bot_str_fields']) && !empty($_POST['qc_bot_str_fields'])){
4358 3100 $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 -
3101 + $fields = rest_sanitize_array($_POST['qc_bot_str_fields']);
4372 3102 update_option('qc_bot_str_fields', $fields);
4373 - qcld_mysql_remove_existing_indexes();
3103 + qc_mysql_remove_existing_indexes();
4374 3104
4375 3105 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 -
3106 + $wpdb->query("ALTER TABLE $table ADD FULLTEXT(".implode(', ', $fields).")");
4380 3107 }
4381 3108 }
4382 3109
4383 3110 if(!get_option('wpbot_preloading_time')) {
4384 - update_option('wpbot_preloading_time', '800');
3111 + update_option('wpbot_preloading_time', '0.5');
4385 3112 }
4386 3113 }
4387 3114 }
4388 3115 }
3116 +
3117 +function general_admin_notice_str(){
3118 + if ( isset($_GET['page']) && $_GET['page'] == 'simple-text-response' ) {
3119 + echo '<div class="notice notice-success is-dismissible">
3120 + <p>Re-Indexing has been completed!</p>
3121 + </div>';
3122 + }
4389 3123 }
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 - }
3124 +
3125 +function qc_wpbot_simple_response_intent(){
3126 + global $wpdb;
3127 + $table = $wpdb->prefix.'wpbot_response';
3128 + $results = $wpdb->get_results("SELECT `intent` FROM `$table` WHERE 1 and `intent` !=''");
3129 + $response = array();
3130 + if(!empty($results)){
3131 + foreach($results as $result){
3132 + $response[] = $result->intent;
3133 + }
3134 + }
3135 + return $response;
4398 3136 }
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 3137
4427 - // phpcs:ignore
4428 - $wpdb->query("ALTER TABLE $table DROP INDEX `".$result->Key_name."`;");
4429 -
4430 - $indexes[] = $result->Key_name;
4431 - }
4432 -
4433 - }
4434 - }
3138 +function qc_mysql_remove_existing_indexes(){
3139 + global $wpdb;
3140 + $table = $wpdb->prefix.'wpbot_response';
3141 +
3142 + $results = $wpdb->get_results("SHOW INDEX FROM $table");
3143 + $indexes = array();
3144 + foreach($results as $result){
3145 +
3146 +
3147 +
3148 + if("PRIMARY" != $result->Key_name && !in_array($result->Key_name, $indexes)){
3149 + $wpdb->query("ALTER TABLE $table DROP INDEX `".$result->Key_name
3150 +."`;");
3151 + $indexes[] = $result->Key_name;
3152 + }
3153 +
3154 + }
4435 3155 }
4436 3156
4437 3157 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 - }
3158 +function qc_wpbotfree_activation_redirect( $plugin ){
3159 +
3160 + if( $plugin == plugin_basename( __FILE__ ) ) {
3161 + exit( wp_redirect( admin_url('admin.php?page=wpbot_help_page') ) );
3162 + }
4448 3163 }
3164 +
3165 +
3166 +
3167 +