=== SoftGlaze Maintenance Mode & Coming Soon ===
Contributors: softglaze
Donate link: https://softglaze.com/
Tags: maintenance mode, coming soon, under construction, landing page, countdown
Requires at least: 5.8
Tested up to: 7.1
Stable tag: 1.7.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Coming Soon and Maintenance Mode pages with 12 templates, countdown timers, a subscriber form, scheduling and access rules for roles, users and IPs.

== Description ==

SoftGlaze Maintenance Mode & Coming Soon shows visitors a Coming Soon or Maintenance page while you work on the site, and lets the people you choose see the real site.

= Two modes =

* **Coming Soon** sends HTTP 200, for a site that has not launched yet.
* **Maintenance** sends HTTP 503 with a Retry-After header, which tells search engines the outage is temporary.
* **Off** shows the normal site.

The mode is switched from the status bar at the top of the settings screen. The status bar also shows the HTTP status being sent, and warns you when Coming Soon is set to 503. The "Add noindex / nofollow" option adds a robots tag that asks search engines not to index the page. It is on by default; switch it off if you want your Coming Soon page indexed.

= Templates and design =

* 12 layouts: six for Coming Soon and six for Maintenance.
* Background, text and accent colours, a background image, a template image and a logo with an adjustable maximum height.
* Heading and body fonts chosen separately from Poppins, Inter, Playfair Display, System UI, Georgia, Helvetica or Monospace. Poppins, Inter and Playfair Display are bundled with the plugin and served from your own site.
* An option to use your theme's fonts and colours instead.
* More than 20 content presets: ready-made headlines and messages for launches, redesigns and maintenance, previewed before you apply them.
* Social profile icons for Facebook, Instagram, X, LinkedIn, YouTube, WhatsApp, TikTok, Telegram and more, drawn as inline SVG.

You can also show a WordPress page or a SoftGlaze Landing Page instead of a template. Landing Pages are a post type that works with the block editor and with page builders such as Elementor.

= Countdown =

Six countdown styles: Simple, Boxed, Circle, Neon, Glitch and Pill. When the countdown reaches zero the page either shows a message you write or redirects visitors to a URL you choose.

= Subscriber form =

* Build the form from Text, Email and Phone fields, in one or two columns, and drag them into order.
* Subscribers are saved in a table in your WordPress database with the email address, the other form fields, the visitor's IP address, browser user agent and the page URL. You can export them to CSV.
* An optional email to you for each new subscriber.
* A short privacy text under the form, which you can edit.
* A honeypot field and a per-IP hourly limit to slow down spam.
* To use another form plugin instead, set the Form Type to Shortcode and paste the form's shortcode.

Sending subscribers to Mailchimp or to a webhook URL is optional and off until you configure it. See External services below.

= Scheduling =

Set a start and end time and the plugin switches to Coming Soon or Maintenance when the window starts, then back to the mode you choose when it ends. Scheduling uses WP-Cron.

= Who can see the real site =

* Administrators always see the real site.
* Allow all logged-in users, chosen roles or chosen user accounts.
* An IP allowlist, with CIDR ranges for IPv4.
* A secret bypass URL, and temporary bypass links that expire after the number of hours you set.
* A password form on the Coming Soon or Maintenance page.
* Preview links that show a template to someone without changing the live mode.
* URL rules: never intercept some paths, or only intercept the paths you list. WooCommerce cart, checkout and account pages can be left open.

= Visit counts =

The plugin counts views of the Coming Soon or Maintenance page and new subscriptions per day, and shows the last seven days in the settings. Only the daily totals are stored, in your own database, for 60 days. No visitor data is stored for this and nothing is sent anywhere. Visits by administrators are not counted, and counting can be switched off.

= Tracking and verification =

The Integrations tab has fields for a Google Analytics 4 measurement ID, a Google Tag Manager container ID and a Meta Pixel ID. Each is empty by default and nothing is loaded until you enter an ID. Entering one loads that service's script on the Coming Soon or Maintenance page; see External services.

