=== Readmo AI ===
Contributors: readmoai
Tags: articles, ai, shortcode, api, questions
Requires at least: 5.9
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.2.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI-powered article analysis and intelligent question generation for WordPress. Requires Readmo AI API subscription.

== Description ==

**Readmo AI Plugin** brings intelligent article processing and question generation directly into your WordPress site.

### Service Requirements

This plugin is **free and open source** (GPL v2), but requires:
- A **paid subscription** to Readmo AI API service
- Valid **API Key** from Readmo AI

### Features

* **Smart Question Generation** - Automatically generates comprehension questions from any article
* **Beautiful UI** - Responsive button layout for question display
* **Analytics Tracking** - Track page views, section visibility, and question clicks
* **Easy Setup** - Simple API Key configuration in WordPress admin
* **Shortcode Support** - Use `[readmo_ai_articles]` on any page or post
* **Multi-language Support** - Available in English, Traditional Chinese (zh_TW), Simplified Chinese (zh_CN), and Hong Kong Chinese (zh_HK)

### How It Works

1. Configure your API Key in Settings > Readmo AI
2. Add `[readmo_ai_articles]` shortcode to any page or post
3. Questions are automatically generated and displayed as interactive buttons
4. Clicking a button navigates to the question detail page

### Shortcode Usage

`[readmo_ai_articles]`

The shortcode automatically detects the current page URL and generates relevant questions.

== Installation ==

1. Upload `readmo-ai-plugin` folder to `/wp-content/plugins/`
2. Activate the plugin through the 'Plugins' menu
3. Navigate to Settings > Readmo AI
4. Enter your API Key and save
5. Add `[readmo_ai_articles]` shortcode to your pages

== Frequently Asked Questions ==

= Is this plugin free? =

The plugin code is free and open source (GPL v2). However, it requires a paid Readmo AI API subscription to function.

= What is an API Key? =

An API Key is a unique credential from Readmo AI that authenticates your site. Contact Readmo AI support to get your API credentials.

= Can I customize the button styling? =

Yes. Override these CSS classes in your theme:
- `.readmo-ai-container` - Main container
- `.readmo-ai-questions` - Questions wrapper
- `.readmo-ai-question-btn` - Individual buttons

= How do I change the language? =

The plugin automatically uses your WordPress site language. To change:
1. Go to Settings > General
2. Change "Site Language" to your preferred language
3. Supported: English, 繁體中文 (zh_TW), 简体中文 (zh_CN), 香港中文 (zh_HK)

= What data does analytics tracking collect? =

The plugin tracks:
- **Page Views** - When a page with the plugin loads
- **Section Views** - When questions become visible
- **Question Clicks** - Which questions users click

No personal user information is collected.

== Troubleshooting ==

**Questions not displaying:**
- Verify API Key is correct in Settings > Readmo AI
- Check browser console for JavaScript errors (F12)
- Verify your Readmo AI account is active

**API errors:**
- **401**: API Key is invalid or expired
- **403**: Account permission issue
- **429**: Rate limit exceeded, wait and retry
- **500+**: Service issue, contact support

== Privacy ==

This plugin sends data to Readmo AI services:

**Data sent:**
- Page URL (for article processing)
- API Key (for authentication)
- Anonymous analytics (page views, clicks)

**Data NOT collected:**
- Personal user information
- Cookies or browser fingerprints
- Cross-site tracking

All communications are HTTPS-encrypted. See Readmo AI Privacy Policy for details.

== Changelog ==

= 1.2.0 (2026-01-26) =
* **New: Auto-Insert** - Automatically insert Readmo AI content without editing posts
* **New: Page Footer Position** - Insert content in page footer area
* **Fixed** - Footer insertion position now works correctly
* **Improved** - Updated author information to ReadmoAI

= 1.1.1 (2026-01-23) =
* **Fixed** - Nonce expiration causing "Security check failed" error
* **New** - Automatic nonce refresh mechanism for long-running sessions
* **Improved** - Use `check_ajax_referer()` for better WordPress security compliance

= 1.1.0 (2025-12-11) =
* **New: Analytics Tracking** - Track page views, section visibility, and question clicks
* **New: Fallback Domain** - Automatic domain selection based on verification status
* **Improved** - Better caching and cache invalidation
* **Improved** - Production-ready code quality

= 1.0.0 (2025-11-10) =
* Initial release
* Smart question generation from articles
* Real-time job processing
* Responsive question button UI

== Upgrade Notice ==

= 1.2.0 =
New auto-insert feature and page footer position support.

= 1.1.1 =
Fixed nonce expiration issue with automatic refresh mechanism.

= 1.1.0 =
New analytics tracking and fallback domain support.

= 1.0.0 =
Initial release.

== Support ==

- Website: https://readmo.ai
- Technical Support: Readmo AI support team
- Security Issues: readmoai@cmoney.com.tw

== External Services ==

This plugin connects to Readmo AI services provided by CMoney:

**Service URL:** https://xlab-api.cmoney.tw/Readmore.ai.backend

**Data sent and when:**
- Page URL (for article processing) - sent when a page containing the shortcode loads
- API Key (for authentication) - sent with every API request
- Anonymous analytics (page views, section views, question clicks) - sent when users interact with the plugin

**Why data is sent:**
- To analyze article content and generate comprehension questions
- To authenticate your subscription and provide the service
- To track anonymous usage statistics for service improvement

**Service provider links:**
- Terms of Service: https://www.cmoney.tw/member/tos.aspx
- Privacy Policy: https://www.cmoney.tw/member/privacy.aspx

By using this plugin, you agree to send data to Readmo AI (CMoney) for processing in accordance with their terms and privacy policy.

== License ==

GNU General Public License v2 or later.

    Copyright (C) 2024 Readmo AI

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

**Note:** The plugin code is free (GPL v2), but Readmo AI API service requires a paid subscription.
