Compare commits
2 Commits
a869d6fbb2
...
f57d20dae7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f57d20dae7 | ||
|
|
32bab92ec9 |
|
|
@ -122,8 +122,6 @@ function generate_artisans_datas_to_csv()
|
|||
}
|
||||
|
||||
|
||||
write_log($mdp_status);
|
||||
|
||||
fputcsv($file, [
|
||||
$artisan->post_title,
|
||||
$formattedPhoneNumber,
|
||||
|
|
|
|||
|
|
@ -107,20 +107,16 @@ function populate_personns()
|
|||
$post_nl_ID = apply_filters('wpml_object_id', $post_fr_ID, 'artisans', FALSE, 'nl');
|
||||
|
||||
|
||||
write_log($post_fr_ID);
|
||||
write_log($post_nl_ID);
|
||||
|
||||
// Récupérer les membres existants
|
||||
$existing_members_fr = is_array(get_field('company_members', $post_fr_ID)) ? get_field('company_members', $post_fr_ID) : [];
|
||||
$existing_members_nl = is_array(get_field('company_members', $post_nl_ID)) ? get_field('company_members', $post_nl_ID) : [];
|
||||
// write_log($existing_members_fr);
|
||||
// write_log($existing_members_nl);
|
||||
|
||||
|
||||
// Build des données du contenu flexible
|
||||
$user_data_fr = build_personn_fr($row);
|
||||
$user_data_nl = build_personn_nl($row);
|
||||
|
||||
// write_log($user_data_fr);
|
||||
// write_log($user_data_nl);
|
||||
|
||||
|
||||
$updatedMembersArrayFr = $existing_members_fr;
|
||||
$updatedMembersArrayNl = $existing_members_nl;
|
||||
|
|
@ -129,9 +125,6 @@ function populate_personns()
|
|||
array_push($updatedMembersArrayNl, $user_data_nl);
|
||||
|
||||
|
||||
// write_log($updatedMembersArrayFr);
|
||||
// write_log($updatedMembersArrayNl);
|
||||
|
||||
$field_key = 'field_670d268f2b324';
|
||||
update_field($field_key, $updatedMembersArrayFr, $post_fr_ID);
|
||||
update_field($field_key, $updatedMembersArrayNl, $post_nl_ID);
|
||||
|
|
@ -168,8 +161,6 @@ function get_multiple_members_from_artisans()
|
|||
|
||||
return $filteredPosts;
|
||||
|
||||
// write_log($newsPostsDatas->posts);
|
||||
|
||||
}
|
||||
|
||||
function show_acf_repeator()
|
||||
|
|
|
|||
|
|
@ -149,7 +149,6 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
|
|||
)
|
||||
);
|
||||
$chantiers = new WP_Query($args);
|
||||
// write_log($chantiers->posts);
|
||||
?>
|
||||
<?php if ($chantiers->posts): ?>
|
||||
<section class="artisans-post__section artisans-post__section--chantiers">
|
||||
|
|
@ -172,48 +171,6 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
|
|||
$pictures = get_field('pictures', $current_chantier_ID);
|
||||
$chantier_name = get_field('chantier_name', $current_chantier_ID);
|
||||
|
||||
|
||||
if ($current_chantier_ID === 8917 || $current_chantier_ID === 2732) {
|
||||
// write_log($current_chantier_ID);
|
||||
// write_log($chantier_name);
|
||||
// write_log($pictures);
|
||||
}
|
||||
|
||||
|
||||
// Si déjà en français, inutile de switcher
|
||||
// if ($current_lang !== 'fr') {
|
||||
// // LANGUAGE IS NL
|
||||
// $chantier_name = get_field('chantier_name', $chantier_fr_id);
|
||||
// // $pictures = get_field('pictures', $chantier_fr_id);
|
||||
// if ($chantier_fr_id == 2732) {
|
||||
|
||||
// write_log($current_lang);
|
||||
// write_log("on est en NL ON SWITCHE");
|
||||
// do_action('wpml_switch_language', 'fr');
|
||||
// write_log($chantier_fr_id);
|
||||
// }
|
||||
// do_action('wpml_switch_language', $current_lang); // Revenir à la langue d’origine
|
||||
|
||||
// } else {
|
||||
// // LANGUAGE IS FR
|
||||
|
||||
// $pictures = get_field('pictures', $current_chantier_ID);
|
||||
// $test = get_field_object('pictures', $chantier_fr_id);
|
||||
// if ($chantier_fr_id == 2732) {
|
||||
// write_log($test);
|
||||
// write_log($chantier_name);
|
||||
// // write_log($pictures);
|
||||
// // write_log($pictures);
|
||||
// write_log($chantier_fr_id);
|
||||
// write_log(get_the_ID());
|
||||
// // write_log($pictures);
|
||||
// }
|
||||
|
||||
|
||||
// // On est déjà en FR, on ne switch pas
|
||||
// }
|
||||
|
||||
|
||||
?>
|
||||
<div class="chantier">
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ $postConseilPatrimoine = get_posts(array(
|
|||
)
|
||||
));
|
||||
|
||||
// write_log($postConseilPatrimoine);
|
||||
|
||||
$postConseilPatrimoineUrl = get_permalink($postConseilPatrimoine[0]->ID);
|
||||
$thematique_picture = get_field('taxonomy_pictures', "thematiques_" . $patrimoineTerm->term_id)['illustration_s'] ?? null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user