Google, Bing and Facebook site verification codes, and other `<meta>` tags, can be added to the page head. These are tags in the page and make no requests.

Version 1.7.0 removed the custom code boxes. See the FAQ.

== External services ==

The plugin connects to no outside service on a default install. Each service below is used only after you configure it in the settings, and only on the Coming Soon or Maintenance page or when a visitor subscribes.

= Google Tag Manager =
* What it is: Google's tag management service.
* When: you enter a Google Tag Manager container ID under Integrations. The Coming Soon or Maintenance page then loads `https://www.googletagmanager.com/gtm.js?id=<your ID>`, plus `https://www.googletagmanager.com/ns.html?id=<your ID>` for visitors without JavaScript.
* What is sent: the visitor's browser requests these files from Google, which receives the visitor's IP address, browser details and the page URL, and any data the tags in your container collect.
* Terms: https://marketingplatform.google.com/about/analytics/tag-manager/use-policy/
* Privacy policy: https://policies.google.com/privacy

= Google Analytics 4 =
* What it is: Google's web analytics service.
* When: you enter a GA4 measurement ID under Integrations. The Coming Soon or Maintenance page then loads `https://www.googletagmanager.com/gtag/js?id=<your ID>` and records a page view.
* What is sent: the page view, the visitor's IP address, browser details, the page URL and Google Analytics cookies.
* Terms: https://marketingplatform.google.com/about/analytics/terms/us/
* Privacy policy: https://policies.google.com/privacy

= Meta Pixel =
* What it is: Meta's conversion tracking pixel.
* When: you enter a Meta Pixel ID under Integrations. The Coming Soon or Maintenance page then loads `https://connect.facebook.net/en_US/fbevents.js` and sends a PageView event, or loads `https://www.facebook.com/tr?id=<your ID>` for visitors without JavaScript.
* What is sent: the PageView event, the visitor's IP address, browser details, the page URL and Meta cookies.
* Terms: https://www.facebook.com/legal/terms/businesstools
* Privacy policy: https://www.facebook.com/privacy/policy/

= Mailchimp =
* What it is: Mailchimp's email marketing service, through the Mailchimp Marketing API.
* When: you fill in the Mailchimp API key, audience (list) ID and data center under Integrations. After that, each new subscription is sent from your server to `https://<data center>.api.mailchimp.com/3.0/lists/<audience ID>/members/`.
* What is sent: the subscriber's email address, and first name, last name and phone when your form collects them, authenticated with your API key.
* Terms: https://mailchimp.com/legal/terms/
* Privacy policy: https://www.intuit.com/privacy/statement/

= Webhook =
* What it is: a URL of your own choosing, such as an automation service or your own server.
* When: you enter a Webhook URL in the Access Control tab. After that, each new subscription is sent from your server to that URL as a JSON POST request.
* What is sent: the email address, the other form fields, the visitor's IP address, the page URL and the time of the subscription.
* The plugin has no terms or privacy policy for this destination: it is the address you enter, and that service's own terms apply.

= Links the plugin shows but never requests =
* The Documentation, Support and Rate links on the Plugins screen point to this plugin's pages on wordpress.org.
* Social profile links on the page are the URLs you enter.

== Installation ==

1. In your dashboard go to **Plugins > Add New**, search for "SoftGlaze Maintenance Mode", then install and activate it. Or upload the `softglaze-maintenance-mode-coming-soon` folder to `/wp-content/plugins/` and activate it on the Plugins screen.
2. Open **SoftGlaze Coming Soon** in the admin menu.
3. Choose Coming Soon or Maintenance in the status bar at the top of the screen.

== Frequently Asked Questions ==

= What is the difference between Coming Soon (200) and Maintenance (503)? =
Coming Soon sends HTTP 200, a normal response, which suits a site that has not launched. Maintenance sends HTTP 503 with a Retry-After header, which tells search engines the site is down for a while and should be checked again later.

= Where do the fonts come from? =
Poppins, Inter and Playfair Display are bundled with the plugin and served from your own site. Nothing is requested from Google Fonts or any other service. The other options are system font stacks, which download nothing.

