=== EmailFig ===
Contributors: emailfig
Tags: newsletter, email marketing, signup form, subscribe, popup
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add your EmailFig signup forms and popups to your site, and subscribe checkboxes to the forms you already have.

== Description ==

Grow your email list from your WordPress site. Show the signup forms you
built in EmailFig on your posts and pages, and let people subscribe while they
comment, register or fill in a contact form. New subscribers go straight into
the EmailFig list you choose.

You design and edit your forms in EmailFig, so a change to a form's wording or
look shows up on your site without touching WordPress.

* Add a form in the block editor with the EmailFig form block, and see it as
  you write.
* Put a form anywhere else with the `[emailfig_form]` shortcode.
* Show a form after every post or page, and pick a different one, or none, on
  any single post.
* Turn on EmailFig popups across your whole site.
* Add subscribe checkboxes to the comment form, the registration form,
  Contact Form 7 and WPForms.
* Use WordPress's privacy tools: suggested privacy policy text, plus personal
  data export and erasure.

== External Services ==

This plugin connects to EmailFig (https://emailfig.com), an email marketing
service, to list the signup forms in your account and to add subscribers. You
need an EmailFig account and an API key.

From your server, it sends:

* Your API key, on every request, to prove it is you.
* A User-Agent naming the plugin version, your WordPress version and your PHP
  version, on every request.
* When you connect: a request to read your account. When you open the
  plugin's settings or a post's Automatic EmailFig form box, or add an
  EmailFig form block: requests to read your forms and lists, kept for a
  short while. The block editor gets your forms from your own site, which
  asks EmailFig for them, so your API key never reaches a browser.
* When a visitor submits a form with the subscribe checkbox ticked (for a
  comment, once the comment is approved, and tried again if EmailFig could
  not be reached): their email address, their name if the form asked for it,
  the list you chose, which kind of form they used (for example
  `wordpress:comment_form`), their IP address and the time they ticked it.
  EmailFig keeps the IP address and time as the record of the signup. The
  checkbox wording is not sent.

Showing a page makes no request to EmailFig from your server, and nothing is
sent about a visitor who only views one.

From the visitor's browser: a page with an EmailFig form, and every page
while you have a popup turned on, loads a script and the form from EmailFig,
so EmailFig receives those requests and the IP address they came from. What a
visitor types into an EmailFig form goes from their browser to EmailFig
directly. The preview in the block editor, and the Preview link on the Forms
tab, load the form from EmailFig the same way, in your own browser. EmailFig
forms show a small "Powered by EmailFig" link, which a paid EmailFig plan can
turn off in the form builder.

Terms of service: https://emailfig.com/terms
Privacy policy: https://emailfig.com/privacy

== Installation ==

1. Install and activate the plugin.
2. In EmailFig, go to Settings → API keys and create a key.
3. In WordPress, open EmailFig in the menu and paste the key.
4. Put a form on a page with the EmailFig form block, or choose one to show
   after every post on the Forms tab. To add a checkbox to a form you already
   have, use the Subscribe checkboxes tab.

== Frequently Asked Questions ==

= Do I need an EmailFig account? =

Yes. You build your forms in EmailFig, and this plugin puts them on your site
and adds subscribe checkboxes to the forms you already have. You can sign up
at https://emailfig.com.

= Will this slow my site down? =

No. Your server never calls EmailFig while showing a page. The plugin adds
one small script that loads in the background, and the form appears in the
visitor's browser, so a slow or unreachable EmailFig can't slow down or break
a page.

= Does it work with my page builder? =

Yes. The `[emailfig_form]` shortcode works anywhere shortcodes do. Most page
builders, such as Elementor, Divi and Beaver Builder, have a shortcode element
for this: copy a form's shortcode from the Forms tab and paste it in.

= Which forms can I add a checkbox to? =

The WordPress comment form, the WordPress registration form, Contact Form 7 and
WPForms. You set each one up separately, and only the ones your site has are
shown.

= Do I have to add the checkbox to each form? =

On the comment form and the registration form, no. Turning it on adds the
checkbox for you. In Contact Form 7 and WPForms you choose which forms ask, so
nothing appears until you add it: put `[emailfig_subscribe]` in a Contact Form
7 form, or give a WPForms Checkboxes field the CSS class `emailfig-subscribe`.
The Subscribe checkboxes tab shows the steps for each.

= What happens if EmailFig can't be reached when someone signs up? =

The visitor's comment or form goes through as normal. Their action never
fails because of EmailFig. A comment form signup is tried again
automatically. Any signup that doesn't make it is listed on the Connection
tab so you can see what happened, and no email address is kept in WordPress.

= Is it GDPR friendly? =

It gives you the tools. Subscribe checkboxes start unticked unless you change
that, and EmailFig records the time and IP address of each signup as proof of
consent. You can make a list ask new subscribers to confirm by email, and
WordPress's privacy export and erasure tools include what the plugin keeps. You
are still responsible for your own privacy policy and how you use the list.

= Does it store personal data in WordPress? =

Only what WordPress already had. The comment form keeps a note on the comment
recording that the box was ticked, the wording shown at the time, and when.
EmailFig records the signup but not the wording, so that note is your own
record of what the visitor agreed to. WordPress's privacy tools export and
erase it with the comment, and deleting the plugin removes it entirely.

= Can I send people a confirmation email before adding them? =

Yes. Confirmation is a setting on the list in EmailFig rather than in
WordPress, so a list that confirms does it for every signup, not only the ones
from your site. The Subscribe to menu marks which of your lists confirm by
email.

== Screenshots ==

1. The Forms tab: every form with its list, its status and how to add it,
   plus where forms show up automatically.
2. Adding a subscribe checkbox to the comment form, Contact Form 7 and WPForms.
3. Choosing one of your EmailFig forms in the block editor, and seeing it as
   you write.

== Upgrade Notice ==

= 1.2.0 =
Forms placed automatically can now sit above the content as well as below it, and a visitor's full name is split into a first and last name instead of going into the first name whole.

= 1.1.0 =
Adds an EmailFig form block, so you can choose a form in the editor instead of writing a shortcode, and see it as you write.

== Changelog ==

= 1.2.0 =
* New: choose whether a form placed automatically goes above or below the content.
* New: a visitor's full name is split into a first and last name instead of going into the first name whole.
* New: a link to create an EmailFig account on the connect screen, for sites that do not have one yet.

= 1.1.0 =
* New: an EmailFig form block, so you can choose a form in the editor instead of writing a shortcode.
* New: the block shows the real form as you write, and every form has a Preview link on the Forms tab.

= 1.0.0 =
* Place a form with the `[emailfig_form]` shortcode or the `emailfig_form()` template tag.
* Show a form after the content of every post of a type, and choose a different form or none on any single post.
* Turn on popup forms across the site.
* Add subscribe checkboxes to the comment form, the registration form, Contact Form 7 and WPForms.
* Try comment form signups again when EmailFig can't be reached.
* List recent signups that didn't make it on the Connection tab.
* Tell you in wp-admin when the plugin isn't connected, or when EmailFig stops accepting it (a replaced key, or a suspended or closing account).
* Suggest privacy policy text, and include the comment consent note in WordPress's personal data export and erasure.
