From daa9dcae9b5b34b7f01fa46aa8750a4e2c47c433 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Mon, 27 May 2024 11:10:46 +0200 Subject: [PATCH] switching function call from getParentThematique to getMainThematique --- header-demo-components.php | 2 +- includes/admin.php | 2 +- single.php | 2 +- template-components/archives/brochure-rows.php | 2 +- template-components/archives/fiche-info-rows.php | 4 ++-- template-components/archives/webinaire-rows.php | 2 +- template-components/footer/menu-renovateur-footer.php | 2 +- template-components/header/menu-renovateur.php | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/header-demo-components.php b/header-demo-components.php index 7766be8..a1b6d20 100644 --- a/header-demo-components.php +++ b/header-demo-components.php @@ -45,7 +45,7 @@ slug); ?> diff --git a/includes/admin.php b/includes/admin.php index d446229..ce51e73 100644 --- a/includes/admin.php +++ b/includes/admin.php @@ -279,7 +279,7 @@ function wpdocs_admin_classes($classes) $thematique = get_the_terms(get_the_ID(), 'thematiques')[0] ?? null; if (!$thematique) return $classes; - $thematiqueParent = getParentThematique($thematique); + $thematiqueParent = getMainThematique($thematique); $thematiqueColorSlug = getThematiqueFamilySlug($thematiqueParent->slug); $postType = get_post_type($post->ID) ?? null; diff --git a/single.php b/single.php index 845218a..1a7af6f 100644 --- a/single.php +++ b/single.php @@ -8,7 +8,7 @@ get_header(); while (have_posts()) : the_post(); $thematique = get_the_terms(get_the_ID(), 'thematiques')[0]; - $thematiqueParent = getParentThematique($thematique); + $thematiqueParent = getMainThematique($thematique); $thematiqueColorSlug = getThematiqueFamilySlug($thematiqueParent->slug); ?> diff --git a/template-components/archives/brochure-rows.php b/template-components/archives/brochure-rows.php index a681305..33a27a6 100644 --- a/template-components/archives/brochure-rows.php +++ b/template-components/archives/brochure-rows.php @@ -12,7 +12,7 @@ $brochuresPosts = $args['brochuresPosts']; $brochureCover = $brochurePdf['ID'] ? get_field('brochure_cover_image', $brochurePdf['ID']) : null; $brochureEdition = get_field('brochure_edition', get_the_id()) ?? null; $thematique = get_the_terms(get_the_id(), 'thematiques')[0] ?? null; - $rootThematic = getParentThematique($thematique) ?? null; + $rootThematic = getMainThematique($thematique) ?? null; ?>
  • diff --git a/template-components/archives/fiche-info-rows.php b/template-components/archives/fiche-info-rows.php index d5de1e7..ed47de7 100644 --- a/template-components/archives/fiche-info-rows.php +++ b/template-components/archives/fiche-info-rows.php @@ -11,7 +11,7 @@ $fichesInfosPosts = $args['fichesInfosPosts']; $thematiques = get_the_terms(get_the_ID(), 'thematiques'); $mainThematique = get_the_terms(get_the_ID(), 'thematiques')[0] ?? null; - $rootThematic = getParentThematique($mainThematique) ?? null; + $rootThematic = getMainThematique($mainThematique) ?? null; $rootThematicIcon = get_field('taxonomy_pictures', "thematiques_" . $rootThematic->term_id)['icon'] ?? null; @@ -27,7 +27,7 @@ $fichesInfosPosts = $args['fichesInfosPosts']; term_id)['icon'] ?? null; ?>

    name ?>

    diff --git a/template-components/archives/webinaire-rows.php b/template-components/archives/webinaire-rows.php index d1c0a09..941ac2b 100644 --- a/template-components/archives/webinaire-rows.php +++ b/template-components/archives/webinaire-rows.php @@ -5,7 +5,7 @@ $videosWebinairesPosts = $args['videosWebinairesPosts']; have_posts()) : while ($videosWebinairesPosts->have_posts()) : $videosWebinairesPosts->the_post(); ?> type === "post_type" && $item->type_label === "Conseil") : ?> object_id, "thematiques")[0]; - $postParentThematique = getParentThematique($postThematique); + $postParentThematique = getMainThematique($postThematique); $thematiqueCover = get_field('taxonomy_pictures', "thematiques_" . $postParentThematique->term_id); $thematiqueColorslug = getThematiqueFamilySlug($postThematique->slug); ?> diff --git a/template-components/header/menu-renovateur.php b/template-components/header/menu-renovateur.php index 88f95c6..eef6f56 100644 --- a/template-components/header/menu-renovateur.php +++ b/template-components/header/menu-renovateur.php @@ -104,7 +104,7 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full'); type === "post_type" && $item->type_label === "Conseil") : ?> object_id, "thematiques")[0]; - $postParentThematique = getParentThematique($postThematique); + $postParentThematique = getMainThematique($postThematique); $thematiqueCover = get_field('taxonomy_pictures', "thematiques_" . $postParentThematique->term_id); $thematiqueColorslug = getThematiqueFamilySlug($postThematique->slug); ?>