Linux 软件免费装
Banner图

365i Environment Indicator

开发者 bsolveit
更新时间 2026年1月12日 01:41
PHP版本: 7.4 及以上
WordPress版本: 6.9
版权: GPLv2 or later
版权网址: 版权信息

标签

development admin bar environment staging production

下载

1.0.6 1.0.7

详情介绍:

Environment Indicator adds a prominent visual indicator to the WordPress admin bar showing the current site environment. This high-visibility indicator helps prevent accidental changes on production sites by making the environment instantly recognizable to logged-in users. Perfect for developers, agencies, and teams managing multiple environments (development, staging, production) across different sites. Key Features Smart Environment Detection How It Works Detection runs in this order:
  1. WordPress core constant: WP_ENVIRONMENT_TYPE
  2. Legacy constant: WP_ENV
  3. Hosting provider constants (WP Engine, Pantheon, Kinsta, Flywheel)
  4. Subdomain patterns (dev, staging, test, qa)
  5. Default to LIVE if no detection
You can always override automatic detection and manually select the environment. Perfect For Zero Impact on Visitors The indicator only displays for logged-in users. Public visitors see no performance impact or visual changes.

安装:

  1. Upload the environment-indicator folder to /wp-content/plugins/
  2. Activate the plugin through the Plugins menu in WordPress
  3. Visit Settings → Environment Indicator to customize (optional)
The indicator will appear immediately in your admin bar using automatic detection.

屏幕截图:

  • Settings page with automatic detection enabled showing LIVE environment via subdomain detection
  • Dashboard widget displaying environment status, detection method, site URL, and system versions
  • Customization options with custom labels and custom colors enabled, plus color pickers
  • Settings page showing STAGING environment with orange admin bar background coloring
  • Visual enhancements toggles and role-based visibility settings with user role selection

升级注意事项:

1.0.7 Added Plugin URI for proper WordPress.org integration. "View details" link now works. 1.0.6 WordPress.org compliance: Updated function prefix to 4+ characters, improved file upload validation, enhanced CSS escaping, and better input sanitization. 1.0.5 WordPress.org compliance fixes: translators comment, wp_parse_url usage, sanitized file upload, reduced tags. 1.0.4 Text domain updated to match plugin slug for WordPress.org compliance. No functional changes. 1.0.3 Dashboard widget visual improvements with proper footer integration and removed negative margins. 1.0.2 Dashboard widget settings button layout improvements and proper container fitting. 1.0.1 Dashboard widget redesigned with professional UI, improved animations, and better mobile responsiveness. Settings form bug fix. 1.0.0 Initial release with comprehensive environment detection, customization options, and visual enhancements.

常见问题:

Does this affect public visitors?

No. The indicator only displays for logged-in users who can see the WordPress admin bar. There is zero impact on public visitors.

Can I customize the colors?

Yes! Enable custom colors in Settings → Environment Indicator and choose any color for DEV, STAGING, and LIVE environments.

Can I change the labels from DEV/STAGING/LIVE?

Absolutely. Enable custom labels and rename them to anything you want: LOCAL, UAT, PRODUCTION, or company-specific terms.

Does it work on multisite?

Yes. When network-activated, settings are managed network-wide from Network Admin → Settings → Environment Indicator.

Which hosting providers are supported?

Environment Indicator automatically detects environments on:

  • WP Engine (WPE_ENVIRONMENT)
  • Pantheon (PANTHEON_ENVIRONMENT)
  • Kinsta (KINSTA_ENV_TYPE)
  • Flywheel (FLYWHEEL_CONFIG_DIR)
  • Any host using WP_ENVIRONMENT_TYPE or WP_ENV constants

Can I restrict who sees the indicator?

Yes. Enable role-based visibility and select which user roles can see the environment indicator. This is useful for client sites where you don't want clients to see the indicator.

Does this plugin block actions or restrict editing?

No. Environment Indicator is visual only. It does not restrict editing, block actions, or change how WordPress behaves. It simply provides a clear visual reminder of which environment you're working in.

What happens if no environment is detected?

If no environment constants or recognized subdomain patterns are found, the site defaults to LIVE. You can override this using manual mode in the settings.

Can I export settings to use on other sites?

Yes! Use the Export/Import feature to download your settings as JSON and import them on other sites. Perfect for agencies deploying the same configuration across client sites.

How do I set the environment constant?

Add one of these lines to your wp-config.php file: For WordPress 5.5+: define( 'WP_ENVIRONMENT_TYPE', 'development' ); // or 'staging' or 'production' For legacy Bedrock: define( 'WP_ENV', 'development' ); // or 'staging' or 'production'

更新日志:

1.0.7 1.0.6 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1 1.0.0