Skip to content

Instantly share code, notes, and snippets.

@carl-alberto
Last active August 19, 2020 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carl-alberto/005c4458d49885f5e4cade13618a9613 to your computer and use it in GitHub Desktop.
Save carl-alberto/005c4458d49885f5e4cade13618a9613 to your computer and use it in GitHub Desktop.
<?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