=== Fileveil ===
Contributors: ornatesol
Tags: popup, modal, lightbox, pdf, image
Requires at least: 6.7
Tested up to: 7.1
Stable tag: 1.0.0
Requires PHP: 8.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Create powerful, lightweight popups for images, PDFs and content with precise page targeting, triggers, scheduling and display controls.

== Description ==

Fileveil is a lightweight popup plugin for images, PDF documents, and simple content. It is developed by Ornate Solutions GmbH (https://www.ornatesol.com/). It is built for administrators who want a popup ready in a minute or two, without a page builder and without an external account.

Create a popup, choose what it shows, decide exactly where it appears, and set when it opens and how often. The public site loads the popup stylesheet and script only when an active popup can appear on that request.

= What you can show =

* An image from the Media Library, with size, fit, alt text, and an optional link.
* A PDF from the Media Library, displayed inside the popup, with download and “Open PDF” fallbacks. The file stays on your site.
* A heading, description, text, button, and optional custom HTML. Scripts and embeds are removed.

= Where it appears =

* Selected published pages.
* Selected published posts.
* Public content types.
* The front page, blog index, search results, 404 page, or archives.
* The whole site, with pages you can exclude.
* Specific URL paths, such as `/special-offer/`.

Draft, private, and trashed content cannot be saved as public targets.

= When it opens =

* When the page is ready, with an optional delay.
* After the visitor scrolls to 25%, 50%, 75%, or the bottom of the page.
* When the pointer leaves a desktop window. This does not run on phones or tablets.

= How often =

Every visit, once per page load, once per browser session, once until the visitor closes it, once every 24 hours, once every 7 days, or once every 30 days.

Every visit stores nothing. The timed choices count 24 hours, 7 × 24 hours, or 30 × 24 hours from the moment the popup was shown. They are not calendar days, weeks, or months. “Once until the visitor closes it” is stored only when the visitor closes it, not when a timer closes it. The memory stays in that browser. Fileveil stores a popup ID and a time. It does not store a name, email address, IP address, or browsing history.

If more than one published popup matches the same page, visitors see the one that was edited most recently. The others stay saved.

= Schedule =

Set a start and an end in the timezone chosen under Settings → General. An expired popup is not shown. The visitor’s timezone does not move the schedule.

= Privacy and weight =

Fileveil does not add analytics, advertising, or a public credit line. It does not connect to an external service. Administrators and editors manage popups. Site-wide settings stay with administrators.

== Installation ==

1. Upload the `fileveil` folder to `/wp-content/plugins/`, or install the zip from Plugins → Add New → Upload Plugin.
2. Activate Fileveil through the Plugins screen.
3. Open Fileveil → Add Popup.

== Frequently Asked Questions ==

= Does Fileveil work without Elementor, WooCommerce, or a page builder? =

Yes. It uses WordPress pages, posts, the Media Library, and its own admin screens.

= How do I show a popup on only a few pages? =

In Display, choose Selected pages. Search for the page and add it. Only published pages are kept.

= What happens if a browser cannot show a PDF? =

The popup includes an Open PDF link. On small screens you can show that link instead of the embedded document.

= Does “once per day” identify the visitor? =

No. The browser stores a key starting with `fileveil:`, the popup ID, and a time. “Once every 24 hours” means 24 hours from the last time it was shown on that device. “Once every 7 days” means 7 × 24 hours. “Once every 30 days” means 30 × 24 hours, not a calendar month. Clearing site data for the website removes the memory.

= Which timezone does the schedule use? =

The timezone in Settings → General. It does not use the visitor’s timezone. The start minute and the end minute are both included. If the end time is empty, the popup runs through 23:59 on the end date and stops at 00:00.

= Can visitors be forced to wait before closing? =

No. The close button, the overlay, and the Escape key remain available. Automatic closing is optional and never blocks those controls.

= Who can manage popups? =

Administrators and editors. Settings are limited to administrators. A preview can be opened only by someone allowed to edit that popup.

= What is removed on uninstall? =

Deleting the plugin removes its popups, settings, and the capabilities it added. Deactivating it keeps the popups.

== Screenshots ==

1. Dashboard with popup counts and recently edited popups.
2. Popup list with status, display location, trigger, and actions.
3. Content choices for an image, a PDF, or text and a button.
4. Design settings for size, position, overlay, and animation.
5. Published-page search for display targeting.
6. Behavior settings for trigger, frequency, and closing.
7. Desktop, tablet, and mobile preview.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.

== Privacy ==

Frequency controls may store a popup ID and a timestamp in the visitor’s browser, using localStorage or sessionStorage. Fileveil does not set a cookie for this and does not send that value to the site or to a third party. The suggested privacy policy text is available under Settings → Privacy in WordPress.
