addons_config = array( 'mxchat-advanced-content' => array( 'title' => __('MxChat Advanced Content Editor', 'mxchat'), 'sidebar_title' => __('Content Gen.', 'mxchat'), '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'), 'key_benefits' => array( __('AI-powered image regeneration & uploads', 'mxchat'), __('SEO meta title, description & excerpt editor', 'mxchat'), __('Automatic internal linking between posts', 'mxchat') ), 'license' => 'MxChat PRO', 'accent' => '#6366f1', 'url' => 'https://mxchat.ai/documentation-bot/', 'download_url' => 'https://mxchat.ai/advanced-content-editor/', 'plugin_file' => 'mxchat-advanced-content/mxchat-advanced-content.php', 'config_page' => 'mxchat-content', 'hero_features' => array( array( 'icon' => '', 'title' => __('Image Management', 'mxchat'), 'desc' => __('Regenerate, upload, and swap AI images', 'mxchat'), ), array( 'icon' => '', 'title' => __('SEO Meta Editor', 'mxchat'), 'desc' => __('Title, description & excerpt controls', 'mxchat'), ), array( 'icon' => '', 'title' => __('Internal Linking', 'mxchat'), 'desc' => __('Auto-link to related posts & pages', 'mxchat'), ), array( 'icon' => '', 'title' => __('Chat-Based Editing', 'mxchat'), 'desc' => __('Refine content through conversation', 'mxchat'), ), ), ), 'mxchat-theme' => array( 'title' => __('MxChat Chat Themes', 'mxchat'), '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'), 'key_benefits' => array( __('AI-powered theme generator', 'mxchat'), __('Live preview customizer', 'mxchat'), __('One-click theme application', 'mxchat') ), 'license' => 'MxChat PRO', 'accent' => '#fa73e6', 'url' => 'https://mxchat.ai/ai-theme-customizer/', 'plugin_file' => 'mxchat-theme/mxchat-theme.php', 'config_page' => 'mxchat-theme-settings', 'hero_features' => array( array( 'icon' => '', 'title' => __('AI Theme Generator', 'mxchat'), 'desc' => __('Describe your style, AI creates it', 'mxchat'), ), array( 'icon' => '', 'title' => __('Live Preview', 'mxchat'), 'desc' => __('See changes in real-time', 'mxchat'), ), array( 'icon' => '', 'title' => __('Color Controls', 'mxchat'), 'desc' => __('Fine-tune every color precisely', 'mxchat'), ), array( 'icon' => '', 'title' => __('One-Click Apply', 'mxchat'), 'desc' => __('Apply themes instantly', 'mxchat'), ), ), ), 'mxchat-admin-assistant' => array( 'title' => __('MxChat Admin Assistant', 'mxchat'), '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'), 'key_benefits' => array( __('ChatGPT-like admin interface', 'mxchat'), __('Generate images & research web', 'mxchat'), __('Searchable chat history', 'mxchat') ), 'license' => 'MxChat PRO', 'accent' => '#fa73e6', 'url' => 'https://mxchat.ai/ai-admin-assistant/', 'plugin_file' => 'mxchat-admin-chat/mxchat-admin-chat.php', 'config_page' => 'mxchat-admin-chat', 'hero_features' => array( array( 'icon' => '', 'title' => __('Admin Chat UI', 'mxchat'), 'desc' => __('ChatGPT-like dashboard interface', 'mxchat'), ), array( 'icon' => '', 'title' => __('Image Generation', 'mxchat'), 'desc' => __('Create images with AI prompts', 'mxchat'), ), array( 'icon' => '', 'title' => __('Web Research', 'mxchat'), 'desc' => __('Search the web from your dashboard', 'mxchat'), ), array( 'icon' => '', 'title' => __('Chat History', 'mxchat'), 'desc' => __('Searchable conversation archive', 'mxchat'), ), ), ), 'mxchat-veo' => array( 'title' => __('MxChat Video Generation', 'mxchat'), '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'), 'key_benefits' => array( __('Multiple Veo models (Veo 2, 3, 3 Fast)', 'mxchat'), __('8-second videos with native audio', 'mxchat'), __('Media library integration', 'mxchat') ), 'license' => 'MxChat PRO', 'accent' => '#ff6b35', 'url' => 'https://mxchat.ai/mxchat-veo-video-generation/', 'plugin_file' => 'mxchat-veo/mxchat-veo.php', 'config_page' => 'mxchat-veo', 'hero_features' => array( array( 'icon' => '', 'title' => __('AI Video Creation', 'mxchat'), 'desc' => __('Generate videos from text prompts', 'mxchat'), ), array( 'icon' => '', 'title' => __('Native Audio', 'mxchat'), 'desc' => __('Videos with built-in audio tracks', 'mxchat'), ), array( 'icon' => '', 'title' => __('Aspect Ratios', 'mxchat'), 'desc' => __('Multiple size options available', 'mxchat'), ), array( 'icon' => '', 'title' => __('Media Library', 'mxchat'), 'desc' => __('Save directly to WordPress media', 'mxchat'), ), ), ), 'mxchat-image-analysis' => array( 'title' => __('MxChat Image Analysis', 'mxchat'), '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'), 'key_benefits' => array( __('Multiple AI vision models', 'mxchat'), __('Drag & drop image uploads', 'mxchat'), __('Custom analysis prompts', 'mxchat') ), 'license' => 'MxChat PRO', 'accent' => '#fa73e6', 'url' => 'https://mxchat.ai/image-analysis/', 'plugin_file' => 'mxchat-vision/mxchat-vision.php', 'config_page' => 'mxchat-vision', 'hero_features' => array( array( 'icon' => '', 'title' => __('Vision AI Models', 'mxchat'), 'desc' => __('OpenAI Vision & Grok analysis', 'mxchat'), ), array( 'icon' => '', 'title' => __('Drag & Drop', 'mxchat'), 'desc' => __('Easy image upload in chat', 'mxchat'), ), array( 'icon' => '', 'title' => __('OCR Extraction', 'mxchat'), 'desc' => __('Extract text from images', 'mxchat'), ), array( 'icon' => '', 'title' => __('Custom Prompts', 'mxchat'), 'desc' => __('Tailor analysis instructions', 'mxchat'), ), ), ), 'mxchat-forms' => array( 'title' => __('MxChat Forms', 'mxchat'), 'description' => __('Convert conversations into data collection. Create smart forms that trigger during chats, collect user information, and turn casual visitors into qualified leads.', 'mxchat'), 'key_benefits' => array( __('No-code form builder', 'mxchat'), __('Intent-triggered activation', 'mxchat'), __('Export lead data easily', 'mxchat') ), 'license' => 'MxChat PRO', 'accent' => '#fa73e6', 'url' => 'https://mxchat.ai/forms-action/', 'plugin_file' => 'mxchat-forms/mxchat-forms.php', 'config_page' => 'mxchat-forms', 'hero_features' => array( array( 'icon' => '', 'title' => __('Form Builder', 'mxchat'), 'desc' => __('No-code drag & drop builder', 'mxchat'), ), array( 'icon' => '', 'title' => __('Smart Triggers', 'mxchat'), 'desc' => __('Show forms based on intent', 'mxchat'), ), array( 'icon' => '', 'title' => __('Lead Capture', 'mxchat'), 'desc' => __('Turn visitors into contacts', 'mxchat'), ), array( 'icon' => '', 'title' => __('Data Export', 'mxchat'), 'desc' => __('Export leads to CSV easily', 'mxchat'), ), ), ), 'mxchat-multi-bot' => array( 'title' => __('MxChat Multi-Bot Manager', 'mxchat'), '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'), 'key_benefits' => array( __('Unlimited specialized chatbots', 'mxchat'), __('Separate Pinecone knowledge bases', 'mxchat'), __('Page-specific bot assignments', 'mxchat') ), 'license' => 'MxChat PRO', 'accent' => '#8b5cf6', 'url' => 'https://mxchat.ai/multi-bot/', 'plugin_file' => 'mxchat-multi-bot/mxchat-multi-bot.php', 'config_page' => 'mxchat-multi-bot', 'hero_features' => array( array( 'icon' => '', 'title' => __('Unlimited Bots', 'mxchat'), 'desc' => __('Create specialized chatbots', 'mxchat'), ), array( 'icon' => '', 'title' => __('Separate Knowledge', 'mxchat'), 'desc' => __('Unique knowledge per bot', 'mxchat'), ), array( 'icon' => '', 'title' => __('Page Assignments', 'mxchat'), 'desc' => __('Assign bots to specific pages', 'mxchat'), ), array( 'icon' => '', 'title' => __('Custom Personas', 'mxchat'), 'desc' => __('Unique personality per bot', 'mxchat'), ), ), ), 'mxchat-trigger' => array( 'title' => __('MxChat Trigger', 'mxchat'), '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'), 'key_benefits' => array( __('Simple data attribute triggers', 'mxchat'), __('Multi-Bot targeting support', 'mxchat'), __('Built-in button styles & animations', 'mxchat') ), 'license' => 'MxChat PRO', 'accent' => '#3ac9d1', 'url' => 'https://mxchat.ai/triggers/', 'plugin_file' => 'mxchat-trigger/mxchat-trigger.php', 'config_page' => 'mxchat-triggers', 'hero_features' => array( array( 'icon' => '', 'title' => __('Element Triggers', 'mxchat'), 'desc' => __('Turn any element into a trigger', 'mxchat'), ), array( 'icon' => '', 'title' => __('Preset Messages', 'mxchat'), 'desc' => __('Auto-send predefined prompts', 'mxchat'), ), array( 'icon' => '', 'title' => __('Multi-Bot Targeting', 'mxchat'), 'desc' => __('Route to specific bots', 'mxchat'), ), array( 'icon' => '', 'title' => __('Button Styles', 'mxchat'), 'desc' => __('Built-in styles & animations', 'mxchat'), ), ), ), 'mxchat-anywhere' => array( 'title' => __('MxChat Anywhere', 'mxchat'), 'sidebar_title' => __('MxChat Anywhere', 'mxchat'), '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'), 'key_benefits' => array( __('One script tag — works on any website', 'mxchat'), __('Shadow DOM prevents CSS conflicts', 'mxchat'), __('Domain-validated security keys', 'mxchat') ), 'license' => 'MxChat PRO', 'accent' => '#10b981', 'url' => 'https://mxchat.ai/mxchat-anywhere-deploy-your-ai-chatbot-on-any-website-with-one-script-tag/', 'download_url' => 'https://mxchat.ai/mxchat-anywhere-deploy-your-ai-chatbot-on-any-website-with-one-script-tag/', 'plugin_file' => 'mxchat-embed/mxchat-embed.php', 'config_page' => 'mxchat-embed', 'hero_features' => array( array( 'icon' => '', 'title' => __('Universal Embed', 'mxchat'), 'desc' => __('One script tag on any website', 'mxchat'), ), array( 'icon' => '', 'title' => __('Style Isolation', 'mxchat'), 'desc' => __('Shadow DOM prevents CSS conflicts', 'mxchat'), ), array( 'icon' => '', 'title' => __('Domain Security', 'mxchat'), 'desc' => __('Validated keys per domain', 'mxchat'), ), array( 'icon' => '', 'title' => __('Zero Dependencies', 'mxchat'), 'desc' => __('Vanilla JS, no impact on Core Web Vitals', 'mxchat'), ), ), ), 'mxchat-woo' => array( 'title' => __('MxChat WooCommerce', 'mxchat'), 'description' => __('Boost sales with AI-powered shopping assistance. Help customers find products, manage carts, and complete purchases—all through natural conversation.', 'mxchat'), 'key_benefits' => array( __('Smart product recommendations', 'mxchat'), __('Cart & checkout assistance', 'mxchat'), __('Order history access', 'mxchat') ), 'license' => 'MxChat PRO', 'accent' => '#fa73e6', 'url' => 'https://mxchat.ai/woocommerce/', 'plugin_file' => 'mxchat-woo/mxchat-woo.php', 'config_page' => 'mxchat-woo', 'hero_features' => array( array( 'icon' => '', 'title' => __('Cart Assistant', 'mxchat'), 'desc' => __('Manage cart through conversation', 'mxchat'), ), array( 'icon' => '', 'title' => __('Product Search', 'mxchat'), 'desc' => __('Smart product recommendations', 'mxchat'), ), array( 'icon' => '', 'title' => __('Checkout Help', 'mxchat'), 'desc' => __('Guide customers to purchase', 'mxchat'), ), array( 'icon' => '', 'title' => __('Order History', 'mxchat'), 'desc' => __('Look up past orders in chat', 'mxchat'), ), ), ), 'mxchat-assistant-api' => array( 'title' => __('MxChat Assistant API', 'mxchat'), 'description' => __('Unlock the full power of OpenAI Assistants. Bypass MxChat\'s knowledge base and connect directly to your custom OpenAI Assistant for advanced AI capabilities and specialized responses.', 'mxchat'), 'key_benefits' => array( __('Custom OpenAI Assistant integration', 'mxchat'), __('Advanced AI capabilities', 'mxchat'), __('24-hour conversation persistence', 'mxchat') ), 'license' => 'MxChat PRO', 'accent' => '#00d4aa', 'url' => 'https://mxchat.ai/openai-assistants-api/', 'plugin_file' => 'mxchat-assistant-api/mxchat-assistant-api.php', 'config_page' => 'mxchat-assistant-api', 'hero_features' => array( array( 'icon' => '', 'title' => __('OpenAI Assistants', 'mxchat'), 'desc' => __('Connect your custom Assistant', 'mxchat'), ), array( 'icon' => '', 'title' => __('Advanced AI', 'mxchat'), 'desc' => __('Full Assistant API capabilities', 'mxchat'), ), array( 'icon' => '', 'title' => __('24hr Persistence', 'mxchat'), 'desc' => __('Conversations persist all day', 'mxchat'), ), array( 'icon' => '', 'title' => __('Direct Connect', 'mxchat'), 'desc' => __('Bypass MxChat knowledge base', 'mxchat'), ), ), ), 'mxchat-perplexity' => array( 'title' => __('MxChat Perplexity', 'mxchat'), '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'), 'key_benefits' => array( __('Real-time web search', 'mxchat'), __('Intent-triggered research', 'mxchat'), __('Up-to-date information', 'mxchat') ), 'license' => 'MxChat PRO', 'accent' => '#fa73e6', 'url' => 'https://quickdeploywp.com/plugin/mxchat-perplexity/', 'plugin_file' => 'mxchat-perplexity/mxchat-perplexity.php', 'config_page' => 'mxchat-perplexity', 'hero_features' => array( array( 'icon' => '', 'title' => __('Web Search', 'mxchat'), 'desc' => __('Real-time internet searching', 'mxchat'), ), array( 'icon' => '', 'title' => __('Intent Triggers', 'mxchat'), 'desc' => __('Auto-search when needed', 'mxchat'), ), array( 'icon' => '', 'title' => __('Live Data', 'mxchat'), 'desc' => __('Up-to-date information always', 'mxchat'), ), array( 'icon' => '', 'title' => __('Seamless Chat', 'mxchat'), 'desc' => __('Results blend into conversation', 'mxchat'), ), ), ), 'mxchat-moderation' => array( 'title' => __('MxChat Moderation', 'mxchat'), 'description' => __('Keep your chat clean and professional. Block unwanted users, filter inappropriate content, and ensure your chatbot represents your brand properly.', 'mxchat'), 'key_benefits' => array( __('IP & email-based blocking', 'mxchat'), __('Content filtering', 'mxchat'), __('Spam protection', 'mxchat') ), 'license' => 'MxChat PRO', 'accent' => '#fa73e6', 'url' => 'https://quickdeploywp.com/plugin/mxchat-moderation/', 'plugin_file' => 'mxchat-moderation/mx-chat-moderation.php', 'config_page' => 'mx-chat-moderation', 'hero_features' => array( array( 'icon' => '', 'title' => __('Content Filter', 'mxchat'), 'desc' => __('Block inappropriate content', 'mxchat'), ), array( 'icon' => '', 'title' => __('User Blocking', 'mxchat'), 'desc' => __('IP & email-based bans', 'mxchat'), ), array( 'icon' => '', 'title' => __('Spam Protection', 'mxchat'), 'desc' => __('Detect and prevent spam', 'mxchat'), ), array( 'icon' => '', 'title' => __('Brand Safety', 'mxchat'), 'desc' => __('Keep chat professional', 'mxchat'), ), ), ), ); } /** * Get the addons configuration array * * @return array The addons configuration */ public function get_addons_config() { return $this->addons_config; } /** * Register the stylesheets for the admin area. */ public function enqueue_styles() { wp_enqueue_style( 'mxchat-addons', plugin_dir_url(__FILE__) . '../css/admin-add-ons.css', array(), MXCHAT_VERSION, 'all' ); } /** * Check if an addon is installed and active * * @param string $plugin_file The plugin's main file path * @return array Status information */ private function get_addon_status($plugin_file) { if (!function_exists('get_plugins')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $all_plugins = get_plugins(); $active_plugins = get_option('active_plugins', array()); // Find the addon by iterating through configs $config_page = ''; foreach ($this->addons_config as $slug => $addon) { if ($addon['plugin_file'] === $plugin_file) { $config_page = $addon['config_page']; break; } } if (isset($all_plugins[$plugin_file])) { if (in_array($plugin_file, $active_plugins)) { return array( 'status' => 'active', 'action_url' => admin_url('admin.php?page=' . $config_page), 'action_text' => __('Configure', 'mxchat') ); } else { return array( 'status' => 'inactive', 'action_url' => wp_nonce_url( admin_url('plugins.php?action=activate&plugin=' . $plugin_file), 'activate-plugin_' . $plugin_file ), 'action_text' => __('Activate', 'mxchat') ); } } return array( 'status' => 'not-installed', 'action_url' => '', 'action_text' => __('Get Extension', 'mxchat') ); } /** * Render the Add Ons page content. */ public function render_page() { $this->enqueue_styles(); // Remove the sorting logic and just use the original order $sorted_addons = $this->addons_config; ?>
get_addon_status($addon['plugin_file']); $button_url = $status_info['status'] === 'not-installed' ? $addon['url'] : $status_info['action_url']; $button_target = $status_info['status'] === 'not-installed' ? '_blank' : '_self'; // Check if addon is deprecated $is_deprecated = isset($addon['status']) && $addon['status'] === 'deprecated'; ?>