load(); // Custom Dotenv Boolean Support if (!function_exists('evalBool')) { function evalBool($value) { return (strcasecmp($value, 'true') ? false : true); } } define('ENV_LOCAL', 'local'); define('ENV_DEV', 'development'); define('ENV_PROD', 'production'); define('ENV', $_ENV['ENVIRONMENT']); /** production **/ if (ENV === ENV_PROD) { if (isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && "https" == $_SERVER["HTTP_X_FORWARDED_PROTO"]) { $_SERVER["HTTPS"] = "on"; } error_reporting(0); @ini_set('display_errors', 0); } /** development **/ if (ENV === ENV_DEV) { if (isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && "https" == $_SERVER["HTTP_X_FORWARDED_PROTO"]) { $_SERVER["HTTPS"] = "on"; } } /** BOTH **/ if (ENV !== ENV_LOCAL) { /* ADMIN */ define('FORCE_SSL_ADMIN', true); /* Hide ACF BO page */ define('ACF_LITE', true); /* Disable plugins editor & upgrades */ define('DISALLOW_FILE_MODS', true); define('DISALLOW_FILE_EDIT', true); } // ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define('DB_NAME', $_ENV['DB_NAME']); /** MySQL database username */ define('DB_USER', $_ENV['DB_USER']); /** MySQL database password */ define('DB_PASSWORD', $_ENV['DB_PASSWORD']); /** MySQL hostname */ define('DB_HOST', $_ENV['DB_HOST']); /** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8mb4'); /** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', ''); /**#@+ * Authentication Unique Keys and Salts. * * Change these to different unique phrases! * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service} * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again. * * @since 2.6.0 */ define('AUTH_KEY', '3lxfhsfr7vvueubusinfq6wh3jzcct0dpokf9wvlesvyqctufzjrsjctkxomfkai'); define('SECURE_AUTH_KEY', 'g8shsentpna4xjwd2hrndysspzqstjqhshl5ltojzfx2jt00mmgv5erkv9hhzfks'); define('LOGGED_IN_KEY', 'bttywkfpheo5alewblait7g63ztfsoiscbrerdbzeinwt0qzyl3nopohusmoffo6'); define('NONCE_KEY', 'g9vf7ljkcjkpgdtejb2rscp53u4lbhoezdzdytomoudzsibrsqh0lwn9rtcfgc8s'); define('AUTH_SALT', 'maxi2iuf7im4jyxok9o9phyuwtesnqdvxpes8cbv6rcjglj4ksqbokhtafqlodm2'); define('SECURE_AUTH_SALT', 'fxzzvwcjmq4gar1pmhgkhrdzgx2h8c8euy5ux3t5s4h9gu686hg6euxop5ahvqp1'); define('LOGGED_IN_SALT', 'yxhrdruruy18h4euqzayua2avomvrjqdolujk66waswrx3kywpxuxwvbetnn1ymx'); define('NONCE_SALT', 'h2xmi72rczdra3rx8gimpnhhztx1oudvlq5zsuufpztg6iipng6pyfpzwdh336x0'); /**#@-*/ /** * WordPress Database Table prefix. * * You can have multiple installations in one database if you give each * a unique prefix. Only numbers, letters, and underscores please! */ $table_prefix = $_ENV['DB_PREFIX']; if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] = "on") { define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] . '/'); } else { define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/'); } /* Disable all core automatic updates */ define('WP_AUTO_UPDATE_CORE', false); /* enable log file */ define('WP_DEBUG_LOG', true); /** Stop du cron WordPress **/ define('DISABLE_WP_CRON', true); /* Change revisions limitation & autosave interval */ define('WP_POST_REVISIONS', 3); define('AUTOSAVE_INTERVAL', 300); /* SMTP */ define('SMTP_HOST', $_ENV['SMTP_HOST']); define('SMTP_PORT', $_ENV['SMTP_PORT']); define('SMTP_AUTH', evalBool($_ENV['SMTP_AUTH'])); define('SMTP_USER', $_ENV['SMTP_USER']); define('SMTP_PASS', $_ENV['SMTP_PASS']); define('SMTP_SECURE', $_ENV['SMTP_SECURE']); define('CONTACT_RECIPIENT', $_ENV['CONTACT_RECIPIENT']); define('MAIL_PASSERELLE', $_ENV['MAIL_PASSERELLE']); /** * For developers: WordPress debugging mode. * * Change this to true to enable the display of notices during development. * It is strongly recommended that plugin and theme developers use WP_DEBUG * in their development environments. * * For information on other constants that can be used for debugging, * visit the documentation. * * @link https://wordpress.org/support/article/debugging-in-wordpress/ */ define('SCRIPT_DEBUG', evalBool($_ENV['SCRIPT_DEBUG'])); define('WP_DEBUG', evalBool($_ENV['WP_DEBUG'])); define('WP_DEBUG_DISPLAY', evalBool($_ENV['WP_DEBUG_DISPLAY'])); define('WP_HTTP_BLOCK_EXTERNAL', evalBool($_ENV['WP_HTTP_BLOCK_EXTERNAL'])); // LDC WEB STATUS CHECKER define('PROJECT_UUID', $_ENV['PROJECT_UUID']); /* CRM */ define('CRM_TOKEN', $_ENV['CRM_TOKEN']); define('CRM_ENDPOINT', $_ENV['CRM_ENDPOINT']); define('CRM_PASSWORD', $_ENV['CRM_PASSWORD']); define('MESBR_REF_CAMP', $_ENV['MESBR_REF_CAMP']); define('MESBR_ENDPOINT', $_ENV['MESBR_ENDPOINT']); /* That's all, stop editing! Happy publishing. */ /** Absolute path to the WordPress directory. */ if (!defined('ABSPATH')) { define('ABSPATH', __DIR__ . '/'); } /** Sets up WordPress vars and included files. */ require_once ABSPATH . 'wp-settings.php';