=== StatusPage Widget ===
Contributors: statuspage
Donate link: https://statuspage.me
Tags: status page, uptime, monitoring, widget, block
Requires at least: 5.8
Tested up to: 6.4
Stable tag: 1.0.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display real-time status page widgets from StatusPage.me on your WordPress site.

== Description ==

StatusPage Widget allows you to embed beautiful, real-time status widgets from [StatusPage.me](https://statuspage.me) directly into your WordPress site.

**Features:**

* **Gutenberg Block** - Easy drag-and-drop block with full visual customization
* **Classic Widget** - Legacy widget for theme widget areas
* **Shortcodes** - Flexible embedding anywhere with `[statuspage_widget]` and `[statuspage_badge]`
* **Two Render Modes** - Choose between JavaScript (client-side) or PHP (server-side) rendering
* **Customizable Appearance** - Light/dark themes, compact mode, show/hide incidents
* **Performance Sparklines** - Display response time and uptime history
* **Auto-refresh** - Real-time updates without page reload (JS mode)
* **Automatic Updates** - Receive updates directly from GitHub

**Shortcode Examples:**

`[statuspage_widget slug="your-status-page"]`

`[statuspage_widget slug="your-status-page" theme="dark" compact="1" show_incidents="0"]`

`[statuspage_badge slug="your-status-page"]`

**Block Features:**

The Gutenberg block includes a visual settings panel with:

* Status page slug selection
* Theme toggle (Auto/Light/Dark)
* Compact mode toggle
* Show/hide incidents
* Response time sparkline (0-240 minutes)
* Uptime sparkline (0-30 days)
* Auto-refresh interval
* Disable external link option
* Render mode (JavaScript/PHP)

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/status-page-widget` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Use the StatusPage Widget block in the block editor, or add the classic widget to your sidebar, or use the shortcodes in your content.

== Frequently Asked Questions ==

= What is StatusPage.me? =

StatusPage.me is a hosted status page service that helps you communicate real-time system status to your users. Create beautiful status pages without any coding.

= Do I need a StatusPage.me account? =

Yes, you need a StatusPage.me account with at least one public status page. The widget will display the status from your StatusPage.me page.

= What's the difference between JS and PHP render modes? =

**JavaScript mode** renders the widget client-side using StatusPage.me's embed script. It supports auto-refresh and ensures the latest styling, but requires JavaScript.

**PHP mode** renders the widget server-side. It's better for SEO and works without JavaScript, but doesn't support auto-refresh and caches data for 30 seconds.

= How do I find my status page slug? =

Your slug is the unique identifier in your status page URL. For example, if your status page URL is `https://my-status-page.statuspage.me`, your slug would be `my-status-page`.

= Can I customize the widget appearance? =

Yes! You can customize:
* Theme (auto, light, dark)
* Compact mode
* Show/hide incidents
* Response time and uptime sparklines
* Auto-refresh interval (JS mode only)

== Screenshots ==

1. StatusPage Widget block in the editor
2. Widget settings panel
3. Light and dark theme examples
4. Compact mode display
5. Widget with incidents

== Changelog ==

= 1.0.1 =
* Fixed: Status page URLs now use subdomain format (slug.statuspage.me)
* Added: Slug validation (alphanumeric and hyphens only, no consecutive/leading/trailing hyphens)
* Added: Settings page for default widget configuration (Settings → StatusPage Widget)
* Improved: Block editor now validates slug input in real-time

= 1.0.0 =
* Initial release
* Gutenberg block with full customization
* Classic widget for legacy themes
* Shortcodes: `[statuspage_widget]` and `[statuspage_badge]`
* JavaScript and PHP render modes
* GitHub-based automatic updates

== Upgrade Notice ==

= 1.0.1 =
URL format fix and new settings page for default configuration.

= 1.0.0 =
Initial release of StatusPage Widget.
