{"id":127461,"date":"2020-08-21T07:45:00","date_gmt":"2020-08-21T07:45:00","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/display-environment-type\/"},"modified":"2025-12-19T15:09:50","modified_gmt":"2025-12-19T15:09:50","slug":"display-environment-type","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/display-environment-type\/","author":21149760,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.6.0","stable_tag":"1.6.0","tested":"6.9.4","requires":"5.5","requires_php":"7.4","requires_plugins":null,"header_name":"Display Environment Type","header_author":"Stoil Dobreff","header_description":"Handle the basics with this plugin.","assets_banners_color":"","last_updated":"2025-12-19 15:09:50","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/roytanck.com\/2020\/08\/21\/new-wordpress-plugin-display-environment-type\/","header_author_uri":"https:\/\/roytanck.com\/","rating":5,"author_block_rating":0,"active_installs":1000,"downloads":138302,"num_ratings":4,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0":{"tag":"1.0","author":"roytanck","date":"2020-08-21 07:44:33"},"1.0.1":{"tag":"1.0.1","author":"roytanck","date":"2020-08-21 08:30:11"},"1.0.2":{"tag":"1.0.2","author":"roytanck","date":"2020-08-21 09:14:39"},"1.1":{"tag":"1.1","author":"roytanck","date":"2020-08-21 11:44:41"},"1.2":{"tag":"1.2","author":"roytanck","date":"2020-08-23 10:45:00"},"1.2.1":{"tag":"1.2.1","author":"roytanck","date":"2020-08-23 11:29:47"},"1.3":{"tag":"1.3","author":"roytanck","date":"2022-01-29 10:15:36"},"1.3.1":{"tag":"1.3.1","author":"roytanck","date":"2023-09-01 11:36:42"},"1.3.2":{"tag":"1.3.2","author":"roytanck","date":"2024-04-05 10:57:13"},"1.3.3":{"tag":"1.3.3","author":"roytanck","date":"2024-07-05 11:04:38"},"1.3.4":{"tag":"1.3.4","author":"roytanck","date":"2025-04-03 16:50:54"},"1.3.5":{"tag":"1.3.5","author":"sdobreff","date":"2025-04-04 06:55:39"},"1.4.0":{"tag":"1.4.0","author":"sdobreff","date":"2025-04-07 10:41:07"},"1.4.1":{"tag":"1.4.1","author":"sdobreff","date":"2025-04-09 19:45:15"},"1.5.0":{"tag":"1.5.0","author":"sdobreff","date":"2025-07-01 20:37:11"},"1.6.0":{"tag":"1.6.0","author":"sdobreff","date":"2025-12-19 15:09:50"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":4},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2366333,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2366333,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":[],"assets_blueprints":{"blueprint.json":{"filename":"blueprint.json","revision":3423787,"resolution":false,"location":"assets","locale":"","contents":"{\"landingPage\":\"\\\/wp-admin\\\/plugins.php\",\"preferredVersions\":{\"php\":\"8.0\",\"wp\":\"latest\"},\"phpExtensionBundles\":[\"kitchen-sink\"],\"features\":{\"networking\":true},\"steps\":[{\"step\":\"installPlugin\",\"options\":{\"activate\":true},\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"display-environment-type\"}},{\"step\":\"login\",\"username\":\"admin\",\"password\":\"password\"}]}"}},"all_blocks":[],"tagged_versions":["1.0","1.0.1","1.0.2","1.1","1.2","1.2.1","1.3","1.3.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"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":2367280,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":2367280,"resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":2367280,"resolution":"3","location":"assets","locale":""},"screenshot-4.png":{"filename":"screenshot-4.png","revision":2367280,"resolution":"4","location":"assets","locale":""},"screenshot-5.png":{"filename":"screenshot-5.png","revision":2367280,"resolution":"5","location":"assets","locale":""}},"screenshots":{"1":"Admin bar display (production).","2":"Admin bar display (staging).","3":"Admin bar display (development).","4":"Admin bar display (custom).","5":"The \"At a Glance\" widget."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[734,189920,7318,23063,19979],"plugin_category":[],"plugin_contributors":[77745,79285,90813,240366,83347,209049],"plugin_business_model":[],"class_list":["post-127461","plugin","type-plugin","status-publish","hentry","plugin_tags-development","plugin_tags-dtap","plugin_tags-environment","plugin_tags-production","plugin_tags-staging","plugin_contributors-markjaquith","plugin_contributors-mrwweb","plugin_contributors-roytanck","plugin_contributors-sdobreff","plugin_contributors-tekapo","plugin_contributors-tflight","plugin_committers-sdobreff"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/display-environment-type\/assets\/icon-128x128.png?rev=2366333","icon_2x":"https:\/\/ps.w.org\/display-environment-type\/assets\/icon-256x256.png?rev=2366333","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/display-environment-type\/assets\/screenshot-1.png?rev=2367280","caption":"Admin bar display (production)."},{"src":"https:\/\/ps.w.org\/display-environment-type\/assets\/screenshot-2.png?rev=2367280","caption":"Admin bar display (staging)."},{"src":"https:\/\/ps.w.org\/display-environment-type\/assets\/screenshot-3.png?rev=2367280","caption":"Admin bar display (development)."},{"src":"https:\/\/ps.w.org\/display-environment-type\/assets\/screenshot-4.png?rev=2367280","caption":"Admin bar display (custom)."},{"src":"https:\/\/ps.w.org\/display-environment-type\/assets\/screenshot-5.png?rev=2367280","caption":"The \"At a Glance\" widget."}],"raw_content":"<!--section=description-->\n<p>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.<\/p>\n\n<p><a href=\"https:\/\/make.wordpress.org\/core\/2020\/07\/24\/new-wp_get_environment_type-function-in-wordpress-5-5\/\">More info about the feature<\/a><\/p>\n\n<p>To gain additional control \u2014 for example, setting the environment or other values from the WP admin (when <code>wp-config.php<\/code> is writable) \u2014 consider installing our other plugin <strong><a href=\"https:\/\/wordpress.org\/plugins\/0-day-analytics\/\">0 Day Analytics<\/a><\/strong>.<\/p>\n\n<h3>Recommended Plugins<\/h3>\n\n<ul>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/0-day-analytics\/\">0 Day Analytics<\/a> \u2014 a powerful plugin for sites that need more insight into errors and runtime behavior. It includes a Cron manager, a Transient manager (database-backed), DB manager, Snippet manager, Mail manager, Plugin Version Switcher available from the Plugins page and many more.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Install and activate the plugin from the 'Plugins' menu in WordPress.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='can%20i%20set%20a%20custom%20color%20for%20my%20environment%20types%3F'><h3>Can I set a custom color for my environment types?<\/h3><\/dt>\n<dd><p>Colors are intentionally fixed to avoid confusion. If colors were configurable, they'd need to be identical across all related servers to remain consistent.<\/p><\/dd>\n<dt id='what%20happens%20if%20i%20define%20custom%20environment%20types%3F'><h3>What happens if I define custom environment types?<\/h3><\/dt>\n<dd><p>Custom environment types were briefly supported in WordPress 5.5 but were removed in 5.5.1. This plugin does not support custom types.<\/p><\/dd>\n<dt id='why%20don%27t%20non-administrators%20see%20the%20environment%20type%20on%20the%20front%20end%3F'><h3>Why don't non-administrators see the environment type on the front end?<\/h3><\/dt>\n<dd><p>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.<\/p>\n\n<p>For additional control, use the <code>det_display_environment_type<\/code> filter hook. Example:<\/p>\n\n<pre><code>function rt_det_display_filter( $display ) {\n    \/\/ Disable the environment type display for user ID 2.\n    return ( get_current_user_id() !== 2 );\n}\nadd_filter( 'det_display_environment_type', 'rt_det_display_filter' );\n<\/code><\/pre><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.6.0 (2025-12-18)<\/h4>\n\n<ul>\n<li>Code improvements. Added the Gutenberg menu. 0 Day Analytics introduced.<\/li>\n<\/ul>\n\n<h4>1.5.0 (2024-07-01)<\/h4>\n\n<ul>\n<li>Code improvements; shows the constants' values regardless of the <code>WP_DEBUG<\/code> constant. WP Control plugin introduced.<\/li>\n<\/ul>\n\n<h4>1.4.0 (2024-04-07)<\/h4>\n\n<ul>\n<li>Code improvements and UI fixes \u2014 show the icon on mobile and set colors in the \"At a Glance\" widget. Added WordPress version in the drop-down menu.<\/li>\n<\/ul>\n\n<h4>1.3.5 (2025-04-04)<\/h4>\n\n<ul>\n<li>Added a drop-down submenu with WP constants and their values (enabled \/ disabled).<\/li>\n<\/ul>\n\n<h4>1.3.4 (2024-12-20)<\/h4>\n\n<ul>\n<li>Added a filter hook to modify the environment's display name (thanks @erniecom).<\/li>\n<\/ul>\n\n<h4>1.3.3 (2024-07-05)<\/h4>\n\n<ul>\n<li>Internationalization improvements by @tekapo.<\/li>\n<\/ul>\n\n<h4>1.3.2 (2023-11-10)<\/h4>\n\n<ul>\n<li>Accessibility improvements by @mrwweb.<\/li>\n<\/ul>\n\n<h4>1.3.1 (2022-03-30)<\/h4>\n\n<ul>\n<li>Skip loading the CSS file on the front end if the toolbar is hidden (thanks @tflight).<\/li>\n<\/ul>\n\n<h4>1.3 (2020-08-25)<\/h4>\n\n<ul>\n<li>Code refactor (thank you, @markjaquith).<\/li>\n<li>Environment type now hidden by default for subscribers.<\/li>\n<\/ul>\n\n<h4>1.2.1 (2020-08-23)<\/h4>\n\n<ul>\n<li>Removed the distracting hover effect (thank you, @markjaquith).<\/li>\n<li>Hardening against XSS (props @markjaquith).<\/li>\n<\/ul>\n\n<h4>1.2 (2020-08-21)<\/h4>\n\n<ul>\n<li>Adds a filter hook to allow you to determine whether the environment is displayed.<\/li>\n<\/ul>\n\n<h4>1.1 (2020-08-21)<\/h4>\n\n<ul>\n<li>Added a conditional front-end display (admins only).<\/li>\n<li>Improved plugin initialization.<\/li>\n<\/ul>\n\n<h4>1.0.2 (2020-08-21)<\/h4>\n\n<ul>\n<li>Removed the (unstyled) display on the front-end admin bar.<\/li>\n<li>Added a FAQ section to the readme file.<\/li>\n<\/ul>\n\n<h4>1.0.1 (2020-08-21)<\/h4>\n\n<ul>\n<li>Fixed the plugin description and plugin URI.<\/li>\n<\/ul>\n\n<h4>1.0 (2020-08-20)<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Displays WordPress 5.5&#039;s environment type setting in the admin bar and the &quot;At a Glance&quot; dashboard widget.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/127461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=127461"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/sdobreff"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=127461"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=127461"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=127461"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=127461"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=127461"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=127461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}