Refactor : admin correction de la boucle pour prendre en compte le statut offline et colonne conseiller
This commit is contained in:
parent
8e3a12f62a
commit
98c2e43f6f
|
|
@ -67,10 +67,10 @@ function metiers_patrimoine_artisans_handle_posts_custom_columns($column)
|
|||
$conseiller = get_field('conseiller', $post_id);
|
||||
if (!isset($conseiller)) return;
|
||||
|
||||
$conseillerDatas = get_userdata($conseiller);
|
||||
if (!isset($conseillerDatas->display_name)) return;
|
||||
// $conseillerDatas = get_userdata($conseiller);
|
||||
// if (!isset($conseillerDatas->display_name)) return;
|
||||
|
||||
echo $conseillerDatas->display_name;
|
||||
echo $conseiller['display_name'];
|
||||
}
|
||||
if ($column == 'state') {
|
||||
$status = get_post_status($post_id);
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ $not_found_message = $args['not_found_message'] ?? "";
|
|||
$queryAllUnaffectedArtisansByStatus = array(
|
||||
'post_type' => 'artisans',
|
||||
'posts_per_page' => -1,
|
||||
'post_status' => array('publish', 'offline'),
|
||||
'meta_query' => array(
|
||||
'relation' => 'AND',
|
||||
array(
|
||||
|
|
@ -49,6 +50,7 @@ $queryAllUnaffectedArtisansByStatus = array(
|
|||
$queryConseillerRelatedArtisansByStatus = array(
|
||||
'post_type' => 'artisans',
|
||||
'posts_per_page' => -1,
|
||||
'post_status' => array('publish', 'offline'),
|
||||
'meta_key' => 'conseiller',
|
||||
'meta_value' => $current_user_id,
|
||||
'meta_query' => array(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user