=== ElWin PopUp ===
Contributors: elwindev
Tags: popup, form, contact, callback, modal
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.2.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Create popup windows with customizable forms, AJAX submission, and email notifications.

== Description ==

ElWin PopUp allows you to create popup windows with fully customizable forms. Assign a CSS class to any element on your site to trigger a specific popup on click.

**Features:**

* Custom Post Types for Popups, Forms, and HTML Blocks
* Popup content type: display a form or an HTML block
* Form builder with drag-and-drop field ordering
* Field types: Text, Phone, Email, Textarea, Checkbox, Select
* AJAX form submission (no page reload)
* Email notifications with HTML template
* Per-form notification email and email subject
* Default consent checkboxes for new forms (configurable in settings)
* Privacy policy URL placeholder for checkbox texts
* Client-side and server-side validation
* Anti-spam protection (honeypot + time-check)
* Russian translation included
* Clean uninstall — removes all plugin data

== Installation ==

1. Upload the `elwin-popup` folder to `/wp-content/plugins/`.
2. Activate the plugin through the "Plugins" menu in WordPress.
3. Go to "ElWin PopUp" in the admin menu to create forms and popups.

**Quick Start:**

1. Create a Form (ElWin PopUp > Forms > Add New).
2. Create a Popup (ElWin PopUp > Popups > Add New), link the form, and set a CSS trigger class.
3. Add the CSS class to any element on your site (e.g., a button).
4. The popup will open on click with the linked form inside.

== Frequently Asked Questions ==

= How do I open a popup? =

Add the CSS trigger class (configured in popup settings) to any HTML element. Clicking that element will open the popup.

= Where do form submissions go? =

Submissions are sent via email. You can set a global notification email in Settings, or override it per form.

= Can I use HTML links in checkbox labels? =

Yes. Checkbox labels support safe HTML links (`<a>` tags). You can also use the `{privacy_url}` placeholder which is replaced with the privacy policy URL from settings.

== Changelog ==

= 1.2.1 =
* Added per-popup max-width setting (configurable 300–1200px, default 520)
* Added responsive CSS for iframe/video/embed inside HTML block popups (aspect-ratio 16:9, 100% width)
* Updated Russian translation

= 1.2.0 =
* Added HTML Block content type for popups
* Popups can now display either a form or an HTML block
* New CPT: HTML Blocks with standard WordPress editor
* Admin menu items: HTML Blocks, Add New HTML Block
* Content type selector in popup settings (Form / HTML Block)
* Popup list shows content type and linked content columns
* HTML Block list shows which popups use each block
* Full backward compatibility with existing form-based popups
* Updated Russian translation

= 1.1.0 =
* Added per-form notification email with global fallback
* Improved email template (HTML format with structured layout)
* Added global default checkbox texts in plugin settings
* Added privacy policy URL setting with {privacy_url} placeholder
* Added anti-spam protection (honeypot field + submission time check)
* Added unique CSS class per popup container (elwin-popup-container-{id})
* Updated readme.txt and changelog
* Version bump to 1.1.0

= 1.0.0 =
* Initial release
* Popup and Form custom post types
* Form builder with 6 field types
* AJAX form submission with validation
* Email notifications
* Custom email subject per form
* Default consent checkboxes for new forms
* Admin columns for popups and forms
* Russian translation
* Phone validation and tabular-nums
* Hide label option for fields
