=== KRB Maintenance Mode ===
Contributors: krbdijital
Tags: maintenance mode, coming soon, under construction, whatsapp, multilingual
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Create a fast multilingual maintenance page with templates, countdown, WhatsApp, preview links, custom branding, and proper 503 headers.

== Description ==

**KRB Maintenance Mode** temporarily hides your public website and displays a fast, professional maintenance page instead.

= Main features =

* Five independently designed templates: Aurora, Blueprint, Paper, Signal, and Sunrise.
* Five system-font options with no external font requests.
* Optional WhatsApp button with a configurable number and prefilled message.
* Optional countdown timer.
* Logo and background image upload options, plus accent, background, and text color controls.
* Administrators can continue viewing the normal website while maintenance mode is enabled.
* Shareable preview link for team members or clients.
* Correct HTTP 503 and Retry-After headers, with noindex enabled by default.
* Translation-ready and compatible with WordPress language packs.
* Sanitized settings, escaped output, capability checks, and nonce protection for administrative actions.
* Automatic cleanup of plugin options when the plugin is deleted.

Developed by [KRB Dijital](https://krbdijital.com).

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/krb-maintenance-mode`, or install the ZIP file through **Plugins > Add New > Upload Plugin**.
2. Activate the plugin.
3. Open **Maintenance Mode** in the WordPress admin menu, configure the page, and enable maintenance mode.

== Frequently Asked Questions ==

= Will I lose access to the website when maintenance mode is enabled? =

No. Users with the `manage_options` capability can continue viewing the normal website. Other visitors see the maintenance page.

= Will search engines index the maintenance page? =

No, not by default. The page sends a `noindex` directive together with the correct `503 Service Unavailable` and `Retry-After` headers. Indexing can be allowed from the advanced settings when required.

= Are fonts loaded from an external service? =

No. Every font option uses system fonts already available on the visitor's device, so the plugin does not make external font requests.

= Are the settings removed when the plugin is deleted? =

Yes. The uninstall routine removes all options created by the plugin.

== Screenshots ==

1. General settings and template selection screen.
2. Example maintenance page using the Aurora template.
3. Example maintenance page using the Blueprint template.

== Changelog ==

= 1.0.4 =
* Fixed the shareable preview URL so it renders the maintenance page even while maintenance mode is disabled.
* Preview requests now return HTTP 200 with noindex and no-cache behavior, while public maintenance responses continue to return HTTP 503.
* Removed the old preview-cookie bypass behavior that incorrectly displayed the normal website.
* Added a clickable preview button that opens the maintenance page in a new tab.

= 1.0.3 =
* Added nonce verification to the regenerated-preview-link success notice.
* Shortened the WordPress.org short description to remain within the 150-character limit.

= 1.0.2 =
* Fixed the unescaped HTML language-attribute warning reported by Plugin Check.
* Removed the discouraged manual plugin text-domain loader and rely on WordPress just-in-time translation loading.
* Documented and isolated the read-only preview-token request so it is not incorrectly treated as an unverified state-changing form request.
* Updated the WordPress.org readme to standard English and set the tested WordPress version to 7.0.

= 1.0.1 =
* Added nonce-protected regeneration for the preview link key.
* Added X-Content-Type-Options, X-Frame-Options, and Referrer-Policy headers to maintenance responses.
* Fixed double HTML encoding in the footer credit.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.4 =
Fixes the preview link so administrators, team members, and clients can see the maintenance page before enabling maintenance mode.

= 1.0.3 =
Resolves the remaining Plugin Check nonce-verification and readme-length warnings.

= 1.0.2 =
Resolves Plugin Check compatibility, escaping, readme, and code-analysis findings.
