{"id":72879,"date":"2017-08-08T14:12:32","date_gmt":"2017-08-08T14:12:32","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/show-environment-in-admin-bar\/"},"modified":"2024-07-16T02:16:48","modified_gmt":"2024-07-16T02:16:48","slug":"show-environment-in-admin-bar","status":"publish","type":"plugin","link":"https:\/\/ca.wordpress.org\/plugins\/show-environment-in-admin-bar\/","author":8976791,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.2.1","stable_tag":"1.2.1","tested":"6.6.5","requires":"4.6","requires_php":"","requires_plugins":null,"header_name":"Show Environment in Admin Bar","header_author":"Paul V. Biron\/Sparrow Hawk Computing","header_description":"Add an indication to the Admin Bar of the environment WordPress is running in (e.g., Prod, Staging, Dev, etc)","assets_banners_color":"f9f9f9","last_updated":"2024-07-16 02:16:48","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_s-xclick&hosted_button_id=Z6D97FA595WSU","header_plugin_uri":"https:\/\/github.com\/pbiron\/shc-show-env","header_author_uri":"http:\/\/sparrowhawkcomputing.com","rating":5,"author_block_rating":0,"active_installs":200,"downloads":12567,"num_ratings":3,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","changelog"],"tags":{"1.0":{"tag":"1.0","author":"pbiron","date":"2017-08-08 15:40:13"},"1.0.1":{"tag":"1.0.1","author":"pbiron","date":"2017-08-08 17:45:55"},"1.1":{"tag":"1.1","author":"pbiron","date":"2020-06-16 23:21:28"},"1.2":{"tag":"1.2","author":"pbiron","date":"2024-07-16 01:30:59"},"1.2.1":{"tag":"1.2.1","author":"pbiron","date":"2024-07-16 02:16:48"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"3"},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":1710251,"resolution":"128x128","location":"assets","locale":""}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":1891868,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.0.1","1.1","1.2","1.2.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":1891868,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":1891868,"resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":1891868,"resolution":"3","location":"assets","locale":""},"screenshot-4.png":{"filename":"screenshot-4.png","revision":1891868,"resolution":"4","location":"assets","locale":""},"screenshot-5.png":{"filename":"screenshot-5.png","revision":1891868,"resolution":"5","location":"assets","locale":""}},"screenshots":{"1":"Production","2":"Staging","3":"QA","4":"Development","5":"Custom &mdash; Preview"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[83,1339],"plugin_category":[],"plugin_contributors":[144821],"plugin_business_model":[],"class_list":["post-72879","plugin","type-plugin","status-publish","hentry","plugin_tags-admin","plugin_tags-admin-bar","plugin_contributors-pbiron","plugin_committers-pbiron"],"banners":{"banner":"https:\/\/ps.w.org\/show-environment-in-admin-bar\/assets\/banner-772x250.png?rev=1891868","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/show-environment-in-admin-bar\/assets\/icon-128x128.png?rev=1710251","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/show-environment-in-admin-bar\/assets\/screenshot-1.png?rev=1891868","caption":"Production"},{"src":"https:\/\/ps.w.org\/show-environment-in-admin-bar\/assets\/screenshot-2.png?rev=1891868","caption":"Staging"},{"src":"https:\/\/ps.w.org\/show-environment-in-admin-bar\/assets\/screenshot-3.png?rev=1891868","caption":"QA"},{"src":"https:\/\/ps.w.org\/show-environment-in-admin-bar\/assets\/screenshot-4.png?rev=1891868","caption":"Development"},{"src":"https:\/\/ps.w.org\/show-environment-in-admin-bar\/assets\/screenshot-5.png?rev=1891868","caption":"Custom &mdash; Preview"}],"raw_content":"<!--section=description-->\n<p>If you're like me, you often have multiple versions of the same WordPress site open in different browser windows, e.g.,  production in one window and development in another window.<\/p>\n\n<p>And if you're like me, you have also unwittingly edited content in the production environment thinking you were doing so in the development environment or vice versa.<\/p>\n\n<p>If so, then this plugin is for you!<\/p>\n\n<p>It adds an indication of the current environment to the Admin Bar that is easier to see than examining the URL in your browser's address bar.<\/p>\n\n<h3>Out-of-the-box behavior<\/h3>\n\n<p>Out-of-the-box, 2 different environments are recognized:<\/p>\n\n<ul>\n<li>Production\n\n<ul>\n<li>The node added to the Admin Bar has a red background (i.e., Stop\/be careful with any changes you make).<\/li>\n<li>If neither a staging, QA, nor development environment is detected, then <code>Prod<\/code> is displayed in the Admin Bar.<\/li>\n<\/ul><\/li>\n<li>Development\n\n<ul>\n<li>The node added to the Admin Bar has a green background (i.e., Go ahead, it is safe to make changes).<\/li>\n<li>If WP is running on localhost (either a loopback IP address or LAN IP address), then <code>Local<\/code> displays in the Admin Bar.<\/li>\n<li>If WP_DEBUG is defined &amp; true, then <code>Dev<\/code> displays in the Admin Bar.<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<h3>Customizing the out-of-the-box behavior<\/h3>\n\n<p>Two additional environments are supported, but cannot be automatically detected:<\/p>\n\n<ul>\n<li>Staging\n\n<ul>\n<li>The node added to the Admin Bar has a yellow-ish background (i.e., Slow down, changes <em>might<\/em> make it into the production site).<\/li>\n<li>For information on how to enable this environment, see the <a href=\"https:\/\/github.com\/pbiron\/shc-show-env\/\">documentation<\/a>.<\/li>\n<\/ul><\/li>\n<li>QA\n\n<ul>\n<li>The node added to the Admin Bar has a blue background (i.e., \"It's cool\", changes you make won't affect the production site).<\/li>\n<li>For information on how to enable this environment, see the <a href=\"https:\/\/github.com\/pbiron\/shc-show-env\/\">documentation<\/a>.<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<!--section=changelog-->\n<h4>1.2.1 (2024-07-15)<\/h4>\n\n<ul>\n<li>Bug fix: forgot to declare <code>$wp_version<\/code> as a global in <code>SHC_Show_Env:init()<\/code>.  D'oh!<\/li>\n<\/ul>\n\n<h4>1.2 (2024-07-15)<\/h4>\n\n<ul>\n<li>Updated the priority at which <code>admin_bar_menu<\/code> is hooked into.  See <a href=\"https:\/\/core.trac.wordpress.org\/ticket\/60685#comment:18\">Trac 60685, comment 18<\/a> for why this change was made. <\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>General code reorg<\/li>\n<li>Added support for QA environment<\/li>\n<li>minor CSS fixes<\/li>\n<li>changed the Text Domain (for localization) to 'show-environment-in-admin-bar', so that the <a href=\"https:\/\/translate.wordpress.org\/projects\/wp-plugins\/show-environment-in-admin-bar\">translate.wordpress.org<\/a> service can be used.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Correct formatting in readme.txt<\/li>\n<li>Removed GitHub Plugin URL reader<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release on .org<\/li>\n<\/ul>","raw_excerpt":"Add an indication to the Admin Bar of the environment WordPress is running in (e.g., Prod, Staging, QA, Dev, etc).","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/72879","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=72879"}],"author":[{"embeddable":true,"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/pbiron"}],"wp:attachment":[{"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=72879"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=72879"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=72879"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=72879"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=72879"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ca.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=72879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}