From cea0d1d010a72bb280abca0fb91e9c336657c02e Mon Sep 17 00:00:00 2001 From: Antoine M Date: Tue, 25 Feb 2025 17:41:18 +0100 Subject: [PATCH] refining personnal widget --- includes/dashboard-widget.php | 63 ++++++++++++++++++- .../dashboard/advisor-dashboard-widget.css | 52 ++++++++++++++- 2 files changed, 113 insertions(+), 2 deletions(-) diff --git a/includes/dashboard-widget.php b/includes/dashboard-widget.php index 904894d..26cfc05 100644 --- a/includes/dashboard-widget.php +++ b/includes/dashboard-widget.php @@ -16,9 +16,70 @@ function custom_dashboard_widget_display() { $current_user = wp_get_current_user(); $user_name = $current_user->user_login; + + + + $args = array( + 'post_type' => 'artisans', + 'meta_key' => 'conseiller', + 'meta_value' => $current_user->ID, + 'posts_per_page' => -1 + ); + + $user_attached_artisans = new WP_Query($args); + + + + $required_actions_artisans = new WP_Query( + array( + 'post_type' => 'artisans', + 'meta_key' => 'conseiller', + 'meta_value' => $current_user->ID, + 'meta_query' => array( + array( + 'key' => 'required_action', + 'value' => true, + 'compare' => '=' + ) + ), + 'posts_per_page' => -1 + ) + ); + ?>

Bonjour !

-

Ceci est un widget personnalisé. Vous pouvez afficher ici des infos utiles, des liens ou tout autre contenu.

+
+

Artisans associés : posts) ?>

+
+
+ posts); + ?> + +

Aucun artisan en attente d'action

+ "count"> action requise + +

Actions requises()

+ + + +
+ + Pannel de gestion