From 51312bf17abd6c9dedea95aca7eece3bfc85eaa1 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Mon, 7 Apr 2025 12:17:46 +0200 Subject: [PATCH] FEAT handling return to button --- includes/artisans.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/artisans.php b/includes/artisans.php index 6c995bb..9f23c07 100644 --- a/includes/artisans.php +++ b/includes/artisans.php @@ -96,8 +96,6 @@ add_action('edit_form_after_title', function () { jQuery(function($) { $('#set-offline-status').on('click', function(e) { e.preventDefault(); - - // Mettre à jour le champ caché du statut du post $('#post_status').val('offline'); $('#post-status-display').text('Hors ligne'); $('#publish').trigger('click'); @@ -161,6 +159,10 @@ function render_custom_chantier_box_content($post) if ($chantiers->have_posts()) { + $artisan_id = get_the_ID(); + $return_to = get_edit_post_link($artisan_id); + + echo '

Chantiers réalisé par l\'entreprise

'; echo ''; - echo 'Ajouter un chantier'; + echo 'Ajouter un chantier'; } else { echo '

Chantiers réalisés

'; echo '

Aucun chantier pour cette entreprise

'; - echo 'Ajouter un chantier'; + echo 'Ajouter un chantier'; } }