Created
September 9, 2019 13:16
-
-
Save elvismdev/fc1f95de85c3ed950b6dc46b1d8b0f16 to your computer and use it in GitHub Desktop.
Example usage filter `wpcfm_multi_env`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// wp-content/mu-plugins/wp-cfm-multi-env.php | |
// ... | |
function my_wpcfm_multi_env_register( $environments ) { | |
// Define an array containing the hosting environment names. | |
// Or detect these with your own code logic if all are available in `$_ENV` or `$_SERVER` super-globals. | |
// ... | |
$environments = [ | |
'dev', | |
'test', | |
'live' | |
]; | |
return $environments; | |
} | |
add_filter( 'wpcfm_multi_env', 'my_wpcfm_multi_env_register' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment