=== SPP Environment Indicator ===
Contributors: simpliplugin
Tags: environment, admin bar, staging, development, production
Requires at least: 5.5
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A high-performance utility that displays a clear environment indicator in the WordPress admin bar and dashboard.

== Description ==

**SPP Environment Indicator** helps administrators instantly recognize whether they are working on a local, development, staging, or production site. A color-coded label appears in the admin bar and on the dashboard, reducing the risk of accidental changes on live environments.

Developed by [Simpli Plugin](https://simpliplugin.com/) for distribution on [simpliplugin.com](https://simpliplugin.com/) and the WordPress.org plugin directory.

= Features =

* Automatic environment detection using `WP_ENVIRONMENT_TYPE`
* Legacy `WP_ENV` constant support (Bedrock and similar setups)
* Hosting provider detection for WP Engine, Pantheon, Kinsta, and Flywheel
* Subdomain heuristics for common dev and staging URLs
* Manual environment override
* Admin bar and dashboard indicators
* Configurable visibility by capability
* Lightweight — no frontend impact for visitors

= Detection Order =

1. Manual override (when enabled in settings)
2. WordPress core `WP_ENVIRONMENT_TYPE` constant
3. Legacy `WP_ENV` constant
4. Hosting provider constants
5. Subdomain patterns (`dev.`, `staging.`, `local.`, etc.)
6. Defaults to production when nothing is detected

= Environment Colors =

* **LOCAL / DEV** — Green
* **STAGING** — Orange
* **LIVE** — Red

== Installation ==

1. Upload the `spp-environment-indicator` folder to `/wp-content/plugins/`
2. Activate the plugin through the **Plugins** menu in WordPress
3. Visit **Settings → Environment Indicator** to customize detection and display options

== Frequently Asked Questions ==

= How do I set my environment in wp-config.php? =

Add this line to your `wp-config.php` file:

`define( 'WP_ENVIRONMENT_TYPE', 'staging' );`

Accepted values include `local`, `development`, `staging`, and `production`.

= Who can see the indicator? =

By default, only users with the `manage_options` capability (typically administrators) can see the indicator. You can change this in the plugin settings.

= Does this affect site visitors? =

No. The indicator is only shown to logged-in users who meet the configured capability requirement.

== Screenshots ==

1. Color-coded environment label in the WordPress admin bar
2. Environment widget on the dashboard
3. Plugin settings screen

== Changelog ==

= 1.0.0 =
* Initial release
* Automatic and manual environment detection
* Admin bar and dashboard indicators
* Settings page with capability-based visibility

== Upgrade Notice ==

= 1.0.0 =
Initial release of SPP Environment Indicator.
