mxchat_model_callback();
}, __('Select the AI model your chatbot will use for conversations.', 'mxchat'));
// Embedding Model
mxchat_render_field_wrapper('embedding_model', __('Embedding Model', 'mxchat'), function() use ($admin_instance) {
$admin_instance->embedding_model_callback();
}, __('Vector embedding model for knowledge base matching. Changing models requires reconfiguring knowledge data.', 'mxchat'));
// Enable Streaming
mxchat_render_field_wrapper('enable_streaming', __('Enable Streaming', 'mxchat'), function() use ($admin_instance) {
$admin_instance->enable_streaming_toggle_callback();
}, __('Enable real-time streaming responses for supported models (OpenAI, Claude, DeepSeek, Grok).', 'mxchat'));
// Enable Web Search (OpenAI & Gemini)
mxchat_render_field_wrapper('enable_web_search', __('Enable Web Search', 'mxchat'), function() use ($admin_instance) {
$admin_instance->enable_web_search_toggle_callback();
}, __('Allow the chatbot to search the web for current information (OpenAI and Gemini models).', 'mxchat'));
?>
system_prompt_instructions_callback();
}, __('Provide system-level instructions to guide the AI\'s behavior and responses.', 'mxchat'));
// Similarity Threshold
mxchat_render_field_wrapper('similarity_threshold', __('Similarity Threshold', 'mxchat'), function() use ($admin_instance) {
$admin_instance->mxchat_similarity_threshold_callback();
}, __('Adjust threshold for content matching. Lower values = more matches, higher values = stricter matching.', 'mxchat'));
// RAG Sources Limit
mxchat_render_field_wrapper('rag_sources_limit', __('RAG Sources Limit', 'mxchat'), function() use ($admin_instance) {
$admin_instance->mxchat_rag_sources_limit_callback();
}, __('Number of knowledge base sources (pages/documents) to include in AI context. Higher values provide more context but use more tokens.', 'mxchat'));
// RAG Chunks Limit
mxchat_render_field_wrapper('rag_chunks_limit', __('RAG Chunks Limit', 'mxchat'), function() use ($admin_instance) {
$admin_instance->mxchat_rag_chunks_limit_callback();
}, __('Maximum total content chunks sent to the AI across all sources. Higher values provide more context but increase token usage and cost.', 'mxchat'));
// Contextual Awareness
mxchat_render_field_wrapper('contextual_awareness', __('Contextual Awareness', 'mxchat'), function() use ($admin_instance) {
$admin_instance->mxchat_contextual_awareness_callback();
}, __('Allow the chatbot to understand and reference the current page content for more relevant responses.', 'mxchat'));
// Citation Links
mxchat_render_field_wrapper('citation_links', __('Citation Links', 'mxchat'), function() use ($admin_instance) {
$admin_instance->mxchat_citation_links_toggle_callback();
}, __('Allow the AI to include citation links from your knowledge database in responses. If disabled, ensure your AI Behavior settings do not mention links or the AI may fabricate URLs.', 'mxchat'));
// Satisfaction Rating Prompt
// The toggle callback inline-renders the 5 customization
// fields inside a single sub-options wrapper (plan-29caac).
// No separate customization group needed — the wrapper handles
// its own server-side display state based on the toggle value.
mxchat_render_field_wrapper('satisfaction_rating', __('Satisfaction Rating Prompt', 'mxchat'), function() use ($admin_instance) {
$admin_instance->mxchat_satisfaction_rating_toggle_callback();
}, __('Show a 👍 / 👎 prompt after a conversation has had a couple of bot replies and the visitor has been idle for a moment. Disable to hide the prompt site-wide.', 'mxchat'));
?>
mxchat_append_to_body_callback();
}, __('Show chatbot automatically on all pages. Disable to use shortcode [mxchat_chatbot floating="yes"] for floating widget or [mxchat_chatbot floating="no"] for embedded chat.', 'mxchat'));
// Open Links in New Tab
mxchat_render_field_wrapper('link_target', __('Open Links in New Tab', 'mxchat'), function() use ($admin_instance) {
$admin_instance->mxchat_link_target_toggle_callback();
}, __('Open links clicked in chat responses in a new browser tab.', 'mxchat'));
// Chat Persistence
mxchat_render_field_wrapper('chat_persistence', __('Chat Persistence', 'mxchat'), function() use ($admin_instance) {
$admin_instance->mxchat_chat_persistence_toggle_callback();
}, __('Keep chat history when users navigate or return within 24 hours.', 'mxchat'));
// Download Transcript button
mxchat_render_field_wrapper('print_button', __('Show Download Transcript Button', 'mxchat'), function() use ($admin_instance) {
$admin_instance->mxchat_print_button_toggle_callback();
}, __('Show the "Download Transcript" item in the chat window menu.', 'mxchat'));
// Start-New-Chat button (plan ac2e81) — lets a visitor reset the
// conversation without the owner disabling chat persistence globally.
mxchat_render_field_wrapper('reset_chat_enabled', __('Show Start-New-Chat Button', 'mxchat'), function() use ($admin_instance) {
$admin_instance->mxchat_reset_chat_toggle_callback();
}, __('Show a "Start new chat" item in the chat window menu that clears the current conversation and begins a fresh session.', 'mxchat'));
mxchat_render_field_wrapper('reset_chat_label', __('Start-New-Chat Button Label', 'mxchat'), function() use ($admin_instance) {
$admin_instance->mxchat_reset_chat_label_callback();
}, __('Label for the Start-New-Chat menu item. Leave blank to use "Start new chat".', 'mxchat'));
?>
mxchat_top_bar_title_callback();
}, __('Title text shown in the chatbot header.', 'mxchat'));
// AI Agent Text
mxchat_render_field_wrapper('ai_agent_text', __('AI Agent Text', 'mxchat'), function() use ($admin_instance) {
$admin_instance->mxchat_ai_agent_text_callback();
}, __('Text shown for AI agents in the status indicator.', 'mxchat'));
// Intro Message
mxchat_render_field_wrapper('intro_message', __('Introductory Message', 'mxchat'), function() use ($admin_instance) {
$admin_instance->mxchat_intro_message_callback();
}, __('First message shown when chat opens. HTML allowed.', 'mxchat'));
// Input Placeholder
mxchat_render_field_wrapper('input_copy', __('Input Placeholder', 'mxchat'), function() use ($admin_instance) {
$admin_instance->mxchat_input_copy_callback();
}, __('Placeholder text in the chat input field.', 'mxchat'));
// Max Input Length (characters) — plan a3fae2 part C
mxchat_render_field_wrapper('max_input_length', __('Max Input Length (characters)', 'mxchat'), function() use ($admin_instance) {
$admin_instance->mxchat_max_input_length_callback();
}, __('Cap how many characters a visitor can type or paste into a single message. Set to 0 for unlimited (default).', 'mxchat'));
// Chat Teaser
mxchat_render_field_wrapper('pre_chat_message', __('Chat Teaser Pop-up', 'mxchat'), function() use ($admin_instance) {
$admin_instance->mxchat_pre_chat_message_callback();
}, __('Message shown before users start chatting.', 'mxchat'));
?>
enable_email_block_callback();
}, __('Require users to enter their email before chatting. Shows for non-logged-in users.', 'mxchat'));
// Email Form Content
mxchat_render_field_wrapper('email_blocker_header', __('Email Form Content', 'mxchat'), function() use ($admin_instance) {
$admin_instance->email_blocker_header_content_callback();
}, __('HTML content shown above the email form.', 'mxchat'));
// Email Button Text
mxchat_render_field_wrapper('email_blocker_button', __('Submit Button Text', 'mxchat'), function() use ($admin_instance) {
$admin_instance->email_blocker_button_text_callback();
}, __('Text for the email form submit button.', 'mxchat'));
// Require Name
mxchat_render_field_wrapper('enable_name_field', __('Also Require Name', 'mxchat'), function() use ($admin_instance) {
$admin_instance->enable_name_field_callback();
}, __('Also require users to enter their name with email.', 'mxchat'));
// Name Placeholder
mxchat_render_field_wrapper('name_placeholder', __('Name Field Placeholder', 'mxchat'), function() use ($admin_instance) {
$admin_instance->name_field_placeholder_callback();
}, __('Placeholder text for the name input field.', 'mxchat'));
?>
mxchat_privacy_toggle_callback();
}, __('Show privacy notice below the chat widget.', 'mxchat'));
// Complianz
mxchat_render_field_wrapper('complianz_toggle', __('Complianz Integration', 'mxchat'), function() use ($admin_instance) {
$admin_instance->mxchat_complianz_toggle_callback();
}, __('Apply Complianz consent logic to the chatbot (requires Complianz plugin).', 'mxchat'));
?>
mxchat_popular_question_1_callback();
});
// Quick Question 2
mxchat_render_field_wrapper('popular_question_2', __('Quick Question 2', 'mxchat'), function() use ($admin_instance) {
$admin_instance->mxchat_popular_question_2_callback();
});
// Quick Question 3
mxchat_render_field_wrapper('popular_question_3', __('Quick Question 3', 'mxchat'), function() use ($admin_instance) {
$admin_instance->mxchat_popular_question_3_callback();
});
// Additional Questions
mxchat_render_field_wrapper('additional_questions', __('Additional Questions', 'mxchat'), function() use ($admin_instance) {
$admin_instance->mxchat_additional_popular_questions_callback();
}, __('Add as many quick questions as you need.', 'mxchat'));
?>
{limit}, {timeframe}, {count}, {remaining}
[Link text](https://example.com)
'WP Rocket', 'state' => 'auto', 'exclusion' => '/wp-admin/admin-ajax\\.php\\?action=mxchat_.*'),
array('name' => 'LiteSpeed Cache', 'state' => 'auto', 'exclusion' => '/wp-admin/admin-ajax.php?action=mxchat_*'),
array('name' => 'W3 Total Cache', 'state' => 'auto', 'exclusion' => '/wp-admin/admin-ajax.php?action=mxchat_*'),
array('name' => 'FlyingPress', 'state' => 'auto', 'exclusion' => '/wp-admin/admin-ajax.php?action=mxchat_*'),
array('name' => 'WP Super Cache', 'state' => 'auto', 'exclusion' => 'wp-admin/admin-ajax.php'),
array('name' => 'Cloudflare APO', 'state' => 'manual', 'exclusion' => 'Page Rule / Cache Rule: URI Path contains "/wp-admin/admin-ajax.php" → Bypass Cache'),
);
?>
' . esc_html__('documentation page', 'mxchat') . ''
); ?>
Scopes):', 'mxchat'); ?>
channels:manage
channels:read
chat:write
chat:write.public
groups:write
users:read
__('Quick Setup with MxChat', 'mxchat'),
'description' => __('Learn how to quickly setup and understand how your chatbot works.', 'mxchat'),
'url' => 'https://www.youtube.com/watch?v=3BqoiyWaQiM&t'
),
array(
'title' => __('AI Content Generation', 'mxchat'),
'description' => __('Generate full blog posts and landing pages with AI—from prompt to publish in minutes.', 'mxchat'),
'url' => 'https://www.youtube.com/watch?v=n8TeEeHpxs4'
),
array(
'title' => __('Chat With Your GSC Data', 'mxchat'),
'description' => __('Find content gaps, quick win keywords, and SEO opportunities by chatting with your Google Search Console data using the Admin Assistant add-on.', 'mxchat'),
'url' => 'https://www.youtube.com/watch?v=ytgMou_7SZA&t=2s'
),
array(
'title' => __('AI Theme Generator', 'mxchat'),
'description' => __('Learn how to instantly restyle your chatbot using plain English prompts with real-time previews.', 'mxchat'),
'url' => 'https://www.youtube.com/watch?v=rSQDW2qbtRU&t'
),
array(
'title' => __('MxChat Forms', 'mxchat'),
'description' => __('Create and manage smart forms that automatically trigger during chat conversations.', 'mxchat'),
'url' => 'https://www.youtube.com/watch?v=3MrWy5dRalA'
),
array(
'title' => __('Admin Assistant Add-on', 'mxchat'),
'description' => __('Bring a ChatGPT-like experience directly inside your WordPress dashboard.', 'mxchat'),
'url' => 'https://youtu.be/AdEA1k-UCFM'
),
array(
'title' => __('Chat Themes', 'mxchat'),
'description' => __('Customize appearance with real-time previews to match your brand.', 'mxchat'),
'url' => 'https://youtu.be/MfbB9mZi6ag'
),
array(
'title' => __('WooCommerce Integration', 'mxchat'),
'description' => __('Provide product recommendations and shopping assistance to customers.', 'mxchat'),
'url' => 'https://www.youtube.com/watch?v=WsqAppHRGdA'
),
array(
'title' => __('Knowledge Base Setup', 'mxchat'),
'description' => __('Set up your knowledge base using PDFs, sitemaps, and manual entries.', 'mxchat'),
'url' => 'https://www.youtube.com/watch?v=8Ztjs66-VTo'
),
array(
'title' => __('Document Chat', 'mxchat'),
'description' => __('Chat with PDF and Word documents for enhanced document analysis.', 'mxchat'),
'url' => 'https://www.youtube.com/watch?v=j_c45WWCTG0'
),
array(
'title' => __('Perplexity Integration', 'mxchat'),
'description' => __('Enable real-time web search capabilities for your chatbot.', 'mxchat'),
'url' => 'https://youtu.be/wpKkbt24-bo'
),
array(
'title' => __('Brave Search Intent', 'mxchat'),
'description' => __('Leverage Brave Search for improved query understanding.', 'mxchat'),
'url' => 'https://www.youtube.com/watch?v=7vDL5H7vToc'
),
array(
'title' => __('Loops Email Capture', 'mxchat'),
'description' => __('Set up email capture with Loops to grow your mailing list.', 'mxchat'),
'url' => 'https://www.youtube.com/watch?v=CNgm5TYDyTc'
),
array(
'title' => __('AI Agent Testing', 'mxchat'),
'description' => __('Evaluate and improve your chatbot\'s performance and accuracy.', 'mxchat'),
'url' => 'https://www.youtube.com/watch?v=A0jowbpyX54'
),
);
foreach ($tutorials as $tutorial): ?>