=== BlogRaffo Comment Moderation Hub ===
Contributors: raffocorre
Donate link: https://www.blograffo.net/comment-moderation-hub/
Tags: comments, moderation, antispam, ai, spam
Requires at least: 6.0
Tested up to: 7.1
Stable tag: 1.0.33
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Local free antispam for comments, plus optional paid AI approval via BlogRaffo Hub. No local LLM API keys.

== Description ==

BlogRaffo Comment Moderation Hub combines:

* **Local antispam (always free, always in the plugin)** - honeypot, minimum submit time, BBCode, gibberish, local spam DB match, link allowlist. Runs on your server with **no external API** and is **not locked** by credits, trials, or payment.
* **Optional remote AI approval (paid BlogRaffo service)** - classification on BlogRaffo Hub (`https://api.blograffo.net`) for comments that remain pending after WordPress Discussion rules. Hub trial/paid **credits apply only to this remote AI approve path**, not to local antispam.

The plugin does **not** store LLM API keys in WordPress. After you accept the privacy notice, the site can register with the hub; pending comments may then be classified as approve / hold / spam. You choose the WordPress destination for hold and spam outcomes.

This is **serviceware (Guideline 6)**, not trialware: every feature shipped in the plugin ZIP stays available. When hub credits run out or the hub is unreachable, **local antispam keeps working**; only remote AI calls stop or stay on hold.

**Important**

* Master switch is **off** until you accept the notice and complete hub registration.
* Local antispam still runs when AI is off or unpaid.
* Hub AI uses trial/paid credits on the BlogRaffo service only for remote AI approvals; dry-run does not consume approve credits.
* Public "AI approved" footer / credit link is **opt-in** (default off).

See the Privacy section for exactly what leaves your site.

== Installation ==

1. Upload the `blograffo-comment-moderation-hub` folder to `/wp-content/plugins/`, or install the ZIP via Plugins -> Add New.
2. Activate the plugin through the Plugins screen.
3. Open Comments -> BlogRaffo Comment Hub, read the notice, and accept to register the site with the hub.
4. Review Antispam / Moderation / Allowed links settings, optionally run a dry-run on the queue, then enable the master switch when ready.

== Frequently Asked Questions ==

= Does this require my own OpenAI / Gemini key? =

No. Inference runs on BlogRaffo Hub. You do not paste LLM keys into WordPress.

= Is local antispam free? What about credits? =

Yes. Local antispam is included and always available with no credit or payment. Credits (trial or paid) are charged only for remote AI approvals on the BlogRaffo Hub service. Running out of credits does not disable local antispam or remove plugin code.

= What if the hub is unreachable or credits are exhausted? =

Remote AI stays on hold (or follows your hold destination). Local antispam still works offline.

= Can I decline the remote service? =

Yes. Decline on the consent screen deactivates the plugin. Without consent, hub AI does not run; you can still use WordPress without this plugin, and the shipped antispam code is not a locked premium module.

= Is this the same as older BlogRaffo plugins that stored LLM API keys in WordPress? =

No. Those older BYOK builds kept provider API keys in WordPress and are not this directory listing. This Hub edition is hub-only for AI, with free local antispam.

== Privacy ==

**Remote service:** `https://api.blograffo.net` (BlogRaffo).

**On registration** the plugin may send: site fingerprint, domain, site URL, site name, plugin version, product key (`rc-comment-guard`), locale, timestamp.

**On each AI moderation request** the plugin may send: comment body, author name, author URL, SHA-256 hashes of author email and IP (not plaintext), post title, extracted URLs, comment/post IDs, domain, site id, plugin version/locale, optional admin site-context text, local heuristic flags/score, dry-run flag, and a signed request (HMAC).

