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

Environment Marker

Change wordpress admin bar according the environment

by guillaumeg87 · github.com/guillaumeg87/wpmu-plugins-environment-marker

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/guillaumeg87/wpmu-plugins-environment-marker/archive/refs/heads/master.zip

Readme

wpmu-plugins-environment-marker

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

Read the full README on GitHub →