=== Popmatic - Popup builder with full customisation ===
Contributors:      easytabsblock
Tags:              popup, modal, lightbox, announcement, promotion
Requires at least: 6.7
Tested up to:      7.0
Stable tag:        1.0.0
License:           GPLv2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html

Add fully customizable popups to your site with a native block for the block editor — announcements, promotions, seasonal campaigns and more.

== Description ==

Popmatic adds a fully customizable popup block to the WordPress block editor. Build the popup with any core or third-party blocks, then control how and when it appears — no page builder or extra JavaScript required.

**Key features**

* Native block for the block editor — design your popup with any blocks you like.
* Ready-made popup patterns for sales, seasonal campaigns, announcements and engagement, via the built-in pattern picker.
* Open triggers: on page load (with an optional delay), on click, or on hover.
* Position the popup anywhere on screen (9 positions) with an optional background overlay.
* Entrance animations: fade, slide (up/down/left/right) and zoom (in/out).
* Close options: close button, click outside, and the Escape key. At least one close method always stays enabled, so a popup can never trap your visitors.
* Show a popup only once per visitor, remembered in the visitor's own browser.
* Optionally lock background scrolling while the popup is open.
* Fully stylable close button (colors, size, border, radius and position offset).
* Accessible by default: the popup is a labelled dialog, focus is trapped while it is open and returned when it closes, and animations respect the "reduce motion" system setting.

**Blocks included**

* **Popup** — the popup wrapper that holds all display and behavior settings.
* **Popup Content** — the content area inside the popup that you fill with any blocks.

**Popmatic Pro**

Some settings in the popup sidebar are marked "(Pro)". They are not included in this
plugin and are shown so you can see what an upgrade adds. Popmatic Pro adds
scroll-distance and exit-intent triggers, an auto-close timer, extra close-button
selectors, repeat-display intervals (hours or days), audience targeting (logged-in,
logged-out or specific user roles), start/end scheduling, and per-page exclusions.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/popmatic` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. In the block editor, add the **Popup** block to any post, page or template and start building.

== Frequently Asked Questions ==

= How do I open the popup from a button or link? =

Set the Popup block's "Open Trigger" to "On Click" (or "On Hover") and enter the CSS class of the element that should trigger it in the "Anchor Trigger Class" field. Add that same class to the button or link using the block's "Additional CSS class(es)" field.

= How often will a visitor see the popup? =

Enable "Disable for Returning Visitors". The popup is then shown only once per visitor. The frequency data is stored in the visitor's own browser (localStorage) — nothing is stored on your server, and no personal data is collected.

To test the popup repeatedly while building your site, use a private/incognito window or clear your browser's site data — otherwise your own browser will remember having seen it.

Showing the popup again on a repeating interval (for example every 3 days) requires Popmatic Pro.

= Can I show the popup only to certain users, or only during a date range? =

Audience targeting and scheduling are part of Popmatic Pro. This free plugin shows the popup to everyone, whenever its open trigger fires.

= Can I use the popup inside a site template? =

Yes. Add the Popup block in the Site Editor — for example to a header or footer template part — and it will be available across the whole site rather than on a single post.

= Does the popup work with caching plugins? =

Yes. The free plugin renders the same markup for every visitor and decides when to open the popup in the browser, so it is fully compatible with page caching.

== Screenshots ==

1. Building a popup in the block editor — insert the Popup block, pick a ready-made pattern and publish.
2. A published popup on the front end — a Black Friday promotion built from a ready-made pattern, over the background overlay.
3. General settings: open trigger, trigger delay, content width, position, animation and background overlay.
4. Close and visibility settings: close button position, close on click outside or Escape, once-per-visitor display, plus a preview of Popmatic Pro options.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release of Popmatic.
