PluginProbe
MxChat – AI Chatbot & Content Generation for WordPress / 3.0.7
MxChat – AI Chatbot & Content Generation for WordPress v3.0.7
3.2.21 3.2.20 3.2.19 3.2.18 3.2.17 3.2.16 3.2.15 3.2.14 3.2.12 3.2.13 3.2.11 3.2.10 3.2.9 3.2.8 3.2.7 3.2.6 3.2.5 3.2.4 3.2.3 3.2.2 3.2.1 2.0.3 2.0.4 2.0.5 2.0.6 All 152 releases
← All changes | includes/admin-settings-page.php +16 -334 3.2.63.0.7 View file →
@@ -67,12 +67,8 @@
67 67 <button class="mxch-mobile-nav-link" data-target="optimization">
68 68 <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"/></svg>
69 69 <span><?php esc_html_e('Optimization', 'mxchat'); ?></span>
70 70 </button>
71 - <button class="mxch-mobile-nav-link" data-target="testing">
72 - <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 2v6"/><path d="M15 2v6"/><path d="M12 17v5"/><path d="M5 8h14"/><path d="M6 11v-1a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v1"/><path d="m9 14 3 3 3-3"/></svg>
73 - <span><?php esc_html_e('Testing', 'mxchat'); ?></span>
74 - </button>
75 71 </div>
76 72 <!-- Integrations Section -->
77 73 <div class="mxch-mobile-nav-section">
78 74 <div class="mxch-mobile-nav-section-title"><?php esc_html_e('Integrations', 'mxchat'); ?></div>
@@ -159,17 +155,8 @@
159 155 </span>
160 156 <span class="mxch-nav-link-text"><?php esc_html_e('Optimization', 'mxchat'); ?></span>
161 157 </button>
162 158 </div>
163 -
164 - <div class="mxch-nav-item" data-section="testing">
165 - <button class="mxch-nav-link" data-target="testing">
166 - <span class="mxch-nav-link-icon">
167 - <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 2v6"/><path d="M15 2v6"/><path d="M12 17v5"/><path d="M5 8h14"/><path d="M6 11v-1a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v1"/><path d="m9 14 3 3 3-3"/></svg>
168 - </span>
169 - <span class="mxch-nav-link-text"><?php esc_html_e('Testing', 'mxchat'); ?></span>
170 - </button>
171 - </div>
172 159 </div>
173 160
174 161 <!-- Integrations Section -->
175 162 <div class="mxch-nav-section">
@@ -205,9 +192,8 @@
205 192 <span class="mxch-nav-link-text"><?php esc_html_e('Tutorials', 'mxchat'); ?></span>
206 193 </button>
207 194 </div>
208 195 </div>
209 -
210 196 </nav>
211 197
212 198 <?php if (!$is_activated): ?>
213 199 <div class="mxch-sidebar-footer">
@@ -223,12 +209,12 @@
223 209 <main class="mxch-content">
224 210 <?php if (!$is_activated): ?>
225 211 <div class="mxch-pro-banner">
226 212 <div class="mxch-pro-banner-content">
227 - <h3 class="mxch-pro-banner-title"><?php esc_html_e('Stop paying $50–200/month for AI chatbot tools.', 'mxchat'); ?></h3>
228 - <p class="mxch-pro-banner-text"><?php esc_html_e('One payment unlocks every MxChat Pro add-on for life — MCP server access for Claude / ChatGPT / Claude Code, WooCommerce sales, Google Search Console insights, AI-generated chatbot themes, lead-capture forms, unlimited bots, image analysis, and more. No renewals. No surprise bills.', 'mxchat'); ?></p>
213 + <h3 class="mxch-pro-banner-title"><?php esc_html_e('MxChat Pro — Lifetime Access', 'mxchat'); ?></h3>
214 + <p class="mxch-pro-banner-text"><?php esc_html_e('One-time purchase. Unlock 10+ premium add-ons: Admin AI Assistant, Forms Builder, Chatbot Themes, and more.', 'mxchat'); ?></p>
229 215 </div>
230 - <a href="https://mxchat.ai/" target="_blank" class="mxch-pro-banner-btn"><span><?php esc_html_e('Get Lifetime Access →', 'mxchat'); ?></span></a>
216 + <a href="https://mxchat.ai/" target="_blank" class="mxch-pro-banner-btn"><span><?php esc_html_e('Learn More', 'mxchat'); ?></span></a>
231 217 </div>
232 218 <?php endif; ?>
233 219
234 220 <?php
@@ -298,13 +284,8 @@
298 284 mxchat_render_field_wrapper('rag_sources_limit', __('RAG Sources Limit', 'mxchat'), function() use ($admin_instance) {
299 285 $admin_instance->mxchat_rag_sources_limit_callback();
300 286 }, __('Number of knowledge base sources (pages/documents) to include in AI context. Higher values provide more context but use more tokens.', 'mxchat'));
301 287
302 - // RAG Chunks Limit
303 - mxchat_render_field_wrapper('rag_chunks_limit', __('RAG Chunks Limit', 'mxchat'), function() use ($admin_instance) {
304 - $admin_instance->mxchat_rag_chunks_limit_callback();
305 - }, __('Maximum total content chunks sent to the AI across all sources. Higher values provide more context but increase token usage and cost.', 'mxchat'));
306 -
307 288 // Contextual Awareness
308 289 mxchat_render_field_wrapper('contextual_awareness', __('Contextual Awareness', 'mxchat'), function() use ($admin_instance) {
309 290 $admin_instance->mxchat_contextual_awareness_callback();
310 291 }, __('Allow the chatbot to understand and reference the current page content for more relevant responses.', 'mxchat'));
@@ -313,16 +294,12 @@
313 294 mxchat_render_field_wrapper('citation_links', __('Citation Links', 'mxchat'), function() use ($admin_instance) {
314 295 $admin_instance->mxchat_citation_links_toggle_callback();
315 296 }, __('Allow the AI to include citation links from your knowledge database in responses. If disabled, ensure your AI Behavior settings do not mention links or the AI may fabricate URLs.', 'mxchat'));
316 297
317 - // Satisfaction Rating Prompt
318 - // The toggle callback inline-renders the 5 customization
319 - // fields inside a single sub-options wrapper (plan-29caac).
320 - // No separate customization group needed — the wrapper handles
321 - // its own server-side display state based on the toggle value.
322 - mxchat_render_field_wrapper('satisfaction_rating', __('Satisfaction Rating Prompt', 'mxchat'), function() use ($admin_instance) {
323 - $admin_instance->mxchat_satisfaction_rating_toggle_callback();
324 - }, __('Show a 👍 / 👎 prompt after a conversation has had a couple of bot replies and the visitor has been idle for a moment. Disable to hide the prompt site-wide.', 'mxchat'));
298 + // Frontend Debugger
299 + mxchat_render_field_wrapper('frontend_debugger', __('Frontend Debugger', 'mxchat'), function() use ($admin_instance) {
300 + $admin_instance->mxchat_frontend_debugger_callback();
301 + }, __('Show debug panel on frontend for admins. Displays similarity scores and query analysis.', 'mxchat'));
325 302 ?>
326 303 </div>
327 304 </div>
328 305 </div>
@@ -347,9 +324,9 @@
347 324 <?php
348 325 // Auto-Display
349 326 mxchat_render_field_wrapper('auto_display', __('Auto-Display Chatbot', 'mxchat'), function() use ($admin_instance) {
350 327 $admin_instance->mxchat_append_to_body_callback();
351 - }, __('Show chatbot automatically on all pages. Disable to use shortcode [mxchat_chatbot floating="yes"] for floating widget or [mxchat_chatbot floating="no"] for embedded chat.', 'mxchat'));
328 + }, __('Show chatbot automatically on all pages. Disable to use shortcode [mxchat_chatbot] instead.', 'mxchat'));
352 329
353 330 // Open Links in New Tab
354 331 mxchat_render_field_wrapper('link_target', __('Open Links in New Tab', 'mxchat'), function() use ($admin_instance) {
355 332 $admin_instance->mxchat_link_target_toggle_callback();
@@ -564,13 +541,12 @@
564 541 OPTIMIZATION
565 542 ======================================== -->
566 543 <div id="optimization" class="mxch-section">
567 544 <div class="mxch-content-header">
568 - <h1 class="mxch-content-title"><?php esc_html_e('Optimization & Diagnostics', 'mxchat'); ?></h1>
569 - <p class="mxch-content-subtitle"><?php esc_html_e('Optimize performance, debug issues, and manage plugin settings.', 'mxchat'); ?></p>
545 + <h1 class="mxch-content-title"><?php esc_html_e('Optimization', 'mxchat'); ?></h1>
546 + <p class="mxch-content-subtitle"><?php esc_html_e('Optimize chatbot loading for better page performance and Core Web Vitals.', 'mxchat'); ?></p>
570 547 </div>
571 548
572 - <!-- Script Loading Card -->
573 549 <div class="mxch-card">
574 550 <div class="mxch-card-header">
575 551 <h3 class="mxch-card-title">
576 552 <svg class="mxch-card-title-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"/></svg>
@@ -609,185 +585,8 @@
609 585 </div>
610 586 </div>
611 587 </div>
612 588 </div>
613 -
614 - <!-- Page Cache Compatibility Card -->
615 - <div class="mxch-card">
616 - <div class="mxch-card-header">
617 - <h3 class="mxch-card-title">
618 - <svg class="mxch-card-title-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg>
619 - <?php esc_html_e('Page Cache Compatibility', 'mxchat'); ?>
620 - </h3>
621 - </div>
622 - <div class="mxch-card-body">
623 - <p class="mxch-field-description" style="margin-top: 0;"><?php esc_html_e('MxChat\'s chat send (and stream send, plus PDF / Word upload) all POST to /wp-admin/admin-ajax.php. Page-cache plugins occasionally cache those responses, which breaks the per-session nonce flow on the first message. MxChat auto-tells the five most common cache plugins to never cache chat AJAX via their own filter APIs — no setup needed for those. For other cache plugins (or Cloudflare APO), copy the manual exclusion string into your cache plugin\'s exclusion list.', 'mxchat'); ?></p>
624 -
625 - <?php
626 - $mxch_cache_rows = array(
627 - array('name' => 'WP Rocket', 'state' => 'auto', 'exclusion' => '/wp-admin/admin-ajax\\.php\\?action=mxchat_.*'),
628 - array('name' => 'LiteSpeed Cache', 'state' => 'auto', 'exclusion' => '/wp-admin/admin-ajax.php?action=mxchat_*'),
629 - array('name' => 'W3 Total Cache', 'state' => 'auto', 'exclusion' => '/wp-admin/admin-ajax.php?action=mxchat_*'),
630 - array('name' => 'FlyingPress', 'state' => 'auto', 'exclusion' => '/wp-admin/admin-ajax.php?action=mxchat_*'),
631 - array('name' => 'WP Super Cache', 'state' => 'auto', 'exclusion' => 'wp-admin/admin-ajax.php'),
632 - array('name' => 'Cloudflare APO', 'state' => 'manual', 'exclusion' => 'Page Rule / Cache Rule: URI Path contains "/wp-admin/admin-ajax.php" → Bypass Cache'),
633 - );
634 - ?>
635 -
636 - <div class="mxch-cache-compat-grid" style="display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 16px;">
637 - <?php foreach ($mxch_cache_rows as $row) :
638 - $is_auto = ($row['state'] === 'auto');
639 - $pill_class = $is_auto ? 'mxch-status-pill-active' : 'mxch-status-pill-warning';
640 - $pill_label = $is_auto ? __('Auto-handled', 'mxchat') : __('Manual', 'mxchat');
641 - ?>
642 - <div class="mxch-cache-compat-row" style="display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: #f8fafc; border: 1px solid var(--mxch-card-border); border-radius: var(--mxch-radius-md);">
643 - <div style="display: flex; align-items: center; gap: 10px; min-width: 0; flex: 0 0 auto;">
644 - <span style="font-weight: 500;"><?php echo esc_html($row['name']); ?></span>
645 - <span class="mxch-status-pill <?php echo esc_attr($pill_class); ?>">
646 - <span class="mxch-status-dot"></span>
647 - <?php echo esc_html($pill_label); ?>
648 - </span>
649 - </div>
650 - <div style="display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0;">
651 - <code style="background: #fff; border: 1px solid var(--mxch-card-border); padding: 4px 8px; border-radius: var(--mxch-radius-sm); font-size: 12px; color: var(--mxch-text-secondary); flex: 1 1 auto; overflow-x: auto; white-space: nowrap; min-width: 0;"><?php echo esc_html($row['exclusion']); ?></code>
652 - <button type="button" class="mxch-btn mxch-btn-secondary mxch-btn-sm" data-mxch-copy="<?php echo esc_attr($row['exclusion']); ?>" style="flex: 0 0 auto;">
653 - <?php esc_html_e('Copy', 'mxchat'); ?>
654 - </button>
655 - </div>
656 - </div>
657 - <?php endforeach; ?>
658 - </div>
659 -
660 - <div class="mxch-notice mxch-notice-info" style="margin-top: 16px;">
661 - <svg class="mxch-notice-icon" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>
662 - <span><?php esc_html_e('Auto-handled plugins receive a filter from MxChat that excludes chat AJAX from their cache. Even so, having the exclusion in your own exclusion list is harmless and acts as a belt-and-suspenders guarantee.', 'mxchat'); ?></span>
663 - </div>
664 - </div>
665 - </div>
666 -
667 - <!-- Debug Mode Card -->
668 - <?php
669 - $debug_mode = isset($options['debug_mode']) ? $options['debug_mode'] : 'off';
670 - $debug_active = ($debug_mode === 'on');
671 - ?>
672 - <div class="mxch-card">
673 - <div class="mxch-card-header">
674 - <h3 class="mxch-card-title">
675 - <svg class="mxch-card-title-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"/><path d="m9 12 2 2 4-4"/></svg>
676 - <?php esc_html_e('Debug Mode', 'mxchat'); ?>
677 - </h3>
678 - </div>
679 - <div class="mxch-card-body">
680 - <div class="mxch-field">
681 - <label class="mxch-toggle">
682 - <input type="checkbox" class="mxch-toggle-input" id="mxchat_debug_mode" name="mxchat_options[debug_mode]" value="on" <?php checked($debug_active); ?>>
683 - <span class="mxch-toggle-switch"></span>
684 - <span class="mxch-toggle-label"><?php esc_html_e('Enable Debug Logging', 'mxchat'); ?></span>
685 - </label>
686 - <p class="mxch-field-description"><?php esc_html_e('Tracks settings changes, knowledge base errors, API issues, and embedding failures. Enable only when troubleshooting. Max 100 entries stored.', 'mxchat'); ?></p>
687 - </div>
688 - </div>
689 - </div>
690 -
691 - <!-- Debug Log Viewer Card -->
692 - <div class="mxch-card">
693 - <div class="mxch-card-header" style="display: flex; justify-content: space-between; align-items: center;">
694 - <h3 class="mxch-card-title">
695 - <svg class="mxch-card-title-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>
696 - <?php esc_html_e('Debug Log', 'mxchat'); ?>
697 - </h3>
698 - <div style="display: flex; gap: 8px; align-items: center;">
699 - <span id="mxchat-log-count" class="mxch-badge" style="display: none;"></span>
700 - <button type="button" class="mxch-btn mxch-btn-secondary mxch-btn-sm" id="mxchat-refresh-log">
701 - <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21.5 2v6h-6M2.5 22v-6h6M2 11.5a10 10 0 0 1 18.8-4.3M22 12.5a10 10 0 0 1-18.8 4.2"/></svg>
702 - <?php esc_html_e('Refresh', 'mxchat'); ?>
703 - </button>
704 - <button type="button" class="mxch-btn mxch-btn-secondary mxch-btn-sm" id="mxchat-clear-log">
705 - <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>
706 - <?php esc_html_e('Clear', 'mxchat'); ?>
707 - </button>
708 - </div>
709 - </div>
710 - <div class="mxch-card-body">
711 - <div id="mxchat-debug-log" class="mxchat-debug-log-viewer">
712 - <div class="mxchat-debug-log-empty">
713 - <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" style="opacity: 0.3;"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>
714 - <p><?php esc_html_e('No log entries yet. Enable debug mode to start logging.', 'mxchat'); ?></p>
715 - </div>
716 - </div>
717 - </div>
718 - </div>
719 -
720 - <!-- Settings Tools Card -->
721 - <div class="mxch-card">
722 - <div class="mxch-card-header">
723 - <h3 class="mxch-card-title">
724 - <svg class="mxch-card-title-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>
725 - <?php esc_html_e('Settings Tools', 'mxchat'); ?>
726 - </h3>
727 - </div>
728 - <div class="mxch-card-body">
729 - <div class="mxch-tools-grid">
730 - <!-- Export Settings -->
731 - <div class="mxch-tool-item">
732 - <div class="mxch-tool-icon">
733 - <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
734 - </div>
735 - <div class="mxch-tool-content">
736 - <h4><?php esc_html_e('Export Settings', 'mxchat'); ?></h4>
737 - <p><?php esc_html_e('Download a JSON file of your current settings for backup or support. API keys are masked for security.', 'mxchat'); ?></p>
738 - <button type="button" class="mxch-btn mxch-btn-secondary" id="mxchat-export-settings">
739 - <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
740 - <?php esc_html_e('Export Settings', 'mxchat'); ?>
741 - </button>
742 - </div>
743 - </div>
744 -
745 - <!-- Reset All Settings -->
746 - <div class="mxch-tool-item mxch-tool-item-danger">
747 - <div class="mxch-tool-icon">
748 - <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>
749 - </div>
750 - <div class="mxch-tool-content">
751 - <h4><?php esc_html_e('Reset All Settings', 'mxchat'); ?></h4>
752 - <p><?php esc_html_e('Reset all MxChat settings to their default values. This action cannot be undone.', 'mxchat'); ?></p>
753 - <button type="button" class="mxch-btn mxch-btn-danger" id="mxchat-reset-settings">
754 - <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/></svg>
755 - <?php esc_html_e('Reset All Settings', 'mxchat'); ?>
756 - </button>
757 - </div>
758 - </div>
759 - </div>
760 - </div>
761 - </div>
762 -
763 - <!-- Reset Confirmation Modal -->
764 - <div id="mxchat-reset-modal" class="mxch-modal" style="display: none;">
765 - <div class="mxch-modal-backdrop"></div>
766 - <div class="mxch-modal-content">
767 - <div class="mxch-modal-header">
768 - <h3><?php esc_html_e('Reset All Settings', 'mxchat'); ?></h3>
769 - <button type="button" class="mxch-modal-close" id="mxchat-reset-modal-close">&times;</button>
770 - </div>
771 - <div class="mxch-modal-body">
772 - <div class="mxch-notice mxch-notice-warning">
773 - <svg class="mxch-notice-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>
774 - <div>
775 - <strong><?php esc_html_e('Warning: This action cannot be undone!', 'mxchat'); ?></strong>
776 - <p><?php esc_html_e('All your MxChat settings including API keys, customizations, and configurations will be permanently deleted.', 'mxchat'); ?></p>
777 - </div>
778 - </div>
779 - <div class="mxch-field" style="margin-top: 20px;">
780 - <label class="mxch-field-label"><?php esc_html_e('Type RESET to confirm:', 'mxchat'); ?></label>
781 - <input type="text" id="mxchat-reset-confirmation" class="mxch-input" placeholder="RESET" autocomplete="off">
782 - </div>
783 - </div>
784 - <div class="mxch-modal-footer">
785 - <button type="button" class="mxch-btn mxch-btn-secondary" id="mxchat-reset-cancel"><?php esc_html_e('Cancel', 'mxchat'); ?></button>
786 - <button type="button" class="mxch-btn mxch-btn-danger" id="mxchat-reset-confirm" disabled><?php esc_html_e('Reset All Settings', 'mxchat'); ?></button>
787 - </div>
788 - </div>
789 - </div>
790 589 </div>
791 590
792 591 <!-- ========================================
793 592 INTEGRATIONS - TOOLBAR
@@ -1023,23 +822,8 @@
1023 822 <div class="mxch-tutorials-grid">
1024 823 <?php
1025 824 $tutorials = array(
1026 825 array(
1027 - 'title' => __('Quick Setup with MxChat', 'mxchat'),
1028 - 'description' => __('Learn how to quickly setup and understand how your chatbot works.', 'mxchat'),
1029 - 'url' => 'https://www.youtube.com/watch?v=3BqoiyWaQiM&t'
1030 - ),
1031 - array(
1032 - 'title' => __('AI Content Generation', 'mxchat'),
1033 - 'description' => __('Generate full blog posts and landing pages with AI—from prompt to publish in minutes.', 'mxchat'),
1034 - 'url' => 'https://www.youtube.com/watch?v=n8TeEeHpxs4'
1035 - ),
1036 - array(
1037 - 'title' => __('Chat With Your GSC Data', 'mxchat'),
1038 - 'description' => __('Find content gaps, quick win keywords, and SEO opportunities by chatting with your Google Search Console data using the Admin Assistant add-on.', 'mxchat'),
1039 - 'url' => 'https://www.youtube.com/watch?v=ytgMou_7SZA&t=2s'
1040 - ),
1041 - array(
1042 826 'title' => __('AI Theme Generator', 'mxchat'),
1043 827 'description' => __('Learn how to instantly restyle your chatbot using plain English prompts with real-time previews.', 'mxchat'),
1044 828 'url' => 'https://www.youtube.com/watch?v=rSQDW2qbtRU&t'
1045 829 ),
@@ -1053,9 +837,14 @@
1053 837 'description' => __('Bring a ChatGPT-like experience directly inside your WordPress dashboard.', 'mxchat'),
1054 838 'url' => 'https://youtu.be/AdEA1k-UCFM'
1055 839 ),
1056 840 array(
1057 - 'title' => __('Chat Themes', 'mxchat'),
841 + 'title' => __('Intent Tester Guide', 'mxchat'),
842 + 'description' => __('Fine-tune your chatbot\'s responses and ensure accurate query understanding.', 'mxchat'),
843 + 'url' => 'https://www.youtube.com/watch?v=uTr14tn59Hc'
844 + ),
845 + array(
846 + 'title' => __('Theme Customizer', 'mxchat'),
1058 847 'description' => __('Customize appearance with real-time previews to match your brand.', 'mxchat'),
1059 848 'url' => 'https://youtu.be/MfbB9mZi6ag'
1060 849 ),
1061 850 array(
@@ -1106,115 +895,8 @@
1106 895 </a>
1107 896 </div>
1108 897 </div>
1109 898 <?php endforeach; ?>
1110 - </div>
1111 - </div>
1112 -
1113 - <!-- =====================================================
1114 - TESTING SECTION
1115 - ===================================================== -->
1116 - <div id="testing" class="mxch-section">
1117 - <div class="mxch-content-header">
1118 - <h1 class="mxch-content-title"><?php esc_html_e('Testing', 'mxchat'); ?></h1>
1119 - <p class="mxch-content-subtitle"><?php esc_html_e('Test your chatbot and inspect debug data in real time.', 'mxchat'); ?></p>
1120 - </div>
1121 -
1122 - <div class="mxch-testing-layout">
1123 - <!-- Left Column: Debug Panel -->
1124 - <div class="mxch-testing-debug-panel">
1125 - <!-- Quick Actions -->
1126 - <div class="mxch-card">
1127 - <div class="mxch-card-body">
1128 - <h3 class="mxch-testing-section-title"><?php esc_html_e('Quick Actions', 'mxchat'); ?></h3>
1129 - <div class="mxch-testing-actions-row">
1130 - <button type="button" class="mxch-testing-btn mxch-testing-btn-danger" id="mxch-testing-clear-session">
1131 - <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/></svg>
1132 - <?php esc_html_e('Clear Chat Session', 'mxchat'); ?>
1133 - </button>
1134 - <button type="button" class="mxch-testing-btn mxch-testing-btn-secondary" id="mxch-testing-clear-debug">
1135 - <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2v20M2 12h20"/></svg>
1136 - <?php esc_html_e('Clear Debug Log', 'mxchat'); ?>
1137 - </button>
1138 - </div>
1139 - </div>
1140 - </div>
1141 -
1142 - <!-- Last Query Analysis -->
1143 - <div class="mxch-card">
1144 - <div class="mxch-card-body">
1145 - <h3 class="mxch-testing-section-title"><?php esc_html_e('Last Query Analysis', 'mxchat'); ?></h3>
1146 -
1147 - <div class="mxch-testing-field">
1148 - <label><?php esc_html_e('Similarity Threshold', 'mxchat'); ?></label>
1149 - <span id="mxch-testing-threshold"><?php esc_html_e('Loading...', 'mxchat'); ?></span>
1150 - </div>
1151 -
1152 - <div class="mxch-testing-field">
1153 - <label><?php esc_html_e('User Query', 'mxchat'); ?></label>
1154 - <div id="mxch-testing-last-query" class="mxch-testing-query-display"><?php esc_html_e('Waiting for next query...', 'mxchat'); ?></div>
1155 - </div>
1156 -
1157 - <div class="mxch-testing-field">
1158 - <label><?php esc_html_e('Approved URLs for Citations', 'mxchat'); ?></label>
1159 - <div id="mxch-testing-approved-urls" class="mxch-testing-results">
1160 - <div class="mxch-testing-no-data"><?php esc_html_e('No URL data yet', 'mxchat'); ?></div>
1161 - </div>
1162 - </div>
1163 -
1164 - <div class="mxch-testing-field">
1165 - <label><?php esc_html_e('Document Matches', 'mxchat'); ?></label>
1166 - <div id="mxch-testing-similarity-scores" class="mxch-testing-results">
1167 - <div class="mxch-testing-no-data"><?php esc_html_e('No query data yet', 'mxchat'); ?></div>
1168 - </div>
1169 - </div>
1170 -
1171 - <div class="mxch-testing-field">
1172 - <label><?php esc_html_e('Actions Triggered', 'mxchat'); ?></label>
1173 - <div id="mxch-testing-action-scores" class="mxch-testing-results">
1174 - <div class="mxch-testing-no-data"><?php esc_html_e('No action data yet', 'mxchat'); ?></div>
1175 - </div>
1176 - </div>
1177 - </div>
1178 - </div>
1179 -
1180 - <!-- System Information -->
1181 - <div class="mxch-card">
1182 - <div class="mxch-card-body">
1183 - <h3 class="mxch-testing-section-title"><?php esc_html_e('System Information', 'mxchat'); ?></h3>
1184 -
1185 - <div class="mxch-testing-field">
1186 - <label><?php esc_html_e('System Prompt', 'mxchat'); ?></label>
1187 - <div id="mxch-testing-system-prompt" class="mxch-testing-system-prompt"><?php esc_html_e('Loading...', 'mxchat'); ?></div>
1188 - </div>
1189 -
1190 - <div class="mxch-testing-field">
1191 - <label><?php esc_html_e('Knowledge Base', 'mxchat'); ?></label>
1192 - <span id="mxch-testing-kb-status"><?php esc_html_e('Checking...', 'mxchat'); ?></span>
1193 - </div>
1194 - </div>
1195 - </div>
1196 -
1197 - <!-- Debug Log -->
1198 - <div class="mxch-card">
1199 - <div class="mxch-card-body">
1200 - <h3 class="mxch-testing-section-title"><?php esc_html_e('Debug Log', 'mxchat'); ?></h3>
1201 - <div id="mxch-testing-debug-console" class="mxch-testing-debug-console">
1202 - <div class="mxch-testing-debug-entry"><?php esc_html_e('Debug panel ready - send a message to begin...', 'mxchat'); ?></div>
1203 - </div>
1204 - </div>
1205 - </div>
1206 - </div>
1207 -
1208 - <!-- Right Column: Chatbot Replica -->
1209 - <div class="mxch-testing-chatbot-column">
1210 - <div class="mxch-testing-chatbot-scope">
1211 - <?php
1212 - // Render the chatbot inline for testing
1213 - echo do_shortcode('[mxchat_chatbot floating="no" bot_id="testing"]');
1214 - ?>
1215 - </div>
1216 - </div>
1217 899 </div>
1218 900 </div>
1219 901
1220 902 </main>