PHP code example of renakdup / colorize-wp-adminpanel-for-environments
1. Go to this page and download the library: Download renakdup/colorize-wp-adminpanel-for-environments library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
renakdup / colorize-wp-adminpanel-for-environments example snippets
define( 'WP_ENVIRONMENT_TYPE', 'local' );
define( 'WP_ENVIRONMENT_TYPE', 'development' );
define( 'WP_ENVIRONMENT_TYPE', 'staging' );
define( 'WP_ENVIRONMENT_TYPE', 'production' );
if ( ! class_exists( Renakdup\AdminpanelEnvColor\AdminpanelEnvColor::class ) ) {
return;
}
Renakdup\AdminpanelEnvColor\AdminpanelEnvColor::init();
add_filter( 'renakdup/adminpanel_env_color/colors', function ( $defaults ) {
return array_merge(
$defaults,
[
'local' => 'green',
'custom-env' => '#CCC'
]
);
}, 10, 1 );