phpcs first shoot
This commit is contained in:
parent
1732131da9
commit
6efd7308f3
15 changed files with 511 additions and 329 deletions
|
|
@ -18,10 +18,14 @@ SMTP_AUTH=
|
|||
SMTP_USER=
|
||||
SMTP_PASS=
|
||||
SMTP_SECURE=
|
||||
|
||||
MAIL_FROM_NAME=
|
||||
MAIL_FROM_ADDRESS=
|
||||
|
||||
CONTACT_RECIPIENT=regalette@regalette.com
|
||||
#CRM
|
||||
CRM_PLATOS_WSDL=
|
||||
WS_SERVCE_LOGIN=
|
||||
WS_SERVCE_PASSWORD=
|
||||
|
||||
# GOOGLE ANALYTICS
|
||||
GOOGLE_ANALYTICS=
|
||||
# GOOGLE RECAPTCHA
|
||||
GOOGLE_RECAPTCHA_PUBLIC=
|
||||
GOOGLE_RECAPTCHA_PRIVATE=
|
||||
|
|
@ -66,8 +66,8 @@
|
|||
</div>
|
||||
<div class="mentions">
|
||||
<p>© 2020 Regalette -
|
||||
<a href='<?= get_site_url(); ?>/mentions-legales/'>Mentions légales & CGU</a> -
|
||||
<a href='<?= get_site_url(); ?>/politique-de-confidentialite/'>Charte de confidentialité</a> -
|
||||
<a href='<?= esc_url(get_site_url()); ?>/mentions-legales/'>Mentions légales & CGU</a> -
|
||||
<a href='<?= esc_url(get_site_url()); ?>/politique-de-confidentialite/'>Charte de confidentialité</a> -
|
||||
<a class="ldcweb-cn-cookie-link">Gestion des cookies</a> -
|
||||
Réalis@tion LDC Service Web
|
||||
</p><br>
|
||||
|
|
@ -92,7 +92,7 @@
|
|||
<div id="ldcweb-banner" class="ldcweb-cn-banner">
|
||||
<div class="ldcweb-banner-content">
|
||||
<div class="ldcweb-banner-img">
|
||||
<img src="<?php echo (get_template_directory_uri()); ?>/assets/images/logo-regalette.png" alt="Logo" />
|
||||
<img src="<?php echo (esc_url(get_template_directory_uri())); ?>/assets/images/logo-regalette.png" alt="Logo" />
|
||||
</div>
|
||||
<div class="ldcweb-banner-text">
|
||||
<div class="ldcweb-banner-title">
|
||||
|
|
@ -170,7 +170,7 @@
|
|||
</div>
|
||||
|
||||
<script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>
|
||||
<script src='<?php echo (get_template_directory_uri()); ?>/assets/js/main.js'></script>
|
||||
<script src='<?php echo (esc_url(get_template_directory_uri())); ?>/assets/js/main.js'></script>
|
||||
|
||||
<script>
|
||||
window.LDCWebCN = new LdcwebCn({
|
||||
|
|
@ -192,12 +192,12 @@
|
|||
'name': "MESURES D'AUDIENCE - Google Analytics",
|
||||
'description': 'Les services de mesure d\'audience permettent de générer des statistiques de fréquentation utiles à l\'amélioration du site.',
|
||||
'link': 'https://support.google.com/analytics/answer/6004245',
|
||||
'cookies': ['NID', '_ga', '_gat_gtag_<?= str_replace("-", "_", GOOGLE_ANALYTICS); ?>', '_gid'],
|
||||
'cookies': ['NID', '_ga', '_gat_gtag_<?= esc_attr(str_replace("-", "_", GOOGLE_ANALYTICS)); ?>', '_gid'],
|
||||
'script': function() {
|
||||
(function(d, t) {
|
||||
var g = d.createElement(t),
|
||||
s = d.getElementsByTagName(t)[0];
|
||||
g.src = 'https://www.googletagmanager.com/gtag/js?id=<?= GOOGLE_ANALYTICS; ?>';
|
||||
g.src = 'https://www.googletagmanager.com/gtag/js?id=<?= esc_attr(GOOGLE_ANALYTICS); ?>';
|
||||
g.id = 'analytics';
|
||||
s.parentNode.insertBefore(g, s)
|
||||
}(document, 'script'));
|
||||
|
|
@ -209,7 +209,7 @@
|
|||
}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '<?= GOOGLE_ANALYTICS; ?>');
|
||||
gtag('config', '<?= esc_attr(GOOGLE_ANALYTICS); ?>');
|
||||
}
|
||||
},
|
||||
'vimeo': {
|
||||
|
|
|
|||
|
|
@ -9,16 +9,6 @@
|
|||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
/**Active les variables de session. */
|
||||
function my_session_start()
|
||||
{
|
||||
if (!session_id()) {
|
||||
@session_start();
|
||||
}
|
||||
}
|
||||
|
||||
add_action('init', 'my_session_start', 1);
|
||||
|
||||
// ---- CPT Produit
|
||||
function wp_produit()
|
||||
{
|
||||
|
|
@ -34,9 +24,6 @@ function wp_produit()
|
|||
);
|
||||
|
||||
$args = array(
|
||||
// 'label' => __( 'Produits'),
|
||||
// 'rewrite' => array( 'slug' => 'les-produits-tregalette'),
|
||||
// 'map_meta_cap' => true,
|
||||
'labels' => $labels,
|
||||
'public' => true,
|
||||
'show_in_rest' => true,
|
||||
|
|
@ -56,7 +43,6 @@ function wp_produit()
|
|||
);
|
||||
|
||||
$args = array(
|
||||
// 'rewrite' => array( 'slug' => 'gamme' ),
|
||||
'labels' => $labels,
|
||||
'public' => true,
|
||||
'show_ui' => true,
|
||||
|
|
@ -82,8 +68,6 @@ remove_filter('acf_the_content', 'wpautop');
|
|||
// Masque la version de Wordpress dans les sources du site
|
||||
remove_action('wp_head', 'wp_generator');
|
||||
|
||||
// remove_filter ('the_content', 'wpautop');
|
||||
|
||||
register_nav_menus(array(
|
||||
'main' => 'Menu principal',
|
||||
'footer' => 'Bas de page',
|
||||
|
|
@ -101,13 +85,16 @@ function set_html_content_type()
|
|||
add_action('phpmailer_init', 'configure_smtp');
|
||||
function configure_smtp(PHPMailer\PHPMailer\PHPMailer $phpmailer)
|
||||
{
|
||||
$phpmailer->isSMTP(); //switch to smtp
|
||||
$phpmailer->isSMTP();
|
||||
$phpmailer->Host = SMTP_HOST;
|
||||
$phpmailer->SMTPAuth = SMTP_AUTH;
|
||||
$phpmailer->Port = SMTP_PORT;
|
||||
$phpmailer->Username = SMTP_USER;
|
||||
$phpmailer->Password = SMTP_PASS;
|
||||
$phpmailer->SMTPSecure = SMTP_SECURE;
|
||||
$phpmailer->From = MAIL_FROM_ADDRESS;
|
||||
$phpmailer->FromName = MAIL_FROM_NAME;
|
||||
$phpmailer->SMTPAutoTLS = false;
|
||||
$phpmailer->SMTPOptions = array(
|
||||
'ssl' => array(
|
||||
'verify_peer' => false,
|
||||
|
|
|
|||
|
|
@ -4,27 +4,27 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="<?php echo (get_template_directory_uri()); ?>/assets/images/apple-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="<?php echo (get_template_directory_uri()); ?>/assets/images/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="<?php echo (get_template_directory_uri()); ?>/assets/images/apple-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="<?php echo (get_template_directory_uri()); ?>/assets/images/apple-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="<?php echo (get_template_directory_uri()); ?>/assets/images/apple-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="<?php echo (get_template_directory_uri()); ?>/assets/images/apple-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="<?php echo (get_template_directory_uri()); ?>/assets/images/apple-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="<?php echo (get_template_directory_uri()); ?>/assets/images/apple-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="<?php echo (get_template_directory_uri()); ?>/assets/images/apple-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="<?php echo (get_template_directory_uri()); ?>/assets/images/android-icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="<?php echo (get_template_directory_uri()); ?>/assets/images/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="<?php echo (get_template_directory_uri()); ?>/assets/images/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="<?php echo (get_template_directory_uri()); ?>/assets/images/favicon-16x16.png">
|
||||
<link rel="manifest" href="<?php echo (get_template_directory_uri()); ?>/assets/images/manifest.json">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="<?= esc_url(get_template_directory_uri()); ?>/assets/images/apple-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="<?= esc_url(get_template_directory_uri()); ?>/assets/images/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="<?= esc_url(get_template_directory_uri()); ?>/assets/images/apple-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="<?= esc_url(get_template_directory_uri()); ?>/assets/images/apple-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="<?= esc_url(get_template_directory_uri()); ?>/assets/images/apple-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="<?= esc_url(get_template_directory_uri()); ?>/assets/images/apple-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="<?= esc_url(get_template_directory_uri()); ?>/assets/images/apple-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="<?= esc_url(get_template_directory_uri()); ?>/assets/images/apple-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="<?= esc_url(get_template_directory_uri()); ?>/assets/images/apple-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="<?= esc_url(get_template_directory_uri()); ?>/assets/images/android-icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="<?= esc_url(get_template_directory_uri()); ?>/assets/images/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="<?= esc_url(get_template_directory_uri()); ?>/assets/images/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="<?= esc_url(get_template_directory_uri()); ?>/assets/images/favicon-16x16.png">
|
||||
<link rel="manifest" href="<?= esc_url(get_template_directory_uri()); ?>/assets/images/manifest.json">
|
||||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="msapplication-TileImage" content="<?php echo (get_template_directory_uri()); ?>/assets/images/ms-icon-144x144.png">
|
||||
<meta name="msapplication-TileImage" content="<?= esc_url(get_template_directory_uri()); ?>/assets/images/ms-icon-144x144.png">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css">
|
||||
<link rel='stylesheet' href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.0/animate.css" />
|
||||
<link href='<?php echo (get_template_directory_uri()); ?>/assets/css/style.css' rel="stylesheet">
|
||||
<link href='<?= esc_url(get_template_directory_uri()); ?>/assets/css/style.css' rel="stylesheet">
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
|
||||
<title>Régalette <?php wp_title(); ?></title>
|
||||
<?php wp_head(); ?>
|
||||
|
|
@ -35,11 +35,11 @@
|
|||
<div class="surHeader">
|
||||
<a class="btn" href="#">
|
||||
<span>Espace collaborateurs</span>
|
||||
<img src='<?php echo (get_template_directory_uri()); ?>/assets/images/icon_lock-white.png' alt="Espace collaborateurs">
|
||||
<img src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/icon_lock-white.png' alt="Espace collaborateurs">
|
||||
</a>
|
||||
</div>
|
||||
<header class="header">
|
||||
<div class="logo"><a href='<?php echo (get_site_url()); ?>'><img src='<?php echo (get_template_directory_uri()); ?>/assets/images/logo-regalette.png' alt="Régalette"></a></div>
|
||||
<div class="logo"><a href='<?= esc_url(get_site_url()); ?>'><img src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/logo-regalette.png' alt="Régalette"></a></div>
|
||||
<nav>
|
||||
<?php
|
||||
wp_nav_menu(
|
||||
|
|
|
|||
|
|
@ -25,18 +25,18 @@ $sliders = get_field('bloc_carrousel');
|
|||
<!-- Loop through rows. -->
|
||||
<?php while (have_rows('bloc_carrousel')) : the_row(); ?>
|
||||
<!-- Load sub field value. -->
|
||||
<?php
|
||||
$sub_value = get_sub_field('slide');
|
||||
$link = get_sub_field('lien');
|
||||
<?php
|
||||
$sub_value = get_sub_field('slide');
|
||||
$myLink = get_sub_field('lien');
|
||||
?>
|
||||
<!-- Do something... -->
|
||||
<?php if (!empty($sub_value)) : ?>
|
||||
<div class="swiper-slide">
|
||||
<?php if (!empty($link)) : ?>
|
||||
<a href="<?php echo $link ?>">
|
||||
<?php endif; ?>
|
||||
<img src='<?php echo $sub_value['url'] ?>' alt="">
|
||||
<?php if (!empty($link)) : ?>
|
||||
<?php if (!empty($myLink)) : ?>
|
||||
<a href="<?= esc_url($myLink) ?>">
|
||||
<?php endif; ?>
|
||||
<img src='<?= esc_url($sub_value['url']); ?>'>
|
||||
<?php if (!empty($myLink)) : ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
|
@ -96,46 +96,46 @@ $sliders = get_field('bloc_carrousel');
|
|||
<h1 class="container">Régalette, spécialiste des crêpes et galettes fraîches nature et garnies</h1>
|
||||
<div class="engage container">
|
||||
<div class="title">
|
||||
<img src='<?= get_template_directory_uri(); ?>/assets/images/mme-tregalette-sm.png' alt="Trégalette">
|
||||
<img src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/mme-tregalette-sm.png' alt="Trégalette">
|
||||
<h2>Régalette s'engage</h2>
|
||||
</div>
|
||||
<div class="infos">
|
||||
<img class="img01" src='<?= get_template_directory_uri(); ?>/assets/images/moulin.png' alt="Régalette - Farine de froment de blé noir">
|
||||
<img class="img01" src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/moulin.png' alt="Régalette - Farine de froment de blé noir">
|
||||
<p class="txt01">Des farines de froment et de blé noir françaises et responsables</p>
|
||||
<img class="img02" src='<?= get_template_directory_uri(); ?>/assets/images/feuille.png' alt="Régalette - Emballages éco-conçus">
|
||||
<img class="img02" src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/feuille.png' alt="Régalette - Emballages éco-conçus">
|
||||
<p class="txt02">Des emballages éco-conçus : -50% de plastique utilisé</p>
|
||||
</div>
|
||||
<div class="button">
|
||||
<a class="btn" href='<?= get_site_url(); ?>/nos-engagements/'>
|
||||
<a class="btn" href='<?= esc_url(get_site_url()); ?>/nos-engagements/'>
|
||||
<h3>Les engagements Régalette</h3>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="products container gray">
|
||||
<div class="title">
|
||||
<img src='<?= get_template_directory_uri(); ?>/assets/images/mme-tregalette-sm.png' alt="Trégalette">
|
||||
<img src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/mme-tregalette-sm.png' alt="Trégalette">
|
||||
<h2>Les produits Trégalette</h2>
|
||||
</div>
|
||||
<div class="pictures">
|
||||
<a class="anchorPic" href='<?= get_site_url(); ?>/les-produits-tregalette/#galettes-nature'>
|
||||
<a class="anchorPic" href='<?= esc_url(get_site_url()); ?>/les-produits-tregalette/#galettes-nature'>
|
||||
<div class="imgs">
|
||||
<img src='<?= get_template_directory_uri(); ?>/assets/images/galettes-nature.png' alt="Régalette - Les Galettes nature">
|
||||
<img src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/galettes-nature.png' alt="Régalette - Les Galettes nature">
|
||||
<div class="circle circle1">
|
||||
<p class="circle-txt circle-txt1">les<br>galettes<br>nature</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="anchorPic" href='<?= get_site_url(); ?>/les-produits-tregalette/#crepes-nature'>
|
||||
<a class="anchorPic" href='<?= esc_url(get_site_url()); ?>/les-produits-tregalette/#crepes-nature'>
|
||||
<div class="imgs">
|
||||
<img src='<?= get_template_directory_uri(); ?>/assets/images/crepes-nature.png' alt="Régalette - Les Crêpes nature">
|
||||
<img src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/crepes-nature.png' alt="Régalette - Les Crêpes nature">
|
||||
<div class="circle circle2">
|
||||
<p class="circle-txt circle-txt2">les<br>crêpes<br>nature</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="anchorPic" href='<?= get_site_url(); ?>/les-produits-tregalette/#garnies'>
|
||||
<a class="anchorPic" href='<?= esc_url(get_site_url()); ?>/les-produits-tregalette/#garnies'>
|
||||
<div class="imgs">
|
||||
<img src='<?= get_template_directory_uri(); ?>/assets/images/garnies.png' alt="Régalette - Les Garnies">
|
||||
<img src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/garnies.png' alt="Régalette - Les Garnies">
|
||||
<div class="circle circle3">
|
||||
<p class="circle-txt circle-txt3"><br>les<br>garnies</p>
|
||||
</div>
|
||||
|
|
@ -145,18 +145,18 @@ $sliders = get_field('bloc_carrousel');
|
|||
</div>
|
||||
<div class="gulf container">
|
||||
<div class="title">
|
||||
<img src='<?= get_template_directory_uri(); ?>/assets/images/mme-tregalette-sm.png' alt="Trégalette">
|
||||
<img src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/mme-tregalette-sm.png' alt="Trégalette">
|
||||
<h2>Une crêperie du Golfe du Morbihan</h2>
|
||||
</div>
|
||||
<div class="infos2">
|
||||
<img class="img11" src='<?= get_template_directory_uri(); ?>/assets/images/pate.png' alt="Régalette - Pate à crêpes">
|
||||
<img class="img12" src='<?= get_template_directory_uri(); ?>/assets/images/site.png' alt="Régalette - Site de Régalette">
|
||||
<img class="img11" src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/pate.png' alt="Régalette - Pate à crêpes">
|
||||
<img class="img12" src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/site.png' alt="Régalette - Site de Régalette">
|
||||
<p class="txt11">Fabricant de crêpes et galettes fraîches depuis 1995, Régalette est reconnue pour ses innovations et la qualité de ses produits.<br>
|
||||
L’entreprise est installée à Saint-Nolff, tout près du Golfe du Morbihan et emploie aujourd’hui 110 collaborateurs.
|
||||
</p>
|
||||
</div>
|
||||
<div class="button">
|
||||
<a class="btn" href='<?php echo (get_site_url()); ?>/les-valeurs-regalette/'>
|
||||
<a class="btn" href='<?php echo (esc_url(get_site_url())); ?>/les-valeurs-regalette/'>
|
||||
<h3>Les valeurs Régalette</h3>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* The template for Regalette
|
||||
*
|
||||
|
|
@ -12,71 +13,113 @@ get_header();
|
|||
|
||||
$hero_format = get_field('img-hero');
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST)){
|
||||
|
||||
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST)) {
|
||||
$GoogleRPrivate = GOOGLE_RECAPTCHA_PRIVATE;
|
||||
$errorMsg = [];
|
||||
$lastname = sanitize_text_field($_POST['lastname']);
|
||||
$firstname = sanitize_text_field($_POST['firstname']);
|
||||
$email = sanitize_email($_POST['email']);
|
||||
// Required "system" values
|
||||
if (!empty($_POST['_wpnonce'])) {
|
||||
wp_verify_nonce(sanitize_key($_POST['_wpnonce']));
|
||||
} else {
|
||||
die("Une erreur est survenue.");
|
||||
}
|
||||
|
||||
if (!empty($_POST['token'])) {
|
||||
$gToken = sanitize_key($_POST['token']);
|
||||
} else {
|
||||
die("Une erreur est survenue.");
|
||||
}
|
||||
// Form values
|
||||
if (!empty($_POST['lastname'])) {
|
||||
$lastname = sanitize_text_field($_POST['lastname']);
|
||||
} else {
|
||||
$errorMsg[] = "Vous devez remplir le champs : Nom";
|
||||
}
|
||||
|
||||
if (!empty($_POST['firstname'])) {
|
||||
$firstname = sanitize_text_field($_POST['firstname']);
|
||||
} else {
|
||||
$errorMsg[] = "Vous devez remplir le champs : Prénom";
|
||||
}
|
||||
|
||||
if (!empty($_POST['email'])) {
|
||||
$email = sanitize_email($_POST['email']);
|
||||
} else {
|
||||
$errorMsg[] = "Vous devez remplir le champs : Email";
|
||||
}
|
||||
|
||||
if (!empty($_POST['message'])) {
|
||||
$message = sanitize_textarea_field($_POST['message']);
|
||||
} else {
|
||||
$errorMsg[] = "Vous devez remplir le champs : Message";
|
||||
}
|
||||
|
||||
if (!empty($_POST['recipient'])) {
|
||||
$recipient = sanitize_key($_POST['recipient']);
|
||||
} else {
|
||||
$errorMsg[] = "Vous devez remplir le champs : Destinataire";
|
||||
}
|
||||
|
||||
!empty($_POST['phone']) ? $phone = sanitize_text_field($_POST['phone']) : $phone = '-';
|
||||
$message = sanitize_textarea_field($_POST['message']);
|
||||
$recipient = sanitize_text_field($_POST['recipient']);
|
||||
|
||||
$gToken = $_POST['token'];
|
||||
|
||||
$secret = "6Ler-r8ZAAAAABt9rhOKLE1PyChkQjxzv3LMh6K2";
|
||||
if (isset($_SERVER["HTTP_X_FORWARDED_FOR"]) && $_SERVER["HTTP_X_FORWARDED_FOR"] != "") {
|
||||
if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',')) {
|
||||
$explode = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
|
||||
// Récupération IP Client
|
||||
$http_forwarded = $_SERVER["HTTP_X_FORWARDED_FOR"];
|
||||
if (!empty($http_forwarded)) {
|
||||
if (strpos($http_forwarded, ',')) {
|
||||
$explode = explode(',', $http_forwarded);
|
||||
$remoteip = trim($explode[0]);
|
||||
} else {
|
||||
$remoteip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
$remoteip = $http_forwarded;
|
||||
}
|
||||
} else {
|
||||
$remoteip = $_SERVER["REMOTE_ADDR"];
|
||||
}
|
||||
|
||||
$api_url = "https://www.google.com/recaptcha/api/siteverify?secret=" . $secret . "&response=" . $gToken . "&remoteip=" . $remoteip;
|
||||
$decode = json_decode(file_get_contents($api_url), true);
|
||||
// Vérification Recaptcha
|
||||
$decode = json_decode(wp_remote_get("https://www.google.com/recaptcha/api/siteverify?secret=" . $GoogleRPrivate . "&response=" . $gToken . "&remoteip=" . $remoteip), true);
|
||||
if ($decode['success'] == true) {
|
||||
$hasAttachment = false;
|
||||
$fileName = null;
|
||||
$tmpFileName = null;
|
||||
|
||||
if (isset($_FILES['files']) && isset($_FILES['files']['error']) && $_FILES['files']['error'] == 0) {
|
||||
if (!empty($_FILES['files']['name'] && !empty($_FILES['files']['tmp_name']))) {
|
||||
$hasAttachment = true;
|
||||
|
||||
if (isset($_FILES['files']) && $_FILES['files']['error'] == 0) {
|
||||
$fileName = $_FILES['files']['name'];
|
||||
$fileName = sanitize_file_name($_FILES['files']['name']);
|
||||
$tmpFileName = sanitize_file_name($_FILES['files']['tmp_name']);
|
||||
$tmpFileName = str_replace(chr(0), '', $tmpFileName); //Null Byte Exploit
|
||||
|
||||
$tmpFileName = $_FILES['files']['tmp_name'];
|
||||
$tmpFileName = str_replace(chr(0), '', $tmpFileName); //Null Byte Exploit
|
||||
$fileExtension = strtolower(strrchr($fileName, "."));
|
||||
|
||||
$fileExtension = strtolower(strrchr($fileName, "."));
|
||||
$supported_mime_type = array('image/jpeg', 'image/png', 'application/pdf');
|
||||
|
||||
$supported_mime_type = array('image/jpeg', 'image/png', 'application/pdf');
|
||||
$finfo = finfo_open(FILEINFO_MIME_TYPE); // return mime-type extension
|
||||
$ftype = finfo_file($finfo, $tmpFileName);
|
||||
finfo_close($finfo);
|
||||
|
||||
$finfo = finfo_open(FILEINFO_MIME_TYPE); // return mime-type extension
|
||||
$ftype = finfo_file($finfo, $tmpFileName);
|
||||
finfo_close($finfo);
|
||||
if (!in_array($ftype, $supported_mime_type)) {
|
||||
$errorMsg[] = "Le type de fichier n'est pas autorisé.";
|
||||
}
|
||||
|
||||
if (!in_array($ftype, $supported_mime_type)) {
|
||||
$errorMsg[] = "Le type de fichier n'est pas autorisé.";
|
||||
$fileSize = filesize($tmpFileName);
|
||||
$fileSize = round($fileSize / 1024 / 1024, 1); // megabytes with 1 digit
|
||||
|
||||
if ($fileSize > 2) {
|
||||
$errorMsg[] = "Poids de la pièce jointe supérieur à 2Mo.";
|
||||
}
|
||||
} else {
|
||||
$errorMsg[] = "Une erreur est survenue lors de l'ajout de la pièce jointe. Veuillez recharger la page.";
|
||||
}
|
||||
|
||||
$fileSize = filesize($tmpFileName);
|
||||
$fileSize = round($fileSize / 1024 / 1024, 1); // megabytes with 1 digit
|
||||
|
||||
if ($fileSize > 2){
|
||||
$errorMsg[] = "Poids de la pièce jointe supérieur à 2Mo.";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (count($errorMsg) === 0) {
|
||||
|
||||
$bodyMail = "<html><head></head><body>";
|
||||
$bodyMail .= "Nom : $lastname <br>";
|
||||
$bodyMail .= "Prénom : $firstname <br>";
|
||||
$bodyMail .= "Email : $email <br>";
|
||||
$bodyMail .= "Tél : $phone<br>";
|
||||
$bodyMail .= "Message : <br>$message";
|
||||
if (isset($_FILES['files']) && $_FILES['files']['error'] == 0) {
|
||||
if ($hasAttachment = true) {
|
||||
$bodyMail .= "<br> Il y a une pièce jointe.";
|
||||
}
|
||||
$bodyMail .= "</body></html>";
|
||||
|
|
@ -94,18 +137,17 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST)){
|
|||
case 'other':
|
||||
$subject = "Contact site AUTRE";
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if (isset($_FILES['files']) && $_FILES['files']['error'] == 0) {
|
||||
if (!file_exists(WP_CONTENT_DIR . '/uploads/contact')) {
|
||||
mkdir(WP_CONTENT_DIR . '/uploads/contact');
|
||||
}
|
||||
$path = WP_CONTENT_DIR . '/uploads/contact/' . basename($_FILES['files']['name']);
|
||||
move_uploaded_file($_FILES['files']['tmp_name'], $path);
|
||||
wp_mail(CONTACT_RECIPIENT, $subject, $bodyMail, '', [$path]);
|
||||
unlink($path);
|
||||
if ($hasAttachment = true) {
|
||||
$myPath = wp_get_upload_dir()['basedir'] . "/contact/" . basename($fileName);
|
||||
move_uploaded_file($tmpFileName, $myPath);
|
||||
// phpcs:ignore
|
||||
wp_mail(CONTACT_RECIPIENT, $subject, $bodyMail, '', [$myPath]);
|
||||
// phpcs:ignore
|
||||
unlink($myPath);
|
||||
} else {
|
||||
// phpcs:ignore
|
||||
wp_mail(CONTACT_RECIPIENT, $subject, $bodyMail);
|
||||
}
|
||||
|
||||
|
|
@ -119,12 +161,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST)){
|
|||
|
||||
<div class="contacts">
|
||||
<div class="hero">
|
||||
<img class="img-bg" src='<?php echo $hero_format ?>' alt="">
|
||||
<div class="tregalette"><img src='<?= get_template_directory_uri(); ?>/assets/images/logo_tregalette.png' alt=""></div>
|
||||
<img class="img-bg" src='<?= esc_url($hero_format); ?>'>
|
||||
<div class="tregalette"><img src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/logo_tregalette.png'></div>
|
||||
<div class="separate">
|
||||
<svg id="Calque_1" data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 125">
|
||||
<defs>
|
||||
<style>.cls-1 {
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: #fefefe;
|
||||
}
|
||||
|
||||
|
|
@ -134,52 +177,40 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST)){
|
|||
|
||||
.cls-3 {
|
||||
fill: red;
|
||||
}</style>
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path class="cls-1"
|
||||
d="M0,8V0H1920V68c-3-2.33-6.07.17-9.15-.33-8.2-1.36-16.44-2.6-24.7-3.52-6.23-.7-12.48-4-18.82-.23a4.32,4.32,0,0,1-2.47,0c-16.91-2.6-33.63-6.35-50.81-7.42-9.67-.61-18.59-4.92-27.42-8.84-5-2.2-9.64-3-14.57.45a6.19,6.19,0,0,1-8.61-.88c-2.47-2.56-5.67-3-9.12-3.28-16.12-1.16-32.29-.13-48.41-1.14-4.68-.29-9.37-.52-13.9.49a41,41,0,0,1-14.86.17,357.07,357.07,0,0,0-69.25-2.73c-10,.56-20.14,2.2-29.87.85-13-1.8-25.86-1-38.82-.94-11.77.08-23.55,2.9-35.32.3a34.77,34.77,0,0,0-11.89-.67,138.87,138.87,0,0,1-18.46.73c-13-.14-26,0-38.87,2-3.93.59-7.74,2.31-11.78,1.75-8.64-1.19-17.25-.38-25.9-.11-14.69.45-29.07,4-43.69,4.33-17.48.42-35,.73-52.36,2.48-29.65,3-59.26,6.29-89,7.84-13.77.72-27.62,1.29-41.12,4.71-8.21,2.07-16.21,5-24.65,6.12-.52.07-.65.14-.33.58.41.65,1.67-.08,1.76,1.16-4.42,2.72-9.28,3.44-14.37,3.06-.66,0-1.81.1-1.92-.16-1.93-4.82-6.11-2.7-9.15-2.59-28.93,1-57.83,2.63-86.73,4.59-37.69,2.56-75.47,3.69-113.21,5.45-5.48.25-11,.38-16.43,1-2.79.32-4.52,3-8,3.3-6.9.66-13.58-1.89-20.06-1.12-7.6.9-15,2.52-22.64.86-1.23-.27-2.63.21-4,.32-5.47.45-10.95,1.38-16.41,1.22-14.61-.41-29.2-2.34-43.92-.51-.47.88,1.54,1.28.51,2.59-6.59.32-13.3,1.36-20.14,1.22-20.31-.41-40.63-.48-60.94-.92-27.64-.61-55.31.84-82.93-.94-1.7-.11-3.49-.14-4.83.88-4.12,3.16-8,2.11-12.12,0a13.67,13.67,0,0,0-5.1-1.88c-15.44-1.1-30.75-3.46-46.21-4.48-12.32-.82-24.94,2.23-37-2.62a6.57,6.57,0,0,0-2-.05c-32.82-1.13-65.33-5.37-97.81-9.87C417.19,70.42,412,69,407,70.2c-5.61,1.36-10.75.32-16.19-.82-6.75-1.41-13.29-4.8-20.49-3.09a29.55,29.55,0,0,1-10.42.54q-11.91-1.38-23.76-3.14C301,58.48,266,53.38,231,47.9,191.7,41.76,152.53,35,114.12,24.46c-7-1.93-14.16-3.84-21.6-1.59-1.28.38-3-.19-4.35-.68-19.53-7-40-9.74-60.18-14a34.64,34.64,0,0,0-4.92-.33L26,13l-.14.13c-1.82.58-3.6,0-5.32-.35C13.7,11.25,6.85,9.6,0,8Z"/>
|
||||
<path class="cls-2"
|
||||
d="M26,13l-3-5.12A34.64,34.64,0,0,1,28,8.18c20.15,4.27,40.65,7.05,60.18,14,1.37.49,3.07,1.06,4.35.68,7.44-2.25,14.56-.34,21.6,1.59C152.53,35,191.7,41.76,231,47.9,266,53.38,301,58.48,336.09,63.69q11.85,1.77,23.76,3.14a29.55,29.55,0,0,0,10.42-.54c7.2-1.71,13.74,1.68,20.49,3.09,5.44,1.14,10.58,2.18,16.19.82,5.06-1.23,10.24.22,15.36.92,32.48,4.5,65,8.74,97.81,9.87a6.57,6.57,0,0,1,2,.05c12,4.85,24.64,1.8,37,2.62,15.46,1,30.77,3.38,46.21,4.48a13.67,13.67,0,0,1,5.1,1.88c4.07,2.15,8,3.2,12.12,0,1.34-1,3.13-1,4.83-.88,27.62,1.78,55.29.33,82.93.94,20.31.44,40.63.51,60.94.92,6.84.14,13.55-.9,20.14-1.22,1-1.31-1-1.71-.51-2.59,14.72-1.83,29.31.1,43.92.51,5.46.16,10.94-.77,16.41-1.22,1.32-.11,2.72-.59,4-.32,7.66,1.66,15,0,22.64-.86,6.48-.77,13.16,1.78,20.06,1.12,3.44-.33,5.17-3,8-3.3,5.44-.62,11-.75,16.43-1,37.74-1.76,75.52-2.89,113.21-5.45,28.9-2,57.8-3.59,86.73-4.59,3-.11,7.22-2.23,9.15,2.59.11.26,1.26.12,1.92.16,5.09.38,10-.34,14.37-3.06-.09-1.24-1.35-.51-1.76-1.16-.32-.44-.19-.51.33-.58,8.44-1.13,16.44-4,24.65-6.12,13.5-3.42,27.35-4,41.12-4.71,29.77-1.55,59.38-4.86,89-7.84,17.4-1.75,34.88-2.06,52.36-2.48,14.62-.36,29-3.88,43.69-4.33,8.65-.27,17.26-1.08,25.9.11,4,.56,7.85-1.16,11.78-1.75,12.9-1.94,25.87-2.1,38.87-2a138.87,138.87,0,0,0,18.46-.73,34.77,34.77,0,0,1,11.89.67c11.77,2.6,23.55-.22,35.32-.3,13-.07,25.79-.86,38.82.94,9.73,1.35,19.91-.29,29.87-.85a357.07,357.07,0,0,1,69.25,2.73,41,41,0,0,0,14.86-.17c4.53-1,9.22-.78,13.9-.49,16.12,1,32.29,0,48.41,1.14,3.45.25,6.65.72,9.12,3.28a6.19,6.19,0,0,0,8.61.88c4.93-3.5,9.61-2.65,14.57-.45,8.83,3.92,17.75,8.23,27.42,8.84,17.18,1.07,33.9,4.82,50.81,7.42a4.32,4.32,0,0,0,2.47,0c6.34-3.74,12.59-.47,18.82.23,8.26.92,16.5,2.16,24.7,3.52,3.08.5,6.2-2,9.15.33v50a27.46,27.46,0,0,1-5-.2c-26.54-5.87-53.72-7.38-80.46-11.92-3.58-.61-7.75.34-10.65-1.93-3.51-2.75-7.16-3.11-11.21-3a40,40,0,0,1-9.94-.76c-6.81-1.47-13.46-2.7-20.21,1-3.32,1.85-7.69,1.45-11.3.44-11.44-3.22-23.1-4.33-34.87-5.47-14.72-1.44-29.27-4.71-44-6-45.61-4-91.34-6.21-137.06-8.46-26.5-1.31-52.87-1.57-79.31.28-5.64.4-11.36.39-16.86-1.27a20.54,20.54,0,0,0-10.37-.7c-10,2.23-20.13,2.07-30.31,1.58a67.81,67.81,0,0,0-13.91,1.08,385.87,385.87,0,0,1-74.06,4.85c-1.68-.06-3.68-.19-4.72,1.13-4.71,6-10.81,5.64-17.23,4.19-.2,0-.36-.29-.59-.49.84-.93,2.51.12,3.19-1.28-6.72-.93-13.14.61-19.62.9-16,.72-31.93.84-47.84,2.74-15.53,1.85-31,4.88-46.65,5.06a503,503,0,0,0-88.69,8.38c-14.8,2.82-29.88,5-44.9,6.4a682.64,682.64,0,0,1-72.8,3.65c-15.78-.15-31.56,1.87-47.37.33a36.32,36.32,0,0,0-7.46-.23,494.77,494.77,0,0,1-57,2.75c-6.32-.05-12.57-1.43-18.94-1-31.39,2.18-62.87,2.32-94.29,3.91-6.88.34-13.84-1.06-20.63.92H732a57.36,57.36,0,0,0-14.11-4c-16.73-2.31-33.53-1.64-50.32-.72a11.79,11.79,0,0,0-2.75.84c0,1.06,1.91,1.24.68,2.66l-70.08-4.41c0-.42,0-.83.05-1.25a139.05,139.05,0,0,0,20.08-1.46c-1.84-1.18-4.26-.21-4.94-2.66,6.78-.07,13.58-1.1,19.87,1.6A31.09,31.09,0,0,0,642.56,118a316.35,316.35,0,0,0,32.44-1.2c3.82-.32,7.78-.52,11.82-2.65-16.56-1.41-32.56,1.08-48.59-1.73-10.39-1.82-21.25-.82-31.88-1.49-4.23-.26-8.23,1.86-12.36.85-14.82-3.62-29.7-2.79-44.66-1.05-5.94.69-11.91.85-17.87-.65-3.74-.94-7.71-2-11.73.47,4.15.78,8.15.94,11.74,3.17-9.3,1-18.39,4.5-28.48.77,4.73-1.68,8.84.84,13.29-.92-3.28-2.65-7.76-3.47-7.39-8.16-7.54-1.85-14.94-1-22.21-1.83-31.94-3.44-63.88-6.86-95.8-10.47-41.84-4.72-83.46-11-125-17.8q-76.1-12.4-151.51-28.43C76.11,38.82,38,30,0,21V8c6.85,1.6,13.7,3.25,20.57,4.75,1.72.37,3.5.93,5.32.35a5.15,5.15,0,0,0,.47.56s.23-.15.36-.23ZM745.08,117.42c2,2.16,4.46,2,6.73,2.17a154.61,154.61,0,0,0,32.39-1c15.19-2.08,30.38-3.42,45.79-1.85,14.66,1.49,29-1.31,44.45-4.38-13.91-1.76-26.63.58-39.44.08-27.78-1.08-55.55,2.2-83.37,1.6A6.87,6.87,0,0,0,745.08,117.42ZM1112,97.79c-15.15,2.17-29.88,3.16-44.58,4.87,13.42.77,26.8.84,40.18.71C1109.89,103.35,1111.46,101.73,1112,97.79Zm138.49-11.36c-14.66.38-29.38.57-43.07,6.89C1222,92.78,1236.62,92.19,1250.44,86.43Zm547.15,9.43c4.57,1,9.1,2.7,14,.59A24.76,24.76,0,0,0,1797.59,95.86ZM1466,75.78l-8,.45C1460.89,78.72,1463.46,77.49,1466,75.78Z"/>
|
||||
<path class="cls-3"
|
||||
d="M0,21c38,9,76.11,17.82,114.35,25.89q75.43,15.92,151.51,28.43c41.56,6.77,83.18,13.08,125,17.8,31.92,3.61,63.86,7,95.8,10.47,7.27.78,14.67,0,22.21,1.83-.37,4.69,4.11,5.51,7.39,8.16-4.45,1.76-8.56-.76-13.29.92,10.09,3.73,19.18.26,28.48-.77-3.59-2.23-7.59-2.39-11.74-3.17,4-2.46,8-1.41,11.73-.47,6,1.5,11.93,1.34,17.87.65,15-1.74,29.84-2.57,44.66,1.05,4.13,1,8.13-1.11,12.36-.85,10.63.67,21.49-.33,31.88,1.49,16,2.81,32,.32,48.59,1.73-4,2.13-8,2.33-11.82,2.65a316.35,316.35,0,0,1-32.44,1.2,31.09,31.09,0,0,1-12.08-2.42c-6.29-2.7-13.09-1.67-19.87-1.6.68,2.45,3.1,1.48,4.94,2.66a139.05,139.05,0,0,1-20.08,1.46c0,.42,0,.83-.05,1.25l70.08,4.41c1.23-1.42-.64-1.6-.68-2.66a11.79,11.79,0,0,1,2.75-.84c16.79-.92,33.59-1.59,50.32.72A57.36,57.36,0,0,1,732,125H0Zm455.44,85.08c8.73,7.11,11.34,7.21,20.22,1.27C469.21,105,462.89,106.19,455.44,106.08Zm-24.71,5.4C425.32,110,420,108.62,413.34,109,419.54,112.67,425.22,111.73,430.73,111.48Zm-176-25.4c-5.69-3.08-6.36-3.15-10.27-1.3A20.75,20.75,0,0,0,254.72,86.08Zm341.12,29.25c-4-2-8.07-1-12.14-.63C587.66,116.59,591.75,115.9,595.84,115.33Zm-158.5-7.42c-4.67-2.08-8.85-1.34-12-1.66C428.07,109,432.34,107.58,437.34,107.91ZM125.77,55c-3.55-2.31-6.6-2.19-10.4-1.72C120,55.21,120,55.21,125.77,55ZM306.28,88.54h7.24C309.14,85.25,309.07,85.25,306.28,88.54Zm36.47,2.21c-2.86-3-5.68-3-9.61-2.43C336.55,89.81,339.06,90.88,342.75,90.75Z"/>
|
||||
<path class="cls-3"
|
||||
d="M745,125c6.79-2,13.75-.58,20.63-.92,31.42-1.59,62.9-1.73,94.29-3.91,6.37-.45,12.62.93,18.94,1a494.77,494.77,0,0,0,57-2.75,36.32,36.32,0,0,1,7.46.23c15.81,1.54,31.59-.48,47.37-.33a682.64,682.64,0,0,0,72.8-3.65c15-1.45,30.1-3.58,44.9-6.4A503,503,0,0,1,1197,99.87c15.65-.18,31.12-3.21,46.65-5.06,15.91-1.9,31.89-2,47.84-2.74,6.48-.29,12.9-1.83,19.62-.9-.68,1.4-2.35.35-3.19,1.28.23.2.39.44.59.49,6.42,1.45,12.52,1.8,17.23-4.19,1-1.32,3-1.19,4.72-1.13a385.87,385.87,0,0,0,74.06-4.85,67.81,67.81,0,0,1,13.91-1.08c10.18.49,20.26.65,30.31-1.58a20.54,20.54,0,0,1,10.37.7c5.5,1.66,11.22,1.67,16.86,1.27,26.44-1.85,52.81-1.59,79.31-.28,45.72,2.25,91.45,4.48,137.06,8.46,14.73,1.28,29.28,4.55,44,6,11.77,1.14,23.43,2.25,34.87,5.47,3.61,1,8,1.41,11.3-.44,6.75-3.75,13.4-2.52,20.21-1a40,40,0,0,0,9.94.76c4-.15,7.7.21,11.21,3,2.9,2.27,7.07,1.32,10.65,1.93,26.74,4.54,53.92,6.05,80.46,11.92a27.46,27.46,0,0,0,5,.2v7Z"/>
|
||||
<path class="cls-3"
|
||||
d="M745.08,117.42a6.87,6.87,0,0,1,6.55-3.42c27.82.6,55.59-2.68,83.37-1.6,12.81.5,25.53-1.84,39.44-.08-15.41,3.07-29.79,5.87-44.45,4.38-15.41-1.57-30.6-.23-45.79,1.85a154.61,154.61,0,0,1-32.39,1C749.54,119.43,747.11,119.58,745.08,117.42Z"/>
|
||||
<path class="cls-3"
|
||||
d="M1112,97.79c-.49,3.94-2.06,5.56-4.4,5.58-13.38.13-26.76.06-40.18-.71C1082.07,101,1096.8,100,1112,97.79Z"/>
|
||||
<path class="cls-3"
|
||||
d="M1250.44,86.43c-13.82,5.76-28.44,6.35-43.07,6.89C1221.06,87,1235.78,86.81,1250.44,86.43Z"/>
|
||||
<path class="cls-3"
|
||||
d="M1797.59,95.86a24.76,24.76,0,0,1,14,.59C1806.69,98.56,1802.16,96.87,1797.59,95.86Z"/>
|
||||
<path class="cls-3" d="M1466,75.78c-2.53,1.71-5.1,2.94-8,.45Z"/>
|
||||
<path class="cls-1" d="M26,13l.69.46c-.13.08-.34.26-.36.23a5.15,5.15,0,0,1-.47-.56Z"/>
|
||||
<path class="cls-2"
|
||||
d="M455.44,106.08c7.45.11,13.77-1.08,20.22,1.27C466.78,113.29,464.17,113.19,455.44,106.08Z"/>
|
||||
<path class="cls-2"
|
||||
d="M430.73,111.48c-5.51.25-11.19,1.19-17.39-2.49C420,108.62,425.32,110,430.73,111.48Z"/>
|
||||
<path class="cls-2" d="M254.72,86.08a20.75,20.75,0,0,1-10.27-1.3C248.36,82.93,249,83,254.72,86.08Z"/>
|
||||
<path class="cls-2"
|
||||
d="M595.84,115.33c-4.09.57-8.18,1.26-12.14-.63C587.77,114.32,591.85,113.32,595.84,115.33Z"/>
|
||||
<path class="cls-2"
|
||||
d="M437.34,107.91c-5-.33-9.27,1-12-1.66C428.49,106.57,432.67,105.83,437.34,107.91Z"/>
|
||||
<path class="cls-2" d="M125.77,55c-5.79.26-5.79.26-10.4-1.72C119.17,52.76,122.22,52.64,125.77,55Z"/>
|
||||
<path class="cls-2" d="M306.28,88.54c2.79-3.29,2.86-3.29,7.24,0Z"/>
|
||||
<path class="cls-2"
|
||||
d="M342.75,90.75c-3.69.13-6.2-.94-9.61-2.43C337.07,87.79,339.89,87.76,342.75,90.75Z"/>
|
||||
<path class="cls-1" d="M0,8V0H1920V68c-3-2.33-6.07.17-9.15-.33-8.2-1.36-16.44-2.6-24.7-3.52-6.23-.7-12.48-4-18.82-.23a4.32,4.32,0,0,1-2.47,0c-16.91-2.6-33.63-6.35-50.81-7.42-9.67-.61-18.59-4.92-27.42-8.84-5-2.2-9.64-3-14.57.45a6.19,6.19,0,0,1-8.61-.88c-2.47-2.56-5.67-3-9.12-3.28-16.12-1.16-32.29-.13-48.41-1.14-4.68-.29-9.37-.52-13.9.49a41,41,0,0,1-14.86.17,357.07,357.07,0,0,0-69.25-2.73c-10,.56-20.14,2.2-29.87.85-13-1.8-25.86-1-38.82-.94-11.77.08-23.55,2.9-35.32.3a34.77,34.77,0,0,0-11.89-.67,138.87,138.87,0,0,1-18.46.73c-13-.14-26,0-38.87,2-3.93.59-7.74,2.31-11.78,1.75-8.64-1.19-17.25-.38-25.9-.11-14.69.45-29.07,4-43.69,4.33-17.48.42-35,.73-52.36,2.48-29.65,3-59.26,6.29-89,7.84-13.77.72-27.62,1.29-41.12,4.71-8.21,2.07-16.21,5-24.65,6.12-.52.07-.65.14-.33.58.41.65,1.67-.08,1.76,1.16-4.42,2.72-9.28,3.44-14.37,3.06-.66,0-1.81.1-1.92-.16-1.93-4.82-6.11-2.7-9.15-2.59-28.93,1-57.83,2.63-86.73,4.59-37.69,2.56-75.47,3.69-113.21,5.45-5.48.25-11,.38-16.43,1-2.79.32-4.52,3-8,3.3-6.9.66-13.58-1.89-20.06-1.12-7.6.9-15,2.52-22.64.86-1.23-.27-2.63.21-4,.32-5.47.45-10.95,1.38-16.41,1.22-14.61-.41-29.2-2.34-43.92-.51-.47.88,1.54,1.28.51,2.59-6.59.32-13.3,1.36-20.14,1.22-20.31-.41-40.63-.48-60.94-.92-27.64-.61-55.31.84-82.93-.94-1.7-.11-3.49-.14-4.83.88-4.12,3.16-8,2.11-12.12,0a13.67,13.67,0,0,0-5.1-1.88c-15.44-1.1-30.75-3.46-46.21-4.48-12.32-.82-24.94,2.23-37-2.62a6.57,6.57,0,0,0-2-.05c-32.82-1.13-65.33-5.37-97.81-9.87C417.19,70.42,412,69,407,70.2c-5.61,1.36-10.75.32-16.19-.82-6.75-1.41-13.29-4.8-20.49-3.09a29.55,29.55,0,0,1-10.42.54q-11.91-1.38-23.76-3.14C301,58.48,266,53.38,231,47.9,191.7,41.76,152.53,35,114.12,24.46c-7-1.93-14.16-3.84-21.6-1.59-1.28.38-3-.19-4.35-.68-19.53-7-40-9.74-60.18-14a34.64,34.64,0,0,0-4.92-.33L26,13l-.14.13c-1.82.58-3.6,0-5.32-.35C13.7,11.25,6.85,9.6,0,8Z" />
|
||||
<path class="cls-2" d="M26,13l-3-5.12A34.64,34.64,0,0,1,28,8.18c20.15,4.27,40.65,7.05,60.18,14,1.37.49,3.07,1.06,4.35.68,7.44-2.25,14.56-.34,21.6,1.59C152.53,35,191.7,41.76,231,47.9,266,53.38,301,58.48,336.09,63.69q11.85,1.77,23.76,3.14a29.55,29.55,0,0,0,10.42-.54c7.2-1.71,13.74,1.68,20.49,3.09,5.44,1.14,10.58,2.18,16.19.82,5.06-1.23,10.24.22,15.36.92,32.48,4.5,65,8.74,97.81,9.87a6.57,6.57,0,0,1,2,.05c12,4.85,24.64,1.8,37,2.62,15.46,1,30.77,3.38,46.21,4.48a13.67,13.67,0,0,1,5.1,1.88c4.07,2.15,8,3.2,12.12,0,1.34-1,3.13-1,4.83-.88,27.62,1.78,55.29.33,82.93.94,20.31.44,40.63.51,60.94.92,6.84.14,13.55-.9,20.14-1.22,1-1.31-1-1.71-.51-2.59,14.72-1.83,29.31.1,43.92.51,5.46.16,10.94-.77,16.41-1.22,1.32-.11,2.72-.59,4-.32,7.66,1.66,15,0,22.64-.86,6.48-.77,13.16,1.78,20.06,1.12,3.44-.33,5.17-3,8-3.3,5.44-.62,11-.75,16.43-1,37.74-1.76,75.52-2.89,113.21-5.45,28.9-2,57.8-3.59,86.73-4.59,3-.11,7.22-2.23,9.15,2.59.11.26,1.26.12,1.92.16,5.09.38,10-.34,14.37-3.06-.09-1.24-1.35-.51-1.76-1.16-.32-.44-.19-.51.33-.58,8.44-1.13,16.44-4,24.65-6.12,13.5-3.42,27.35-4,41.12-4.71,29.77-1.55,59.38-4.86,89-7.84,17.4-1.75,34.88-2.06,52.36-2.48,14.62-.36,29-3.88,43.69-4.33,8.65-.27,17.26-1.08,25.9.11,4,.56,7.85-1.16,11.78-1.75,12.9-1.94,25.87-2.1,38.87-2a138.87,138.87,0,0,0,18.46-.73,34.77,34.77,0,0,1,11.89.67c11.77,2.6,23.55-.22,35.32-.3,13-.07,25.79-.86,38.82.94,9.73,1.35,19.91-.29,29.87-.85a357.07,357.07,0,0,1,69.25,2.73,41,41,0,0,0,14.86-.17c4.53-1,9.22-.78,13.9-.49,16.12,1,32.29,0,48.41,1.14,3.45.25,6.65.72,9.12,3.28a6.19,6.19,0,0,0,8.61.88c4.93-3.5,9.61-2.65,14.57-.45,8.83,3.92,17.75,8.23,27.42,8.84,17.18,1.07,33.9,4.82,50.81,7.42a4.32,4.32,0,0,0,2.47,0c6.34-3.74,12.59-.47,18.82.23,8.26.92,16.5,2.16,24.7,3.52,3.08.5,6.2-2,9.15.33v50a27.46,27.46,0,0,1-5-.2c-26.54-5.87-53.72-7.38-80.46-11.92-3.58-.61-7.75.34-10.65-1.93-3.51-2.75-7.16-3.11-11.21-3a40,40,0,0,1-9.94-.76c-6.81-1.47-13.46-2.7-20.21,1-3.32,1.85-7.69,1.45-11.3.44-11.44-3.22-23.1-4.33-34.87-5.47-14.72-1.44-29.27-4.71-44-6-45.61-4-91.34-6.21-137.06-8.46-26.5-1.31-52.87-1.57-79.31.28-5.64.4-11.36.39-16.86-1.27a20.54,20.54,0,0,0-10.37-.7c-10,2.23-20.13,2.07-30.31,1.58a67.81,67.81,0,0,0-13.91,1.08,385.87,385.87,0,0,1-74.06,4.85c-1.68-.06-3.68-.19-4.72,1.13-4.71,6-10.81,5.64-17.23,4.19-.2,0-.36-.29-.59-.49.84-.93,2.51.12,3.19-1.28-6.72-.93-13.14.61-19.62.9-16,.72-31.93.84-47.84,2.74-15.53,1.85-31,4.88-46.65,5.06a503,503,0,0,0-88.69,8.38c-14.8,2.82-29.88,5-44.9,6.4a682.64,682.64,0,0,1-72.8,3.65c-15.78-.15-31.56,1.87-47.37.33a36.32,36.32,0,0,0-7.46-.23,494.77,494.77,0,0,1-57,2.75c-6.32-.05-12.57-1.43-18.94-1-31.39,2.18-62.87,2.32-94.29,3.91-6.88.34-13.84-1.06-20.63.92H732a57.36,57.36,0,0,0-14.11-4c-16.73-2.31-33.53-1.64-50.32-.72a11.79,11.79,0,0,0-2.75.84c0,1.06,1.91,1.24.68,2.66l-70.08-4.41c0-.42,0-.83.05-1.25a139.05,139.05,0,0,0,20.08-1.46c-1.84-1.18-4.26-.21-4.94-2.66,6.78-.07,13.58-1.1,19.87,1.6A31.09,31.09,0,0,0,642.56,118a316.35,316.35,0,0,0,32.44-1.2c3.82-.32,7.78-.52,11.82-2.65-16.56-1.41-32.56,1.08-48.59-1.73-10.39-1.82-21.25-.82-31.88-1.49-4.23-.26-8.23,1.86-12.36.85-14.82-3.62-29.7-2.79-44.66-1.05-5.94.69-11.91.85-17.87-.65-3.74-.94-7.71-2-11.73.47,4.15.78,8.15.94,11.74,3.17-9.3,1-18.39,4.5-28.48.77,4.73-1.68,8.84.84,13.29-.92-3.28-2.65-7.76-3.47-7.39-8.16-7.54-1.85-14.94-1-22.21-1.83-31.94-3.44-63.88-6.86-95.8-10.47-41.84-4.72-83.46-11-125-17.8q-76.1-12.4-151.51-28.43C76.11,38.82,38,30,0,21V8c6.85,1.6,13.7,3.25,20.57,4.75,1.72.37,3.5.93,5.32.35a5.15,5.15,0,0,0,.47.56s.23-.15.36-.23ZM745.08,117.42c2,2.16,4.46,2,6.73,2.17a154.61,154.61,0,0,0,32.39-1c15.19-2.08,30.38-3.42,45.79-1.85,14.66,1.49,29-1.31,44.45-4.38-13.91-1.76-26.63.58-39.44.08-27.78-1.08-55.55,2.2-83.37,1.6A6.87,6.87,0,0,0,745.08,117.42ZM1112,97.79c-15.15,2.17-29.88,3.16-44.58,4.87,13.42.77,26.8.84,40.18.71C1109.89,103.35,1111.46,101.73,1112,97.79Zm138.49-11.36c-14.66.38-29.38.57-43.07,6.89C1222,92.78,1236.62,92.19,1250.44,86.43Zm547.15,9.43c4.57,1,9.1,2.7,14,.59A24.76,24.76,0,0,0,1797.59,95.86ZM1466,75.78l-8,.45C1460.89,78.72,1463.46,77.49,1466,75.78Z" />
|
||||
<path class="cls-3" d="M0,21c38,9,76.11,17.82,114.35,25.89q75.43,15.92,151.51,28.43c41.56,6.77,83.18,13.08,125,17.8,31.92,3.61,63.86,7,95.8,10.47,7.27.78,14.67,0,22.21,1.83-.37,4.69,4.11,5.51,7.39,8.16-4.45,1.76-8.56-.76-13.29.92,10.09,3.73,19.18.26,28.48-.77-3.59-2.23-7.59-2.39-11.74-3.17,4-2.46,8-1.41,11.73-.47,6,1.5,11.93,1.34,17.87.65,15-1.74,29.84-2.57,44.66,1.05,4.13,1,8.13-1.11,12.36-.85,10.63.67,21.49-.33,31.88,1.49,16,2.81,32,.32,48.59,1.73-4,2.13-8,2.33-11.82,2.65a316.35,316.35,0,0,1-32.44,1.2,31.09,31.09,0,0,1-12.08-2.42c-6.29-2.7-13.09-1.67-19.87-1.6.68,2.45,3.1,1.48,4.94,2.66a139.05,139.05,0,0,1-20.08,1.46c0,.42,0,.83-.05,1.25l70.08,4.41c1.23-1.42-.64-1.6-.68-2.66a11.79,11.79,0,0,1,2.75-.84c16.79-.92,33.59-1.59,50.32.72A57.36,57.36,0,0,1,732,125H0Zm455.44,85.08c8.73,7.11,11.34,7.21,20.22,1.27C469.21,105,462.89,106.19,455.44,106.08Zm-24.71,5.4C425.32,110,420,108.62,413.34,109,419.54,112.67,425.22,111.73,430.73,111.48Zm-176-25.4c-5.69-3.08-6.36-3.15-10.27-1.3A20.75,20.75,0,0,0,254.72,86.08Zm341.12,29.25c-4-2-8.07-1-12.14-.63C587.66,116.59,591.75,115.9,595.84,115.33Zm-158.5-7.42c-4.67-2.08-8.85-1.34-12-1.66C428.07,109,432.34,107.58,437.34,107.91ZM125.77,55c-3.55-2.31-6.6-2.19-10.4-1.72C120,55.21,120,55.21,125.77,55ZM306.28,88.54h7.24C309.14,85.25,309.07,85.25,306.28,88.54Zm36.47,2.21c-2.86-3-5.68-3-9.61-2.43C336.55,89.81,339.06,90.88,342.75,90.75Z" />
|
||||
<path class="cls-3" d="M745,125c6.79-2,13.75-.58,20.63-.92,31.42-1.59,62.9-1.73,94.29-3.91,6.37-.45,12.62.93,18.94,1a494.77,494.77,0,0,0,57-2.75,36.32,36.32,0,0,1,7.46.23c15.81,1.54,31.59-.48,47.37-.33a682.64,682.64,0,0,0,72.8-3.65c15-1.45,30.1-3.58,44.9-6.4A503,503,0,0,1,1197,99.87c15.65-.18,31.12-3.21,46.65-5.06,15.91-1.9,31.89-2,47.84-2.74,6.48-.29,12.9-1.83,19.62-.9-.68,1.4-2.35.35-3.19,1.28.23.2.39.44.59.49,6.42,1.45,12.52,1.8,17.23-4.19,1-1.32,3-1.19,4.72-1.13a385.87,385.87,0,0,0,74.06-4.85,67.81,67.81,0,0,1,13.91-1.08c10.18.49,20.26.65,30.31-1.58a20.54,20.54,0,0,1,10.37.7c5.5,1.66,11.22,1.67,16.86,1.27,26.44-1.85,52.81-1.59,79.31-.28,45.72,2.25,91.45,4.48,137.06,8.46,14.73,1.28,29.28,4.55,44,6,11.77,1.14,23.43,2.25,34.87,5.47,3.61,1,8,1.41,11.3-.44,6.75-3.75,13.4-2.52,20.21-1a40,40,0,0,0,9.94.76c4-.15,7.7.21,11.21,3,2.9,2.27,7.07,1.32,10.65,1.93,26.74,4.54,53.92,6.05,80.46,11.92a27.46,27.46,0,0,0,5,.2v7Z" />
|
||||
<path class="cls-3" d="M745.08,117.42a6.87,6.87,0,0,1,6.55-3.42c27.82.6,55.59-2.68,83.37-1.6,12.81.5,25.53-1.84,39.44-.08-15.41,3.07-29.79,5.87-44.45,4.38-15.41-1.57-30.6-.23-45.79,1.85a154.61,154.61,0,0,1-32.39,1C749.54,119.43,747.11,119.58,745.08,117.42Z" />
|
||||
<path class="cls-3" d="M1112,97.79c-.49,3.94-2.06,5.56-4.4,5.58-13.38.13-26.76.06-40.18-.71C1082.07,101,1096.8,100,1112,97.79Z" />
|
||||
<path class="cls-3" d="M1250.44,86.43c-13.82,5.76-28.44,6.35-43.07,6.89C1221.06,87,1235.78,86.81,1250.44,86.43Z" />
|
||||
<path class="cls-3" d="M1797.59,95.86a24.76,24.76,0,0,1,14,.59C1806.69,98.56,1802.16,96.87,1797.59,95.86Z" />
|
||||
<path class="cls-3" d="M1466,75.78c-2.53,1.71-5.1,2.94-8,.45Z" />
|
||||
<path class="cls-1" d="M26,13l.69.46c-.13.08-.34.26-.36.23a5.15,5.15,0,0,1-.47-.56Z" />
|
||||
<path class="cls-2" d="M455.44,106.08c7.45.11,13.77-1.08,20.22,1.27C466.78,113.29,464.17,113.19,455.44,106.08Z" />
|
||||
<path class="cls-2" d="M430.73,111.48c-5.51.25-11.19,1.19-17.39-2.49C420,108.62,425.32,110,430.73,111.48Z" />
|
||||
<path class="cls-2" d="M254.72,86.08a20.75,20.75,0,0,1-10.27-1.3C248.36,82.93,249,83,254.72,86.08Z" />
|
||||
<path class="cls-2" d="M595.84,115.33c-4.09.57-8.18,1.26-12.14-.63C587.77,114.32,591.85,113.32,595.84,115.33Z" />
|
||||
<path class="cls-2" d="M437.34,107.91c-5-.33-9.27,1-12-1.66C428.49,106.57,432.67,105.83,437.34,107.91Z" />
|
||||
<path class="cls-2" d="M125.77,55c-5.79.26-5.79.26-10.4-1.72C119.17,52.76,122.22,52.64,125.77,55Z" />
|
||||
<path class="cls-2" d="M306.28,88.54c2.79-3.29,2.86-3.29,7.24,0Z" />
|
||||
<path class="cls-2" d="M342.75,90.75c-3.69.13-6.2-.94-9.61-2.43C337.07,87.79,339.89,87.76,342.75,90.75Z" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-row container">
|
||||
<div class="contacter">
|
||||
<h1>Contactez-nous !</h1>
|
||||
<?php if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST)): ?>
|
||||
<?php if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST)) : ?>
|
||||
<?php if (isset($successMsg)) : ?>
|
||||
<p class="success-msg"><?= $successMsg; ?></p>
|
||||
<p class="success-msg"><?= esc_html($successMsg); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($errorMsg)): ?>
|
||||
<?php foreach ($errorMsg as $msg): ?>
|
||||
<p class="error-msg"><?= $msg; ?></p>
|
||||
<?php if (isset($errorMsg)) : ?>
|
||||
<?php foreach ($errorMsg as $msg) : ?>
|
||||
<p class="error-msg"><?= esc_html($msg); ?></p>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
|
@ -228,16 +259,14 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST)){
|
|||
</div>
|
||||
<div class="form-field">
|
||||
<p>Message*</p>
|
||||
<textarea name="message" cols="30" rows="10" placeholder="Taper ici votre message..."
|
||||
required></textarea>
|
||||
<textarea name="message" cols="30" rows="10" placeholder="Taper ici votre message..." required></textarea>
|
||||
</div>
|
||||
<div class="flex-row">
|
||||
<div class="form-field">
|
||||
<p>Pièce jointe</p>
|
||||
<label class="fichier">
|
||||
<span class="medium default contact-filename">Télécharger votre fichier...</span>
|
||||
<input type="file" name="files" placeholder="Télécharger votre fichier..." id="files"
|
||||
accept=".jpg,.jpeg,.png,.txt,.doc,.docx,.pdf,.odt">
|
||||
<input type="file" name="files" placeholder="Télécharger votre fichier..." id="files" accept=".jpg,.jpeg,.png,.txt,.doc,.docx,.pdf,.odt">
|
||||
<input type="hidden" name="MAX_FILE_SIZE" value="2000" />
|
||||
<i class="fa fa-download" aria-hidden="true"></i>
|
||||
</label>
|
||||
|
|
@ -257,6 +286,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST)){
|
|||
<div class="flex-row">
|
||||
<div class="form-field send">
|
||||
<input type="hidden" name="token" id="recaptchaResponse">
|
||||
<?= wp_nonce_field('submitcontact_' . wp_rand()); ?>
|
||||
<input type="submit" value="ENVOYER LE MESSAGE">
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -269,45 +299,42 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST)){
|
|||
<div class="trouver">
|
||||
<h2>Où nous trouver ?</h2>
|
||||
<div class="find">
|
||||
<a href="https://www.google.com/maps/place/R%C3%A9galette/@47.695001,-2.6432354,17z/data=!3m1!4b1!4m5!3m4!1s0x480fe0d91e3bb191:0x795b83be16c3ece1!8m2!3d47.6949974!4d-2.6410467?hl=fr"
|
||||
target="new"><img src='<?= get_template_directory_uri(); ?>/assets/images/contacts-map.png'
|
||||
alt="Itinéraire pour aller chez Régalette"></a>
|
||||
<a href="https://www.google.com/maps/place/R%C3%A9galette/@47.695001,-2.6432354,17z/data=!3m1!4b1!4m5!3m4!1s0x480fe0d91e3bb191:0x795b83be16c3ece1!8m2!3d47.6949974!4d-2.6410467?hl=fr" target="new"><img src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/contacts-map.png' alt="Itinéraire pour aller chez Régalette"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
let files = $("input[name=files]");
|
||||
|
||||
files.on('change', function (e) {
|
||||
files.on('change', function(e) {
|
||||
let file = $(this).prop('files')[0];
|
||||
if($(this).prop('files').length > 0) {
|
||||
if ($(this).prop('files').length > 0) {
|
||||
|
||||
let filesize = ((file.size/1024)/1024).toFixed(4); // MB
|
||||
let filesize = ((file.size / 1024) / 1024).toFixed(4); // MB
|
||||
|
||||
if (filesize > 2){
|
||||
if (filesize > 2) {
|
||||
alert("Poids de la pièce jointe supérieur à 2Mo.");
|
||||
files.val('');
|
||||
$(".contact-filename").html("Télécharger votre fichier...");
|
||||
}else{
|
||||
} else {
|
||||
$(".contact-filename").html(file.name);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("#contact-form").on('submit', function (e) {
|
||||
$("#contact-form").on('submit', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
grecaptcha.ready(function () {
|
||||
grecaptcha.execute('6Ler-r8ZAAAAABNsm3LJGTP8tMQ29AU8YDQ23xWS', { action: 'contact' }).then(function (token) {
|
||||
grecaptcha.ready(function() {
|
||||
grecaptcha.execute('<?= esc_attr(GOOGLE_RECAPTCHA_PUBLIC); ?>', {
|
||||
action: 'contact'
|
||||
}).then(function(token) {
|
||||
let recaptchaResponse = document.getElementById('recaptchaResponse');
|
||||
recaptchaResponse.value = token;
|
||||
$("#contact-form").unbind('submit').submit();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php get_footer(); ?>
|
||||
<?php get_footer(); ?>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* The template for Regalette
|
||||
*
|
||||
|
|
@ -9,14 +10,14 @@
|
|||
*/
|
||||
get_header();
|
||||
|
||||
$content = get_post_field('post_content', get_the_id());
|
||||
$content = get_post_field('post_content', get_the_id());
|
||||
?>
|
||||
<div class="main container">
|
||||
<div class="legals">
|
||||
<h1 class="title"><?php the_title(); ?></h1>
|
||||
<div class="content">
|
||||
<?php echo $content; ?>
|
||||
</div>
|
||||
<?= $content; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php get_footer(); ?>
|
||||
<?php get_footer(); ?>
|
||||
|
|
@ -20,8 +20,8 @@ $picture_bloc2 = get_field('picture_bloc2');
|
|||
|
||||
<div class="metiers">
|
||||
<div class="hero">
|
||||
<img class="img-bg" src='<?php echo $hero_format ?>' alt="">
|
||||
<div class="tregalette"><img src='<?= get_template_directory_uri(); ?>/assets/images/logo_tregalette.png' alt=""></div>
|
||||
<img class="img-bg" src='<?= esc_url($hero_format); ?>'>
|
||||
<div class="tregalette"><img src='<?= esc_url(esc_url(get_template_directory_uri())); ?>/assets/images/logo_tregalette.png' alt="Tregalette"></div>
|
||||
<div class="separate">
|
||||
<svg id="Calque_1" data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 125">
|
||||
<defs>
|
||||
|
|
@ -67,7 +67,7 @@ $picture_bloc2 = get_field('picture_bloc2');
|
|||
<div class="tableau">
|
||||
<ul>
|
||||
<li>
|
||||
<img src='<?= get_template_directory_uri(); ?>/assets/images/red.jpg' alt="Recherche & Développement">
|
||||
<img src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/red.jpg' alt="Recherche & Développement">
|
||||
<h2>Recherche &<br>Développement</h2>
|
||||
<div class="info">
|
||||
<p>Le service Recherche et Développement (R&D) assure la recherche et le développement de nouvelles matières premières, procédés ou produits afin de favoriser l’innovation et la compétitivité de l’entreprise.</p>
|
||||
|
|
@ -75,7 +75,7 @@ $picture_bloc2 = get_field('picture_bloc2');
|
|||
<div class="cta"><i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i></div>
|
||||
</li>
|
||||
<li>
|
||||
<img src='<?= get_template_directory_uri(); ?>/assets/images/commerce.jpg' alt="Commerce Marketing">
|
||||
<img src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/commerce.jpg' alt="Commerce Marketing">
|
||||
<h2>Commerce<br>Marketing</h2>
|
||||
<div class="info">
|
||||
<p>Le service Commercial et Marketing a pour objectif de répondre aux besoins des consommateurs et des clients pour développer les ventes de l’entreprise. Il doit apporter une solution aux nouvelles attentes en améliorant les produits ou en en proposant de nouveaux.</p>
|
||||
|
|
@ -83,7 +83,7 @@ $picture_bloc2 = get_field('picture_bloc2');
|
|||
<div class="cta"><i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i></div>
|
||||
</li>
|
||||
<li>
|
||||
<img src='<?= get_template_directory_uri(); ?>/assets/images/prod.jpg' alt="Production">
|
||||
<img src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/prod.jpg' alt="Production">
|
||||
<h2>Production</h2>
|
||||
<div class="info">
|
||||
<p>L’ équipe Production a pour mission de fabriquer les Crêpes et Galettes, nature ou garnies, en respectant les process établis, les cahiers des charges et en veillant à la sécurité alimentaire. Cela regroupe une large palette de métiers.</p>
|
||||
|
|
@ -91,7 +91,7 @@ $picture_bloc2 = get_field('picture_bloc2');
|
|||
<div class="cta"><i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i></div>
|
||||
</li>
|
||||
<li>
|
||||
<img src='<?= get_template_directory_uri(); ?>/assets/images/rh.jpg' alt="Ressources humaines">
|
||||
<img src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/rh.jpg' alt="Ressources humaines">
|
||||
<h2>Ressources<br>humaines</h2>
|
||||
<div class="info">
|
||||
<p>Le service Ressources Humaines (RH) s’occupe de la gestion du personnel sur le plan administratif (paie, contrats de travail, plannings…) et carrières (entretiens annuels, formations…).</p>
|
||||
|
|
@ -99,7 +99,7 @@ $picture_bloc2 = get_field('picture_bloc2');
|
|||
<div class="cta"><i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i></div>
|
||||
</li>
|
||||
<li>
|
||||
<img src='<?= get_template_directory_uri(); ?>/assets/images/klit.jpg' alt="Qualité Sécurité Environnement">
|
||||
<img src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/klit.jpg' alt="Qualité Sécurité Environnement">
|
||||
<h2>Qualité<br>Sécurité<br>Environnement</h2>
|
||||
<div class="info">
|
||||
<p>Le service Qualité Sécurité Environnement (QSE) garantit la qualité des produits dans le respect de la réglementation, la sécurité alimentaire et la sécurité des collaborateurs au travail ainsi que la préservation de l’environnement lié à la production.</p>
|
||||
|
|
@ -107,7 +107,7 @@ $picture_bloc2 = get_field('picture_bloc2');
|
|||
<div class="cta"><i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i></div>
|
||||
</li>
|
||||
<li>
|
||||
<img src='<?= get_template_directory_uri(); ?>/assets/images/maint.jpg' alt="Maintenance">
|
||||
<img src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/maint.jpg' alt="Maintenance">
|
||||
<h2>Maintenance</h2>
|
||||
<div class="info">
|
||||
<p>L’équipe Maintenance a pour mission d’assurer le bon fonctionnement des équipements et des bâtiments sur l’ensemble de l’atelier de fabrication et la gestion des projets d’investissements.</p>
|
||||
|
|
@ -115,7 +115,7 @@ $picture_bloc2 = get_field('picture_bloc2');
|
|||
<div class="cta"><i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i></div>
|
||||
</li>
|
||||
<li>
|
||||
<img src='<?= get_template_directory_uri(); ?>/assets/images/log.jpg' alt="Approvisionnements Prévisions de vente Logistique">
|
||||
<img src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/log.jpg' alt="Approvisionnements Prévisions de vente Logistique">
|
||||
<h2>Approvisionnements<br>Prévisions de vente<br>Logistique</h2>
|
||||
<div class="info">
|
||||
<p>Cette équipe doit se coordonner pour maîtriser le bon approvisionnement des matières auprès des fournisseurs et servir de façon optimale les clients. Ils sont en relation avec les fournisseurs, la production, le service commercial et les plateformes d’expédition.</p>
|
||||
|
|
@ -124,7 +124,7 @@ $picture_bloc2 = get_field('picture_bloc2');
|
|||
<div class="cta"><i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i></div>
|
||||
</li>
|
||||
<li>
|
||||
<img src='<?= get_template_directory_uri(); ?>/assets/images/adm.jpg' alt="Administratif">
|
||||
<img src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/adm.jpg' alt="Administratif">
|
||||
<h2>Administratif</h2>
|
||||
<div class="info">
|
||||
<p>Les fonctions administratives regroupent la comptabilité, le contrôle de gestion, l’administration des ventes et le service après vente. La comptabilité traite l’ensemble des factures et règlements et éditer les résultats financiers de l’entreprise. Le contrôle de gestion veille aux résultats et à la bonne performance économique.</p>
|
||||
|
|
@ -144,14 +144,14 @@ $picture_bloc2 = get_field('picture_bloc2');
|
|||
<?php if (!empty($title_bloc2) || !empty($text_bloc2) || !empty($picture_bloc2)) : ?>
|
||||
<div class="iep">
|
||||
<?php if (!empty($title_bloc2)) : ?>
|
||||
<p class="title"><?php echo $title_bloc2 ?></p>
|
||||
<p class="title"><?= esc_html($title_bloc2); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($text_bloc2)) : ?>
|
||||
<?php echo $text_bloc2 ?>
|
||||
<?= esc_html($text_bloc2); ?>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($picture_bloc2)) : ?>
|
||||
<div class="img-bloc2">
|
||||
<img src='<?php echo $picture_bloc2['url'] ?>' alt="<?php echo $picture_bloc2['alt'] ?>">
|
||||
<img src='<?= esc_url($picture_bloc2['url']); ?>' alt="<?= esc_attr($picture_bloc2['alt']); ?>">
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ $tabGammes = [];
|
|||
$tabProducts = [];
|
||||
$terms = get_terms('gamme');
|
||||
|
||||
foreach ($terms as $key => $term) {
|
||||
$tabGammes[$key]['data'] = $term;
|
||||
foreach ($terms as $key => $myTerm) {
|
||||
$tabGammes[$key]['data'] = $myTerm;
|
||||
$args = array(
|
||||
'post_type' => 'produit',
|
||||
'meta_key' => 'prod-order',
|
||||
|
|
@ -28,26 +28,26 @@ foreach ($terms as $key => $term) {
|
|||
array(
|
||||
'taxonomy' => 'gamme',
|
||||
'field' => 'term_id',
|
||||
'terms' => $term->term_id,
|
||||
'terms' => $myTerm->term_id,
|
||||
)
|
||||
)
|
||||
);
|
||||
$query = new WP_Query($args);
|
||||
$posts = $query->posts;
|
||||
$tabGammes[$key]['posts'] = $posts;
|
||||
$tabGammes[$key]['order'] = get_field('order', 'gamme_' . $term->term_id);
|
||||
$myPosts = $query->posts;
|
||||
$tabGammes[$key]['posts'] = $myPosts;
|
||||
$tabGammes[$key]['order'] = get_field('order', 'gamme_' . $myTerm->term_id);
|
||||
|
||||
foreach ($posts as $index => $post) {
|
||||
foreach ($myPosts as $index => $myPost) {
|
||||
$tabProduct = [];
|
||||
$tabProduct['id'] = $post->ID;
|
||||
$tabProduct['taxonomy'] = $term->term_id;
|
||||
$tabProduct['name'] = $post->post_title;
|
||||
$tabProduct['title'] = get_field('prod-title', $post->ID);
|
||||
$tabProduct['image'] = get_field('prod-img', $post->ID);
|
||||
$tabProduct['description'] = get_field('prod-description', $post->ID);
|
||||
$tabProduct['advices'] = get_field('prod-advices', $post->ID);
|
||||
$tabProduct['ing'] = get_field('prod-ing', $post->ID);
|
||||
$tabProduct['order'] = $tabGammes[$key]['order'] . get_field('prod-order', $post->ID);
|
||||
$tabProduct['id'] = $myPost->ID;
|
||||
$tabProduct['taxonomy'] = $myTerm->term_id;
|
||||
$tabProduct['name'] = $myPost->post_title;
|
||||
$tabProduct['title'] = get_field('prod-title', $myPost->ID);
|
||||
$tabProduct['image'] = get_field('prod-img', $myPost->ID);
|
||||
$tabProduct['description'] = get_field('prod-description', $myPost->ID);
|
||||
$tabProduct['advices'] = get_field('prod-advices', $myPost->ID);
|
||||
$tabProduct['ing'] = get_field('prod-ing', $myPost->ID);
|
||||
$tabProduct['order'] = $tabGammes[$key]['order'] . get_field('prod-order', $myPost->ID);
|
||||
$prodAdvices = get_field('pictogrammes');
|
||||
$tabProduct['pictos'] = [];
|
||||
if (!empty($prodAdvices)) {
|
||||
|
|
@ -65,8 +65,8 @@ array_multisort(array_column($tabGammes, "order"), SORT_ASC, $tabGammes);
|
|||
|
||||
<div class="produits">
|
||||
<div class="hero">
|
||||
<img class="img-bg" src='<?php echo $hero_format ?>' alt="">
|
||||
<div class="tregalette"><img src='<?= get_template_directory_uri(); ?>/assets/images/logo_tregalette.png' alt=""></div>
|
||||
<img class="img-bg" src='<?= esc_url($hero_format); ?>' alt="">
|
||||
<div class="tregalette"><img src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/logo_tregalette.png' alt=""></div>
|
||||
<div class="separate">
|
||||
<svg id="Calque_1" data-name="Calque 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 125">
|
||||
<defs>
|
||||
|
|
@ -111,54 +111,54 @@ array_multisort(array_column($tabGammes, "order"), SORT_ASC, $tabGammes);
|
|||
</div>
|
||||
<div class="infos container">
|
||||
<?php foreach ($tabGammes as $key => $value) : ?>
|
||||
<div class="menu" id="<?= $value['data']->slug; ?>">
|
||||
<h2 class="mobile-subtitle"><?= $value['data']->name; ?></h2>
|
||||
<div class="menu" id="<?= esc_attr($value['data']->slug); ?>">
|
||||
<h2 class="mobile-subtitle"><?= esc_html($value['data']->name); ?></h2>
|
||||
<div class="bulle">
|
||||
<div class="imgs">
|
||||
|
||||
<img src='<?= get_field('image', 'gamme_' . $value['data']->term_id); ?>' alt='<?= $value['data']->name; ?>'>
|
||||
<img src='<?= esc_url(get_field('image', 'gamme_' . esc_attr($value['data']->term_id))); ?>' alt='<?= esc_attr($value['data']->name); ?>'>
|
||||
<div class="circle circle1">
|
||||
<h2 class="circle-txt circle-txt1"><?= str_replace(' ', '<br>', $value['data']->name); ?></h2>
|
||||
<h2 class="circle-txt circle-txt1"><?= esc_attr(str_replace(' ', '<br>', $value['data']->name)); ?></h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<nav>
|
||||
<ul id='tax-<?= $value['data']->term_id; ?>'>
|
||||
<?php foreach ($value['posts'] as $key => $post) : ?>
|
||||
<ul id='tax-<?= esc_attr(esc_attr($value['data']->term_id)); ?>'>
|
||||
<?php foreach ($value['posts'] as $key => $myPost) : ?>
|
||||
<li>
|
||||
<a href="#" data-postid="<?= $post->ID; ?>" data-taxid='<?= $value['data']->term_id; ?>' <?php echo ($key === 0) ? ' class="clicked"' : ''; ?>>
|
||||
<img src='<?= get_template_directory_uri(); ?>/assets/images/hermine-sm.png' alt=""><span><?= $post->post_title; ?></span>
|
||||
<a href="#" data-postid="<?= esc_attr($myPost->ID); ?>" data-taxid='<?= esc_attr(esc_attr($value['data']->term_id)); ?>' <?php echo ($key === 0) ? ' class="clicked"' : ''; ?>>
|
||||
<img src='<?= esc_url(get_template_directory_uri()); ?>/assets/images/hermine-sm.png' alt=""><span><?= esc_html($myPost->post_title); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="caracteristiques tax-<?= $value['data']->term_id; ?>-caracteristiques animate__flip">
|
||||
<div class="caracteristiques tax-<?= esc_attr($value['data']->term_id); ?>-caracteristiques animate__flip">
|
||||
<div class="product-name">
|
||||
<p class="p-title-<?= $value['data']->term_id; ?>"><?= get_field('prod-title', $value['posts'][0]->ID); ?></p>
|
||||
<p class="p-title-<?= esc_attr($value['data']->term_id); ?>"><?= esc_html(get_field('prod-title', $value['posts'][0]->ID)); ?></p>
|
||||
</div>
|
||||
<div class="product-description">
|
||||
<div class="p-description-<?= $value['data']->term_id; ?>"><?= get_field('prod-description', $value['posts'][0]->ID); ?></div>
|
||||
<div class="p-description-<?= esc_attr($value['data']->term_id); ?>"><?= esc_html(get_field('prod-description', $value['posts'][0]->ID)); ?></div>
|
||||
</div>
|
||||
<div class="middle">
|
||||
<div class="low-left">
|
||||
<div class="product-prep">
|
||||
<div class="p-advices-<?= $value['data']->term_id; ?>"><?= get_field('prod-advices', $value['posts'][0]->ID); ?></div>
|
||||
<div class="p-advices-<?= esc_attr($value['data']->term_id); ?>"><?= esc_html(get_field('prod-advices', $value['posts'][0]->ID)); ?></div>
|
||||
</div>
|
||||
<div class="product-ing">
|
||||
<div class="p-ing-<?= $value['data']->term_id; ?>"><?= get_field('prod-ing', $value['posts'][0]->ID); ?></div>
|
||||
<div class="p-ing-<?= esc_attr($value['data']->term_id); ?>"><?= esc_html(get_field('prod-ing', $value['posts'][0]->ID)); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="product-picture">
|
||||
<img class="img-prod-<?= $value['data']->term_id; ?>" src='<?= get_field('prod-img', $value['posts'][0]->ID); ?>' alt='<?= get_field('prod-title', $value['posts'][0]->ID); ?>'>
|
||||
<img class="img-prod-<?= esc_attr($value['data']->term_id); ?>" src='<?= esc_url(get_field('prod-img', $value['posts'][0]->ID)); ?>' alt='<?= esc_attr(get_field('prod-title', $value['posts'][0]->ID)); ?>'>
|
||||
</div>
|
||||
<div class="product-class">
|
||||
<?php $prodAdvices = get_field('pictogrammes', $value['posts'][0]->ID); ?>
|
||||
<?php if (!empty($prodAdvices)) : ?>
|
||||
<?php foreach ($prodAdvices as $pictogramme) : ?>
|
||||
<?php if (!empty($pictogramme)) : ?>
|
||||
<img class="picto-prod-<?= $value['data']->term_id; ?>" src='<?= $pictogramme['image']['url']; ?>' alt="">
|
||||
<img class="picto-prod-<?= esc_attr($value['data']->term_id); ?>" src='<?= esc_url($pictogramme['image']['url']); ?>'>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
|
@ -171,13 +171,13 @@ array_multisort(array_column($tabGammes, "order"), SORT_ASC, $tabGammes);
|
|||
<p>Nous fabriquons également des produits pour les Marques de Distributeur, la Restauration Hors Foyer ou l'export.<br>L'entreprise est certifiée IFS.<br>N'hésitez pas à nous contacter pour avoir plus de renseignements.</p>
|
||||
</div>
|
||||
<div class="button">
|
||||
<a class="btn" href='<?= get_site_url(); ?>/contacts/'>
|
||||
<a class="btn" href='<?= esc_url(get_site_url()); ?>/contacts/'>
|
||||
<h3>Nous contacter</h3>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
let productsTab = <?= json_encode($tabProducts, JSON_PRETTY_PRINT); ?>;
|
||||
let productsTab = <?= wp_json_encode($tabProducts, JSON_PRETTY_PRINT); ?>;
|
||||
$(document).ready(function() {
|
||||
$(".produits li a").click(function(e) {
|
||||
e.preventDefault();
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -4,5 +4,7 @@
|
|||
<arg name="extensions" value="php"/>
|
||||
<file>content/themes</file>
|
||||
<exclude-pattern>content/plugins*</exclude-pattern>
|
||||
<rule ref="WordPress-VIP-Go" />
|
||||
<rule ref="WordPress-VIP-Go">
|
||||
<exclude name="WordPressVIPMinimum.Functions.RestrictedFunctions.wp_remote_get_wp_remote_get" />
|
||||
</rule>
|
||||
</ruleset>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
require_once 'vendor/autoload.php';
|
||||
Dotenv\Dotenv::createImmutable(__DIR__)->load();
|
||||
|
||||
|
||||
// Custom Dotenv Boolean Support
|
||||
if (! function_exists('evalBool')) {
|
||||
function evalBool($value)
|
||||
|
|
@ -11,7 +10,6 @@ if (! function_exists('evalBool')) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* La configuration de base de votre installation WordPress.
|
||||
*
|
||||
|
|
@ -35,7 +33,7 @@ if (! function_exists('evalBool')) {
|
|||
define('ENV_LOCAL', 'local');
|
||||
define('ENV_DEV', 'development');
|
||||
define('ENV_PROD', 'production');
|
||||
define('ENV', getenv('ENVIRONMENT'));
|
||||
define('ENV', $_ENV['ENVIRONMENT']);
|
||||
|
||||
if (isset($_SERVER["HTTP_X_FORWARDED_PROTO"] ) && "https" == $_SERVER["HTTP_X_FORWARDED_PROTO"] ) {
|
||||
$_SERVER["HTTPS"] = "on";
|
||||
|
|
@ -56,16 +54,16 @@ if (ENV === ENV_PROD) {
|
|||
|
||||
// ** Réglages MySQL - Votre hébergeur doit vous fournir ces informations. ** //
|
||||
/** The name of the database for WordPress */
|
||||
define('DB_NAME', getenv('DB_NAME'));
|
||||
define('DB_NAME', $_ENV['DB_NAME']);
|
||||
|
||||
/** MySQL database username */
|
||||
define('DB_USER', getenv('DB_USER'));
|
||||
define('DB_USER', $_ENV['DB_USER']);
|
||||
|
||||
/** MySQL database password */
|
||||
define('DB_PASSWORD', getenv('DB_PASSWORD'));
|
||||
define('DB_PASSWORD', $_ENV['DB_PASSWORD']);
|
||||
|
||||
/** MySQL hostname */
|
||||
define('DB_HOST', getenv('DB_HOST'));
|
||||
define('DB_HOST', $_ENV['DB_HOST']);
|
||||
|
||||
/** Database Charset to use in creating database tables. */
|
||||
define( 'DB_CHARSET', 'utf8mb4' );
|
||||
|
|
@ -101,7 +99,7 @@ define( 'NONCE_SALT', '@q)9^N|D@;Ltu%j>9f;`#YYB=qHkaq*mmsz]D;iAG3$I1qwZP=<
|
|||
* si vous leur donnez chacune un préfixe unique.
|
||||
* N’utilisez que des chiffres, des lettres non-accentuées, et des caractères soulignés !
|
||||
*/
|
||||
$table_prefix = getenv('DB_PREFIX');
|
||||
$table_prefix = $_ENV['DB_PREFIX'];
|
||||
/** Changement du nom du répertoire wp-content => content. */
|
||||
define ('WP_CONTENT_FOLDERNAME', 'content');
|
||||
define ('WP_CONTENT_DIR', ABSPATH . WP_CONTENT_FOLDERNAME) ;
|
||||
|
|
@ -130,29 +128,27 @@ 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('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', getenv('CONTACT_RECIPIENT'));
|
||||
define('CONTACT_RECIPIENT', $_ENV['CONTACT_RECIPIENT']);
|
||||
|
||||
define( 'SCRIPT_DEBUG', evalBool(getenv('SCRIPT_DEBUG')) );
|
||||
define('WP_DEBUG', evalBool(getenv('WP_DEBUG')));
|
||||
define('WP_DEBUG_DISPLAY', evalBool(getenv('WP_DEBUG_DISPLAY')));
|
||||
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(getenv('WP_HTTP_BLOCK_EXTERNAL')));
|
||||
define('WP_HTTP_BLOCK_EXTERNAL', evalBool($_ENV['WP_HTTP_BLOCK_EXTERNAL']));
|
||||
|
||||
/* Google Recaptcha */
|
||||
define('GOOGLE_RECAPTCHA_PUBLIC', $_ENV['GOOGLE_RECAPTCHA_PUBLIC']);
|
||||
define('GOOGLE_RECAPTCHA_PRIVATE', $_ENV['GOOGLE_RECAPTCHA_PRIVATE']);
|
||||
/* Google analytics */
|
||||
define('GOOGLE_ANALYTICS', $_ENV['GOOGLE_ANALYTICS']);
|
||||
|
||||
/* CRM */
|
||||
define( 'CRM_PLATOS_WSDL', getenv('CRM_PLATOS_WSDL') );
|
||||
define( 'WS_SERVCE_LOGIN', getenv('WS_SERVCE_LOGIN') );
|
||||
define( 'WS_SERVCE_PASSWORD', getenv('WS_SERVCE_PASSWORD') );
|
||||
|
||||
/* C’est tout, ne touchez pas à ce qui suit ! */
|
||||
|
||||
/** Chemin absolu vers le dossier de WordPress. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue