外掛說明
WordPress 5.5 導入了區分開發、測試、正式環境類型的方式,這個外掛能在工具列上顯示網站的環境類型。
如果需要對網站有更多的控制權,並直接從 WordPress 管理後台 (wp-config.php 必須為可寫入) 設定環境及其他設定值,請安裝我們的 WP Control。
建議安裝的外掛
- WP Control:這是一款專為會產生大量錯誤記錄的 WordPress 網站而設計的實用外掛,它可以讓網站管理員檢查 WordPress 網站的狀況,並提供內建的 Cron 管理程式、暫存資料管理程式 (資料庫相關) 及直接在 [外掛] 頁面變更外掛版本的功能。
安裝方式
- 透過 WordPress 管理後台的 [外掛] 選單安裝並啟用外掛。
常見問題集
-
可以針對網站環境類型資訊自訂色彩嗎?
-
目前只能顯示固定的色彩,這麼設計是為了避免混淆。如果可以自訂這些資訊的顯示色彩,便必須為全部相關的伺服器進行完全一致的設定。
-
為網站定義自訂網站環境類型後,會發生哪些狀況?
-
自訂環境類型是 WordPress 5.5 加入的原生功能,但已於 5.5.1 移除。這個外掛不再支援這項功能。
-
為什麼這個外掛無法為網站前端設定顯示工具列的已登入使用者,在網站前端工具列顯示相關資訊?
-
這個外掛不會為無管理權限使用者顯示相關資訊。在大多數的使用情境中,網站管理員多半不會想在工具列上以鮮明的色塊干擾已登入的訂閱者;同理,網站的環境類型一樣會在管理後台對訂閱者進行隱藏。
如需進一步控制,請使用
det_display_environment_type篩選器勾點: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' );
使用者評論
參與者及開發者
以下人員參與了開源軟體〈Display Environment Type〉的開發相關工作。
參與者變更記錄
1.5.0 (2024-07-01)
- Code improvements, shows the constants value regardless of the WP_DEBUG constant value. WP Control plugin introduced
1.4.0 (2024-04-07)
- Code improvements and UI fixes – showing icon on mobile, and set colors on At a Glance. Added WP version in drop-down menu.
1.3.5 (2025-04-04)
- Added a drop-down submenu with WP constants and their values (enabled / disabled).
1.3.4 (2024-12-20)
- Added a filter hook to modify the envronment’s display name (thanks @erniecom).
1.3.3 (2024-07-05)
- Internationalization improvements by @tekapo.
1.3.2 (2023-11-10)
- Assessibility improvements by @mrwweb.
1.3.1 (2022-03-30)
- Skip loading of the CSS file on the front end if toolbar is hidden (thanks @tflight).
1.3 (2020-08-25)
- Code refactor (thank you, @markjaquith).
- Environment type now hidden by default for subscribers.
1.2.1 (2020-08-23)
- Removes the distracting hover effect (thank you, @markjaquith).
- Hardening against XSS (props @markjaquith).
1.2 (2020-08-21)
- Adds a filter hook to allow you to determine whether the environmment is displayed.
1.1 (2020-08-21)
- Added a conditional front-end display (admins only).
- Improved plugin initialization.
1.0.2 (2020-08-21)
- Removed the (unstyled) display on the front-end admin bar.
- Added a FAQ section to the readme file.
1.0.1 (2020-08-21)
- Fixed the plugin description and plugin URI.
1.0 (2020-08-20)
- Initial release.




