Created
March 7, 2022 16:06
-
-
Save jonathanstegall/905df73aed3a7d1b9255167eb7979509 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: Environment Files | |
* Description: Load environment-specific config files | |
* | |
*/ | |
if ( 'local' !== VIP_GO_ENV ) { | |
if ( file_exists( WPCOM_VIP_PRIVATE_DIR . '/' . VIP_GO_ENV . '-config.php' ) ) { | |
require_once( WPCOM_VIP_PRIVATE_DIR . '/' . VIP_GO_ENV . '-config.php' ); | |
} | |
} else { | |
if ( file_exists( __DIR__ . '/../private/local-config.php' ) ) { | |
require_once( __DIR__ . '/../private/local-config.php' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment