=== AppoDigireale Publisher ===
Contributors: marcocostanzo
Tags: frontend, post-submission, moderation, collaboration
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.4.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Front-page submissions for AppoDigireale, with role-based publishing and moderation.

== Description ==
This plugin adds a lightweight on-page composer at the theme's appodigireale_before_feed action. Submissions happen via same-origin Ajax and do not leave the home page. Native HTML form submission redirects to the same homepage as a no-JavaScript fallback.

Guest users and logged-in users without publish_posts submit Pending posts. Only authenticated users with native publish_posts capability can publish immediately. The plugin does not alter role permissions.

Security: nonce, server-side field validation, plain-text sanitization, escape-on-output, honeypot, short-lived hashed-IP rate limits, no file uploads, no custom public user capabilities, no remote dependencies, and anonymous global throttle. Contributions must still be moderated by site administrators; install proper anti-spam protections if operating publicly.

Privacy: this plugin saves submitted text as native WordPress posts. The publishing feature does not set its own cookies, perform analytics or send data offsite. The separately installed Jetpack Subscribe block handles subscriptions using Jetpack/WordPress.com services and their privacy terms. For throttling, a temporary hash derived from network IP is stored in a transient for two minutes; the raw IP is not saved by this plugin. Site/web server logs may still contain IP addresses. Do not submit personal information that should not be published.

The title field is always visible above the post message and remains optional. Administrators with the native manage_categories permission can create parent or child categories from the home page. The new category becomes selected in the composer automatically, with a no-JavaScript fallback. These actions have separate nonces and capabilities. Existing post submission behavior is unchanged.

A private visibility checkbox is offered to authenticated authors with publishing rights. Private posts use the core WordPress private post status, are not sent to Jetpack public newsletter subscribers, and can be read by their author and users granted the relevant WordPress read capabilities. A forged private request from a guest or subscriber is rejected, rather than saved as publicly visible pending content.

The homepage includes a Jetpack Subscribe block below the article feed when Jetpack registers it. Subscribers can choose newsletter categories once the site administrator enables Newsletter categories in the Jetpack Newsletter settings. This setting must be configured on the self-hosted WordPress dashboard; the plugin does not secretly alter Jetpack options.

A new AI access preference (Yes/No) is required with every homepage submission, including moderated guest posts. Editors can set or change the preference in a classic/Gutenberg metabox or through the registered _appo_ai_choice post meta REST field. Published posts display the author declaration. Existing posts show "not declared" until the author or an editor chooses a value. The plugin generates machine-readable meta, best-effort robots.txt hints, and restricts some identifiable crawlers at the singular and REST endpoints. Public content cannot be made un-readable to every AI: the robots.txt mechanism may not apply if a physical robots.txt file overrides WordPress, user agents can be spoofed, and copies, feeds, search engines and third-party caches may expose content. Use private post visibility for real access restrictions. No third-party network calls are added.

== Changelog ==
= 0.4.0 =
* Per-article AI access declaration, shown to readers and selectable from the frontend or WordPress editor.
* Best-effort machine-readable notices and crawler preferences; existing posts remain "not declared".

= 0.3.1 =
- Homepage composer heading: «Il tuo messaggio nella bottiglia...».

= 0.3.0 =
* Add public/private checkbox for authorized authors, using native WordPress private post permissions.
* Reject forged private submissions from guests or users lacking editorial capabilities.
* Render Jetpack Subscribe block at the bottom of the homepage, with a category guide and administrator setup reminder.

= 0.2.0 =
* Optional title moved above message field.
* Administrator-only category creation from the homepage, supporting parent categories, same-page AJAX, and a no-JavaScript fallback.
* Separate permission and nonce validation for taxonomy changes.

= 0.1.0 =
* Optional title and category fields, a simple composer and single-page AJAX post submission.
* Guest/moderated vs authorized/immediate publishing workflow.
