=== Flex Maintenance ===
Contributors: flexfields, hovoqoch
Tags: maintenance, coming-soon, under-construction, countdown, 503
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Coming soon, under construction, and maintenance splash pages. Login and wp-admin stay available.

== Description ==

**Flex Maintenance** is part of the FLEX plugin suite from **FLEX LLC** (https://flexible.am/). It puts a public splash in front of the website while you build or repair it. Login and wp-admin stay available. Logged-in administrators always see the real site. Use Preview splash to check the design.

* Coming soon, under construction, or maintenance page types
* Optional start and end schedule in the site timezone
* Countdown when a future time is set
* Bypass by extra roles, secret link, IP allowlist, or public paths
* Three local templates (centered, split, minimal), logo, background, accent, and social links
* Preview from admin and an admin-bar badge when the splash is on
* Block bots and crawlers while the splash is on (Recommended, on by default)
* Purges Flex Cache when the splash turns on or off

Admin CSS and JavaScript ship with the plugin. The public page does not load Tailwind, Google Fonts, or any other remote stylesheet. No remote calls. No telemetry.

= Privacy =

Flex Maintenance does not log visitors, IPs, or user agents. It does not send data to FLEX or any third-party service.

**IP allowlist** (optional): addresses you type on Settings are stored in the WordPress options table. The plugin compares them to `REMOTE_ADDR` only. It does not store visitor IPs.

**Secret bypass cookie** (optional): if someone opens your secret link, a 7-day HttpOnly cookie (`flex_maintenance_ok`) is set so they can see the real site. The cookie holds the preview token. It is not used for analytics.

**Preview** (administrators only): **Preview splash** opens the public page with a nonce so you can check the design without logging out.

= Limitations =

* This is a splash page, not a landing-page builder, form plugin, or analytics tool.
* Only one full-page splash is shown. It does not hide wp-admin or the login form.
* Fast page caches (including Flex Cache) are purged when settings change. The splash itself is not stored in Flex Cache.

== Installation ==

1. Upload the `flex-maintenance` folder to `/wp-content/plugins/`, or install the zip via **Plugins → Add New → Upload Plugin**.
2. Activate **Flex Maintenance**.
3. Go to **Flex Maintenance → Design** and save the splash copy.
4. Go to **Flex Maintenance → Settings**, choose the page type, then enable the splash.
5. Open the site in a private window (logged out) to confirm visitors see the splash.

== Frequently Asked Questions ==

= Can visitors still log in? =

Yes. `wp-login.php` and wp-admin stay open. If Flex Website Security uses a custom login slug, that path stays open too.

= Who sees the real site? =

Logged-in administrators always see the real site. You can also allow extra roles, IPs, paths, or share a secret bypass link. Use Preview splash to check the design.

= What HTTP status does it send? =

Maintenance sends 503 with Retry-After. Coming soon and under construction send 200. The splash is never stored by Flex Cache after a purge.

= Does it load CSS from a CDN? =

No. Templates are local CSS. There is no Tailwind runtime and no Google Fonts.

= What happens when I uninstall? =

Deleting the plugin removes its settings and the cache-state flag. It does not change your theme or other plugins.

== Screenshots ==

1. Settings — status, page type, schedule, and access
2. Design — templates, copy, and branding
3. Usage — in-plugin guide

== Changelog ==

= 1.0.0 =
* Initial release.
* Design uses form fields only. Custom CSS is not accepted. Splash styles are enqueued.

== Upgrade Notice ==

= 1.0.0 =
First release: coming soon, under construction, and maintenance splash pages.
