Created
May 24, 2022 05:54
-
-
Save ivangrynenko/a7171324527f7ca576d52c297197410c to your computer and use it in GitHub Desktop.
Quant local override for Wordpress
This file contains hidden or 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 | |
/** | |
* @file | |
* | |
* Overrides QuantCDN config for non production envs. | |
* Place this file to the mu-plugins folder, name it site-config.php | |
*/ | |
if (empty(getenv('LAGOON_ENVIRONMENT')) || getenv('LAGOON_ENVIRONMENT') != 'production') { | |
add_filter('option_wp_quant_settings', 'override_wp_quant_settings'); | |
function override_wp_quant_settings() { | |
$quant_settings = [ | |
'enabled' => 0, | |
'webserver_url' => 'http://localhost', | |
'webserver_host' => 'www.example.com', | |
'api_endpoint' => 'https://api.quantcdn.io', | |
'api_account' => '', | |
'api_project' => '', | |
'api_token' => '', | |
]; | |
return $quant_settings; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment