Title: Environment &amp; Debug Bar
Author: Medium Rare
Published: <strong>2023 年 5 月 5 日</strong>
Last modified: 2026 年 3 月 16 日

---

搜尋外掛

![](https://ps.w.org/environment-debug-admin-toolbar/assets/banner-772x250.png?rev
=2938819)

![](https://ps.w.org/environment-debug-admin-toolbar/assets/icon-256x256.png?rev
=2908724)

# Environment & Debug Bar

 由 [Medium Rare](https://profiles.wordpress.org/mediumraredev/) 開發

[下載](https://downloads.wordpress.org/plugin/environment-debug-admin-toolbar.1.4.0.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/environment-debug-admin-toolbar/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/environment-debug-admin-toolbar/#reviews)
 * [開發資訊](https://tw.wordpress.org/plugins/environment-debug-admin-toolbar/#developers)

 [技術支援](https://wordpress.org/support/plugin/environment-debug-admin-toolbar/)

## 外掛說明

This plugin will tell you what environment type you are on, and what the debug settings
are.

If you have only one version of your site this plugin may not be useful to you.

Make sure every version of your site has its _ENV_ defined in wp-config.php. We 
support both the new official WP_ENVIRONMENT_TYPE constant, and the community classic
WP_ENV.

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

#### Medium Rare

We hope you like this Medium Rare plugin. We take a lot of pride in our work, and
try to make it the absolute best we can.

This plugin is fully free, and will never have a pro version. A small gift, from
us, to you.

If you’re interested in our other plugins, and future plugins, we invite you to 
visit our website at [mediumrare.dev](https://mediumrare.dev/). Our newsletter is
the best way to never miss a Medium Rare plugin launch.

#### Contribute

If you want to contribute, development takes place on [GitHub](https://github.com/Brugman/environment-debug-admin-toolbar).

## 螢幕擷圖

 * [[
 * [[
 * [[
 * [[
 * [[
 * [[
 * [[

## 常見問題集

### What users see the toolbar?

By default, only **Administrators** see the bar. You can change who sees the bar
with the following snippet. This example enables the bar for **Editors** as well:

    ```
    add_filter( 'edt_capability_check', function ( $capability ) {
        return 'edit_pages';
    });
    ```

### What are environment types?

Instead of displaying the exact environment you’ve set, we show types. A type is
a group of environments that roughly have the same purpose. Like local, dev, develop
and development.

### Can you support another environment?

If you’ve found a common environment that we do not yet recognize as part of a type,
please let us know and we’ll gladly add it.

If you have a rare, custom, or localized environment name, we won’t be adding those.
However, you can add support for them yourself, with these snippets:

    ```
    add_filter( 'edt_env_development', function ( $environments ) {
        $environments[] = 'daring_development';
        return $environments;
    });

    add_filter( 'edt_env_staging', function ( $environments ) {
        $environments[] = 'strange_staging';
        return $environments;
    });

    add_filter( 'edt_env_production', function ( $environments ) {
        $environments[] = 'precious_production';
        return $environments;
    });
    ```

Please make sure the environment names are lowercased.

### Can you support more types?

Perhaps, if you can convince us. Please create a GitHub issue, so we can discuss
your use-case.

### Can I show the toolbar on the frontend as well?

You can, with the snippet below.

Keep in mind that if you have a site where the end users are logged in, and see 
the toolbar on the frontend, you probably don’t want to bother them by showing the
environment info.

    ```
    add_filter( 'edt_show_on_frontend', '__return_true' );
    ```

### Can I set my own colors?

Yeah. Like with all CSS, you can override it:

    ```
    #wp-admin-bar-edt-group .env-type-1 { background-color: #f09; }
    ```

### Can I disable all styles?

Sure. You can disable our CSS with this snippet:

    ```
    add_action( 'admin_enqueue_scripts', function () {
        wp_dequeue_style( 'edt-backend-css' );
    });
    ```

## 使用者評論

![](https://secure.gravatar.com/avatar/3af92cf897a34220c5189129a1ea9069d166166527744979566cdb07a225e7c7?
s=60&d=retro&r=g)

### 󠀁[Works like a charm!](https://wordpress.org/support/topic/works-like-a-charm-2379/)󠁿

 [skukreja](https://profiles.wordpress.org/skukreja/) 2025 年 2 月 5 日

I use this during development of projects that have multiple environments and it
has really come in handy. These kinds of dev-friendly features should really be 
built into WordPress, but until then this is just as good!

 [ 閱讀全部 1 則使用者評論 ](https://wordpress.org/support/plugin/environment-debug-admin-toolbar/reviews/)

## 參與者及開發者

以下人員參與了開源軟體〈Environment & Debug Bar〉的開發相關工作。

參與者

 *   [ Medium Rare ](https://profiles.wordpress.org/mediumraredev/)
 *   [ timbr ](https://profiles.wordpress.org/brugman/)

[將〈Environment & Debug Bar〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/environment-debug-admin-toolbar)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/environment-debug-admin-toolbar/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/environment-debug-admin-toolbar/)，
或透過 [RSS](https://plugins.trac.wordpress.org/log/environment-debug-admin-toolbar/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/environment-debug-admin-toolbar/)。

## 變更記錄

#### 1.4.0

 * Added support for Troy distribution.

#### 1.3.3

 * Checked compatibility with WP 6.6.

#### 1.3.2

 * Fixed wrong variable use for getenv(‘WP_ENV’) users.

#### 1.3.1

 * Checked compatibility with WP 6.4.

#### 1.3.0

 * Added WP_DEVELOPMENT_MODE.
 * Updated styling.

#### 1.2.1

 * Checked compatibility with WP 6.3.
 * Fixed showing an incomplete title.

#### 1.2.0

 * Added bar to the frontend behind a filter.

#### 1.1.1

 * Fixed the name of a filter.

#### 1.1.0

 * Updated bar colors.
 * Added PHP version.
 * Added actual environment as title to the env type.
 * Added actual log file as title to WP_DEBUG_LOG.
 * Added filters to set environments to types.
 * Added a filter for who sees the bar.
 * Made plugin compatible with WP 5.5.
 * Made plugin compatible with PHP 7.4.

#### 1.0.0

 * Initial release.

## 中繼資料

 *  版本 **1.4.0**
 *  最後更新 **1 個月前**
 *  啟用安裝數 **40+**
 *  WordPress 版本需求 ** 5.5 或更新版本 **
 *  已測試相容的 WordPress 版本 **7.0**
 *  PHP 版本需求 ** 7.4 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/environment-debug-admin-toolbar/)
 * 標籤
 * [debug](https://tw.wordpress.org/plugins/tags/debug/)[env](https://tw.wordpress.org/plugins/tags/env/)
   [environment](https://tw.wordpress.org/plugins/tags/environment/)[production](https://tw.wordpress.org/plugins/tags/production/)
   [staging](https://tw.wordpress.org/plugins/tags/staging/)
 *  [進階檢視](https://tw.wordpress.org/plugins/environment-debug-admin-toolbar/advanced/)

## 評分

 5 星，滿分為 5 星

 *  [  1 個 5 星使用者評論     ](https://wordpress.org/support/plugin/environment-debug-admin-toolbar/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/environment-debug-admin-toolbar/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/environment-debug-admin-toolbar/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/environment-debug-admin-toolbar/reviews/?filter=2)
 *  [  0 個 1 星使用者評論     ](https://wordpress.org/support/plugin/environment-debug-admin-toolbar/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/environment-debug-admin-toolbar/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/environment-debug-admin-toolbar/reviews/)

## 參與者

 *   [ Medium Rare ](https://profiles.wordpress.org/mediumraredev/)
 *   [ timbr ](https://profiles.wordpress.org/brugman/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/environment-debug-admin-toolbar/)