Linux 软件免费装

Don't Mess Up Prod

开发者 eightface
更新时间 2025年12月20日 07:42
PHP版本: 8.0 及以上
WordPress版本: 6.9
版权: GPL-2.0-or-later
版权网址: 版权信息

标签

debug development admin bar environment staging production

下载

0.9.1

详情介绍:

Don't Mess Up Prod helps developers and content managers quickly identify which environment they're working in by displaying a colored indicator in the WordPress admin bar. Hopefully this prevents messing up production 😅

安装:

Automatic Installation:
  1. Go to Plugins > Add New in your WordPress admin
  2. Search for "Don't Mess Up Prod"
  3. Click "Install Now" and then "Activate"
Manual Installation:
  1. Upload the plugin files to /wp-content/plugins/dont-mess-up-prod/
  2. Activate the plugin through the 'Plugins' screen in WordPress

屏幕截图:

  • Staging environment indicator (green) with environment switcher menu
  • Development environment indicator (purple)
  • Local environment indicator (grey)
  • Staging environment indicator with environment switcher menu

升级注意事项:

0.9.1 WordPress.org deployment automation and updated Playground blueprints. 0.9.0 Added stylesheet instead of inline css

常见问题:

How do I configure which environment I'm in?

The plugin detects your environment automatically in two ways:

  1. URL Matching – Configure environment URLs using the dmup_environment_urls filter (see Configuration below)
  2. WP_ENVIRONMENT_TYPE – Set this constant in your wp-config.php:
define( 'WP_ENVIRONMENT_TYPE', 'staging' );

How do I customize the colors?

Add a filter in your theme's functions.php or an mu-plugin: add_filter( 'dmup_environment_colors', function( $colors ) { return [ 'local' => '#17a2b8', // blue 'development' => '#6f42c1', // purple 'staging' => '#ffc107', // yellow 'production' => '#dc3545', // red ]; } );

How do I control who can see the indicator?

By default, users with the publish_posts capability can see it. Customize this: Role-based access: add_filter( 'dmup_minimum_capability', function() { return 'edit_posts'; // or 'manage_options', etc. } ); Specific users only: add_filter( 'dmup_allowed_users', function( $users ) { return array_merge( $users, [ 'johndoe', 'janedoe' ] ); } );

How do I add environment URLs for quick switching?

Configure environment URLs to show a menu with links to other environments: add_filter( 'dmup_environment_urls', function() { return [ 'local' => 'http://yourproject.local', 'development' => 'https://dev.yourproject.com', 'staging' => 'https://staging.yourproject.com', 'production' => 'https://yourproject.com', ]; } );

更新日志:

0.9.1 0.9.0 0.8.1 0.8.0