= Does it load anything on my normal site? =
No. The plugin's front-end files load only when the Coming Soon or Maintenance page is shown.

= Do I need a page builder? =
No. The built-in templates need no page builder. If you want to design the page yourself, show a WordPress page or a SoftGlaze Landing Page instead.

= What happens to the subscribers I collect? =
They are saved in your WordPress database with the email address, the other form fields, IP address, browser user agent and page URL, and you can export them to CSV. They are sent to Mailchimp or a webhook only if you set one up. The table is removed on uninstall only if you tick the option to delete data on uninstall.

= Can I use WPForms, Gravity Forms or Contact Form 7 instead of the built-in form? =
Yes. In the subscriber form settings, set the Form Type to Shortcode and paste the form's shortcode.

= Can a client see the site without a login? =
Yes. Send them the secret bypass URL or a temporary bypass link from the Access Control and Automation tabs. You can also allow roles, user accounts or IP ranges.

= Can I schedule maintenance mode in advance? =
Yes. Set a start and end time under scheduling, and choose which mode to return to when the window ends.

= What happens when the countdown reaches zero? =
The page shows the message you wrote, or redirects visitors to the URL you set.

= Where did the custom CSS and code boxes go? =
Version 1.7.0 removed the custom CSS setting and the head, body and footer code boxes, because WordPress.org no longer allows plugins to save and print arbitrary CSS or JavaScript. Values saved in those boxes are deleted when you update. Use the GA4, Google Tag Manager and Meta Pixel ID fields for tracking, the verification fields and the Custom Meta Tags box for `<meta>` tags, and the design settings for colours, fonts and images.

= Does the plugin help with privacy laws such as the GDPR? =
It gives you the pieces: a privacy text under the form, local storage of subscribers, CSV export, and tracking that stays off until you enter an ID. Whether your site complies depends on how you set it up, your privacy policy and any consent your visitors give.

== Screenshots ==

1. Status bar for switching between Live, Coming Soon and Maintenance.
2. Layout picker with 12 templates, and heading and body font settings.
3. Form builder with Text, Email and Phone fields, or a form plugin shortcode.
4. Access control: roles, users, IP ranges and the secret bypass URL.
5. Countdown settings: styles, and a message or redirect at zero.
6. Integrations: GA4, Google Tag Manager, Meta Pixel and site verification fields.
7. Subscribers list with CSV export.
8. A Coming Soon template on the front end.
9. A Maintenance template on the front end.
10. Content presets with a preview before applying.
11. Design settings, including using the theme's fonts and colours.
12. Social icons settings.

== Changelog ==

= 1.7.0 =
* Removed: The custom CSS setting and the head, body and footer code boxes. WordPress.org no longer allows plugins to save and print arbitrary CSS or JavaScript. Values saved in them are deleted on update.
* Changed: The Custom Meta Tags box now keeps only `<meta>` tags with name, property and content. `<link>` tags and other attributes are no longer printed.
* Added: An External services section in this readme for Google Tag Manager, Google Analytics 4, Meta Pixel, Mailchimp and the webhook, and notes beside those settings on what each one sends.
* Changed: The Documentation link on the Plugins screen now opens this plugin's FAQ on wordpress.org.
* Changed: Plugin header and readme rewritten as plain documentation; Author URI corrected; Requires at least and Requires PHP added to the plugin header.
* Changed: The plugin's PHP constants are renamed from SG_MMCS_* to SOFTGLAZE_MMCS_*, a longer and unique prefix. Code outside the plugin that read the old constants needs the new names.
* Tested up to WordPress 7.1.

= 1.6.0 =
* Added: Heading Font and Body Font selectors. Pick Poppins, Inter, Playfair Display, System UI, Georgia, Helvetica or Monospace for each, so a serif headline can sit above a sans body.
* Added: Inter and Playfair Display are now bundled with the plugin under the SIL Open Font License. Both are variable fonts, one file each, served from your own site.
* Added: Logo Max Height setting, 20 to 300 pixels.
* Improved: Fonts apply only when you choose them. Left on "Follow the setting above", the Inherit Theme Fonts checkbox behaves exactly as it did before, so updating changes nothing on a page you already have live.

