Last active
September 9, 2019 14:15
-
-
Save elvismdev/e3de8123929a5982fe4d3f079ee7dca9 to your computer and use it in GitHub Desktop.
Example usage filter `wpcfm_current_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_current_env_set( $env ) { | |
// Detect with your own code logic the current environment the WordPress site is running. | |
// Generally this will be defined in a constant inside `$_ENV` or `$_SERVER` super-globals. | |
// ... | |
$env = 'dev'; | |
return $env; | |
} | |
add_filter( 'wpcfm_current_env', 'my_wpcfm_current_env_set' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment