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.zipReadme
wpmu-plugins-environment-marker
-
Add variable in your wp-config.php
-
define('WP_ENV', 'local');
-
Allowed variable values
- local : #2e7d32 (vert)
- staging: #1565c0 (blue)
- preprod: #ef6c00 (orange)
- prod: #AB1109 (red)
- 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';