=== LaunchVik – Coming Soon & Maintenance Mode ===
Tags: maintenance mode, coming soon, under construction, client preview, launch page
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.5.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A lightweight coming-soon and maintenance mode with shareable, expiring preview links so clients can see the site without an account.

== Description ==

Building a site for a client? Turn on Coming Soon mode, then send the client a private preview link. They see the real site and you don't have to create a login for them. Turn the link off when you're done.

**Features**

* Three modes: Off, Coming soon (200 + noindex), Maintenance (503 + Retry-After, keeps SEO rankings).
* Client preview links: create, copy, set an expiry (1 day to never), see how often each was opened, turn off at any time.
* Automatic launch: the site goes live on its own at the launch date, visitors on the holding page are moved onto the live site, and you get an email.
* Choose which logged-in roles see the real site.
* Simple holding page: headline, message, logo, background image with adjustable darkening, three colors, optional countdown.
* "Preview holding page" button, so you see exactly what visitors see.
* Always-public pages (e.g. /privacy-policy or /landing/*).
* Blocks the REST API for anonymous visitors, so content can't leak through /wp-json/.
* Red admin-bar badge while the site is closed.
* No tracking, no page builder. Deleting the plugin removes all its data.

**LaunchVik Pro**

LaunchVik Pro adds client feedback pins, one-click "Approve for launch" from clients, and landing pages built from your own HTML. You can start a free trial or upgrade from Settings → LaunchVik.

**Third-party service**

Upgrades, licenses and Pro updates are handled by [Freemius](https://freemius.com) ([terms](https://freemius.com/terms/), [privacy policy](https://freemius.com/privacy/)). LaunchVik only contacts Freemius when you open the upgrade page, start a trial, activate a license, or choose to opt in on the welcome screen. Nothing is sent if you skip it.

== Installation ==

1. Upload the `launchvik` folder to `/wp-content/plugins/`, or upload the zip under Plugins → Add New → Upload Plugin.
2. Activate the plugin.
3. Go to Settings → LaunchVik.

== Frequently Asked Questions ==

= My caching plugin still shows the old page =

The holding page tells caching plugins not to store it, but a page cached before you turned the mode on may still be served. Clear your cache after switching modes.

= How do preview links work? =

Opening a link sets a secure cookie in the visitor's browser and redirects them to the normal site. The cookie stops working as soon as the link expires or you turn it off.

= Can I use my own template? =

Yes. Use the `launchvik_template` filter to return the path to your own PHP file.

= Does automatic launch need WP-Cron or a real cron job? =

No. LaunchVik checks the launch time on every page load, so the first visitor after the launch time already sees the live site.

== Changelog ==

= 1.5.3 =
* Fixed: background image URL is now escaped when printed.
* Changed: the "Preview holding page" button now uses a security token.

= 1.5.1 =
* Changed: all internal names now use the launchvik prefix. Settings and preview links from 1.5.0 need to be set up again.

= 1.5.0 =
* New: upgrade to Pro, start a free trial or manage your license from Settings → LaunchVik.
* Changed: plugin name now says what it does: LaunchVik – Coming Soon & Maintenance Mode.

= 1.4.0 =
* New: "Preview holding page" button so admins can see exactly what visitors see.

= 1.3.0 =
* New: background image for the holding page, with a "Darken image" slider so text stays readable.
* Fix: color pickers on the settings screen were misaligned.

= 1.2.0 =
* Fix: pages shown to preview visitors are no longer stored by page-cache plugins.

= 1.1.0 =
* New: automatic launch at the launch date, with an email and an admin notice when it happens.
* New: the admin-bar badge shows how long until launch.

= 1.0.0 =
* First release.
