ldc-poule-et-toque/wp-config.php
2021-04-12 15:54:29 +02:00

191 lines
6.5 KiB
PHP

<?php
require_once 'vendor/autoload.php';
Dotenv\Dotenv::createImmutable(__DIR__)->load();
// Custom Dotenv Boolean Support
if (! function_exists('evalBool')) {
function evalBool($value)
{
return (strcasecmp($value, 'true') ? false : true);
}
}
/**
* La configuration de base de votre installation WordPress.
*
* Ce fichier contient les réglages de configuration suivants : réglages MySQL,
* préfixe de table, clefs secrètes, langue utilisée, et ABSPATH.
* Vous pouvez en savoir plus à leur sujet en allant sur
* {@link http://codex.wordpress.org/Editing_wp-config.php Modifier
* wp-config.php} (en anglais). C'est votre hébergeur qui doit vous donner vos
* codes MySQL.
*
* Ce fichier est utilisé par le script de création de wp-config.php pendant
* le processus d'installation. Vous n'avez pas à utiliser le site web, vous
* pouvez simplement renommer ce fichier en "wp-config.php" et remplir les
* valeurs.
*
* @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', 'jp-`zqemTQS;H(+&|7Q8_1IVB%n/*5PV^&-P -pVO,Ko(9yIv<&UC]_r+NQ^b;.F');
define('SECURE_AUTH_KEY', 'P*DWDf|I2NBB@b*w N;qrD[J*6TgnarZpw{H%bgh?%}i+|-r>}M&7gOp8tUT`nO*');
define('LOGGED_IN_KEY', 'cqMZ]R.vuM%1:b0]F1|7=<cC83!W72T- +N8F R|%sv/;SuMi]hq^ok-vRiY3~aU');
define('NONCE_KEY', '4+fX`^Z+iit.oc]qC_~RxQ^!C,QS>kB7QYERdcax~oo5uR:YZ~yQ%}A{9!xzxd##');
define('AUTH_SALT', 'JD A}H;|6x?R-FA6r|!Y,;8.>-9%`]-y4LeM{<`GA&l-bKND*g&zBU%E_+2UA,y}');
define('SECURE_AUTH_SALT', 'Zyal+y2-`jn*f]nXu#kF:JON4KKBL/`+8&|c!HMu(ggaJmTkK>;Q9nlN$v<y8mX+');
define('LOGGED_IN_SALT', '!,+ W@-r8%%0pV|;:wHf~T}tqs6;XS Xm8>+^ wS,x[a~@XGq0MWER|E<0:IIKZ/');
define('NONCE_SALT', '4Hj1I?+bL?Q%,AR rJb|p6y6-s=[$*6XpI|4L>fn?jEY#+u*~:[T5dwDPpJ/cf_/');
/**#@-*/
/**
* 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');
/* 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', 'marie@ldc-crm.fr');
define('SENDERNAME_MAIL', 'Marie');
define('FROM_MAIL', 'noreply@marie.fr');
DEFINE ("MAIL_PASSERELLE", "passerelle.ldc@ldc.fr");
DEFINE("CONTACT_PASSERELLE1", "alexandra.vanhuysberghe@ldc.fr");
DEFINE("CONTACT_PASSERELLE2", 'caroline.santoni@marie.fr');
DEFINE ("MAIL_ALERTE", "sandrine.vannereau@marie.fr");
DEFINE ("MAIL_ALERTE_B", "sylvain.gouet@ldc.fr");
DEFINE ("MAIL_ALERTE_C", "vincent.bridier@ldc.fr");
define('WS_SERVCE_LOGIN', getenv('WS_SERVCE_LOGIN'));
define('WS_SERVCE_PASSWORD', getenv('WS_SERVCE_PASSWORD'));
define('CRM_PLATOS_WSDL', getenv('CRM_PLATOS_WSDL'));
/**
* 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'));
/** Changement du nom du répertoire wp-content => content. */
define ('WP_CONTENT_FOLDERNAME', 'content');
define ('WP_CONTENT_DIR', ABSPATH . WP_CONTENT_FOLDERNAME) ;
if(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] = "on"){
define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] . '/');
}else{
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
}
define('WP_CONTENT_URL', WP_SITEURL . WP_CONTENT_FOLDERNAME);
define ('WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins');
define( 'EP_HOST', 'http://192.168.31.254:9200' );
/* 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' );