192 lines
6 KiB
PHP
192 lines
6 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);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 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'));
|
|
|
|
if (isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && "https" == $_SERVER["HTTP_X_FORWARDED_PROTO"]) {
|
|
$_SERVER["HTTPS"] = "on";
|
|
}
|
|
|
|
/** production **/
|
|
if (ENV === ENV_PROD) {
|
|
error_reporting(0);
|
|
@ini_set('display_errors', 0);
|
|
}
|
|
|
|
/** 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', '' );
|
|
|
|
/**#@+
|
|
* 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', 'lr7dofr8oqutsblvjqofkzdxs7mmgtdvd6vvxefkijnfomhikvvlvxeixugf2qvy' );
|
|
define( 'SECURE_AUTH_KEY', 'tsgz2tgsjp8btkmba0khehyypgvycn3ffgilmnlz3o0xktahekhz4ftkqpzs1pho' );
|
|
define( 'LOGGED_IN_KEY', '24poq3molaljsx0nupdadpi1pdt94n7skxmesjuhtspw04cnu2vrbztrgua42euz' );
|
|
define( 'NONCE_KEY', 'nfv8x2qwe2lcsjahv52vozcm6ihfkt3ftmqjess5ui1vmm5n6vtntz1cozksrcyr' );
|
|
define( 'AUTH_SALT', 'pmkkbgxzui7qaj3bryqlpjsct6emaiyzzzsq0gnxhyzlovepovgwfa6jusy8cajr' );
|
|
define( 'SECURE_AUTH_SALT', 'zxpzrb2glgu6akxpxbq7hs0unochvbdy1aec98qbk1wd6bjxzcysmxr9aeaccsiy' );
|
|
define( 'LOGGED_IN_SALT', 'dd6v6cta94xvzboicawb5uqael3epobfrivqajjtw1aufnkjpq3j220vuswhx3ed' );
|
|
define( 'NONCE_SALT', 'ut0armnwpkywsmhhrxy8qtxarupkoel7hfusujbhudcc5namscenwnjaryit2dn2' );
|
|
|
|
/**#@-*/
|
|
|
|
/**
|
|
* 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');
|
|
|
|
/** 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('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('MAIL_ADMIN', getenv('MAIL_ADMIN'));
|
|
/**
|
|
* 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', $_ENV['PROJECT_UUID']);
|
|
define('LDCWEB_API_TOKEN', $_ENV['LDCWEB_API_TOKEN']);
|
|
define('MAIL_LIST_SERVICEWEB', $_ENV['MAIL_LIST_SERVICEWEB']);
|
|
// ALPHAVANTAGE
|
|
define('ALPHAVANTAGE_API_KEY', getenv('ALPHAVANTAGE_API_KEY'));
|
|
// MATOMO
|
|
define('MATOMO_SITE_ID', getenv('MATOMO_SITE_ID'));
|
|
/* That's all, stop editing! Happy publishing. */
|
|
|
|
/** Absolute path to the WordPress directory. */
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
define( 'ABSPATH', dirname( __FILE__ ) . '/' );
|
|
}
|
|
|
|
/* Custom */
|
|
// type_activite
|
|
define('AMONT',60);
|
|
define('VOLAILLE',52);
|
|
define('TRAITEUR',70);
|
|
define('INTERNATIONAL',54);
|
|
define('PLATEFORME',55);
|
|
|
|
|
|
define('PLATEFORME_86',86);
|
|
define('PLATEFORME_87',87);
|
|
define('PLATEFORME_88',88);
|
|
define('PLATEFORME_89',89);
|
|
define('PLATEFORME_90',90);
|
|
define('PLATEFORME_91',91);
|
|
define('PLATEFORME_92',92);
|
|
|
|
/** Sets up WordPress vars and included files. */
|
|
require_once( ABSPATH . 'wp-settings.php' );
|