Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save ivangrynenko/a7171324527f7ca576d52c297197410c to your computer and use it in GitHub Desktop.

Select an option

Save ivangrynenko/a7171324527f7ca576d52c297197410c to your computer and use it in GitHub Desktop.

Revisions

  1. ivangrynenko created this gist May 24, 2022.
    23 changes: 23 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    <?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;
    }
    }