PluginProbe
MxChat – AI Chatbot & Content Generation for WordPress / 3.2.20
MxChat – AI Chatbot & Content Generation for WordPress v3.2.20
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
mxchat-basic / includes / class-mxchat-addons.php

class-mxchat-addons.php in MxChat – AI Chatbot & Content Generation for WordPress 3.2.20, at includes/class-mxchat-addons.php

759 lines 54.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The admin-specific functionality for the Add Ons page.
4 *
5 * @package MxChat
6 * @subpackage MxChat/admin
7 */
8 class MxChat_Addons {
9 /**
10 * Store add-on configuration data
11 *
12 * @var array
13 */
14 private $addons_config;
15
16 /**
17 * Initialize the class and set its properties.
18 */
19 public function __construct() {
20 $this->addons_config = array(
21
22 'mxchat-ai-search' => array(
23 'title' => __('MxChat AI Search', 'mxchat'),
24 'sidebar_title' => __('AI Search', 'mxchat'),
25 'description' => __('Bring AI Overviews to your own site search. Visitors ask a question in your search bar and get a real answer drawn from your knowledge base, with sources — above your theme\'s normal results, as a full AI results page, or as a search box you can drop on any page.', 'mxchat'),
26 'key_benefits' => array(
27 __('AI answers above your theme\'s search results', 'mxchat'),
28 __('Embeddable search box via shortcode or block', 'mxchat'),
29 __('Grounded in your knowledge base, with sources', 'mxchat')
30 ),
31 'license' => 'MxChat PRO',
32 'accent' => '#0ea5e9',
33 'url' => 'https://mxchat.ai/add-ons/mxchat-search/',
34 'download_url' => 'https://mxchat.ai/add-ons/mxchat-search/',
35 'plugin_file' => 'mxchat-search/mxchat-search.php',
36 'config_page' => 'mxchat-search',
37 'hero_features' => array(
38 array(
39 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>',
40 'title' => __('AI Overview', 'mxchat'),
41 'desc' => __('Answers above your normal results', 'mxchat'),
42 ),
43 array(
44 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><line x1="3" y1="9" x2="21" y2="9"/><line x1="7" y1="14" x2="14" y2="14"/></svg>',
45 'title' => __('Drop It Anywhere', 'mxchat'),
46 'desc' => __('Shortcode or block on any page', 'mxchat'),
47 ),
48 array(
49 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/></svg>',
50 'title' => __('Your Own Content', 'mxchat'),
51 'desc' => __('Grounded answers that cite sources', 'mxchat'),
52 ),
53 array(
54 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg>',
55 'title' => __('Cost Controls', 'mxchat'),
56 'desc' => __('Caching, rate limits, cheaper model', 'mxchat'),
57 ),
58 ),
59 ),
60
61 'mxchat-mcp' => array(
62 'title' => __('MxChat MCP Server', 'mxchat'),
63 'sidebar_title' => __('MCP Server', 'mxchat'),
64 'description' => __('Turn your MxChat install into a Model Context Protocol server so Claude, ChatGPT, and Claude Code can list transcripts, push knowledge, and inspect bots directly — no per-message fees, no middleman API.', 'mxchat'),
65 'key_benefits' => array(
66 __('JSON-RPC 2.0 MCP endpoint with OAuth + bearer auth', 'mxchat'),
67 __('One-click connect snippets for Claude Code, ChatGPT, mcp-inspector', 'mxchat'),
68 __('WooCommerce-aware tools: products, orders, customers', 'mxchat')
69 ),
70 'license' => 'MxChat PRO',
71 'accent' => '#7873f5',
72 'url' => 'https://mxchat.ai/add-ons/mxchat-mcp/',
73 'download_url' => 'https://mxchat.ai/add-ons/mxchat-mcp/',
74 'plugin_file' => 'mxchat-mcp/mxchat-mcp.php',
75 'config_page' => 'mxchat-mcp',
76 'hero_features' => array(
77 array(
78 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>',
79 'title' => __('Open Protocol', 'mxchat'),
80 'desc' => __('Standards-based MCP over Streamable HTTP', 'mxchat'),
81 ),
82 array(
83 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>',
84 'title' => __('OAuth + Bearer', 'mxchat'),
85 'desc' => __('Reuses your MxChat REST token', 'mxchat'),
86 ),
87 array(
88 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/></svg>',
89 'title' => __('Chatbot Ops Tools', 'mxchat'),
90 'desc' => __('Transcripts, knowledge, bots, search', 'mxchat'),
91 ),
92 array(
93 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"/></svg>',
94 'title' => __('WooCommerce Aware', 'mxchat'),
95 'desc' => __('Products, orders, customer lookups', 'mxchat'),
96 ),
97 ),
98 ),
99
100 'mxchat-advanced-content' => array(
101 'title' => __('MxChat Advanced Content Editor', 'mxchat'),
102 'sidebar_title' => __('Content Gen.', 'mxchat'),
103 'description' => __('Supercharge your AI content generation workflow. Add advanced editing tools, image management, SEO meta controls, and internal linking to the MxChat Content Generator—turning simple prompts into publish-ready posts and landing pages.', 'mxchat'),
104 'key_benefits' => array(
105 __('AI-powered image regeneration & uploads', 'mxchat'),
106 __('SEO meta title, description & excerpt editor', 'mxchat'),
107 __('Automatic internal linking between posts', 'mxchat')
108 ),
109 'license' => 'MxChat PRO',
110 'accent' => '#6366f1',
111 'url' => 'https://mxchat.ai/add-ons/mxchat-advanced-content/',
112 'download_url' => 'https://mxchat.ai/add-ons/mxchat-advanced-content/',
113 'plugin_file' => 'mxchat-advanced-content/mxchat-advanced-content.php',
114 'config_page' => 'mxchat-content',
115 'hero_features' => array(
116 array(
117 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg>',
118 'title' => __('Image Management', 'mxchat'),
119 'desc' => __('Regenerate, upload, and swap AI images', 'mxchat'),
120 ),
121 array(
122 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>',
123 'title' => __('SEO Meta Editor', 'mxchat'),
124 'desc' => __('Title, description & excerpt controls', 'mxchat'),
125 ),
126 array(
127 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>',
128 'title' => __('Internal Linking', 'mxchat'),
129 'desc' => __('Auto-link to related posts & pages', 'mxchat'),
130 ),
131 array(
132 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"/></svg>',
133 'title' => __('Chat-Based Editing', 'mxchat'),
134 'desc' => __('Refine content through conversation', 'mxchat'),
135 ),
136 ),
137 ),
138
139 'mxchat-theme' => array(
140 'title' => __('MxChat Chat Themes', 'mxchat'),
141 'description' => __('Make your chatbot uniquely yours. Generate beautiful themes instantly using simple descriptions or customize manually with precise color controls—zero coding required. Perfect for matching your brand identity.', 'mxchat'),
142 'key_benefits' => array(
143 __('AI-powered theme generator', 'mxchat'),
144 __('Live preview customizer', 'mxchat'),
145 __('One-click theme application', 'mxchat')
146 ),
147 'license' => 'MxChat PRO',
148 'accent' => '#fa73e6',
149 'url' => 'https://mxchat.ai/add-ons/mxchat-theme/',
150 'plugin_file' => 'mxchat-theme/mxchat-theme.php',
151 'config_page' => 'mxchat-theme-settings',
152 'hero_features' => array(
153 array(
154 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="13.5" cy="6.5" r="2.5"/><path d="M17.5 10.5l4-4"/><circle cx="6" cy="12" r="2"/><path d="M2 14l2-2"/><circle cx="10.5" cy="17.5" r="2.5"/><path d="M14 21l-1-3"/></svg>',
155 'title' => __('AI Theme Generator', 'mxchat'),
156 'desc' => __('Describe your style, AI creates it', 'mxchat'),
157 ),
158 array(
159 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18"/><path d="M9 21V9"/></svg>',
160 'title' => __('Live Preview', 'mxchat'),
161 'desc' => __('See changes in real-time', 'mxchat'),
162 ),
163 array(
164 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2v4"/><path d="m16.2 7.8 2.9-2.9"/><path d="M18 12h4"/><path d="m16.2 16.2 2.9 2.9"/><path d="M12 18v4"/><path d="m4.9 19.1 2.9-2.9"/><path d="M2 12h4"/><path d="m4.9 4.9 2.9 2.9"/></svg>',
165 'title' => __('Color Controls', 'mxchat'),
166 'desc' => __('Fine-tune every color precisely', 'mxchat'),
167 ),
168 array(
169 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" 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>',
170 'title' => __('One-Click Apply', 'mxchat'),
171 'desc' => __('Apply themes instantly', 'mxchat'),
172 ),
173 ),
174 ),
175
176 'mxchat-admin-assistant' => array(
177 'title' => __('MxChat Admin Assistant', 'mxchat'),
178 'description' => __('Your AI powerhouse inside WordPress. Chat with multiple AI models, generate images, research the web, and boost productivity—all without leaving your dashboard.', 'mxchat'),
179 'key_benefits' => array(
180 __('ChatGPT-like admin interface', 'mxchat'),
181 __('Generate images & research web', 'mxchat'),
182 __('Searchable chat history', 'mxchat')
183 ),
184 'license' => 'MxChat PRO',
185 'accent' => '#fa73e6',
186 'url' => 'https://mxchat.ai/add-ons/mxchat-admin-chat/',
187 'plugin_file' => 'mxchat-admin-chat/mxchat-admin-chat.php',
188 'config_page' => 'mxchat-admin-chat',
189 'hero_features' => array(
190 array(
191 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>',
192 'title' => __('Admin Chat UI', 'mxchat'),
193 'desc' => __('ChatGPT-like dashboard interface', 'mxchat'),
194 ),
195 array(
196 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg>',
197 'title' => __('Image Generation', 'mxchat'),
198 'desc' => __('Create images with AI prompts', 'mxchat'),
199 ),
200 array(
201 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>',
202 'title' => __('Web Research', 'mxchat'),
203 'desc' => __('Search the web from your dashboard', 'mxchat'),
204 ),
205 array(
206 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="22 12 16 12 14 15 10 9 8 12 2 12"/></svg>',
207 'title' => __('Chat History', 'mxchat'),
208 'desc' => __('Searchable conversation archive', 'mxchat'),
209 ),
210 ),
211 ),
212
213 'mxchat-veo' => array(
214 'title' => __('MxChat Video Generation', 'mxchat'),
215 'description' => __('Generate stunning AI videos using Google Veo 2 and Veo 3 models directly from your WordPress dashboard. Create high-quality videos from text prompts with audio, multiple aspect ratios, and optimized generation speeds.', 'mxchat'),
216 'key_benefits' => array(
217 __('Multiple Veo models (Veo 2, 3, 3 Fast)', 'mxchat'),
218 __('8-second videos with native audio', 'mxchat'),
219 __('Media library integration', 'mxchat')
220 ),
221 'license' => 'MxChat PRO',
222 'accent' => '#ff6b35',
223 'url' => 'https://mxchat.ai/add-ons/mxchat-veo/',
224 'plugin_file' => 'mxchat-veo/mxchat-veo.php',
225 'config_page' => 'mxchat-veo',
226 'hero_features' => array(
227 array(
228 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="23 7 16 12 23 17 23 7"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>',
229 'title' => __('AI Video Creation', 'mxchat'),
230 'desc' => __('Generate videos from text prompts', 'mxchat'),
231 ),
232 array(
233 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18V5l12-2v13"/><circle cx="6" cy="18" r="3"/><circle cx="18" cy="16" r="3"/></svg>',
234 'title' => __('Native Audio', 'mxchat'),
235 'desc' => __('Videos with built-in audio tracks', 'mxchat'),
236 ),
237 array(
238 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3h7a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-7m0-18H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7m0-18v18"/></svg>',
239 'title' => __('Aspect Ratios', 'mxchat'),
240 'desc' => __('Multiple size options available', 'mxchat'),
241 ),
242 array(
243 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" 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="17 8 12 3 7 8"/><line x1="12" y1="3" x2="12" y2="15"/></svg>',
244 'title' => __('Media Library', 'mxchat'),
245 'desc' => __('Save directly to WordPress media', 'mxchat'),
246 ),
247 ),
248 ),
249
250 'mxchat-image-analysis' => array(
251 'title' => __('MxChat Image Analysis', 'mxchat'),
252 'description' => __('Enhance your chatbot with AI-powered image analysis. Users can upload images for intelligent descriptions, OCR text extraction, and get answers about visual content using OpenAI Vision and Grok APIs.', 'mxchat'),
253 'key_benefits' => array(
254 __('Multiple AI vision models', 'mxchat'),
255 __('Drag & drop image uploads', 'mxchat'),
256 __('Custom analysis prompts', 'mxchat')
257 ),
258 'license' => 'MxChat PRO',
259 'accent' => '#fa73e6',
260 'url' => 'https://mxchat.ai/add-ons/mxchat-vision/',
261 'plugin_file' => 'mxchat-vision/mxchat-vision.php',
262 'config_page' => 'mxchat-vision',
263 'hero_features' => array(
264 array(
265 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',
266 'title' => __('Vision AI Models', 'mxchat'),
267 'desc' => __('OpenAI Vision & Grok analysis', 'mxchat'),
268 ),
269 array(
270 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 16 12 12 8 16"/><line x1="12" y1="12" x2="12" y2="21"/><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"/></svg>',
271 'title' => __('Drag & Drop', 'mxchat'),
272 'desc' => __('Easy image upload in chat', 'mxchat'),
273 ),
274 array(
275 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" 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"/></svg>',
276 'title' => __('OCR Extraction', 'mxchat'),
277 'desc' => __('Extract text from images', 'mxchat'),
278 ),
279 array(
280 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="4" y1="21" x2="4" y2="14"/><line x1="4" y1="10" x2="4" y2="3"/><line x1="12" y1="21" x2="12" y2="12"/><line x1="12" y1="8" x2="12" y2="3"/><line x1="20" y1="21" x2="20" y2="16"/><line x1="20" y1="12" x2="20" y2="3"/><line x1="1" y1="14" x2="7" y2="14"/><line x1="9" y1="8" x2="15" y2="8"/><line x1="17" y1="16" x2="23" y2="16"/></svg>',
281 'title' => __('Custom Prompts', 'mxchat'),
282 'desc' => __('Tailor analysis instructions', 'mxchat'),
283 ),
284 ),
285 ),
286
287 'mxchat-forms' => array(
288 'title' => __('MxChat Forms', 'mxchat'),
289 'description' => __('Convert conversations into data collection. Create smart forms that trigger during chats, collect user information, and turn casual visitors into qualified leads.', 'mxchat'),
290 'key_benefits' => array(
291 __('No-code form builder', 'mxchat'),
292 __('Intent-triggered activation', 'mxchat'),
293 __('Export lead data easily', 'mxchat')
294 ),
295 'license' => 'MxChat PRO',
296 'accent' => '#fa73e6',
297 'url' => 'https://mxchat.ai/add-ons/mxchat-forms/',
298 'plugin_file' => 'mxchat-forms/mxchat-forms.php',
299 'config_page' => 'mxchat-forms',
300 'hero_features' => array(
301 array(
302 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><line x1="9" y1="9" x2="15" y2="9"/><line x1="9" y1="13" x2="15" y2="13"/><line x1="9" y1="17" x2="12" y2="17"/></svg>',
303 'title' => __('Form Builder', 'mxchat'),
304 'desc' => __('No-code drag & drop builder', 'mxchat'),
305 ),
306 array(
307 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg>',
308 'title' => __('Smart Triggers', 'mxchat'),
309 'desc' => __('Show forms based on intent', 'mxchat'),
310 ),
311 array(
312 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>',
313 'title' => __('Lead Capture', 'mxchat'),
314 'desc' => __('Turn visitors into contacts', 'mxchat'),
315 ),
316 array(
317 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" 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>',
318 'title' => __('Data Export', 'mxchat'),
319 'desc' => __('Export leads to CSV easily', 'mxchat'),
320 ),
321 ),
322 ),
323
324 'mxchat-multi-bot' => array(
325 'title' => __('MxChat Multi-Bot Manager', 'mxchat'),
326 'description' => __('Create unlimited specialized chatbots for every purpose. Deploy dedicated bots with separate knowledge bases, custom personalities, and page-specific assignments—perfect for support, sales, and department-specific assistance.', 'mxchat'),
327 'key_benefits' => array(
328 __('Unlimited specialized chatbots', 'mxchat'),
329 __('Separate Pinecone knowledge bases', 'mxchat'),
330 __('Page-specific bot assignments', 'mxchat')
331 ),
332 'license' => 'MxChat PRO',
333 'accent' => '#8b5cf6',
334 'url' => 'https://mxchat.ai/add-ons/mxchat-multi-bot/',
335 'plugin_file' => 'mxchat-multi-bot/mxchat-multi-bot.php',
336 'config_page' => 'mxchat-multi-bot',
337 'hero_features' => array(
338 array(
339 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>',
340 'title' => __('Unlimited Bots', 'mxchat'),
341 'desc' => __('Create specialized chatbots', 'mxchat'),
342 ),
343 array(
344 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"/><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"/></svg>',
345 'title' => __('Separate Knowledge', 'mxchat'),
346 'desc' => __('Unique knowledge per bot', 'mxchat'),
347 ),
348 array(
349 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" 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"/></svg>',
350 'title' => __('Page Assignments', 'mxchat'),
351 'desc' => __('Assign bots to specific pages', 'mxchat'),
352 ),
353 array(
354 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>',
355 'title' => __('Custom Personas', 'mxchat'),
356 'desc' => __('Unique personality per bot', 'mxchat'),
357 ),
358 ),
359 ),
360
361 'mxchat-trigger' => array(
362 'title' => __('MxChat Trigger', 'mxchat'),
363 'description' => __('Turn any element into a conversation starter. Add chat trigger buttons and links throughout your website that open MxChat and send predefined messages—perfect for CTAs, support links, and guided experiences.', 'mxchat'),
364 'key_benefits' => array(
365 __('Simple data attribute triggers', 'mxchat'),
366 __('Multi-Bot targeting support', 'mxchat'),
367 __('Built-in button styles & animations', 'mxchat')
368 ),
369 'license' => 'MxChat PRO',
370 'accent' => '#3ac9d1',
371 'url' => 'https://mxchat.ai/add-ons/mxchat-trigger/',
372 'plugin_file' => 'mxchat-trigger/mxchat-trigger.php',
373 'config_page' => 'mxchat-triggers',
374 'hero_features' => array(
375 array(
376 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="16"/><line x1="8" y1="12" x2="16" y2="12"/></svg>',
377 'title' => __('Element Triggers', 'mxchat'),
378 'desc' => __('Turn any element into a trigger', 'mxchat'),
379 ),
380 array(
381 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>',
382 'title' => __('Preset Messages', 'mxchat'),
383 'desc' => __('Auto-send predefined prompts', 'mxchat'),
384 ),
385 array(
386 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>',
387 'title' => __('Multi-Bot Targeting', 'mxchat'),
388 'desc' => __('Route to specific bots', 'mxchat'),
389 ),
390 array(
391 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><path d="M12 8v8"/><path d="M8 12h8"/></svg>',
392 'title' => __('Button Styles', 'mxchat'),
393 'desc' => __('Built-in styles & animations', 'mxchat'),
394 ),
395 ),
396 ),
397
398 'mxchat-anywhere' => array(
399 'title' => __('MxChat Anywhere', 'mxchat'),
400 'sidebar_title' => __('MxChat Anywhere', 'mxchat'),
401 'description' => __('Deploy your AI chatbot on any website with a single script tag. Works on static HTML, Shopify, Squarespace, Wix, and custom web apps — no WordPress required on the target site. Full feature parity with Shadow DOM style isolation.', 'mxchat'),
402 'key_benefits' => array(
403 __('One script tag — works on any website', 'mxchat'),
404 __('Shadow DOM prevents CSS conflicts', 'mxchat'),
405 __('Domain-validated security keys', 'mxchat')
406 ),
407 'license' => 'MxChat PRO',
408 'accent' => '#10b981',
409 'url' => 'https://mxchat.ai/add-ons/mxchat-embed/',
410 'download_url' => 'https://mxchat.ai/add-ons/mxchat-embed/',
411 'plugin_file' => 'mxchat-embed/mxchat-embed.php',
412 'config_page' => 'mxchat-embed',
413 'hero_features' => array(
414 array(
415 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/></svg>',
416 'title' => __('Universal Embed', 'mxchat'),
417 'desc' => __('One script tag on any website', 'mxchat'),
418 ),
419 array(
420 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>',
421 'title' => __('Style Isolation', 'mxchat'),
422 'desc' => __('Shadow DOM prevents CSS conflicts', 'mxchat'),
423 ),
424 array(
425 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>',
426 'title' => __('Domain Security', 'mxchat'),
427 'desc' => __('Validated keys per domain', 'mxchat'),
428 ),
429 array(
430 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg>',
431 'title' => __('Zero Dependencies', 'mxchat'),
432 'desc' => __('Vanilla JS, no impact on Core Web Vitals', 'mxchat'),
433 ),
434 ),
435 ),
436
437 'mxchat-woo' => array(
438 'title' => __('MxChat WooCommerce', 'mxchat'),
439 'description' => __('Boost sales with AI-powered shopping assistance. Help customers find products, manage carts, and complete purchases—all through natural conversation.', 'mxchat'),
440 'key_benefits' => array(
441 __('Smart product recommendations', 'mxchat'),
442 __('Cart & checkout assistance', 'mxchat'),
443 __('Order history access', 'mxchat')
444 ),
445 'license' => 'MxChat PRO',
446 'accent' => '#fa73e6',
447 'url' => 'https://mxchat.ai/add-ons/mxchat-woo/',
448 'plugin_file' => 'mxchat-woo/mxchat-woo.php',
449 'config_page' => 'mxchat-woo',
450 'hero_features' => array(
451 array(
452 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"/></svg>',
453 'title' => __('Cart Assistant', 'mxchat'),
454 'desc' => __('Manage cart through conversation', 'mxchat'),
455 ),
456 array(
457 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/></svg>',
458 'title' => __('Product Search', 'mxchat'),
459 'desc' => __('Smart product recommendations', 'mxchat'),
460 ),
461 array(
462 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="1" y="4" width="22" height="16" rx="2" ry="2"/><line x1="1" y1="10" x2="23" y2="10"/></svg>',
463 'title' => __('Checkout Help', 'mxchat'),
464 'desc' => __('Guide customers to purchase', 'mxchat'),
465 ),
466 array(
467 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" 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>',
468 'title' => __('Order History', 'mxchat'),
469 'desc' => __('Look up past orders in chat', 'mxchat'),
470 ),
471 ),
472 ),
473
474 'mxchat-perplexity' => array(
475 'title' => __('MxChat Perplexity', 'mxchat'),
476 'description' => __('Give your chatbot real-time knowledge. Add powerful web search capabilities so your bot can answer questions about current events and time-sensitive information.', 'mxchat'),
477 'key_benefits' => array(
478 __('Real-time web search', 'mxchat'),
479 __('Intent-triggered research', 'mxchat'),
480 __('Up-to-date information', 'mxchat')
481 ),
482 'license' => 'MxChat PRO',
483 'accent' => '#fa73e6',
484 'url' => 'https://mxchat.ai/add-ons/mxchat-perplexity/',
485 'plugin_file' => 'mxchat-perplexity/mxchat-perplexity.php',
486 'config_page' => 'mxchat-perplexity',
487 'hero_features' => array(
488 array(
489 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/></svg>',
490 'title' => __('Web Search', 'mxchat'),
491 'desc' => __('Real-time internet searching', 'mxchat'),
492 ),
493 array(
494 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg>',
495 'title' => __('Intent Triggers', 'mxchat'),
496 'desc' => __('Auto-search when needed', 'mxchat'),
497 ),
498 array(
499 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>',
500 'title' => __('Live Data', 'mxchat'),
501 'desc' => __('Up-to-date information always', 'mxchat'),
502 ),
503 array(
504 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>',
505 'title' => __('Seamless Chat', 'mxchat'),
506 'desc' => __('Results blend into conversation', 'mxchat'),
507 ),
508 ),
509 ),
510
511 'mxchat-moderation' => array(
512 'title' => __('MxChat Moderation', 'mxchat'),
513 'description' => __('Keep your chat clean and professional. Block unwanted users, filter inappropriate content, and ensure your chatbot represents your brand properly.', 'mxchat'),
514 'key_benefits' => array(
515 __('IP & email-based blocking', 'mxchat'),
516 __('Content filtering', 'mxchat'),
517 __('Spam protection', 'mxchat')
518 ),
519 'license' => 'MxChat PRO',
520 'accent' => '#fa73e6',
521 'url' => 'https://mxchat.ai/add-ons/mxchat-moderation/',
522 'plugin_file' => 'mxchat-moderation/mx-chat-moderation.php',
523 'config_page' => 'mx-chat-moderation',
524 'hero_features' => array(
525 array(
526 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>',
527 'title' => __('Content Filter', 'mxchat'),
528 'desc' => __('Block inappropriate content', 'mxchat'),
529 ),
530 array(
531 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="4.93" y1="4.93" x2="19.07" y2="19.07"/></svg>',
532 'title' => __('User Blocking', 'mxchat'),
533 'desc' => __('IP & email-based bans', 'mxchat'),
534 ),
535 array(
536 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/></svg>',
537 'title' => __('Spam Protection', 'mxchat'),
538 'desc' => __('Detect and prevent spam', 'mxchat'),
539 ),
540 array(
541 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="8.5" cy="7" r="4"/><line x1="20" y1="8" x2="20" y2="14"/><line x1="23" y1="11" x2="17" y2="11"/></svg>',
542 'title' => __('Brand Safety', 'mxchat'),
543 'desc' => __('Keep chat professional', 'mxchat'),
544 ),
545 ),
546 ),
547
548 'mxchat-migration-tool' => array(
549 'title' => __('MxChat Migration Tool', 'mxchat'),
550 'description' => __('Move your knowledge base safely between embedding models and vector databases. Re-embed existing content when switching models, migrate between WordPress and Pinecone storage, and export your knowledge base for backup.', 'mxchat'),
551 'key_benefits' => array(
552 __('Re-embed when switching models', 'mxchat'),
553 __('WordPress ↔ Pinecone migration', 'mxchat'),
554 __('Knowledge base export', 'mxchat')
555 ),
556 'license' => 'MxChat PRO',
557 'accent' => '#fa73e6',
558 'url' => 'https://mxchat.ai/add-ons/mxchat-migration-tool/',
559 'plugin_file' => 'mxchat-migration-tool/mxchat-migration-tool.php',
560 'config_page' => 'mxchat-migration',
561 'hero_features' => array(
562 array(
563 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 3 21 3 21 8"/><line x1="4" y1="20" x2="21" y2="3"/><polyline points="21 16 21 21 16 21"/><line x1="15" y1="15" x2="21" y2="21"/><line x1="4" y1="4" x2="9" y2="9"/></svg>',
564 'title' => __('Model Migration', 'mxchat'),
565 'desc' => __('Re-embed for a new model', 'mxchat'),
566 ),
567 array(
568 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"/><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"/></svg>',
569 'title' => __('Database Moves', 'mxchat'),
570 'desc' => __('WordPress ↔ Pinecone', 'mxchat'),
571 ),
572 array(
573 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" 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>',
574 'title' => __('KB Export', 'mxchat'),
575 'desc' => __('Back up as JSON or text', 'mxchat'),
576 ),
577 array(
578 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="22 12 16 12 14 15 10 9 8 12 2 12"/></svg>',
579 'title' => __('Progress Tracking', 'mxchat'),
580 'desc' => __('Batched with live status', 'mxchat'),
581 ),
582 ),
583 ),
584
585 );
586 }
587
588 /**
589 * Get the addons configuration array
590 *
591 * @return array The addons configuration
592 */
593 public function get_addons_config() {
594 return $this->addons_config;
595 }
596
597 /**
598 * Register the stylesheets for the admin area.
599 */
600 public function enqueue_styles() {
601 wp_enqueue_style(
602 'mxchat-addons',
603 plugin_dir_url(__FILE__) . '../css/admin-add-ons.css',
604 array(),
605 MXCHAT_VERSION,
606 'all'
607 );
608 }
609
610 /**
611 * Check if an addon is installed and active
612 *
613 * @param string $plugin_file The plugin's main file path
614 * @return array Status information
615 */
616 private function get_addon_status($plugin_file) {
617 if (!function_exists('get_plugins')) {
618 require_once ABSPATH . 'wp-admin/includes/plugin.php';
619 }
620
621 $all_plugins = get_plugins();
622 $active_plugins = get_option('active_plugins', array());
623
624 // Find the addon by iterating through configs
625 $config_page = '';
626 foreach ($this->addons_config as $slug => $addon) {
627 if ($addon['plugin_file'] === $plugin_file) {
628 $config_page = $addon['config_page'];
629 break;
630 }
631 }
632
633 if (isset($all_plugins[$plugin_file])) {
634 if (in_array($plugin_file, $active_plugins)) {
635 return array(
636 'status' => 'active',
637 'action_url' => admin_url('admin.php?page=' . $config_page),
638 'action_text' => __('Configure', 'mxchat')
639 );
640 } else {
641 return array(
642 'status' => 'inactive',
643 'action_url' => wp_nonce_url(
644 admin_url('plugins.php?action=activate&plugin=' . $plugin_file),
645 'activate-plugin_' . $plugin_file
646 ),
647 'action_text' => __('Activate', 'mxchat')
648 );
649 }
650 }
651
652 return array(
653 'status' => 'not-installed',
654 'action_url' => '',
655 'action_text' => __('Get Extension', 'mxchat')
656 );
657 }
658
659 /**
660 * Render the Add Ons page content.
661 */
662 public function render_page() {
663 $this->enqueue_styles();
664 // Remove the sorting logic and just use the original order
665 $sorted_addons = $this->addons_config;
666
667 ?>
668 <div class="wrap mxchat-addons-wrapper">
669 <div class="mxchat-addons-hero">
670 <h1 class="mxchat-main-title">
671 <span class="mxchat-gradient-text">Power Up</span> Your Chatbot
672 </h1>
673 <p class="mxchat-hero-subtitle">
674 <?php esc_html_e('Extend MxChat with these powerful extensions and unlock advanced features.', 'mxchat'); ?>
675 </p>
676 </div>
677
678 <div class="mxchat-addons-section">
679 <div class="mxchat-addons-grid">
680 <?php foreach ($sorted_addons as $slug => $addon): ?>
681 <?php $this->render_addon_card($slug, $addon); ?>
682 <?php endforeach; ?>
683 </div>
684 </div>
685
686 <div class="mxchat-cta-section">
687 <h2><?php esc_html_e('Ready to take your chatbot to the next level?', 'mxchat'); ?></h2>
688 <p><?php esc_html_e('Get MxChat PRO today and access all premium extensions at one low price.', 'mxchat'); ?></p>
689 <a href="https://mxchat.ai/" class="mxchat-cta-button" target="_blank"><?php esc_html_e('Learn More', 'mxchat'); ?></a>
690 </div>
691 </div>
692 <?php
693 }
694
695 /**
696 * Render individual add-on card
697 *
698 * @param string $slug The addon slug
699 * @param array $addon The addon configuration array
700 */
701 private function render_addon_card($slug, $addon) {
702 $status_info = $this->get_addon_status($addon['plugin_file']);
703 $button_url = $status_info['status'] === 'not-installed' ? $addon['url'] : $status_info['action_url'];
704 $button_target = $status_info['status'] === 'not-installed' ? '_blank' : '_self';
705
706 // Check if addon is deprecated
707 $is_deprecated = isset($addon['status']) && $addon['status'] === 'deprecated';
708 ?>
709 <div class="mxchat-addon-card <?php echo $is_deprecated ? 'deprecated' : ''; ?>" style="--card-accent: <?php echo esc_attr($addon['accent']); ?>">
710 <div class="mxchat-addon-badge">
711 <?php if ($is_deprecated): ?>
712 <?php esc_html_e('Deprecated', 'mxchat'); ?>
713 <?php else: ?>
714 <?php echo esc_html(ucfirst($addon['license'])); ?>
715 <?php endif; ?>
716 </div>
717 <div class="mxchat-addon-content">
718 <h3 class="mxchat-addon-title"><?php echo esc_html($addon['title']); ?></h3>
719 <p class="mxchat-addon-description"><?php echo esc_html($addon['description']); ?></p>
720
721 <?php if (!empty($addon['key_benefits'])): ?>
722 <div class="mxchat-benefits-list">
723 <?php foreach ($addon['key_benefits'] as $benefit): ?>
724 <div class="mxchat-benefit-item">
725 <span class="mxchat-benefit-icon"></span>
726 <?php echo esc_html($benefit); ?>
727 </div>
728 <?php endforeach; ?>
729 </div>
730 <?php endif; ?>
731
732 <div class="mxchat-addon-footer">
733 <?php if ($is_deprecated): ?>
734 <div class="mxchat-status-indicator deprecated">
735 <?php esc_html_e('Now Built-in', 'mxchat'); ?>
736 </div>
737 <a href="<?php echo esc_url(admin_url('admin.php?page=mxchat-prompts')); ?>"
738 class="mxchat-action-button deprecated"
739 target="_self">
740 <?php esc_html_e('Go to Knowledge Tab', 'mxchat'); ?>
741 </a>
742 <?php else: ?>
743 <div class="mxchat-status-indicator <?php echo esc_attr($status_info['status']); ?>">
744 <?php echo esc_html(ucfirst(str_replace('-', ' ', $status_info['status']))); ?>
745 </div>
746 <a href="<?php echo esc_url($button_url); ?>"
747 class="mxchat-action-button"
748 target="<?php echo esc_attr($button_target); ?>"
749 data-action="<?php echo esc_attr($status_info['status']); ?>">
750 <?php echo esc_html($status_info['action_text']); ?>
751 </a>
752 <?php endif; ?>
753 </div>
754 </div>
755 </div>
756 <?php
757 }
758
759 }