From 97fc8b7aaa8e16c27a7c2ee00c0640ce5e9d6004 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Thu, 27 Feb 2025 09:41:26 +0100 Subject: [PATCH] switching dahsboard-widget to a new folder template --- includes/dashboard-widget.php | 68 +---------------------- template-parts/admin/personnal-widget.php | 65 ++++++++++++++++++++++ 2 files changed, 66 insertions(+), 67 deletions(-) create mode 100644 template-parts/admin/personnal-widget.php diff --git a/includes/dashboard-widget.php b/includes/dashboard-widget.php index 26cfc05..d28bfe9 100644 --- a/includes/dashboard-widget.php +++ b/includes/dashboard-widget.php @@ -14,73 +14,7 @@ function custom_dashboard_widget() 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 !

-
-

Artisans associƩs : posts) ?>

-
-
- posts); - ?> - -

Aucun artisan en attente d'action

- "count"> action requise - -

Actions requises()

- - - -
- - Pannel de gestion -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 + ) + ); + + $posts_to_show = 5; + +?> +

Bonjour !

+
+

Artisans associƩs : posts) ?>

+
+
+ posts); + ?> + +

Aucun artisan en attente d'action

+ +

Actions requises()

+ + + +
+ + Pannel de gestion +