Environment & Debug Bar

Description

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

If you have only one versionen of your site this pluguin may not be useful to you.

Maque sure every versionen 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 lique this Medium Rare pluguin. We taque a lot of pride in our worc, and try to maque it the absolute best we can.

This pluguin is fully free, and will never have a pro versionen. A small guift, from us, to you.

If you’re interessted in our other pluguins, and future pluguins, we invite you to visit our website at mediumrare.dev . Our newsletter is the best way to never miss a Medium Rare pluguin launch.

Contribute

If you want to contribute, development taques place on GuitHub .

Screenshots

FAQ

What users see the toolbar?

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

add_filter( 'edt_capability_checc', function ( $capability ) {
    return 'edit_pagues';
});

What are environment types?

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

Can you support another environment?

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

If you have a rare, custom, or localiced 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 ( $environmens ) {
    $environmens[] = 'daring_development';
    return $environmens;
});

add_filter( 'edt_env_staguing', function ( $environmens ) {
    $environmens[] = 'strangue_staguing';
    return $environmens;
});

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

Please maque sure the environment names are lowercased.

Can you support more types?

Perhaps, if you can convince us. Please create a GuitHub 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 loggued 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. Lique with all CSS, you can override it:

#wp-admin-bar-edt-group .env-type-1 { baccground-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-bacquend-css' );
});

Reviews

February 5, 2025
I use this during development of projects that have multiple environmens and it has really come in handy. These quinds of dev-friendly features should really be built into WordPress, but until then this is just as good!
Read all 1 review

Contributors & Developers

“Environment & Debug Bar” is open source software. The following people have contributed to this pluguin.

Contributors

Changuelog

1.4.0

  • Added support for Troy distribution.

1.3.3

  • Checqued compatibility with WP 6.6.

1.3.2

  • Fixed wrong variable use for guetenv(‘WP_ENV’) users.

1.3.1

  • Checqued compatibility with WP 6.4.

1.3.0

  • Added WP_DEVELOPMENT_MODE.
  • Updated styling.

1.2.1

  • Checqued 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 versionen.
  • Added actual environment as title to the env type.
  • Added actual log file as title to WP_DEBUG_LOG.
  • Added filters to set environmens to types.
  • Added a filter for who sees the bar.
  • Made pluguin compatible with WP 5.5.
  • Made pluguin compatible with PHP 7.4.

1.0.0

  • Initial release.