Display Environment Type

Beschreibung

WordPress 5.5 führt eine Möglichkeit ein, zwischen verschiedenen Umgebungstypen (Entwicklung, Inszenierung, Produktion) zu unterscheiden. Dieses Plugin zeigt den Umgebungstyp deiner Website in der Admin-Leiste an.

Weitere Informationen über die neue Funktion.

Screenshots

  • Admin bar display (production).
  • Admin bar display (staging).
  • Admin bar display (development).
  • Admin bar display (custom).
  • Das Widget "Auf einen Blick".

Installation

  1. Installiere und aktiviere über das Menü ‚Plugins‘ in WordPress.

FAQ

Kann ich eigene Farben für meine Umgebungstypen einstellen?

Die Farben sind im Moment festgelegt. Dies wurde gemacht, um mögliche Verwechslungen zu vermeiden. Wenn die Farben durch den Benutzer einstellbar wären, müssten sie auf allen verbundenen Servern exakt gleich eingestellt werden.

Was passiert, wenn ich eigene Umgebungstypen definiere?

Custom types were originally added in WordPress 5.5, but they were removed in 5.5.1. This plugin no longer supports them.

Wieso gibt es für angemeldete Benutzer mit aktivierter Admin-Leiste keine Anzeige im Frontend der Website?

There’s no display for non-admin users. The reasoning behind this is that in most cases, you’d probably not want to bother logged-in subscribers with a bright-colored box on their admin bar. For the same reason, the environment type is also hidden for subscribers in wp-admin.

For additional control, you can use the ‚det_display_environment_type‘ filter hook:

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' );

Rezensionen

24. Januar 2024
Five stars for Display Environment Type! Huge thanks to the author for creating this gem. The plugin might be small, but it's incredibly useful, doing exactly what you'd expect without any unnecessary clutter. No settings hassle – just install and get to work seamlessly.
26. April 2022
I switch a LOT between production sites and a clone made for testing, when creating a real staging environment is not possible. More than once, I have unintentionally made changes to the wrong instance of the site. That's no fun. Display Environment Type makes it very clear what I'm working on, when I should pay extra attention. Recommended.
21. August 2020
Have you ever accidentally added test content to a productive website? You can now define a constant in your wp-config.php to distinguish between development, staging and productuion sites. To make this visible, this lean but helpful plugin adds an indicator to the admin bar and dashboard widget which helps to avoid mistakes as adding "Lorem ipsum" to your productive site. 🙂 Plugin works like a charm. No settings needed. Install, activate and feel happy.
Alle 2 Rezensionen lesen

Mitwirkende & Entwickler

„Display Environment Type“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:

Mitwirkende

„Display Environment Type“ wurde in 14 Sprachen übersetzt. Danke an die Übersetzerinnen und Übersetzer für ihre Mitwirkung.

Übersetze „Display Environment Type“ in deine Sprache.

Interessiert an der Entwicklung?

Durchstöbere den Code, sieh dir das SVN Repository an oder abonniere das Entwicklungsprotokoll per RSS.

Änderungsprotokoll

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).
  • Absicherung gegen 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)

  • Eine bedingte Frontend-Anzeige wurde (nur für Administratoren) hinzugefügt.
  • Verbesserte Plugin-Initialisierung.

1.0.2 (2020-08-21)

  • Die (unformatierte) Anzeige in der Frontend-Admin-Leiste wurde entfernt.
  • FAQ-Abschnitt zur Readme-Datei hinzugefügt.

1.0.1 (2020-08-21)

  • Plugin-Beschreibung und Plugin-URL korrigiert.

1.0 (2020-08-20)

  • Erstveröffentlichung.