load(); // Custom Dotenv Boolean Support if (! function_exists('evalBool')) { function evalBool($value) { return (strcasecmp($value, 'true') ? false : true); } } /** * The base configuration for WordPress * * The wp-config.php creation script uses this file during the * installation. You don't have to use the web site, you can * copy this file to "wp-config.php" and fill in the values. * * This file contains the following configurations: * * * MySQL settings * * Secret keys * * Database table prefix * * ABSPATH * * @link https://codex.wordpress.org/Editing_wp-config.php * * @package WordPress */ define('ENV_LOCAL', 'local'); define('ENV_DEV', 'development'); define('ENV_PROD', 'production'); define('ENV', getenv('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', getenv('DB_NAME')); /** MySQL database username */ define('DB_USER', getenv('DB_USER')); /** MySQL database password */ define('DB_PASSWORD', getenv('DB_PASSWORD')); /** MySQL hostname */ define('DB_HOST', getenv('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', '' ); /**#@+ * Clefs uniques d'authentification et salage. * * Remplacez les valeurs par défaut par des phrases uniques ! * Vous pouvez générer des phrases aléatoires en utilisant * {@link https://api.wordpress.org/secret-key/1.1/salt/ le service de clefs secrètes de WordPress.org}. * Vous pouvez modifier ces phrases à n'importe quel moment, afin d'invalider tous les cookies existants. * Cela forcera également tous les utilisateurs à se reconnecter. * * @since 2.6.0 */ define('AUTH_KEY', 'Mv_8U+2R@XurLhF`Y4Y?|8da.LC?zLGP!VI/^>(}/Sl^Q%IP.*[Pl5$1M,8cFf0j'); define('SECURE_AUTH_KEY', 'YJf(M7Y_?&d9o#fgk>P;xan*1!QE}Jbc`oZL{p9+[qz6v3g>Cvna^2x|OzRb}6b-'); define('LOGGED_IN_KEY', 'L)I(^t_s!_Q.?4pz/.E)3eig}Y}E1bz?E!w~SSTjsH$T)u5;KW_/y> r8ROav9.a'); define('NONCE_KEY', 'BNm++C7xI9z|lLm,V-y-UC/3L?vF+dUd-}VA yyppj@2UQ ^{|Fpz_+|W=Q[(bZk'); define('AUTH_SALT', '&tYJ^@JgYLRo`o?7moA}A4xAQA:8KzP!v;krGTQt,{^yTdn1re=7;g,dItUv|ogE>bKR}b?t'); define('LOGGED_IN_SALT', 'T@/.C--yWf'); define('NONCE_SALT', '1|-(ju#w#AFw?|*P+{/Cezq4DlZ3R#Lg3e1|PVd^a_+V]/$[U=|qr +k}(G,}h,B'); /**#@-*/ /** * 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 = getenv('DB_PREFIX'); define('FS_METHOD','direct'); /** * Langue de localisation de WordPress, par défaut en Anglais. * * Modifiez cette valeur pour localiser WordPress. Un fichier MO correspondant * au langage choisi doit être installé dans le dossier wp-content/languages. * Par exemple, pour mettre en place une traduction française, mettez le fichier * fr_FR.mo dans wp-content/languages, et réglez l'option ci-dessous à "fr_FR". */ define('WPLANG', 'fr_FR'); /* 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', getenv('SMTP_HOST') ); define( 'SMTP_PORT', getenv('SMTP_PORT') ); define( 'SMTP_AUTH', evalBool(getenv('SMTP_AUTH')) ); define( 'SMTP_USER', getenv('SMTP_USER') ); define( 'SMTP_PASS', getenv('SMTP_PASS') ); define( 'SMTP_SECURE', getenv('SMTP_SECURE') ); define('SENDER_MAIL', getenv('SENDER_MAIL')); define('SENDERNAME_MAIL', getenv('SENDERNAME_MAIL')); define('FROM_MAIL', getenv('FROM_MAIL')); /* CRM */ define('CRM_TOKEN', getenv('CRM_TOKEN')); /** * 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 Codex. * * @link https://codex.wordpress.org/Debugging_in_WordPress */ define( 'SCRIPT_DEBUG', evalBool(getenv('SCRIPT_DEBUG')) ); define('WP_DEBUG', evalBool(getenv('WP_DEBUG'))); define('WP_DEBUG_DISPLAY', evalBool(getenv('WP_DEBUG_DISPLAY'))); define('WP_HTTP_BLOCK_EXTERNAL', evalBool(getenv('WP_HTTP_BLOCK_EXTERNAL'))); // LDC WEB STATUS CHECKER define('PROJECT_UUID', getenv('PROJECT_UUID')); if(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] = "on"){ define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] . '/'); }else{ define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/'); } /* That's all, stop editing! Happy publishing. */ /** Absolute path to the WordPress directory. */ if ( ! defined( 'ABSPATH' ) ) { define( 'ABSPATH', dirname( __FILE__ ) . '/' ); } /** Sets up WordPress vars and included files. */ require_once( ABSPATH . 'wp-settings.php' );