=== XHTheme AI Toolbox ===
Contributors: xhtheme
Donate link: https://www.paypal.com/paypalme/xhtheme
Tags: ai, ai writing, gutenberg, ai summary, auto comments
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 7.0
Stable tag: 2.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

All-in-one AI toolbox for WordPress: Gutenberg AI workbench, writing, translation, summary, tags, slugs, images, smart comments and automation.

== Description ==

**XHTheme AI Toolbox** is a professional WordPress AI plugin built by the XHTheme team. It brings **AI writing, AI translation, AI summary, AI tagging, AI categorization, AI text-to-image, AI smart comments and an automation task queue** into a single plugin, natively integrated with the Gutenberg block editor and the WordPress admin — so you no longer need to copy and paste between multiple AI platforms.

Product highlights:

* **Gutenberg AI Workbench** — Call AI directly from the block editor sidebar for writing, rewriting, expanding, polishing and full-post translation.
* **Unified Admin Dashboard** — Model status, quota balance, automation switches, task queue, runtime notifications and support tickets are all gathered on a single page.
* **Cloud Model Routing + Advanced Models** — In automatic mode the cloud picks the most suitable model for each task; when you need more power you can switch to an advanced model (including reasoning models) for long-form writing, high-quality translation, complex rewriting and deep topic expansion.
* **Complete Comment Operation Suite** — Auto comment generation, AI comment personas, random comments, auto moderation and AI-powered author replies — a full solution for comment-section operations.
* **Rule-based Automation** — When you publish a post, AI tasks are automatically queued and executed in the background, with queue management, retry and timeout handling.

Suitable for personal blogs, content sites, news sites, vertical industry sites, creator sites, WooCommerce stores and any WordPress site that wants to boost content production with AI.

