WP Manifestindependent plugin directory
manifest / admin / wpmu-plugins-environment-marker

Environment Marker

Change wordpress admin bar according the environment

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/guillaumeg87/wpmu-plugins-environment-marker/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
  1. Add variable in your wp-config.php

  2. define('WP_ENV', 'local');

  3. Allowed variable values

  • local : #2e7d32 (vert)
  • staging: #1565c0 (blue)
  • preprod: #ef6c00 (orange)
  • prod: #AB1109 (red)
  1. Troubleshooting Need to use a file loader, because Wordpress read only php file in mu-plugins directory, so here is an exemple
    
    // Add new mu-plugin with duplicated line as below
    require WPMU_PLUGIN_DIR . '/environment-marker/environment.php';