# NWS Sendy Plugin

## Description
NWS Sendy is a WordPress plugin that integrates with Sendy, allowing users to easily manage their email subscriptions through a simple interface. This plugin provides an admin settings page for configuring the Sendy API key and List ID, as well as a shortcode and block to display a subscription form on the front end.

## Features
- Admin interface under the Tools menu for setting the API key and List ID.
- Shortcode to display a subscription form widget.
- Block for the WordPress block editor that replicates the functionality of the shortcode.
- Fallback template for the subscription form if the theme template is not found.

## Installation
1. Upload the `nws-sendy` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Navigate to Tools > NWS Sendy to configure your API key and List ID.

## Usage
- Use the shortcode `[nws_sendy_form]` to display the subscription form in posts or pages.
- Add the Sendy form block in the block editor to include the subscription form in your content.

## Success and error message customization
There are two filters available for overriding success and error messages after a subscribe attempt. 
You can simply override them by implementing filters:
* `nws_sendy_form_success_message`
* `nws_sendy_form_error_message`

## Support
For support, please open an issue on the plugin's repository or contact the plugin author.

## Changelog
- **1.0.1** - Fixed direct access security issue.
- **1.0.0** - Initial release of the NWS Sendy plugin.