[Official Overview](https://www.xhtheme.com/xhtheme-ai-toolbox)

== Key Features ==

= Gutenberg AI Workbench — Your AI Assistant Inside the WordPress Editor =
Use AI directly from the block editor sidebar: AI writing, paragraph rewriting, content polishing, content expansion, full-post translation and editing assistance. Writing, editing and translating all happen inside Gutenberg — no need to switch to external tools.

= AI Summary Generation — One-click article summary and reading hook =
Automatically generate AI summaries from article content, choose between traditional summary style or a guided reading hook, use multiple preset styles out of the box, or let AI generate custom styles for you. Summaries can also be synced to the default WordPress excerpt field to improve your SEO description quality.

= AI Tag Extraction — Auto-extract tags and complete SEO metadata =
AI analyzes the full article, extracts the most relevant tags, and automatically fills in SEO title, English slug, tag description and other metadata for new tags. Existing tags are recognized to avoid duplicates.

= AI Auto Categorization and English Slug Generation =
AI automatically selects the most appropriate category from your existing categories. It also generates an SEO-friendly English URL slug based on the article content, deeply matching the article keywords.

= AI Text-to-Image — Multi-platform image generation =
Generate illustrations and cover images based on the article topic, with multi-platform support (Alibaba Cloud Bailian Tongyi Wanxiang, Zhipu, official channel, etc.). You can set aspect ratio, automatically apply images as the post cover, insert them into the article body, and configure custom Model IDs for third-party platforms.

= AI Smart Comment Assistant — Auto-moderation + Auto-reply + Engagement =
A complete AI comment operations suite:

* **AI Auto Comment Generation**: Automatically generates comments when a post is published, or batch-generates comments from the admin.
* **AI Comment Personas**: Readers can @-mention an AI persona inside a comment to trigger an interactive reply.
* **AI Random Comments**: Auto-posts comments with configurable frequency and daily limits.
* **AI Comment Moderation**: Automatically moderates real user comments, with delayed moderation and spam filtering.
* **AI Author Reply**: Automatically generates author replies for both real and AI-generated comments.
* **Smart Interaction Mode**: Simulates natural conversations between AI personas and real users to boost engagement.

= AI Topic Expansion — Content matrix generator =
AI analyzes the current article to generate extended reading directions and topic tags, displayed below the post content to help you build a content matrix.

= Automation Task Queue — Triggered on publish, executed silently in the background =
Rule-based automation: when a post is published, AI tasks are automatically queued according to your rules. Supports task rules, feature switches, per-category exclusions, queue status, task retry, batch delete, timeout handling, and PostMeta-based triggering (works with importer / publishing tools).

= Unified Admin Dashboard =
The dashboard surfaces model status, quota balance, feature entry points, automation switches, queue task count, runtime notifications and support ticket submission in one place — making configuration, monitoring and troubleshooting much easier.

= Cloud Model Routing and Advanced Models =

* **Automatic model mode**: The cloud routes each request to the most suitable model based on task type — zero configuration, works out of the box.
* **One-click advanced model switching**: Inside the AI panel or workbench you can manually switch to an advanced model (including reasoning models) — ideal for long-form writing, high-quality translation, deep topic expansion and complex rewriting tasks that need stronger understanding and generation.
* **Pay as you need, cost under control**: Advanced models consume quota at a multiplier rate, and only when you explicitly choose them. Regular tasks keep running on automatic mode with no extra cost.

= Support Tickets and Diagnostics =
Submit a support ticket from the admin in one click, with the issue description, environment diagnostics and screenshots automatically attached — shortening support response time.

= Image Recognition for Content Supplementation =
When the article body is too short or only contains images, AI automatically supplements the content via image recognition for higher-quality generation.

= WooCommerce Product Support =
Compatible with WooCommerce products — apply AI categorization, tag extraction and comment generation to your products.

= Usage and Pricing =

All users get a daily free quota, which is suitable for light use of core features such as AI writing, summary, tags and categories. The quota resets automatically every day. For heavier usage, you can upgrade to a paid tier or buy resource packs to extend usage. Advanced models consume quota at a multiplier only when you manually switch to them. Text-to-image is billed separately by the third-party platform you configure in the admin.

== How to Use? ==

= 1. Trigger AI capabilities via the AI panel =
* Choose which AI capability and custom model to use
* Works inside the block editor (Gutenberg)
* You can modify the result before applying it

= 2. Use AI capabilities via the automation queue =
* When publishing a post you can decide whether to enqueue it; default rules can be configured in the admin
* Once queued, tasks run silently in the background — no manual work needed
* Supports all AI capabilities, in both the classic editor and Gutenberg

= 3. Apply AI capabilities via post-list shortcut buttons =
* The admin post list embeds AI status indicators and one-click action buttons
* Quickly apply a single AI capability to one post
* Works in both the classic editor and Gutenberg

= 4. Apply AI capabilities via PostMeta parameters =
* Designed for importer programs and scheduled-publishing programs
* When publishing a post, include PostMeta queue parameters and it will be automatically queued

[View Documentation](https://www.xhtheme.com/docs/aitoolbox)

== Screenshots ==

1. Gutenberg AI Workbench: write, rewrite and translate directly from the block editor sidebar
2. Unified admin dashboard: models, quota, automation, queue and notifications visible at a glance
3. AI summary generation: guided reading hook on the front end with style picker in the admin
4. AI tag extraction and metadata auto-completion settings
5. AI text-to-image result and cover application
6. AI smart comment assistant settings page
7. Automation rules and task queue management
8. Admin support ticket submission dialog

== Installation ==

1. Upload the `xhtheme-ai-toolbox` folder to `/wp-content/plugins/`, or search for **XHTheme AI Toolbox** in the WordPress admin to install it.
2. Activate XHTheme AI Toolbox from the Plugins page.
3. Go to "Settings → XHTheme AI Toolbox" and follow the wizard to enter your APPID. New sites automatically launch the setup wizard.
4. Open "Automation Settings" and pick which AI capabilities to run automatically.
5. When editing a post you will see the Gutenberg AI Workbench in the sidebar.

== Frequently Asked Questions ==

= Do I need an API key? =

Yes. The plugin relies on cloud AI models, so you need to apply for an APPID at the [XHTheme official site](https://www.xhtheme.com).

= Does it support multiple languages? =

Yes. Recognition for Chinese and English works well, and a per-article language option is available to prevent misdetection. WPML configuration is included so it works well on multilingual sites.

= Does it support the classic editor? =

Yes. The AI panel, automation queue and post-list shortcut buttons work in both the classic editor and Gutenberg. The Gutenberg AI Workbench is a dedicated sidebar built specifically for the block editor.

= Is it compatible with WooCommerce? =

Yes. Product pages can use AI categorization, tag extraction and comment generation.

= Will my article content be stored on the server? =

No. The XHTheme AI platform only performs request routing and authentication, and does not store user-generated content. In special cases, runtime logs may be kept for no more than 30 days for troubleshooting.

== External Services ==

This plugin connects to the XHTheme AI API (https://www.xhtheme.com) and third-party text-to-image platforms to complete AI generation and processing.

Terms of Service: https://www.xhtheme.com/agreement/
Privacy Policy: https://www.xhtheme.com/privacy-policy/

== Changelog ==

= 2.0.2 =
* Optimized the content length verification logic for API return results to resolve the "API return content too long" error in certain cases

= 2.0.1 =
* Added support for Zhipu CogView / GLM image generation model resolutions

= 2.0 =
* Added the AI Workbench in the Gutenberg editor, supporting article writing, content optimization, full-post translation and related editing tasks.
* Added advanced model multiplier configuration, applying the corresponding quota multiplier only when users manually select an advanced model.
* Rebuilt the admin panel with a unified dashboard and configuration page for model status, quota usage, feature entry points and runtime state.
* Added backend support ticket submission with issue descriptions, environment diagnostics and image attachments.
* Reworked automation and task queue configuration with clearer task rules, queue status and retry management.
* Fixed an issue where automation could bypass feature switches.
* Optimized feature options and admin configuration items for a clearer settings structure.
* Optimized plugin performance and build assets to improve backend loading and runtime experience.
* Adjusted backend page styles, message notifications and interaction details.

= 1.9.5 =
* Unified AI user generation count limits
* Optimized queue task allocation logic
* Optimized some backend settings options

= 1.9.4 =
* Optimized text-to-image logic and controlled failure retries
* Bailian text-to-image API added region option

= 1.9.3 =
* Optimized image generation API logic

= 1.9.2 =
* Fixed summary animation compatibility
* Added React dependency detection to avoid unknown errors
* Added topic content length check
* Optimized AI visual data interface
* Optimized error handling mechanism

= 1.9.1 =
* Added delayed moderation option for comment moderation
* Added spam comment filter rules as optional preset
* Added quick-create account button in AI Comment Official keyword bindings
* Added email filtering for AI users to prevent sending emails to virtual addresses

= 1.9 =
* Added Smart Comment Assistant module with comprehensive AI-powered comment management
* Added AI auto-moderation for real user comments
* Added AI Comment Officials — users can summon AI personas by @-mentioning them in comments
* Added AI random comments with configurable frequency and daily limits
* Added AI-powered auto-reply on behalf of authors for both real and AI-generated comments
* Added smart interaction mode that simulates natural conversations between AI and real users
* Added existing tag recognition for AI tag generation to avoid duplicates
* Added custom Model ID support for third-party AI image platforms
* Added Aurora typing-effect style for front-end AI summaries with streaming animation
* Improved new site setup wizard experience
* Optimized front-end style loading mechanism
* Extended theme compatibility with added support for Guaqi and Zibll community editions

= 1.8.3 =
* Cancelled REST API detection popup

= 1.8.2 =
* Added new site configuration wizard
* Added REST API health check warning
* Updated Alibaba Cloud image generation model endpoint
* Added queue task timeout handling
* Added GPT-5 model support
* Added queue task count display in the menu
* Updated default values for some settings
* Comment avatar improves compatibility with certain themes

= 1.8.1 =
* Improved summary settings compatibility for Zibll theme

= 1.8 =
* Added topic list page (enable in plugin settings)
* Added modern style template for topic list page
* Added aspect ratio setting for topic image generation
* Added personalized settings options for topic generation
* Optimized front-end code loading logic
* Optimized queue execution mechanism
* Optimized scheduled task processing
* Optimized admin list styles
* Fixed an issue where AI summary could not be removed from default excerpt in some cases

= 1.7.4 =
* Optimized scheduled task processing approach

= 1.7.3 =
* Fixed an issue where task queue caused scheduled task backlog in some cases

= 1.7.2 =
* Optimized queue execution logic to improve efficiency

= 1.7.1 =
* Fixed Zibll theme avatar retrieval
* Optimized queue execution logic to improve efficiency

= 1.7 =
* Refactored the automation module, switching automation to a rule-based mode
* Enhanced queue functionality, adding features such as batch delete / retry
* Optimized queue execution logic and added a manual trigger button
* Added an option for AI Summary to push content to the default post excerpt
* Optimized AI summary style loading logic for compatibility with themes that load post content via AJAX
* Added comment options: Guest Comments, Registered User Comments and Mixed Mode
* Added compatibility for B2 Theme's comment avatars and AI capability support for its "Shopping District" model
* Added comment avatar compatibility for Zibll Theme (custom avatars can be displayed for registered user comments)
* Improved general compatibility to work with a wider range of themes
* Added Zhipu and Official Channel options for the text-to-image API
* Added a "Content Image Only" option
* Fixed several style bugs and known issues
* Preparing for Phase 2 of development, focusing on content and expanding more AI capabilities

= 1.6.3 =
* Updated the Tongyi Wanxiang (Alibaba text-to-image) API model to Wanxiang 2.2

= 1.6.2 =
* Optimized initialization functions to enhance compatibility

= 1.6.1 =
* Optimized configuration panel
* Fixed paragraph optimization bug

= 1.6 =
* Optimized language recognition logic to improve accuracy
* Enhanced paragraph optimization functionality, added translation and multiple rewriting options
* Added engaging guidance mode option for AI summaries, focusing on guiding users to read article content
* Added support for reasoning models — paragraph optimization and AI panel can display the reasoning process
* Added image recognition capability to compensate content when there is insufficient content or articles with only images
* Added AI image compression functionality, with cloud-based compression API for higher efficiency
* Optimized prompt algorithms
* Automated tasks now support exclusion by category disable function
* Added quota balance display module in the user backend

= 1.5.3 =
* Optimized excerpt control

= 1.5.2 =
* Optimized thread feature style

= 1.5.1 =
* Optimized thread feature style

= 1.5 =
* Added custom content multilingual support
* Restructured automated task control to support separate model control
* Restructured AI comment feature
* Restructured AI tag extraction processing logic
* Added adaptation for some themes
* Fixed known bugs
* Adapted to cloud API 2.0 version, quality and performance improved
* Added reminder popups for certain scenarios
* Added template options for topic feature

= 1.4.1 =
* Optimized queue time zone unification issue

= 1.4 =
* Added support for WooCommerce products: intelligent categorization, tag extraction and review generation
* Implemented content language specification for precise returns; uses model auto-detection when unspecified (recommended for single-language sites)
* Optimized logic for topic quick-action buttons
* Added adaptation documentation module in admin panel

= 1.3 =
* Added text-to-image feature, new users of Alibaba Bailian can generate 1000 images for free
* Text-to-image supports automatic cover setting and inserting images into article content (optional)
* Optimized AI panel with additional detailed control options
* Enhanced queue functionality, improving the execution efficiency of chained tasks
* Added retry button for tasks
* Optimized interface calls and allocation
* Fixed front-end style bugs in the topic feature
* Added AI comment option to the topic feature
* Added automatic image generation option to the topic feature
* Added status display to the comment list

= 1.2 =
* Adapted for Classic Editor
* Added quick AI actions in the list
* Added queue feature, AI tasks executed in the background
* Added automation feature, automatically adding AI tasks when publishing posts
* Fixed compatibility with some themes

= 1.1 =
* Added: Unified modal component to replace native alert prompts
* Added: AI comment feature with background generation and randomized scheduling
* Added: AI-generated post slug feature
* Added: AI auto-category selection
* Improved: AppID validation with length check (15-30 characters)
* Fixed: Empty AppID handling during settings save
* Performance: Optimized API request handling
* Performance: Improved model list update mechanism

= 1.0 =
* Initial version release
* AI content generation / optimization
* AI auto comments
* AI tag extraction
* AI summary generation
* Multiple AI model integration
