Last active
August 19, 2020 22:09
-
-
Save carl-alberto/005c4458d49885f5e4cade13618a9613 to your computer and use it in GitHub Desktop.
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 | |
/* | |
Plugin Name: WPCFM Helper | |
Plugin URI: https://pantheon.io | |
Description: Helper for WP CFM | |
Version: 0.1 | |
Author: Pantheon / Carl Alberto | |
Author URI: https://carlalberto.code.blog | |
*/ | |
add_filter( 'wpcfm_multi_env', function( $pantheon_envs ) { | |
if ( !( in_array( PANTHEON_ENVIRONMENT, $pantheon_envs ) ) ) { | |
$pantheon_envs[] = PANTHEON_ENVIRONMENT; | |
} | |
return $pantheon_envs; | |
} ); | |
add_filter( 'wpcfm_current_env', function( $pantheon_env ) { | |
return PANTHEON_ENVIRONMENT; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment