=== Shed Coming Soon ===
Contributors: teamstaccato
Tags: coming soon, maintenance, under construction
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.7.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Simple coming soon and maintenance page. Customize the title, message, background, and colors from the admin dashboard.

== Description ==

Shed Coming Soon is a lightweight plugin for displaying a coming soon or maintenance page while your site is being built or updated.

= Features =
* Coming Soon mode and Maintenance mode
* Set a custom title and rich-text message (HTML editor)
* Background image or background color
* Custom text color
* Site name: show, hide, or override with custom text
* Title font size: specify in px
* Schedule automatic start and end times
* Invert schedule period for limited-time open sites (coming soon shown outside the scheduled window)
* Email notifications on scheduled start/end with customizable subject and body (To/CC supported)
* Google Chat notifications on scheduled start/end via Incoming Webhook
* Bypass URL with one-click copy button for previewing the live site
* Returns 503 status with Retry-After header (SEO-friendly)
* Cache purge on save for popular caching plugins
* Admin-only live preview panel with desktop / tablet / smartphone switching
* Logged-in administrators always see the full site

== Installation ==

1. Upload the plugin to the `/wp-content/plugins/` directory or install via the WordPress plugin screen.
2. Activate the plugin.
3. Go to Settings → Shed Coming Soon to configure.

== Frequently Asked Questions ==

= Does it work with page caching plugins? =

Yes. When settings are saved, the plugin automatically triggers cache purge hooks for popular caching plugins if they are installed and active. No data is sent to any external service.

= Does it work with CDN services? =

The plugin returns a 503 status with `Cache-Control: no-store` headers, which prevents most CDN configurations from caching the coming soon page. If you use aggressive full-page caching rules on your CDN or hosting environment, you may need to configure a cache bypass rule based on the `shedsoon_bypass` cookie. Please refer to your CDN or hosting provider's documentation for cache bypass settings.

= Will search engines index my coming soon page? =

No. The plugin returns a 503 status with a `Retry-After` header, which instructs search engines to come back later and not index the page.

= Can I let specific users preview the site while it is in coming soon mode? =

Yes. Generate a bypass URL from the settings page. Anyone with that URL will receive a 24-hour cookie that lets them view the full site.

== Screenshots ==

1. Admin settings page with live preview panel.
2. Example coming soon page displayed to visitors.

== Upgrade Notice ==

= 1.6.3 =
デザインタブのタイトル・サイト名をpx直接指定に変更。改行対応。

= 1.6.2 =
通知設定の入力欄がウィンドウ幅によって突き抜ける表示を修正。

= 1.6.1 =
通知タブにテスト送信ボタン（メール・Google Chat）を追加。過去日時のスケジュールには通知を送らないよう修正。

= 1.6.0 =
Google Chat Incoming Webhook 通知を追加。管理画面を設定/通知/デザインの3タブ構成に変更。

= 1.5.0 =
Adds schedule-based email notifications (start/end) with customizable subject/body and To/CC, invert schedule period for limited-time open sites, and a copy button for the bypass URL.

= 1.4.7 =
WP.org compliance: remove discouraged load_plugin_textdomain() call.

= 1.4.6 =
WP.org compliance: English i18n base, Clipboard API copy, sanitized superglobal access, phpcs fixes.

= 1.4.5 =
WP.org compliance: move inline scripts and styles to enqueued files, add LICENSE, update Tested up to 7.0.

= 1.4.4 =
Confirmed compatibility with WordPress 7.0.

= 1.4.3 =
WP.org compliance: full i18n support, uninstall cleanup, and minor security hardening.

== Changelog ==

= 1.7.0 =
* 変更: 「有効化」チェックボックス＋「スケジュール」という分かりにくい設定モデルを廃止し、「公開状態」として通常公開／今すぐカミングスーン表示／スケジュールで切り替えるの3択に整理（併せて「期間を逆にする」チェックボックスも、期間中の動作を明示する2択ラジオボタンに変更）
* 修正: 「期間を逆にする」（期間限定公開）を有効にし、開始日時＜終了日時という自然な順序で入力すると、常にコミングスーンが表示されたままになる不具合を修正
* 変更: 管理画面の状態表示を「開始予定/終了予定」の生の日時表示から、「🟢 サイト公開中」のような結果重視の表示に変更
* 既存サイトの設定は初回アクセス時に自動移行され、移行前と同じ公開/コミングスーン状態が維持されます
= 1.6.4 =
* セキュリティ: WordPress 7.1.2 実機確認（Coming Soonページ表示・バイパスURL）・Tested up to 更新
= 1.6.3 =
* 変更: タイトルフォントサイズをS/M/L/XLのセレクトからpx直接入力に変更
* 追加: サイト名フォントサイズをpx直接入力で指定可能に
* 追加: タイトル・サイト名の入力欄で改行をサポート（フロント表示に反映）

= 1.6.2 =
* 修正: 通知設定の入力欄がウィンドウ幅によって突き抜ける表示を修正

= 1.6.1 =
* 追加: 通知タブにテストメール送信ボタンを追加（To/CC の内容で即時テスト送信）
* 追加: 通知タブに Google Chat テスト送信ボタンを追加（入力中の Webhook URL に即時テスト送信）
* 修正: 過去日時のスケジュールには通知 Cron を登録しないよう修正
* 変更: メール・Google Chat 通知のデフォルト本文から設定ページ URL 行を削除

= 1.6.0 =
* 追加: Google Chat Incoming Webhook 通知（開始・終了・メッセージカスタマイズ）
* 変更: 管理画面を設定/通知/デザインの3タブ構成に刷新（スクロール量を削減）
* 変更: 「Email notification」セクションを「通知」タブ内に移動し、Email と Google Chat を並列表示

= 1.5.0 =
* 追加: スケジュール開始時のメール通知（件名・本文・To/CC をカスタマイズ可能。{site_name} 等のプレースホルダー対応）
* 追加: スケジュール終了時のメール通知（同上）
* 追加: スケジュール反転オプション（期間中のみサイトを公開する期間限定オープンモード）
* 追加: バイパス URL 横にワンクリックコピーボタンを追加
* 変更: 管理バーのスケジュール表示で日時の `T` 区切りをスペースに変更
* 修正: 翻訳ファイル名を WordPress 標準命名に変更（ja.po/mo → shed-coming-soon-ja.po/mo）

= 1.4.7 =
* 修正: load_plugin_textdomain() の呼び出しを削除（WordPress 4.6 以降は自動読み込みのため不要）

= 1.4.6 =
* 修正: 全 msgid を英語ベース文字列に変換（WP.org i18n 対応）
* 修正: 日本語翻訳ファイル languages/ja.po を追加
* 修正: JS プレビューの lang 属性をハードコードから動的取得に変更
* 修正: Clipboard API を使用したコピー機能を実装（execCommand フォールバック付き）
* 修正: $_GET['shedsoon_preview'] を sanitize_key() + wp_unslash() でサニタイズ
* 修正: 503 SEO ヘッダーの header() 直接呼び出しに phpcs:ignore を追加
* 修正: wp_die() で HTTP ステータスを ['response' => 403] 形式で指定
* 修正: onclick="this.select()" をインライン HTML から JS ファイルへ移動

= 1.4.5 =
* 修正: インライン admin スクリプトをエンキュー済み JS ファイルへ移動（WP.org 対応）
* 修正: インライン admin スタイルをエンキュー済み CSS ファイルへ移動（WP.org 対応）
* 修正: LICENSE ファイル（GPL-2.0）を追加
* 確認: WordPress 7.0 での動作確認済み

= 1.4.4 =
* 確認: WordPress 7.0 での動作確認済み

= 1.4.3 =
* 追加: 全ユーザー向け文字列に翻訳関数を適用（i18n 完全対応）
* 追加: プラグイン削除時に全オプションを削除する uninstall.php を追加
* 修正: プラグインヘッダーに GPL-2.0-or-later・License URI・Domain Path・Tested up to を追加
* 修正: $_COOKIE 値をサニタイズしてから比較するよう修正

= 1.4.2 =
* 修正: JS プレビュービルダー内の link rel stylesheet リテラルを削除（Plugin Check 対応）

= 1.4.1 =
* 修正: Plugin Check 対応（変数プレフィックス・wp_unslash・wp_safe_redirect・スタンドアロンテンプレートの phpcs:ignore）

= 1.4.0 =
* 追加: サイト名の表示トグルとカスタムテキスト上書き機能を追加

= 1.3.0 =
* 変更: リサイズ可能な2カラム管理画面レイアウトに変更（デスクトップ/タブレット/スマホのプレビュー切替付き）
* 追加: 別タブでフルサイズプレビューを開くボタンを追加（管理者専用エンドポイント）

= 1.2.0 =
* 追加: タイトルフォントサイズ選択（S / M / L / XL）
* 追加: メッセージフィールドに WP ビジュアルエディター（TinyMCE）を採用
* 追加: 管理画面にライブプレビューパネルを追加

= 1.1.0 =
* 追加: カミングスーン中の REST API リクエストを除外するオプションを追加

= 1.0.5 =
* 追加: 設定保存時に主要キャッシュプラグインのキャッシュを自動パージ
* 追加: 管理画面に CDN/ホスティング向けキャッシュバイパス設定ガイドを追加

= 1.0.4 =
* 変更: 関数・クラス・定数・フック・オプションのプレフィックスを wscs_/WSCS_ から shedsoon_/SHEDSOON_/Shedsoon_ に全面変更

= 1.0.0 =
* 初回リリース
