=== EM Event Submissions ===
Contributors: mmulligan
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 8.1
Requires Plugins: events-manager
Stable tag: 0.7.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Public event submissions for Events Manager, approved by site users from a personal review link in their email.

== Description ==

Visitors submit events through Events Manager's own form, placed on any page with the [em_event_submission_form] shortcode. Requires Events Manager 7.4.1 or later (tested with 7.4.6).

* Approvers are users of the site, chosen under Events → Submissions. With none chosen, every user who can publish events is asked. Each approver gets their own link by email.
* The link opens a review page with a preview of the event. Approving or rejecting acts as that user, with their permissions checked when they click. The first decision closes every approver's link.
* Whoever publishes a submission, from the email or in the admin, becomes its owner.
* Submissions from logged-out visitors always wait for review. Recurring submissions are optional and off by default.
* Cloudflare Turnstile is optional.
* Submitter details are shown only in the admin, and WordPress's personal-data export and erase tools cover them.
* Hooks for themes: the `ems_submission_form_fields` action adds fields to the form, the `ems_approval_recipients` filter adjusts who is asked, and the `ems_submission_save` and `ems_submission_published` actions run when a submission is stored and when it goes live.

If a page cache or CDN stores HTML in front of WordPress, never cache a request that has an `ems_action` query parameter or a cookie whose name starts with `ems_review_`.

== Changelog ==

= 0.7.0 =
* Breaking change: the "Admin email recipients" setting is gone. Approvers are now users of the site, chosen under Events → Submissions. Nothing is carried over, so choose your approvers after updating. Until you do, every user who can publish events gets a link.
* Now requires PHP 8.1 or later, WordPress 7.1 or later, and Events Manager 7.4.1 or later (tested with 7.4.6).
* Each approver gets their own link, which opens a review page. Approving or rejecting acts as that user, with their permissions checked at the time. Nobody gets a link for their own submission.
* Approval links sent by 0.6.x stop working. Publish or trash those submissions from Events → All Events.
* Rejected submissions go to the Trash, with any new venue the submission created.
* Whoever publishes a submission becomes its owner, and the submitter's details stop appearing as the event's contact.
* Approval publishes only the new venue the submission created. A submission whose venue has changed must be reviewed again.
* Every event saved by a logged-out visitor follows the submission rules and waits for review.
* The "Allow recurring event submissions" setting carries over from 0.6.2.
* The settings screen warns when Events Manager's guest user can publish events or venues, or manage bookings.
* Submitter details are shown only in the admin, and are covered by WordPress's personal-data export and erase tools.
* A saved Turnstile secret is never shown again. Clear the site key to switch Turnstile off.
* Review pages tell caching plugins not to store them. A page cache or CDN that serves pages before WordPress runs needs its own bypass rule (see the description).
* New hooks for themes: `ems_submission_form_fields`, `ems_approval_recipients`, `ems_submission_save`, `ems_submission_published`.
* Security hardening throughout submission, review and approval.

= 0.6.2 =
* Security: logged-out submissions always wait for approval; recurring submissions are optional (off by default).

= 0.6.1 =
* Security: correct capability checks that Events Manager 7.x answered too permissively for some objects. Update recommended.

= 0.6.0 =
* First release under the em-event-submissions slug (renamed from event-submissions). Clean-slate namespace move: option keys, site secret, token meta, preview cookie, and the submission shortcode tag all moved to the new em_event_submissions / ems_ / [em_event_submission_form] namespace. Existing installs must reconfigure settings and re-place the shortcode after updating.
