=== AI Generator ===
Contributors: wpthemoon
Donate link: https://www.wpthemoon.com
Tags: ai, content generation, seo, featured image, article writing, gutenberg
Requires at least: 6.0
Tested up to: 6.9
Stable tag: 2.2.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI-powered content generation plugin for WordPress. Generate SEO-optimized articles, featured images, landing pages, podcast audio, and batch-generate content with advanced AI technology.

== Description ==

AI Generator is a comprehensive [Wordpress AI plugin](https://www.wpthemoon.com) that brings advanced artificial intelligence capabilities directly into your WordPress editor, helping you create high-quality, SEO-optimized content efficiently.

### Key Features

**🎯 AI Article Generation**
- Generate SEO-optimized articles based on keywords and search intent analysis
- Support for 7 article types: General SEO, Best/Top List, Comparison (A vs B), How-to Tutorial, Product Review, Reference-based, and Video Transcript-based
- Intelligent intent analysis before generation for targeted content
- Automatic content structure optimization with proper headings and formatting
- Real-time streaming generation for immediate feedback
- Customizable target audience settings
- Support for 12 content languages with automatic detection (Chinese, Japanese, Korean, Arabic, English, and more)

**📦 Batch Article Generator**
- Generate multiple SEO-optimized articles in one batch from keyword lists
- Support for up to 50 keywords at once with automatic duplicate detection
- Real-time progress tracking with detailed status indicators
- Smart error handling with automatic retry (exponential backoff) for transient failures
- Batch summary report with success/failure lists and edit links
- Resume and retry failed keywords with one click

**🖼️ AI Featured Image Generation**
- Automatically extract key themes from your content
- 5 visual styles: Modern Minimal, Cinematic Photo, Gradient Abstract, Hand Drawn, 3D Render
- Style recommendation engine based on content keywords
- Editable prompt builder for fine-tuned image generation
- Auto-fills from article generation for seamless workflow
- One-click application to WordPress media library

**📄 AI Page Generation**
- Create professional pages (General or Landing pages) from simple prompts
- Intelligent HTML to Gutenberg block conversion
- Optimized for conversions and user engagement
- Responsive design with modern layouts

**🎙️ AI Podcast Generator**
- Generate high-quality audio podcasts from your article content
- 21 realistic voices to choose from: 9 female voices (Rachel, Aria, Sarah, Laura, Charlotte, Alice, Matilda, Jessica, Lily) and 12 male voices (Roger, Charlie, George, Callum, River, Liam, Will, Eric, Chris, Brian, Daniel, Bill)
- Automatic insertion as native Gutenberg Audio block
- Seamless integration with the block editor sidebar

**📊 Content Analytics & SEO**
- Track word count, keyword density, and readability scores
- Display SEO analysis summary after article generation
- Store AI generation metadata for future reference
- Dashboard widget showing account credits, connection status, and service status
- Low balance warnings to prevent service interruption

**💳 Credit Management**
- Real-time credit balance display in WordPress dashboard
- Credit estimation before generation to prevent insufficient credit errors
- Cached credit queries for optimal performance

### Powered by Advanced AI Agent Technology

AI Generator uses sophisticated AI agent technology from WPTheMoon, ensuring enterprise-grade content quality and intelligent content generation capabilities. Our multi-agent system analyzes search intent, optimizes SEO structure, and creates engaging content that resonates with your target audience.

The same AI technology also powers [Story AI](https://story321.com), a dedicated platform for AI-driven storytelling and creative content generation.

### Third-Party Service Integration

This plugin relies on the **AI Generator** third-party service to process your requests and generate content. 
- **Service URL:** https://www.wpthemoon.com
- **Data Sent:** When you use the generation features, the plugin sends your prompts, keywords, article content, and related metadata to our API to generate articles, images, and other content.
- **Terms of Service:** https://www.wpthemoon.com/terms-of-service
- **Privacy Policy:** https://www.wpthemoon.com/privacy-policy

By using this plugin, you agree to the Terms of Service and Privacy Policy of AI Generator. An API Key is required to use all generation features. The service operates on a credit-based system.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/wpthemoon` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Navigate to Settings -> AI Generator and enter your API Key (obtain from https://www.wpthemoon.com).
4. (Optional) Configure default settings like target audience for article generation.
5. Open any post or page and use the AI Generator sidebar in the block editor to:
   - Generate SEO-optimized articles from keywords with intent analysis
   - Create custom featured images from your content
   - Build pages from simple prompts
   - Generate audio podcasts from your article content
6. Visit the **AI Generator** admin menu to use the Batch Article Generator:
   - Enter up to 50 keywords for bulk article generation
   - Monitor real-time progress and manage results
   - Retry or resume batch operations as needed

== Frequently Asked Questions ==

= Do I need an account to use this plugin? =

Yes, you need to create an account at https://www.wpthemoon.com to obtain an API Key.

= How does the credit system work? =

The plugin uses a credit-based system. Each generation action (article, image, etc.) consumes credits from your account. You can view your remaining credits in the WordPress dashboard widget or purchase more credits on the main website.

= What types of content can I generate? =

You can generate:
- SEO-optimized articles (7 types: General SEO, Best/Top List, Comparison, How-to Tutorial, Product Review, Reference-based, and Video Transcript-based)
- Custom featured images in 5 visual styles based on your content
- Professional pages (General and Landing pages)
- Audio podcasts from article content with 21 voice options
- Batch generate multiple articles from keyword lists
- All content is generated with proper formatting and WordPress block structure

= What is the Batch Generator? =

The Batch Generator allows you to generate multiple SEO-optimized articles simultaneously from a list of keywords. Enter up to 50 keywords, configure your preferences, and the plugin will process them automatically with real-time progress tracking, automatic retry for transient failures, and a comprehensive summary report when completed.

= How does the Podcast Generator work? =

The Podcast Generator converts your article content into high-quality audio using text-to-speech technology. Choose from 21 realistic voices (9 female and 12 male), and generate a podcast that is automatically inserted as a native Gutenberg Audio block in your post. Perfect for creating audio versions of your content for broader audience reach.

= Is my data safe? =

We only transmit the necessary content (prompts, keywords, article content) to our API for the sole purpose of generating the requested content. All data transmission is encrypted via HTTPS. Please review our Privacy Policy for more details.

= Can I customize the generated content? =

Yes, all generated content is fully editable in the WordPress editor. You can modify text, adjust formatting, and customize images after generation.

= What happens if I run out of credits? =

The dashboard widget will show a warning when your credits are low. You can purchase additional credits at https://www.wpthemoon.com. The plugin will display an error message if you attempt to generate content without sufficient credits. The Batch Generator also shows credit estimates before starting to prevent interruptions.

== Screenshots ==

1. The AI Generator sidebar in the Gutenberg editor with article generation interface.
2. Settings page for API key and default options configuration.
3. Dashboard widget showing credit balance and service status.
4. Featured image generation panel with content extraction.
5. Real-time article generation with streaming output.
6. Podcast generator panel with voice selection in the block editor.
7. Batch Article Generator admin page with keyword input and progress tracking.

== Changelog ==

= 2.2.1 =
* Improved: Performance optimization
* Added: Text-to-image prompt detection
* Removed: Frontend credit caching

= 2.2 =
* Added: AI Podcast Generator with 21 realistic voice options

* Improved: API client with better error handling and streaming support
* Improved: Credit caching system for better performance
* Improved: Gutenberg block conversion for page generation

= 2.0.0 =
* Added Tailwind CSS component generation
* Improved Gutenberg editor integration

= 1.0.0 =
* Initial release of the AI Generator plugin
* Major feature update with comprehensive AI content generation capabilities
* Added: AI-powered article generation with keyword and intent analysis
* Added: Automatic featured image generation from article content
* Added: Landing page generation feature
* Added: Real-time streaming for article and page generation
* Added: Dashboard widget for credit balance monitoring
* Added: Content analytics (word count, keyword density, readability)
* Added: Support for multiple article types (general, product review)
* Added: Customizable target audience settings
* Added: Post metadata storage for AI-generated content
* Added: Batch Article Generator for bulk article creation from keyword lists
* Added: Credit estimation feature for batch generation
* Added: 5 new article types (Best/Top List, Comparison, How-to Tutorial, Reference-based, Video Transcript-based)
* Added: 12 content languages with automatic detection support
* Added: Featured image style recommendations based on content keywords




== Upgrade Notice ==

= 2.2.1 =
Performance improvements and text-to-image prompt detection. Removed frontend credit caching for more accurate credit display.

= 2.2 =
Major update with new AI content generation features. Backup your site before upgrading. After upgrade, verify your API key in Settings -> AI Generator.
