=== Forward: Simple Mailchimp Form ===
Contributors: forlaens
Tags: mailchimp, newsletter, signup, form, shortcode
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.2.13
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add a simple Mailchimp signup form to any post, page, or template with a shortcode.

== Description ==

Forward: Simple Mailchimp Form adds a lightweight signup form that subscribes visitors to a Mailchimp audience. Configure your API key, default audience/list ID, subscription status, and response messages, then place the form with a shortcode.

The plugin is intentionally small: it focuses on one form, one audience/list, and clear setup.

= Key features =

* Adds a Mailchimp signup form with `[simple_mailchimp]`.
* Collects email address, first name, and last name.
* Supports immediate subscription or confirmation by email.
* Lets you customize success and error messages.
* Uses the WordPress HTTP API for Mailchimp requests.
* Includes bundled translation files for common languages.

= Requirements =

* A Mailchimp account.
* A Mailchimp API key.
* A Mailchimp audience/list ID.

== Shortcode and template usage ==

Add the form to a post, page, or widget area with:

`[simple_mailchimp]`

Add the form from a theme template with:

`<?php echo do_shortcode( '[simple_mailchimp]' ); ?>`

The settings screen also includes the generated HTML form markup if you want to adapt the fields manually.

== External service and privacy ==

This plugin connects to the Mailchimp API when a visitor submits the signup form.

Submitted email address, first name, last name, the configured subscription status, and the configured audience/list ID are sent to Mailchimp over HTTPS. The API endpoint is based on your API key's data center and uses this pattern:

`https://<dc>.api.mailchimp.com/3.0/lists/{list_id}/members/{subscriber_hash}`

The plugin stores the API key, default list ID, subscription status, and response messages in WordPress options. It does not store submitted subscribers in WordPress.

Mailchimp's terms and privacy information are available at [https://mailchimp.com/legal/terms/](https://mailchimp.com/legal/terms/) and [https://mailchimp.com/legal/privacy/](https://mailchimp.com/legal/privacy/).

== Installation ==

1. Install the plugin from **Plugins > Add New**, or upload the `simple-mailchimp` folder to `/wp-content/plugins/`.
2. Activate the plugin from the **Plugins** screen in WordPress.
3. Open **Settings > Forward: Simple Mailchimp Form**.
4. Enter your Mailchimp API key and default audience/list ID.
5. Choose whether new subscribers are added immediately or confirmed by email.
6. Add `[simple_mailchimp]` to any post or page.

== Frequently Asked Questions ==

= Do I need a Mailchimp account? =

Yes. The plugin sends subscribers to Mailchimp, so you need a Mailchimp API key and audience/list ID.

= Where do I find my Mailchimp list ID? =

In Mailchimp, open the audience you want to use and copy its audience/list ID from the audience settings.

= Can I use the form in a template file? =

Yes. Use `do_shortcode( '[simple_mailchimp]' )` from your template.

= Does the plugin store subscribers in WordPress? =

No. Subscriber details are sent to Mailchimp and are not stored locally by this plugin.

== Screenshots ==

1. Settings screen for API key, list ID, subscription status, and messages.
2. Example signup form displayed on a page.
3. Success message after a completed subscription.

== Changelog ==

= 1.2.13 =

* Add translated setup help for Mailchimp API keys and audience IDs.
* Move settings screen styles into an enqueued admin stylesheet for cleaner WordPress.org checks.

= 1.2.12 =

* Remove the legacy manual textdomain loader so WordPress.org can load translations automatically without Plugin Check warnings.

= 1.2.11 =

* Improve shortcode form target sizes, focus styles, and scoped front-end styling for accessibility.
* Improve target sizing for the custom HTML details control on the settings screen.

= 1.2.10 =

* Apply the Forward color palette to the settings and help screens, including light and dark color modes.
* Prefix internal shortcode helper functions for cleaner WordPress Plugin Check results.

= 1.2.9 =

* Fix front-end form submission processing so nonce validation runs after WordPress has loaded its pluggable functions.
* Improve settings labels for the customizable success and error messages.

= 1.2.8 =

* Improve responsive behavior for the settings and help screen on narrow admin viewports.

= 1.2.7 =

* Only repopulate submitted form fields after nonce validation to satisfy Plugin Check form handling requirements.

= 1.2.6 =

* Correct the Forlæns author URL to `forlaens.com`.

= 1.2.5 =

* Add the shared Forward icon to plugin assets and the settings screen.

= 1.2.4 =

* Refresh the settings and help screens with a cleaner, modern WordPress admin layout.
* Add a clearer saved-settings notice.

= 1.2.3 =

* Add bundled translations for common languages.
* Improve settings security with capability checks, nonces, sanitization, and safe redirects.
* Add frontend nonce verification for form submissions.
* Use the WordPress HTTP API for Mailchimp requests with standard TLS verification.
* Always subscribe to the configured default list instead of accepting a submitted list ID.
* Add browser-side required fields to the signup form.
* Fix uninstall cleanup for plugin options.
* Remove donation prompts from the plugin screen and readme.
* Remove obsolete direct-access messaging and unnecessary output buffering.

== Upgrade Notice ==

= 1.2.13 =

Adds translated Mailchimp setup help and uses an enqueued admin stylesheet.

= 1.2.12 =

Removes the legacy textdomain loader for cleaner WordPress.org Plugin Check results.

= 1.2.11 =

Improves front-end form accessibility and settings help target sizing.

= 1.2.10 =

Applies the Forward color palette and improves internal function prefixing.

= 1.2.9 =

Fixes front-end form submissions that could trigger a critical error before WordPress finished loading.

= 1.2.8 =

Improves the settings and help layout on smaller screens.

= 1.2.7 =

Improves frontend form handling for cleaner WordPress.org checks.

= 1.2.6 =

Corrects the Forlæns author URL.

= 1.2.5 =

Adds the shared Forward icon to plugin assets and the settings screen.

= 1.2.4 =

Refreshes the settings and help screen layout.

= 1.2.3 =

Improves localization, Mailchimp request handling, form submission security, and uninstall cleanup.
