=== AI Smart Excerpt ===
Contributors: Calogero1975
Donate link: http://paypal.me/Calogero
Tags: AI excerpt, smart excerpt, automatic excerpt, SEO, ChatGPT, keywords, multilingual
Requires at least: 5.0
Tested up to: 6.8
Stable tag: 2.2.3
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generate SEO optimized excerpts and keywords using AI (Claude, ChatGPT, Gemini). Multilingual support: English, Italian, Spanish.

== Description ==

> #### Transform your excerpts with AI-powered intelligence
>
> AI Smart Excerpt 2.0 uses advanced language models to create compelling, optimized excerpts that boost engagement and SEO.
>

The AI Smart Excerpt plugin for WordPress revolutionizes excerpt generation by leveraging artificial intelligence from leading providers like Claude (Anthropic), ChatGPT (OpenAI), and Gemini (Google). Instead of simple text truncation or basic algorithms, this plugin creates intelligent, contextual excerpts and SEO keywords optimized for your specific needs.

**Perfect for bloggers, marketers, and content creators who want to maximize engagement and search visibility across multiple languages.**

= ✨ Key Features =

* **🤖 AI-Powered Generation** - Uses Claude, ChatGPT, or Gemini to create intelligent excerpts
* **🎯 SEO Optimization** - Generates excerpts specifically designed to improve search rankings
* **📱 Social Media Ready** - Creates engaging excerpts perfect for social sharing
* **🔑 Smart Keywords** - Automatically generates SEO keywords and focus phrases
* **🌍 Multilingual Support** - Available in English, Italian, and Spanish
* **⚡ Smart Caching** - Reduces API costs with intelligent caching system
* **🛡️ Fallback Protection** - Automatic fallback to ensure excerpts are always generated
* **🖼️ Featured Images** - Seamlessly integrates with WordPress featured images
* **⚙️ Flexible Configuration** - Extensive settings for fine-tuning behavior
* **🔒 Security First** - Built with WordPress security best practices

= 🎯 Excerpt Types =

* **SEO Optimized** - Focuses on keywords and search engine visibility
* **Social Media** - Designed for maximum engagement and shareability  
* **General Purpose** - Balanced approach for general content summarization

= 🌍 Multilingual Support =

AI Smart Excerpt now speaks your language! The plugin is professionally translated and fully localized in:
* **English** - Full native support
* **Italian** - Complete translation for Italian users
* **Spanish** - Comprehensive Spanish localization

All interface elements, admin panels, and user messages are translated to provide a seamless experience in your preferred language.

= 🚀 Why Upgrade to AI? =

Traditional excerpt generators simply cut text at arbitrary points or use basic keyword matching. AI Smart Excerpt understands context, identifies key themes, and crafts excerpts that actually represent your content meaningfully.

**The result?** Higher click-through rates, better search rankings, and more engaged readers.

= Need Support? =

Do you require dedicated assistance? Submit your requests.

== Installation ==

= Automatic Installation =
1. Go to your WordPress admin dashboard
2. Navigate to Plugins → Add New
3. Search for "AI Smart Excerpt"
4. Click "Install Now" and then "Activate"
5. Go to Settings → AI Smart Excerpt to configure

= Manual Installation =
1. Download the plugin from WordPress.org
2. Upload the `ai-smart-excerpt` folder to `/wp-content/plugins/`
3. Activate the plugin through the 'Plugins' menu in WordPress
4. Go to Settings → AI Smart Excerpt to configure