Email and IP are **not** sent in plaintext. Retention, credit accounting, and spam-memory behaviour on the hub are described in the service privacy policy on [blograffo.net/comment-moderation-hub](https://www.blograffo.net/comment-moderation-hub/).

Local antispam checks do not call the hub.

== Changelog ==

= 1.0.33 =
* Optional public AI signature on Hub AI spam (opt-in, default off) to distinguish AI spam from local antispam; separate template from approve signature.

= 1.0.32 =
* Pingbacks/trackbacks: apply the same local link allowlist (`antispam_links`) as comments so promo trackbacks with external URLs go straight to spam before any Hub moderate call.

= 1.0.31 =
* Restore Text Domain / zip root to requested slug `blograffo-comment-moderation-hub` (1.0.30 briefly remapped to legacy review slug — incorrect). Plugins Team: Text Domain warnings vs old `rc-comment-guard-hub` sandbox are expected until the new permalink is reserved.

= 1.0.30 =
* (superseded) Incorrect local pack remapped domain to legacy review slug; do not use.

= 1.0.29 =
* Plugin Check fixes: silence PrefixAllGlobals false positives on admin settings view (included from method scope only).

= 1.0.28 =
* Plugin URI / Donate link aligned to https://www.blograffo.net/comment-moderation-hub/ (permalink slug). Author URI remains https://www.blograffo.net/.

= 1.0.27 =
* wordpress.org headers: Author URI is https://www.blograffo.net/ (site); Plugin URI was https://www.blograffo.net/rc-commentguard/ (plugin page). They must differ.

= 1.0.26 =
* Hub registration sends product key `rc-comment-guard` so SiteRegister is product-scoped (no cross-product secret rotation with other BlogRaffo plugins).
* wordpress.org ZIP rebuilt with that register payload; Stable tag aligned.

= 1.0.25 =
* Auto-migrate vault credentials from v1 (AUTH-based seal) to v2 (plugin seal key) on init/activation so Hub stays configured after update without re-register. Legacy AUTH material is used only locally to decrypt old seals and is never sent to the hub.

= 1.0.24 =
* Site fingerprint v3: SHA-256 of public home/site hosts (+ subdirectory path). No AUTH keys, salts, DB credentials, or random UUID. Uninstall clears the local cache; reinstall on the same URLs recomputes the same id so hub trial is once per site.

= 1.0.23 =
* wordpress.org review: rename to BlogRaffo Comment Moderation Hub; PHP 7.4-safe strings; no AUTH keys in fingerprint/vault; enqueue admin CSS; UTF-8 readme; directory ZIP excludes bundled translations.

= 1.0.22 =
* Plugins screen: author is Blograffo.net and links to the plugin page.

= 1.0.21 =
* Hub domain-proof on registration (trial after verify); signed verify helper.
* Private updater host allowlist (lab); directory ZIP still excludes updater.
* Stable tag aligned with plugin header.

= 1.0.20 =
* Plugin Check: clear remaining security/i18n warnings (nonce in settings save, sanitize/unslash on input, remove discouraged load_plugin_textdomain, prepared local-spam query).

= 1.0.19 =
* wordpress.org package hygiene: EscapeOutput on admin notices; Stable tag aligned; private updater excluded from directory ZIP.

= 1.0.18 =
* Client UX: hub `no_credit` / daily quota exhaustion shown as credits exhausted (local antispam unchanged).

= 1.0.17 =
* i18n: full UI/admin translations - de_DE, fr_FR, es_ES, pt_PT, pt_BR, nl_NL, pl_PL, ru_RU, zh_CN (po+mo); it_IT kept.

= 1.0.16 =
* i18n: English gettext source for admin UI; languages/blograffo-comment-moderation-hub.pot + it_IT po/mo.
* Admin hard-coded Italian wrapped in __()/esc_html__().

= 1.0.15 =
* WordPress.org readiness: English readme.txt, GPL license headers, clear hub URL (no endpoint obfuscation).
* Removed third-party Update URI from the plugin header (private BlogRaffo updates remain opt-in via RC_CGH_PRIVATE_UPDATES).
* Consent / privacy notice aligned with the real registration and moderation payloads.
* Guideline 10: public AI signature / credit link defaults off (opt-in).
* Guideline 5-6 copy: local antispam always free; hub credits only for remote AI.

= 1.0.14 =
* Local gibberish check; hub payload uses SHA-256 email/IP hashes only.
* Settings merge preserves WP options on file-only updates.

= 1.0.6 =
* Antispam tab (honeypot, time, BBCode, regex, local spam, link allowlist).

= 1.0.0 =
* Initial hub-only client release.

== Upgrade Notice ==

= 1.0.17 =
Additional UI languages (DE/FR/ES/PT/BR/NL/PL/RU/zh_CN) bundled as po/mo.

= 1.0.16 =
i18n readiness for wordpress.org (POT + Italian translations).

= 1.0.15 =
Directory readiness: privacy/consent docs, opt-in public AI signature (default off), clearer free antispam vs paid hub AI credits.