= 1.5.0 =
* Added: Two new Coming Soon templates. Launch Card puts the countdown first under an image banner, Editorial is left aligned with large type and no card. The library is now 12 layouts.
* Added: Template Image setting. A second image used inside the layout itself, such as the panel on Split Screen or the banner on Launch Card. Leave it empty and the background image is used instead.
* Improved: Background, text and accent colours now reach every layout. A layout keeps its own palette until you actually choose a colour, so updating will not restyle a page you already have live.
* Fixed: The Maintenance layout 5 and 6 headline rules were not scoped to Maintenance, so they could colour headlines on other layouts.
* Fixed: The Split Screen image panel had no image of its own and fell back to the page background.
* Added: Settings, Documentation, Support and Rate links on the Plugins screen.
* Added: Complete translation template (245 strings).
* Improved: Template picker redesigned. Each of the 12 layout thumbnails now draws the real page structure and uses your own colours.
* Improved: The status bar reports the HTTP status actually being sent, and warns, with a link to fix it, when Coming Soon is set to 503.
* Fixed: The bundled Poppins font shipped the Regular weight three times, so headings set to semibold or bold rendered at normal weight.
* Fixed: Quick Preview Links could generate the wrong template.
* Fixed: Layouts could not be chosen with the keyboard, and had no visible focus indicator.
* Fixed: Focus outlines were suppressed on the settings tabs.
* Fixed: The preset dialog can now be closed with Escape or a click outside, and keeps focus inside while open.
* Fixed: Form field keys typed by hand were overwritten by the auto-fill.
* Fixed: Thumbnail content overflowed its frame and clipped the call-to-action.
* Fixed: Background, text and accent colour settings had no visible effect on the layout thumbnails.
* Fixed: The preview button produced invalid markup by sitting inside a label.
* Fixed: Stricter type comparisons in settings validation and access checks.
* Removed: An unused nonce field and roughly 35 lines of dead CSS.

= 1.4.3 =
* Improved: New banner, icon and screenshots.
* Improved: Documentation rewritten, including the scheduling feature.
* Fixed: Minor UI and stability fixes.

= 1.4.2 =
* Added: Maintenance templates 5 and 6.
* Added: Builder support for SoftGlaze Landing Pages.
* Added: Preset preview and a preset list that follows the mode.
* Added: Countdown finish actions: a message or a redirect when the timer ends.
* Improved: Admin select and password form styling.
* Improved: Social icons use each platform's colours.

= 1.4.1 =
* Fixed: WordPress page and Landing Page rendering in Coming Soon and Maintenance modes.
* Fixed: Maintenance layouts and background image rendering.
* Improved: Access Control multi-select styling.
* Improved: Integrations tab fields for GA4, GTM, Meta Pixel and verification tags.
* Improved: The built-in form uses placeholders by default; labels remain available to screen readers.

= 1.4.0 =
* Added: Countdown styles Neon, Glitch and Pill.
* Added: Content presets.
* Added: Bypass for selected user accounts.
* Added: Form shortcode support.
* Fixed: Background image rendering.
* Fixed: Theme font and colour inheritance.

= 1.3.0 =
* Added: Form builder and social icons.
* Added: Admin status bar.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.7.0 =
Removes the custom CSS setting and the head, body and footer code boxes, and deletes what was saved in them. Use the GA4, Tag Manager and Meta Pixel ID fields for tracking. Custom Meta Tags now keeps only meta tags.

= 1.6.0 =
Choose a heading font and a body font from eight options, with Inter and Playfair Display now bundled and served from your own site. Nothing changes on an existing page unless you pick a font.

== Credits ==

Developed and maintained by [SoftGlaze](https://softglaze.com/).

Bundled fonts: Poppins, Inter and Playfair Display, under the SIL Open Font License 1.1 (https://openfontlicense.org/).