= Setup Steps =
1. **Choose your AI provider** (Claude, ChatGPT, or Gemini)
2. **Get an API key** from your chosen provider:
   - Claude: Visit [console.anthropic.com](https://console.anthropic.com/)
   - ChatGPT: Visit [platform.openai.com/api-keys](https://platform.openai.com/api-keys)
   - Gemini: Visit [ai.google.dev](https://ai.google.dev/)
3. **Enter your API key** in the plugin settings
4. **Test the connection** using the "Test Connection" button
5. **Configure excerpt settings** to match your needs
6. **Enable the plugin** and start generating AI excerpts!

== Frequently Asked Questions ==

= Which AI provider should I choose? =

Each provider has different strengths:
- **Claude**: Excellent for balanced, natural-sounding excerpts
- **ChatGPT**: Great for creative and engaging content
- **Gemini**: Good for technical content and factual summaries

All providers support SEO and social media optimization.

= How much do API calls cost? =

Costs are typically very low:
- Claude: ~$0.001 per excerpt
- ChatGPT: ~$0.0001 per excerpt  
- Gemini: Often free within limits

The plugin includes caching to minimize API calls.

= Will my excerpts still work if the API is down? =

Yes! The plugin includes a fallback system that generates basic excerpts if the AI service is unavailable.

= Can I use this with my existing manual excerpts? =

Yes, you can choose to either keep manual excerpts or override them with AI-generated ones.

= Is my API key secure? =

Yes, API keys are stored securely in your WordPress database and never transmitted except to the official AI provider APIs.

= Does this work with all themes? =

Yes, the plugin hooks into WordPress's standard excerpt system, so it works with any properly coded theme.

== Screenshots ==

1. Main settings page with AI provider configuration
2. Excerpt type and length settings
3. Display options for featured images
4. Advanced settings and caching options
5. API connection test interface

== Changelog ==

= 2.2.3 (2025-01-25) =
**Enhanced Debugging & Logging**

🔍 **Independent Logging System:**
* Added plugin-specific debug log file (wp-content/ai-smart-excerpt-debug.log)
* Logging now works independently of WP_DEBUG settings
* No need to modify wp-config.php to see error details
* Detailed API request and response logging for all providers

🐛 **Improved Error Diagnostics:**
* Enhanced Claude API error logging with specific error type detection
* Added HTTP status code logging
* Detailed response structure logging for troubleshooting
* API key format validation in error messages
* Shows exact log file location in error messages

🔧 **Better Test Connection:**
* More informative error messages during API testing
* Automatic detection of authentication vs request errors
* Clear indication of rate limit and API issues
* Easier troubleshooting for sites without WP_DEBUG access

= 2.2.2 (2025-01-25) =
**AI Model Updates**

🤖 **Latest AI Models:**
* **Claude**: Updated to Claude 4.5 Haiku and Claude Sonnet 4.5 - latest generation models with improved performance
* **OpenAI**: Updated to GPT-5, GPT-5 Mini, GPT-5 Nano, and GPT-5.2 - next-generation models with enhanced capabilities
* **Gemini**: Updated to Gemini 3 Flash Preview and Gemini 3 Pro - newest models with better accuracy

🔧 **Technical Improvements:**
* Removed deprecated older model versions
* Updated API parameters for latest model compatibility
* Improved fallback logic for GPT-5 models

= 2.2.1 (2025-01-08) =
**New Features & Enhancements**

🌟 **Plugin Recommendations:**
* Added new "Recommended Plugins" tab to admin interface
* Professional plugin recommendation cards with detailed information
* Features Link Automator Pro and Knowledge AI Bot from the same developer
* Beautiful gradient design with comprehensive feature descriptions
* Direct links to WordPress.org plugin pages

🔧 **Admin Interface Improvements:**
* Enhanced navigation with new recommendations section
* Improved user experience with better plugin discovery
* Consistent styling across all admin tabs

= 2.2.0 (2025-01-09) =
**New Features & Enhancements**

🌍 **Language Detection & Multilingual Support:**
* Intelligent language detection for content - excerpts now generated in post's original language
* Complete Italian translation (ai-smart-excerpt-it_IT)
* Complete Spanish translation (ai-smart-excerpt-es_ES)  
* Professional localization of all interface elements
* Support for 300+ translatable strings

🔑 **AI Keyword Generation:**
* Intelligent SEO keyword generation
* Focus keyword creation for SEO plugins
* Automatic tag assignment from AI analysis
* Customizable keyword types and limits

⚙️ **Enhanced User Experience:**
* Fixed bulk progress stats display issue - now shows immediately when starting operations
* Improved admin interface with better organization
* Enhanced JavaScript localization
* Better error handling and user feedback
* Expanded API integration options

🔧 **Technical Improvements:**
* Smart language detection algorithm supporting English, Italian, Spanish, French, and German
* Updated to WordPress 6.8 compatibility
* Enhanced translation system
* Improved plugin versioning and metadata
* Better code organization and documentation

= 2.0.0 (2024-01-XX) =
**Major Release - Complete Rewrite**

🚀 **New Features:**
* **AI Integration**: Full support for Claude, ChatGPT, and Gemini
* **Smart Excerpt Types**: SEO optimized, social media, and general purpose
* **Caching System**: Intelligent caching to reduce API costs
* **Security Enhancements**: Nonces, sanitization, and validation
* **Modern Admin UI**: Completely redesigned settings interface
* **API Testing**: Built-in connection testing tools
* **Fallback System**: Automatic fallback if AI services are unavailable

🔧 **Technical Improvements:**
* Updated for WordPress 6.8 compatibility
* Modern PHP 7.4+ codebase
* PSR-4 compliant structure
* Comprehensive error handling
* Performance optimizations

⚠️ **Breaking Changes:**
* Requires WordPress 5.0+
* Requires PHP 7.4+
* Settings need to be reconfigured
* API key required for operation

= 1.5.2 =
* Bug fix: Function now removes shortcodes properly

= 1.5 =
* Added ability to display first available image if no featured image set

= 1.4 =
* Bug fixes and new settings: "is active" flag and admin-only mode

= 1.3 =
* Added featured image size and custom tag management

= 1.2 =
* Added multiple admin configurations for images and HTML tags

= 1.1 =
* Added ability to skip/use manual excerpts

== Upgrade Notice ==

= 2.0.0 =
**Major update!** Complete rewrite with AI integration. You'll need to reconfigure settings and obtain an API key. Backup your site before updating. The new version offers significantly better excerpt quality but requires setup.