PluginProbe
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services / 8.3.8
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services v8.3.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 8.5.3 8.5.2 All 533 releases
← All changes | includes/admin/templates/ai-admin.php +139 -178 8.6.28.3.8 View file →
@@ -1,178 +1,139 @@
1 -<?php
2 -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3 -$no_ai_active = (
4 - get_option( 'ai_enabled' ) != 1 &&
5 - get_option( 'qcld_openrouter_enabled' ) != 1 &&
6 - get_option( 'qcld_gemini_enabled' ) != 1 &&
7 - get_option( 'qcld_grok_enabled' ) != 1
8 -);
9 -$wizard_done = ( get_option( 'wpbot_ai_setup_wizard_done' ) == 1 );
10 -
11 -$show_wizard_automatically = $no_ai_active;
12 -require_once QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/admin/templates/wizard-popup.php';
13 -?>
14 -<div class="wrap qcld-main-wrapper">
15 - <div class="qcld-wp-chatbot-wrap-header-aisection">
16 -<div class="qcld-wp-chatbot-wrap-header">
17 -
18 - <div class="qcld-wp-chatbot-wrap-header-logo"><a href="#" class="qcld-wp-chatbot-wrap-site__logo"><img style="width:100%" src="<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/chatbot.png' ); ?>" alt="Dialogflow CX"> WPBot Control Panel </a>
19 - <p><strong>Core Version:</strong> v<?php echo esc_html( QCLD_wpCHATBOT_VERSION ); ?></p>
20 - </div>
21 - <ul class="qcld-wp-chatbot-wrap-version-wrapper">
22 - <li>
23 - <a class="wpchatbot-Upgrade" href="https://www.wpbot.pro/" target="_blank">Upgrade To Pro</a>
24 -
25 - </li>
26 - </ul>
27 -</div>
28 - </div>
29 -</div>
30 -
31 -<div class="qcl-openai">
32 - <div class="row gx-0">
33 -
34 - <div class="card admin-maxwith qcld-openai-main-box">
35 - <div class="card-header bg-dark text-white py-sm-4 border-0">
36 - <div class="row">
37 -
38 - <div class="col-auto me-auto ai-settings-title-container">
39 -
40 - <a href="<?php echo esc_url( admin_url( 'admin.php?page=wpbot_openAi' ) ); ?>"><h4><?php esc_html_e( 'AI Settings','chatbot');?></h4></a>
41 -
42 - <?php
43 - // Determine which provider is currently active
44 - $active_provider = 'openai'; // default
45 - if (get_option('qcld_grok_enabled') == 1) $active_provider = 'grok';
46 - if (get_option('qcld_gemini_enabled') == 1) $active_provider = 'gemini';
47 - if (get_option('qcld_openrouter_enabled') == 1) $active_provider = 'openrouter';
48 - if (get_option('ai_enabled') == 1) $active_provider = 'openai';
49 - ?>
50 - <input type="hidden" id="ai-provider-selector" value="<?php echo esc_attr($active_provider); ?>">
51 -
52 - <div class="col-auto ai-settings-title-container">
53 - <button id="wpbot-trigger-wizard" class="qcld-btn-primary"><?php esc_html_e( 'AI Wizard', 'chatbot' ); ?></button>
54 - </div>
55 - <div class="col-auto ai-settings-title-container">
56 - <button id="ai-knowledge-base-tab" class="qcld-btn-primary" link="page=wpbot_openAi#ai-knowledge-base-tab"><?php esc_html_e( 'Knowledge Base (RAG)', 'chatbot' ); ?></button>
57 - </div>
58 - <div class="col-auto ai-settings-title-container">
59 - <button id="qcld-common-ai-settings" class="qcld-btn-primary" link="page=wpbot_openAi#common-ai-settings-tab"><?php esc_html_e( 'Common AI Settings', 'chatbot' ); ?></button>
60 - </div>
61 - </div>
62 -
63 -
64 - </div>
65 - </div>
66 - <!-- AI Provider Cards - Separate Row -->
67 - <div class="ai-provider-cards-wrapper">
68 - <h4></h4>
69 - <div class="ai-provider-cards">
70 - <div class="ai-provider-card <?php echo ($active_provider === 'openai') ? 'active' : ''; ?>" data-provider="openai">
71 - <span class="ai-provider-check"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><circle cx="7" cy="7" r="7" fill="#2563EB"/><path d="M4 7.2L6.2 9.4L10 5" stroke="#fff" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></svg></span>
72 - <div class="ai-provider-icon">
73 - <svg viewBox="0 0 24 24" width="32" height="32" fill="none"><path d="M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.28 4.082a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 12.56 24a6.051 6.051 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073zM12.56 22.51a4.476 4.476 0 0 1-2.876-1.04l.143-.08 4.779-2.758a.795.795 0 0 0 .395-.684v-6.74l2.02 1.166a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.5 4.502zM3.12 18.376a4.48 4.48 0 0 1-.535-3.014l.142.085 4.783 2.759a.77.77 0 0 0 .785 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.26 19.998a4.5 4.5 0 0 1-6.14-1.622zM2.036 7.874a4.485 4.485 0 0 1 2.34-1.97V11.6a.77.77 0 0 0 .388.676l5.815 3.355-2.02 1.168a.076.076 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.036 7.87zm16.37 3.81L12.57 8.316l2.02-1.166a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.698a.785.785 0 0 0-.388-.676zm2.01-3.028l-.141-.085-4.774-2.782a.776.776 0 0 0-.785 0L8.87 9.158V6.826a.08.08 0 0 1 .033-.062l4.83-2.787a4.5 4.5 0 0 1 6.683 4.66zM7.823 12.74l-2.02-1.164a.08.08 0 0 1-.038-.057V5.936a4.504 4.504 0 0 1 7.372-3.462l-.142.08L8.21 5.312a.786.786 0 0 0-.395.684l.009 6.744zm1.1-2.368l2.6-1.502 2.6 1.502v3.004l-2.6 1.502-2.6-1.502z" fill="#10A37F"/></svg>
74 - </div>
75 - <span class="ai-provider-name"><?php esc_html_e('OpenAI', 'chatbot'); ?></span>
76 - </div>
77 - <div class="ai-provider-card <?php echo ($active_provider === 'gemini') ? 'active' : ''; ?>" data-provider="gemini">
78 - <span class="ai-provider-check"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><circle cx="7" cy="7" r="7" fill="#2563EB"/><path d="M4 7.2L6.2 9.4L10 5" stroke="#fff" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></svg></span>
79 - <div class="ai-provider-icon">
80 - <svg viewBox="0 0 24 24" width="32" height="32" fill="none"><path d="M12 24C12 24 12 12 24 12C12 12 12 0 12 0C12 0 12 12 0 12C12 12 12 24 12 24Z" fill="url(#gemini_grad)"/><defs><linearGradient id="gemini_grad" x1="0" y1="12" x2="24" y2="12"><stop stop-color="#1A73E8"/><stop offset="1" stop-color="#6C48C1"/></linearGradient></defs></svg>
81 - </div>
82 - <span class="ai-provider-name"><?php esc_html_e('Google Gemini', 'chatbot'); ?></span>
83 - </div>
84 - <div class="ai-provider-card <?php echo ($active_provider === 'grok') ? 'active' : ''; ?>" data-provider="grok">
85 - <span class="ai-provider-check"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><circle cx="7" cy="7" r="7" fill="#2563EB"/><path d="M4 7.2L6.2 9.4L10 5" stroke="#fff" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></svg></span>
86 - <div class="ai-provider-icon">
87 - <svg viewBox="0 0 24 24" width="32" height="32" fill="none"><path d="M4.24 4L11.47 14.13L4.2 21H5.84L12.2 15.16L17.34 21H22L14.35 10.29L21.1 4H19.46L13.63 9.26L8.9 4H4.24ZM6.56 5.27H8.32L19.68 19.73H17.92L6.56 5.27Z" fill="#1DA1F2"/></svg>
88 - </div>
89 - <span class="ai-provider-name"><?php esc_html_e('Grok', 'chatbot'); ?></span>
90 - </div>
91 - <div class="ai-provider-card <?php echo ($active_provider === 'openrouter') ? 'active' : ''; ?>" data-provider="openrouter">
92 - <span class="ai-provider-check"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><circle cx="7" cy="7" r="7" fill="#2563EB"/><path d="M4 7.2L6.2 9.4L10 5" stroke="#fff" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></svg></span>
93 - <div class="ai-provider-icon">
94 - <svg viewBox="0 0 24 24" width="32" height="32" fill="none"><path d="M16.778 1.844v1.919q-.569-.026-1.138-.032q-.708-.008-1.415.037c-1.93.126-4.023.728-6.149 2.237c-2.911 2.066-2.731 1.95-4.14 2.75c-.396.223-1.342.574-2.185.798c-.841.225-1.753.333-1.751.333v4.229s.768.108 1.61.333c.842.224 1.789.575 2.185.799c1.41.798 1.228.683 4.14 2.75c2.126 1.509 4.22 2.11 6.148 2.236c.88.058 1.716.041 2.555.005v1.918l7.222-4.168l-7.222-4.17v2.176c-.86.038-1.611.065-2.278.021c-1.364-.09-2.417-.357-3.979-1.465c-2.244-1.593-2.866-2.027-3.68-2.508c.889-.518 1.449-.906 3.822-2.59c1.56-1.109 2.614-1.377 3.978-1.466c.667-.044 1.418-.017 2.278.02v2.176L24 6.014Z" fill="#6B7280"/></svg>
95 - </div>
96 - <span class="ai-provider-name"><?php esc_html_e('OpenRouter', 'chatbot'); ?></span>
97 - </div>
98 - </div>
99 - </div>
100 - <?php
101 - if ( get_option( 'ai_enabled' ) != 1 && get_option( 'qcld_openrouter_enabled' ) != 1 && get_option( 'qcld_gemini_enabled' ) != 1 && get_option( 'qcld_grok_enabled' ) != 1 ) {
102 - ?>
103 - <div id="openai-settings" class="ai-settings-provider">
104 - <?php require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/integration/openai/admin/admin_ui2.php'); ?>
105 - </div>
106 -
107 - <?php
108 - }
109 - ?>
110 - <div id="openai-settings" class="ai-settings-provider" <?php echo (get_option( 'ai_enabled') == 1) ? 'style="display: block;"' :'style="display: none;"';?> >
111 - <?php require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/integration/openai/admin/admin_ui2.php'); ?>
112 - </div>
113 - <div id="openrouter-settings" class="ai-settings-provider" <?php echo (get_option( 'qcld_openrouter_enabled') == 1) ? 'style="display: block;"' :'style="display: none;"';?> >
114 - <?php require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/integration/openrouter/admin/settings.php'); ?>
115 - </div>
116 - <div id="gemini-settings" class="ai-settings-provider" <?php echo (get_option( 'qcld_gemini_enabled') == 1) ? 'style="display: block;"' :'style="display: none;"';?> >
117 - <?php require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/integration/gemini/admin/settings.php'); ?>
118 - </div>
119 - <div id="grok-settings" class="ai-settings-provider" <?php echo (get_option( 'qcld_grok_enabled') == 1) ? 'style="display: block;"' :'style="display: none;"';?> >
120 - <?php require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/integration/grok/admin/settings.php'); ?>
121 - </div>
122 - <div id="rag-settings" class="ai-settings-provider" style="display: none;">
123 - <?php require_once QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/admin/templates/rag.php'; ?>
124 - </div>
125 - <div id="common-ai-settings" class="ai-settings-provider" style="display: none;">
126 - <?php require_once QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/admin/templates/common-ai-settings.php'; ?>
127 - </div>
128 - <div class="card-footer bg-dark text-white py-sm-4 border-0"></div>
129 - </div>
130 -
131 -
132 -
133 - </div>
134 -</div>
135 -</div>
136 -
137 -
138 -
139 -
140 -<style>
141 -
142 -div#promotion-wpchatbot {
143 - margin: 0;
144 - padding: 0;
145 - border: none;
146 - max-width: initial !important;
147 - padding: 0 !important;
148 - margin: 20px 20px 20px 0 !important;
149 - padding: 15px 15px 15px 0 !important;
150 - border: none !important;
151 - border-radius: 6px !important;
152 - box-shadow: 0px 4px 6px 1px #ebebeb !important;
153 -}
154 -
155 -
156 -.qc-review-notice{
157 - max-width: initial !important;
158 - padding: 0 !important;
159 - margin: 20px 20px 20px 0 !important;
160 - padding: 15px 15px 15px 0 !important;
161 - border: none !important;
162 - border-radius: 6px !important;
163 - box-shadow: 0px 4px 6px 1px #ebebeb !important;
164 - background: #fff;
165 - color: #000;
166 -}
167 -
168 -.qc-review-text h3 {
169 - color: #000000;
170 -}
171 -.qc-review-text p {
172 - color: #000000;
173 -}
174 -</style>
175 -
176 -
177 -
178 -
1 +<?php
2 +$no_ai_active = (
3 + get_option( 'ai_enabled' ) != 1 &&
4 + get_option( 'qcld_openrouter_enabled' ) != 1 &&
5 + get_option( 'qcld_gemini_enabled' ) != 1 &&
6 + get_option( 'qcld_grok_enabled' ) != 1
7 +);
8 +$wizard_done = ( get_option( 'wpbot_ai_setup_wizard_done' ) == 1 );
9 +
10 +$show_wizard_automatically = $no_ai_active;
11 +require_once QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/admin/templates/wizard-popup.php';
12 +?>
13 +<div class="wrap qcld-main-wrapper">
14 + <div class="qcld-wp-chatbot-wrap-header-aisection">
15 +<div class="qcld-wp-chatbot-wrap-header">
16 +
17 + <div class="qcld-wp-chatbot-wrap-header-logo"><a href="#" class="qcld-wp-chatbot-wrap-site__logo"><img style="width:100%" src="<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/chatbot.png' ); ?>" alt="Dialogflow CX"> WPBot Control Panel </a>
18 + <p><strong>Core Version:</strong> v<?php echo QCLD_wpCHATBOT_VERSION; ?></p>
19 + </div>
20 + <ul class="qcld-wp-chatbot-wrap-version-wrapper">
21 + <li>
22 + <a class="wpchatbot-Upgrade" href="https://www.wpbot.pro/" target="_blank">Upgrade To Pro</a>
23 +
24 + </li>
25 + </ul>
26 +</div>
27 + </div>
28 +</div>
29 +
30 +<div class="qcl-openai">
31 + <div class="row gx-0">
32 +
33 + <div class="card admin-maxwith qcld-openai-main-box">
34 + <div class="card-header bg-dark text-white py-sm-4 border-0">
35 + <div class="row">
36 +
37 + <div class="col-auto me-auto ai-settings-title-container">
38 +
39 + <a href="<?php echo admin_url( 'admin.php?page=wpbot_openAi' ); ?>"><h4><?php esc_html_e( 'AI Settings','chatbot');?></h4></a>
40 +
41 + <select id="ai-provider-selector" class="form-select ai-settings-selector">
42 + <option value="openai" <?php echo (get_option( 'ai_enabled') == 1) ? esc_attr( 'selected') :'';?> ><?php echo esc_html__( 'OpenAI','chatbot')?></option>
43 + <option value="openrouter" <?php echo (get_option( 'qcld_openrouter_enabled') == 1) ? esc_attr( 'selected') :'';?> ><?php echo esc_html__( 'OpenRouter','chatbot')?></option>
44 + <option value="gemini" <?php echo (get_option( 'qcld_gemini_enabled') == 1) ? esc_attr( 'selected') :'';?> ><?php echo esc_html__( 'Gemini','chatbot')?></option>
45 + <option value="grok" <?php echo (get_option( 'qcld_grok_enabled') == 1) ? esc_attr( 'selected') :'';?> ><?php echo esc_html__( 'Grok','chatbot')?></option>
46 + </select>
47 + <div class="col-auto ai-settings-title-container">
48 + <button id="wpbot-trigger-wizard" class="qcld-btn-primary"><?php esc_html_e( 'AI Wizard', 'chatbot' ); ?></button>
49 + </div>
50 + <div class="col-auto ai-settings-title-container">
51 + <button id="ai-knowledge-base-tab" class="qcld-btn-primary" link="page=wpbot_openAi#ai-knowledge-base-tab"><?php esc_html_e( 'Knowledge Base (RAG)', 'chatbot' ); ?></button>
52 + </div>
53 + <div class="col-auto ai-settings-title-container">
54 + <button id="qcld-common-ai-settings" class="qcld-btn-primary" link="page=wpbot_openAi#common-ai-settings-tab"><?php esc_html_e( 'Common AI Settings', 'chatbot' ); ?></button>
55 + </div>
56 + </div>
57 +
58 +
59 + </div>
60 + </div>
61 + <?php
62 + if ( get_option( 'ai_enabled' ) != 1 && get_option( 'qcld_openrouter_enabled' ) != 1 && get_option( 'qcld_gemini_enabled' ) != 1 && get_option( 'qcld_grok_enabled' ) != 1 ) {
63 + ?>
64 + <div id="openai-settings" class="ai-settings-provider">
65 + <?php require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/integration/openai/admin/admin_ui2.php'); ?>
66 + </div>
67 +
68 + <?php
69 + }
70 + ?>
71 + <div id="openai-settings" class="ai-settings-provider" <?php echo (get_option( 'ai_enabled') == 1) ? 'style="display: block;"' :'style="display: none;"';?> >
72 + <?php require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/integration/openai/admin/admin_ui2.php'); ?>
73 + </div>
74 + <div id="openrouter-settings" class="ai-settings-provider" <?php echo (get_option( 'qcld_openrouter_enabled') == 1) ? 'style="display: block;"' :'style="display: none;"';?> >
75 + <?php require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/integration/openrouter/admin/settings.php'); ?>
76 + </div>
77 + <div id="gemini-settings" class="ai-settings-provider" <?php echo (get_option( 'qcld_gemini_enabled') == 1) ? 'style="display: block;"' :'style="display: none;"';?> >
78 + <?php require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/integration/gemini/admin/settings.php'); ?>
79 + </div>
80 + <div id="grok-settings" class="ai-settings-provider" <?php echo (get_option( 'qcld_grok_enabled') == 1) ? 'style="display: block;"' :'style="display: none;"';?> >
81 + <?php require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/integration/grok/admin/settings.php'); ?>
82 + </div>
83 + <div id="rag-settings" class="ai-settings-provider" style="display: none;">
84 + <?php require_once QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/admin/templates/rag.php'; ?>
85 + </div>
86 + <div id="common-ai-settings" class="ai-settings-provider" style="display: none;">
87 + <?php require_once QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/admin/templates/common-ai-settings.php'; ?>
88 + </div>
89 + <div class="card-footer bg-dark text-white py-sm-4 border-0"></div>
90 + </div>
91 +
92 +
93 +
94 + </div>
95 +</div>
96 +</div>
97 +
98 +
99 +
100 +
101 +<style>
102 +
103 +div#promotion-wpchatbot {
104 + margin: 0;
105 + padding: 0;
106 + border: none;
107 + max-width: initial !important;
108 + padding: 0 !important;
109 + margin: 20px 20px 20px 0 !important;
110 + padding: 15px 15px 15px 0 !important;
111 + border: none !important;
112 + border-radius: 6px !important;
113 + box-shadow: 0px 4px 6px 1px #ebebeb !important;
114 +}
115 +
116 +
117 +.qc-review-notice{
118 + max-width: initial !important;
119 + padding: 0 !important;
120 + margin: 20px 20px 20px 0 !important;
121 + padding: 15px 15px 15px 0 !important;
122 + border: none !important;
123 + border-radius: 6px !important;
124 + box-shadow: 0px 4px 6px 1px #ebebeb !important;
125 + background: #fff;
126 + color: #000;
127 +}
128 +
129 +.qc-review-text h3 {
130 + color: #000000;
131 +}
132 +.qc-review-text p {
133 + color: #000000;
134 +}
135 +</style>
136 +
137 +
138 +
139 +