=== AIFORYA FAQ Generator ===
Contributors: aiforya
Tags: faq, schema, rich snippets, seo, gutenberg
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Build FAQs by hand or detect them automatically from your posts (no AI), with accordion display and schema.org FAQPage for Google rich snippets.

== Description ==

**AIFORYA FAQ Generator** lets you add structured FAQs to your posts and pages, with no configuration needed.

**Everything stays on your site.** This plugin makes no network requests and requires no account or API key.

Write your questions and answers by hand, or detect them automatically from the content of your posts (no AI): the plugin reads the structure of your text — headings that end with a question mark become questions, and the content that follows becomes the answer. The FAQ is displayed as an accordion (or in other layouts), and the schema.org FAQPage markup makes it eligible for Google rich results.

= Features =

* **Manual FAQ editor** — create and edit your questions and answers per post or page, using repeatable fields.
* **Automatic detection without AI** — a "Detect the Q&As in this post" button analyses the structure of the content (H2/H3/H4 headings phrased as questions, followed by a paragraph) to pre-fill the FAQ. No AI, no network calls.
* **Accordion display** — answers expand using the native HTML `<details>`/`<summary>` elements, plus 4 other layouts (cards, list, numbered, minimal).
* **Shortcode** — `[aiforya_faq]` works anywhere: Gutenberg, Elementor, Divi, WPBakery, Oxygen, Avada and the classic editor.
* **Native Gutenberg block** — the "AIFORYA FAQ" block (Widgets category), with an option to display the FAQ of another post.
* **Native Elementor widget** — available automatically when Elementor is active.
* **schema.org FAQPage structured data** — validated JSON-LD markup, injected into the `<head>` for Google rich snippets.
* **Dashboard** — number of FAQs, posts covered and questions published.
* **Multilingual interface** — English, French, German, Spanish, Italian and Dutch.

= Privacy =

Your questions and answers are stored in your own WordPress database. Nothing is sent anywhere, and no API key is required.

= Advanced version =

An advanced version automatically generates a complete, optimised FAQ from the content of your posts, with multilingual translation and bulk generation, using your own personal API key with the AI provider of your choice. See [aiforya.fr](https://aiforya.fr/extensions/faq-generator).

== Installation ==

1. Upload the `aiforya-faq-generator` folder to `/wp-content/plugins/`, or install the plugin from the WordPress Plugins screen.
2. Activate the plugin from the "Plugins" menu.
3. Go to the "AIFORYA FAQ Generator" menu, "FAQ" tab: choose a post, then write your questions by hand or click "Detect the Q&As in this post".
4. Display the FAQ with the `[aiforya_faq]` shortcode, the "AIFORYA FAQ" Gutenberg block, or by enabling automatic display in the Settings tab.

== Frequently Asked Questions ==

= Do I need an API key or an account? =

No. The free version runs entirely on your site, with no API key and no external service.

= How does automatic detection work without AI? =

The plugin reads the structure of your post: each heading (H2/H3/H4) that ends with "?" becomes a question, and the text that follows (a paragraph or a list) becomes the answer. You get a pre-filled FAQ that you are free to adjust.

= Are the FAQs compatible with Google rich snippets? =

Yes. Each FAQ is marked up as schema.org FAQPage (JSON-LD), which makes it eligible for Google rich results.

= How do I display a FAQ? =

Three ways: the `[aiforya_faq]` shortcode, the "AIFORYA FAQ" Gutenberg block, or automatic display before or after the content (enable it in the Settings).

= Does the shortcode work with Elementor and Divi? =

Yes. A native "AIFORYA FAQ" widget is available in Elementor. For Divi and other builders, insert `[aiforya_faq]` into a Code or Text module.

= Where do I get support? =

Through the support forum of this plugin on WordPress.org.

== Screenshots ==

1. The FAQ rendered on the front end: accordion layout, with schema.org FAQPage markup.
2. Settings: where the FAQ appears, which layout, and the heading shown above it.
3. FAQ tab: pick a post, then write the questions by hand or detect them from its content.

== Changelog ==

= 1.0.1 =
* Source strings switched from French to English (196 strings). On WordPress.org en_US is the ORIGINAL language, so French source strings meant no English speaker could read the plugin and no community translation was possible.
* Front-end styles moved from an inline <style> block to wp_enqueue_style() + wp_add_inline_style(): the whole stylesheet was re-emitted once per FAQ shown on the page.
* Admin fix: values passed to wp_localize_script were JSON-encoded twice, the nonce included — every AJAX call failed with a network error.
* Plugin description and built-in FAQ translated to English (they appear in the admin header and in the plugin directory listing).

= 1.0.0 =
* Initial release: manual FAQ editor, automatic Q&A detection without AI, accordion display (and 4 other layouts), shortcode, Gutenberg block, Elementor widget, schema.org FAQPage structured data, dashboard, multilingual interface (6 languages).
