Linux 软件免费装

Display Environment Type

开发者 roytanck
markjaquith
tflight
mrwweb
tekapo
sdobreff
更新时间 2025年12月19日 23:09
PHP版本: 7.4 及以上
WordPress版本: 6.9
版权: GPLv3

标签

development environment staging production dtap

下载

1.2.1 1.3 1.2 1.0 1.0.1 1.0.2 1.3.1 1.1 1.3.2 1.3.3 1.3.4 1.3.5 1.4.0 1.4.1 1.5.0 1.6.0

详情介绍:

WordPress 5.5 introduced a way to differentiate between environment types (development, staging, production). This plugin shows your site's environment type in the admin bar and the dashboard "At a Glance" widget. More info about the feature To gain additional control — for example, setting the environment or other values from the WP admin (when wp-config.php is writable) — consider installing our other plugin 0 Day Analytics.

安装:

  1. Install and activate the plugin from the 'Plugins' menu in WordPress.

屏幕截图:

  • Admin bar display (staging).
  • Admin bar display (development).
  • Admin bar display (custom).
  • The "At a Glance" widget.

常见问题:

Can I set a custom color for my environment types?

Colors are intentionally fixed to avoid confusion. If colors were configurable, they'd need to be identical across all related servers to remain consistent.

What happens if I define custom environment types?

Custom environment types were briefly supported in WordPress 5.5 but were removed in 5.5.1. This plugin does not support custom types.

Why don't non-administrators see the environment type on the front end?

By default, the environment type is shown only to users with administrative capabilities. This avoids exposing a prominent colored indicator to regular subscribers and other non-admin users. For additional control, use the det_display_environment_type filter hook. Example: function rt_det_display_filter( $display ) { // Disable the environment type display for user ID 2. return ( get_current_user_id() !== 2 ); } add_filter( 'det_display_environment_type', 'rt_det_display_filter' );

更新日志:

1.6.0 (2025-12-18) 1.5.0 (2024-07-01) 1.4.0 (2024-04-07) 1.3.5 (2025-04-04) 1.3.4 (2024-12-20) 1.3.3 (2024-07-05) 1.3.2 (2023-11-10) 1.3.1 (2022-03-30) 1.3 (2020-08-25) 1.2.1 (2020-08-23) 1.2 (2020-08-21) 1.1 (2020-08-21) 1.0.2 (2020-08-21) 1.0.1 (2020-08-21) 1.0 (2020-08-20)