PluginProbe
MxChat – AI Chatbot & Content Generation for WordPress / 3.2.24
MxChat – AI Chatbot & Content Generation for WordPress v3.2.24
3.2.25 3.2.24 3.2.23 3.2.22 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 All 156 releases
mxchat-basic / includes / class-mxchat-addons.php

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

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